From dc6b8e72fed2586239e3514819238c520636c9d9 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:54:04 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdewebdev@1157656 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kfilereplace/commandengine.cpp | 80 +- kfilereplace/commandengine.h | 20 +- kfilereplace/configurationclasses.cpp | 24 +- kfilereplace/configurationclasses.h | 116 +- kfilereplace/kaddstringdlg.cpp | 68 +- kfilereplace/kaddstringdlg.h | 6 +- kfilereplace/kfilereplace.cpp | 16 +- kfilereplace/kfilereplaceiface.h | 2 +- kfilereplace/kfilereplacelib.cpp | 62 +- kfilereplace/kfilereplacelib.h | 12 +- kfilereplace/kfilereplacepart.cpp | 352 +++--- kfilereplace/kfilereplacepart.h | 24 +- kfilereplace/kfilereplaceview.cpp | 128 +-- kfilereplace/kfilereplaceview.h | 20 +- kfilereplace/knewprojectdlg.cpp | 124 +-- kfilereplace/knewprojectdlg.h | 12 +- kfilereplace/koptionsdlg.cpp | 54 +- kfilereplace/koptionsdlg.h | 4 +- kfilereplace/report.cpp | 36 +- kfilereplace/report.h | 4 +- kfilereplace/whatthis.h | 70 +- kimagemapeditor/arealistview.cpp | 24 +- kimagemapeditor/arealistview.h | 10 +- kimagemapeditor/drawzone.cpp | 192 ++-- kimagemapeditor/drawzone.h | 78 +- kimagemapeditor/imagemap.cpp | 112 +- kimagemapeditor/imagemap.h | 50 +- kimagemapeditor/imageslistview.cpp | 24 +- kimagemapeditor/imageslistview.h | 6 +- kimagemapeditor/kimagemapeditor.cpp | 542 ++++----- kimagemapeditor/kimagemapeditor.h | 88 +- kimagemapeditor/kimearea.cpp | 412 +++---- kimagemapeditor/kimearea.h | 196 ++-- kimagemapeditor/kimecommands.cpp | 8 +- kimagemapeditor/kimecommands.h | 10 +- kimagemapeditor/kimedialogs.cpp | 340 +++--- kimagemapeditor/kimedialogs.h | 102 +- kimagemapeditor/kimeshell.cpp | 36 +- kimagemapeditor/mapslistview.cpp | 70 +- kimagemapeditor/mapslistview.h | 34 +- kimagemapeditor/qextfileinfo.cpp | 84 +- kimagemapeditor/qextfileinfo.h | 22 +- klinkstatus/src/actionmanager.cpp | 34 +- klinkstatus/src/actionmanager.h | 6 +- klinkstatus/src/engine/linkchecker.cpp | 60 +- klinkstatus/src/engine/linkchecker.h | 20 +- klinkstatus/src/engine/linkfilter.cpp | 2 +- klinkstatus/src/engine/linkfilter.h | 8 +- klinkstatus/src/engine/linkstatus.cpp | 16 +- klinkstatus/src/engine/linkstatus.h | 56 +- klinkstatus/src/engine/linkstatus_impl.h | 32 +- klinkstatus/src/engine/searchmanager.cpp | 62 +- klinkstatus/src/engine/searchmanager.h | 40 +- klinkstatus/src/engine/searchmanager_impl.h | 10 +- klinkstatus/src/global.cpp | 56 +- klinkstatus/src/global.h | 12 +- klinkstatus/src/klinkstatus.cpp | 22 +- klinkstatus/src/klinkstatus_part.cpp | 12 +- klinkstatus/src/klinkstatus_part.h | 6 +- klinkstatus/src/parser/htmlparser.cpp | 74 +- klinkstatus/src/parser/htmlparser.h | 20 +- klinkstatus/src/parser/http.cpp | 12 +- klinkstatus/src/parser/http.h | 28 +- klinkstatus/src/parser/mstring.cpp | 34 +- klinkstatus/src/parser/mstring.h | 64 +- klinkstatus/src/parser/node.cpp | 14 +- klinkstatus/src/parser/node.h | 96 +- klinkstatus/src/parser/node_impl.h | 64 +- klinkstatus/src/parser/url.cpp | 42 +- klinkstatus/src/parser/url.h | 14 +- klinkstatus/src/ui/celltooltip.cpp | 14 +- klinkstatus/src/ui/celltooltip.h | 6 +- klinkstatus/src/ui/documentrootdialog.cpp | 30 +- klinkstatus/src/ui/documentrootdialog.h | 14 +- klinkstatus/src/ui/klshistorycombo.cpp | 40 +- klinkstatus/src/ui/klshistorycombo.h | 6 +- klinkstatus/src/ui/resultssearchbar.cpp | 76 +- klinkstatus/src/ui/resultssearchbar.h | 10 +- klinkstatus/src/ui/resultview.cpp | 18 +- klinkstatus/src/ui/resultview.h | 34 +- klinkstatus/src/ui/sessionwidget.cpp | 102 +- klinkstatus/src/ui/sessionwidget.h | 18 +- .../src/ui/settings/configidentificationdialog.cpp | 6 +- .../src/ui/settings/configidentificationdialog.h | 2 +- klinkstatus/src/ui/tablelinkstatus.cpp | 166 +-- klinkstatus/src/ui/tablelinkstatus.h | 64 +- klinkstatus/src/ui/tabwidgetsession.cpp | 54 +- klinkstatus/src/ui/tabwidgetsession.h | 12 +- klinkstatus/src/ui/treeview.cpp | 110 +- klinkstatus/src/ui/treeview.h | 40 +- klinkstatus/src/utils/utils.cpp | 18 +- klinkstatus/src/utils/utils.h | 8 +- klinkstatus/src/utils/xsl.cpp | 130 +-- klinkstatus/src/utils/xsl.h | 14 +- kommander/editor/actiondnd.cpp | 500 ++++----- kommander/editor/actiondnd.h | 222 ++-- kommander/editor/actioneditorimpl.cpp | 88 +- kommander/editor/actioneditorimpl.h | 12 +- kommander/editor/actionlistview.cpp | 46 +- kommander/editor/actionlistview.h | 18 +- kommander/editor/asciivalidator.cpp | 20 +- kommander/editor/asciivalidator.h | 12 +- kommander/editor/assistproc.cpp | 14 +- kommander/editor/assistproc.h | 16 +- kommander/editor/assoctexteditorimpl.cpp | 126 +-- kommander/editor/assoctexteditorimpl.h | 48 +- kommander/editor/choosewidgetimpl.cpp | 56 +- kommander/editor/choosewidgetimpl.h | 12 +- kommander/editor/command.cpp | 472 ++++---- kommander/editor/command.h | 374 +++---- kommander/editor/connectioneditorimpl.cpp | 118 +- kommander/editor/connectioneditorimpl.h | 24 +- kommander/editor/defs.cpp | 50 +- kommander/editor/defs.h | 10 +- kommander/editor/filechooser.cpp | 32 +- kommander/editor/filechooser.h | 16 +- kommander/editor/formfile.cpp | 56 +- kommander/editor/formfile.h | 18 +- kommander/editor/formsettingsimpl.cpp | 6 +- kommander/editor/formsettingsimpl.h | 2 +- kommander/editor/formwindow.cpp | 852 +++++++------- kommander/editor/formwindow.h | 212 ++-- kommander/editor/functionsimpl.cpp | 106 +- kommander/editor/functionsimpl.h | 26 +- kommander/editor/globaldefs.h | 14 +- kommander/editor/hierarchyview.cpp | 294 ++--- kommander/editor/hierarchyview.h | 94 +- kommander/editor/iconvieweditorimpl.cpp | 36 +- kommander/editor/iconvieweditorimpl.h | 8 +- kommander/editor/layout.cpp | 226 ++-- kommander/editor/layout.h | 66 +- kommander/editor/listboxeditorimpl.cpp | 56 +- kommander/editor/listboxeditorimpl.h | 8 +- kommander/editor/listvieweditorimpl.cpp | 148 +-- kommander/editor/listvieweditorimpl.h | 34 +- kommander/editor/mainwindow.cpp | 598 +++++----- kommander/editor/mainwindow.h | 110 +- kommander/editor/mainwindowactions.cpp | 322 +++--- kommander/editor/messagelog.cpp | 48 +- kommander/editor/messagelog.h | 12 +- kommander/editor/metadatabase.cpp | 362 +++--- kommander/editor/metadatabase.h | 206 ++-- kommander/editor/multilineeditorimpl.cpp | 20 +- kommander/editor/multilineeditorimpl.h | 8 +- kommander/editor/newformimpl.cpp | 72 +- kommander/editor/newformimpl.h | 20 +- kommander/editor/orderindicator.cpp | 36 +- kommander/editor/orderindicator.h | 12 +- kommander/editor/paletteeditoradvancedimpl.cpp | 208 ++-- kommander/editor/paletteeditoradvancedimpl.h | 38 +- kommander/editor/paletteeditorimpl.cpp | 134 +-- kommander/editor/paletteeditorimpl.h | 20 +- kommander/editor/parser.cpp | 26 +- kommander/editor/parser.h | 4 +- kommander/editor/pics/images.h | 12 +- kommander/editor/pixmapchooser.cpp | 142 +-- kommander/editor/pixmapchooser.h | 44 +- kommander/editor/previewframe.cpp | 18 +- kommander/editor/previewframe.h | 14 +- kommander/editor/previewwidgetimpl.cpp | 32 +- kommander/editor/previewwidgetimpl.h | 6 +- kommander/editor/propertyeditor.cpp | 1172 +++++++++---------- kommander/editor/propertyeditor.h | 286 ++--- kommander/editor/qcompletionedit.cpp | 68 +- kommander/editor/qcompletionedit.h | 26 +- kommander/editor/resource.cpp | 1174 ++++++++++---------- kommander/editor/resource.h | 144 +-- kommander/editor/sizehandle.cpp | 52 +- kommander/editor/sizehandle.h | 38 +- kommander/editor/styledbutton.cpp | 136 +-- kommander/editor/styledbutton.h | 50 +- kommander/editor/tableeditorimpl.cpp | 108 +- kommander/editor/tableeditorimpl.h | 20 +- kommander/editor/timestamp.cpp | 24 +- kommander/editor/timestamp.h | 18 +- kommander/editor/widgetdatabase.cpp | 176 +-- kommander/editor/widgetdatabase.h | 36 +- kommander/editor/widgetfactory.cpp | 926 +++++++-------- kommander/editor/widgetfactory.h | 304 ++--- kommander/editor/wizardeditorimpl.cpp | 20 +- kommander/editor/wizardeditorimpl.h | 8 +- kommander/editor/workspace.cpp | 192 ++-- kommander/editor/workspace.h | 46 +- kommander/executor/dcopkommanderif.h | 100 +- kommander/executor/instance.cpp | 362 +++--- kommander/executor/instance.h | 126 +-- kommander/executor/main.cpp | 14 +- kommander/executor/register.cpp | 36 +- kommander/factory/domtool.cpp | 154 +-- kommander/factory/domtool.h | 22 +- kommander/factory/kommanderfactory.cpp | 888 +++++++-------- kommander/factory/kommanderfactory.h | 132 +-- kommander/part/kommander_part.cpp | 20 +- kommander/part/kommander_part.h | 8 +- kommander/plugin/kommanderplugin.cpp | 20 +- kommander/plugin/kommanderplugin.h | 40 +- kommander/plugin/specialinformation.cpp | 366 +++--- kommander/plugin/specialinformation.h | 74 +- kommander/pluginmanager/main.cpp | 10 +- kommander/pluginmanager/mainwindow.cpp | 14 +- kommander/pluginmanager/mainwindow.h | 4 +- kommander/pluginmanager/pluginmanager.cpp | 20 +- kommander/pluginmanager/pluginmanager.h | 14 +- kommander/widget/expression.cpp | 100 +- kommander/widget/expression.h | 46 +- kommander/widget/function.h | 6 +- kommander/widget/functionlib.cpp | 248 ++--- kommander/widget/invokeclass.cpp | 18 +- kommander/widget/invokeclass.h | 28 +- kommander/widget/kmdrmainwindow.cpp | 6 +- kommander/widget/kmdrmainwindow.h | 2 +- kommander/widget/kommanderfunctions.cpp | 160 +-- kommander/widget/kommanderwidget.cpp | 244 ++-- kommander/widget/kommanderwidget.h | 114 +- kommander/widget/kommanderwindow.cpp | 6 +- kommander/widget/kommanderwindow.h | 8 +- kommander/widget/myprocess.cpp | 36 +- kommander/widget/myprocess.h | 12 +- kommander/widget/parsenode.cpp | 32 +- kommander/widget/parsenode.h | 22 +- kommander/widget/parser.cpp | 98 +- kommander/widget/parser.h | 56 +- kommander/widget/parserdata.cpp | 16 +- kommander/widget/parserdata.h | 18 +- kommander/widgets/aboutdialog.cpp | 64 +- kommander/widgets/aboutdialog.h | 60 +- kommander/widgets/buttongroup.cpp | 52 +- kommander/widgets/buttongroup.h | 34 +- kommander/widgets/checkbox.cpp | 60 +- kommander/widgets/checkbox.h | 36 +- kommander/widgets/closebutton.cpp | 56 +- kommander/widgets/closebutton.h | 28 +- kommander/widgets/combobox.cpp | 60 +- kommander/widgets/combobox.h | 32 +- kommander/widgets/datepicker.cpp | 46 +- kommander/widgets/datepicker.h | 34 +- kommander/widgets/dialog.cpp | 80 +- kommander/widgets/dialog.h | 42 +- kommander/widgets/execbutton.cpp | 74 +- kommander/widgets/execbutton.h | 30 +- kommander/widgets/fileselector.cpp | 70 +- kommander/widgets/fileselector.h | 60 +- kommander/widgets/fontdialog.cpp | 38 +- kommander/widgets/fontdialog.h | 28 +- kommander/widgets/groupbox.cpp | 62 +- kommander/widgets/groupbox.h | 42 +- kommander/widgets/konsole.cpp | 42 +- kommander/widgets/konsole.h | 22 +- kommander/widgets/label.cpp | 42 +- kommander/widgets/label.h | 34 +- kommander/widgets/lineedit.cpp | 60 +- kommander/widgets/lineedit.h | 38 +- kommander/widgets/listbox.cpp | 72 +- kommander/widgets/listbox.h | 32 +- kommander/widgets/pixmaplabel.cpp | 50 +- kommander/widgets/pixmaplabel.h | 36 +- kommander/widgets/plugin.cpp | 12 +- kommander/widgets/popupmenu.cpp | 72 +- kommander/widgets/popupmenu.h | 32 +- kommander/widgets/progressbar.cpp | 54 +- kommander/widgets/progressbar.h | 26 +- kommander/widgets/radiobutton.cpp | 52 +- kommander/widgets/radiobutton.h | 36 +- kommander/widgets/richtexteditor.cpp | 116 +- kommander/widgets/richtexteditor.h | 44 +- kommander/widgets/scriptobject.cpp | 54 +- kommander/widgets/scriptobject.h | 32 +- kommander/widgets/slider.cpp | 38 +- kommander/widgets/slider.h | 30 +- kommander/widgets/spinboxint.cpp | 50 +- kommander/widgets/spinboxint.h | 38 +- kommander/widgets/statusbar.cpp | 42 +- kommander/widgets/statusbar.h | 28 +- kommander/widgets/subdialog.cpp | 54 +- kommander/widgets/subdialog.h | 42 +- kommander/widgets/table.cpp | 136 +-- kommander/widgets/table.h | 36 +- kommander/widgets/tabwidget.cpp | 76 +- kommander/widgets/tabwidget.h | 26 +- kommander/widgets/textbrowser.cpp | 46 +- kommander/widgets/textbrowser.h | 28 +- kommander/widgets/textedit.cpp | 98 +- kommander/widgets/textedit.h | 34 +- kommander/widgets/timer.cpp | 40 +- kommander/widgets/timer.h | 26 +- kommander/widgets/toolbox.cpp | 80 +- kommander/widgets/toolbox.h | 28 +- kommander/widgets/treewidget.cpp | 194 ++-- kommander/widgets/treewidget.h | 66 +- kommander/widgets/wizard.cpp | 62 +- kommander/widgets/wizard.h | 38 +- kommander/working/plugintemplate/plugin.cpp | 6 +- kommander/working/plugintemplate/widget.cpp | 32 +- kommander/working/plugintemplate/widget.h | 28 +- kxsldbg/kxsldbg.cpp | 26 +- kxsldbg/kxsldbg.h | 4 +- kxsldbg/kxsldbgif.h | 4 +- kxsldbg/kxsldbgpart/kxsldbg_part.cpp | 266 ++--- kxsldbg/kxsldbgpart/kxsldbg_part.h | 36 +- kxsldbg/kxsldbgpart/libqtnotfier/qtnotifier2.cpp | 4 +- .../libqtnotfier/xsldbgdebuggerbase.cpp | 34 +- .../kxsldbgpart/libqtnotfier/xsldbgdebuggerbase.h | 82 +- kxsldbg/kxsldbgpart/libqtnotfier/xsldbgevent.cpp | 56 +- kxsldbg/kxsldbgpart/libxsldbg/breakpoint_cmds.cpp | 24 +- kxsldbg/kxsldbgpart/libxsldbg/debugXSL.cpp | 8 +- kxsldbg/kxsldbgpart/libxsldbg/file_cmds.cpp | 2 +- kxsldbg/kxsldbgpart/libxsldbg/help_unix.cpp | 6 +- kxsldbg/kxsldbgpart/libxsldbg/options.cpp | 38 +- kxsldbg/kxsldbgpart/libxsldbg/param_cmds.cpp | 6 +- kxsldbg/kxsldbgpart/libxsldbg/template_cmds.cpp | 8 +- kxsldbg/kxsldbgpart/libxsldbg/xsldbg.cpp | 44 +- kxsldbg/kxsldbgpart/libxsldbg/xsldbg.h | 12 +- kxsldbg/kxsldbgpart/libxsldbg/xsldbgevent.h | 144 +-- kxsldbg/kxsldbgpart/qxsldbgdoc.cpp | 22 +- kxsldbg/kxsldbgpart/qxsldbgdoc.h | 14 +- kxsldbg/kxsldbgpart/xsldbgbreakpointlistitem.cpp | 8 +- kxsldbg/kxsldbgpart/xsldbgbreakpointlistitem.h | 12 +- kxsldbg/kxsldbgpart/xsldbgbreakpointsimpl.cpp | 60 +- kxsldbg/kxsldbgpart/xsldbgbreakpointsimpl.h | 10 +- kxsldbg/kxsldbgpart/xsldbgcallstackimpl.cpp | 20 +- kxsldbg/kxsldbgpart/xsldbgcallstackimpl.h | 8 +- kxsldbg/kxsldbgpart/xsldbgconfigimpl.cpp | 92 +- kxsldbg/kxsldbgpart/xsldbgconfigimpl.h | 44 +- kxsldbg/kxsldbgpart/xsldbgdebugger.cpp | 118 +- kxsldbg/kxsldbgpart/xsldbgdebugger.h | 34 +- kxsldbg/kxsldbgpart/xsldbgdialogbase.h | 2 +- kxsldbg/kxsldbgpart/xsldbgdoc.cpp | 10 +- kxsldbg/kxsldbgpart/xsldbgdoc.h | 12 +- kxsldbg/kxsldbgpart/xsldbgdocmap.h | 4 +- kxsldbg/kxsldbgpart/xsldbgentitiesimpl.cpp | 22 +- kxsldbg/kxsldbgpart/xsldbgentitiesimpl.h | 8 +- kxsldbg/kxsldbgpart/xsldbggloballistitem.cpp | 6 +- kxsldbg/kxsldbgpart/xsldbggloballistitem.h | 8 +- kxsldbg/kxsldbgpart/xsldbgglobalvariablesimpl.cpp | 18 +- kxsldbg/kxsldbgpart/xsldbgglobalvariablesimpl.h | 8 +- kxsldbg/kxsldbgpart/xsldbginspector.cpp | 76 +- kxsldbg/kxsldbgpart/xsldbginspector.h | 14 +- kxsldbg/kxsldbgpart/xsldbglistitem.cpp | 10 +- kxsldbg/kxsldbgpart/xsldbglistitem.h | 12 +- kxsldbg/kxsldbgpart/xsldbglocallistitem.cpp | 10 +- kxsldbg/kxsldbgpart/xsldbglocallistitem.h | 16 +- kxsldbg/kxsldbgpart/xsldbglocalvariablesimpl.cpp | 34 +- kxsldbg/kxsldbgpart/xsldbglocalvariablesimpl.h | 12 +- kxsldbg/kxsldbgpart/xsldbgmsgdialogimpl.h | 10 +- kxsldbg/kxsldbgpart/xsldbgoutputview.cpp | 54 +- kxsldbg/kxsldbgpart/xsldbgoutputview.h | 12 +- kxsldbg/kxsldbgpart/xsldbgsourcesimpl.cpp | 18 +- kxsldbg/kxsldbgpart/xsldbgsourcesimpl.h | 8 +- kxsldbg/kxsldbgpart/xsldbgtemplatelistitem.cpp | 4 +- kxsldbg/kxsldbgpart/xsldbgtemplatelistitem.h | 12 +- kxsldbg/kxsldbgpart/xsldbgtemplatesimpl.cpp | 18 +- kxsldbg/kxsldbgpart/xsldbgtemplatesimpl.h | 8 +- kxsldbg/kxsldbgpart/xsldbgwalkspeedimpl.cpp | 4 +- kxsldbg/kxsldbgpart/xsldbgwalkspeedimpl.h | 2 +- kxsldbg/xsldbgmain.cpp | 10 +- lib/compatibility/kmdi/qextmdi/kdelibs_export.h | 2 +- lib/compatibility/kmdi/qextmdi/kdockwidget.cpp | 784 ++++++------- lib/compatibility/kmdi/qextmdi/kdockwidget.h | 194 ++-- lib/compatibility/kmdi/qextmdi/kdockwidget_p.h | 26 +- .../kmdi/qextmdi/kdockwidget_private.cpp | 82 +- .../kmdi/qextmdi/kdockwidget_private.h | 52 +- lib/compatibility/kmdi/qextmdi/kmdichildarea.cpp | 84 +- lib/compatibility/kmdi/qextmdi/kmdichildarea.h | 42 +- lib/compatibility/kmdi/qextmdi/kmdichildfrm.cpp | 384 +++---- lib/compatibility/kmdi/qextmdi/kmdichildfrm.h | 108 +- .../kmdi/qextmdi/kmdichildfrmcaption.cpp | 54 +- .../kmdi/qextmdi/kmdichildfrmcaption.h | 20 +- lib/compatibility/kmdi/qextmdi/kmdichildview.cpp | 196 ++-- lib/compatibility/kmdi/qextmdi/kmdichildview.h | 114 +- lib/compatibility/kmdi/qextmdi/kmdidefines.h | 6 +- .../kmdi/qextmdi/kmdidockcontainer.cpp | 154 +-- lib/compatibility/kmdi/qextmdi/kmdidockcontainer.h | 50 +- .../kmdi/qextmdi/kmdidocumentviewtabwidget.cpp | 24 +- .../kmdi/qextmdi/kmdidocumentviewtabwidget.h | 22 +- lib/compatibility/kmdi/qextmdi/kmdifocuslist.cpp | 30 +- lib/compatibility/kmdi/qextmdi/kmdifocuslist.h | 14 +- lib/compatibility/kmdi/qextmdi/kmdiguiclient.cpp | 62 +- lib/compatibility/kmdi/qextmdi/kmdiguiclient.h | 18 +- lib/compatibility/kmdi/qextmdi/kmdilistiterator.h | 6 +- lib/compatibility/kmdi/qextmdi/kmdimainfrm.cpp | 594 +++++----- lib/compatibility/kmdi/qextmdi/kmdimainfrm.h | 114 +- lib/compatibility/kmdi/qextmdi/kmditaskbar.cpp | 68 +- lib/compatibility/kmdi/qextmdi/kmditaskbar.h | 34 +- .../kmdi/qextmdi/kmditoolviewaccessor.cpp | 40 +- .../kmdi/qextmdi/kmditoolviewaccessor.h | 24 +- .../kmdi/qextmdi/kmditoolviewaccessor_p.h | 10 +- lib/compatibility/kmdi/qextmdi/kmultitabbar.cpp | 244 ++-- lib/compatibility/kmdi/qextmdi/kmultitabbar.h | 64 +- lib/compatibility/kmdi/qextmdi/kmultitabbar_p.h | 24 +- lib/compatibility/kmdi/qextmdi/ktabbar.cpp | 154 +-- lib/compatibility/kmdi/qextmdi/ktabbar.h | 44 +- lib/compatibility/kmdi/qextmdi/ktabwidget.cpp | 162 +-- lib/compatibility/kmdi/qextmdi/ktabwidget.h | 72 +- lib/compatibility/knewstuff/downloaddialog.cpp | 162 +-- lib/compatibility/knewstuff/downloaddialog.h | 52 +- lib/compatibility/knewstuff/engine.cpp | 94 +- lib/compatibility/knewstuff/engine.h | 38 +- lib/compatibility/knewstuff/entry.cpp | 104 +- lib/compatibility/knewstuff/entry.h | 86 +- lib/compatibility/knewstuff/knewstuff.cpp | 16 +- lib/compatibility/knewstuff/knewstuff.h | 22 +- lib/compatibility/knewstuff/knewstuffgeneric.cpp | 42 +- lib/compatibility/knewstuff/knewstuffgeneric.h | 12 +- lib/compatibility/knewstuff/knewstuffsecure.cpp | 46 +- lib/compatibility/knewstuff/knewstuffsecure.h | 18 +- lib/compatibility/knewstuff/provider.cpp | 48 +- lib/compatibility/knewstuff/provider.h | 34 +- lib/compatibility/knewstuff/providerdialog.cpp | 14 +- lib/compatibility/knewstuff/providerdialog.h | 2 +- lib/compatibility/knewstuff/security.cpp | 70 +- lib/compatibility/knewstuff/security.h | 20 +- lib/compatibility/knewstuff/uploaddialog.cpp | 66 +- lib/compatibility/knewstuff/uploaddialog.h | 20 +- lib/ksavealldialog.cpp | 50 +- lib/ksavealldialog.h | 6 +- lib/qextfileinfo.cpp | 186 ++-- lib/qextfileinfo.h | 48 +- quanta/components/csseditor/colorrequester.cpp | 38 +- quanta/components/csseditor/colorrequester.h | 14 +- quanta/components/csseditor/colorslider.cpp | 42 +- quanta/components/csseditor/colorslider.h | 14 +- quanta/components/csseditor/csseditor.cpp | 164 +-- quanta/components/csseditor/csseditor.h | 60 +- quanta/components/csseditor/csseditor_globals.cpp | 20 +- quanta/components/csseditor/csseditor_globals.h | 22 +- quanta/components/csseditor/cssselector.cpp | 190 ++-- quanta/components/csseditor/cssselector.h | 36 +- .../components/csseditor/cssshpropertyparser.cpp | 40 +- quanta/components/csseditor/cssshpropertyparser.h | 18 +- quanta/components/csseditor/doubleeditors.cpp | 46 +- quanta/components/csseditor/doubleeditors.h | 26 +- quanta/components/csseditor/encodingselector.cpp | 8 +- quanta/components/csseditor/encodingselector.h | 6 +- quanta/components/csseditor/fontfamilychooser.cpp | 100 +- quanta/components/csseditor/fontfamilychooser.h | 20 +- quanta/components/csseditor/minieditor.h | 4 +- quanta/components/csseditor/percentageeditor.cpp | 8 +- quanta/components/csseditor/percentageeditor.h | 12 +- quanta/components/csseditor/propertysetter.cpp | 44 +- quanta/components/csseditor/propertysetter.h | 20 +- quanta/components/csseditor/qmyhighlighter.cpp | 16 +- quanta/components/csseditor/qmyhighlighter.h | 8 +- quanta/components/csseditor/shorthandformer.cpp | 178 +-- quanta/components/csseditor/shorthandformer.h | 70 +- quanta/components/csseditor/specialsb.cpp | 38 +- quanta/components/csseditor/specialsb.h | 28 +- quanta/components/csseditor/styleeditor.cpp | 26 +- quanta/components/csseditor/styleeditor.h | 4 +- quanta/components/csseditor/stylesheetparser.cpp | 36 +- quanta/components/csseditor/stylesheetparser.h | 18 +- quanta/components/csseditor/tlpeditors.cpp | 66 +- quanta/components/csseditor/tlpeditors.h | 34 +- quanta/components/cvsservice/cvsservice.cpp | 146 +-- quanta/components/cvsservice/cvsservice.h | 44 +- quanta/components/cvsservice/cvsservicedcopif.h | 4 +- quanta/components/debugger/backtracelistview.cpp | 16 +- quanta/components/debugger/backtracelistview.h | 24 +- .../debugger/conditionalbreakpointdialog.cpp | 22 +- .../debugger/conditionalbreakpointdialog.h | 10 +- quanta/components/debugger/dbgp/dbgpnetwork.cpp | 42 +- quanta/components/debugger/dbgp/dbgpnetwork.h | 12 +- quanta/components/debugger/dbgp/dbgpsettings.cpp | 8 +- quanta/components/debugger/dbgp/dbgpsettings.h | 2 +- quanta/components/debugger/dbgp/qbytearrayfifo.cpp | 8 +- quanta/components/debugger/dbgp/qbytearrayfifo.h | 10 +- .../debugger/dbgp/quantadebuggerdbgp.cpp | 136 +-- .../components/debugger/dbgp/quantadebuggerdbgp.h | 70 +- quanta/components/debugger/debuggerbreakpoint.cpp | 30 +- quanta/components/debugger/debuggerbreakpoint.h | 44 +- .../components/debugger/debuggerbreakpointlist.cpp | 8 +- .../components/debugger/debuggerbreakpointlist.h | 18 +- .../components/debugger/debuggerbreakpointview.cpp | 24 +- .../components/debugger/debuggerbreakpointview.h | 12 +- quanta/components/debugger/debuggermanager.cpp | 142 +-- quanta/components/debugger/debuggermanager.h | 30 +- quanta/components/debugger/debuggerui.cpp | 16 +- quanta/components/debugger/debuggerui.h | 10 +- quanta/components/debugger/debuggervariable.cpp | 24 +- quanta/components/debugger/debuggervariable.h | 32 +- quanta/components/debugger/gubed/gubedsettings.cpp | 4 +- quanta/components/debugger/gubed/gubedsettings.h | 2 +- .../debugger/gubed/quantadebuggergubed.cpp | 132 +-- .../debugger/gubed/quantadebuggergubed.h | 58 +- .../debugger/interfaces/debuggerclient.cpp | 14 +- .../debugger/interfaces/debuggerclient.h | 20 +- .../debugger/interfaces/debuggerinterface.cpp | 4 +- .../debugger/interfaces/debuggerinterface.h | 30 +- quanta/components/debugger/pathmapper.cpp | 56 +- quanta/components/debugger/pathmapper.h | 30 +- quanta/components/debugger/pathmapperdialog.cpp | 24 +- quanta/components/debugger/pathmapperdialog.h | 10 +- .../debugger/quantadebuggerinterface.cpp | 28 +- .../components/debugger/quantadebuggerinterface.h | 30 +- quanta/components/debugger/variableslistview.cpp | 34 +- quanta/components/debugger/variableslistview.h | 10 +- quanta/components/framewizard/areaattributedb.h | 24 +- quanta/components/framewizard/fmfpeditor.cpp | 36 +- quanta/components/framewizard/fmfpeditor.h | 10 +- quanta/components/framewizard/fmrceditor.cpp | 6 +- quanta/components/framewizard/fmrceditor.h | 2 +- quanta/components/framewizard/framewizard.cpp | 28 +- quanta/components/framewizard/framewizard.h | 14 +- quanta/components/framewizard/selectablearea.cpp | 22 +- quanta/components/framewizard/selectablearea.h | 20 +- quanta/components/framewizard/treenode.cpp | 38 +- quanta/components/framewizard/treenode.h | 40 +- .../components/framewizard/visualframeeditor.cpp | 134 +-- quanta/components/framewizard/visualframeeditor.h | 36 +- quanta/components/tableeditor/tableeditor.cpp | 230 ++-- quanta/components/tableeditor/tableeditor.h | 54 +- quanta/components/tableeditor/tableitem.cpp | 46 +- quanta/components/tableeditor/tableitem.h | 20 +- quanta/dialogs/actionconfigdialog.cpp | 208 ++-- quanta/dialogs/actionconfigdialog.h | 34 +- quanta/dialogs/copyto.cpp | 12 +- quanta/dialogs/dirtydlg.cpp | 18 +- quanta/dialogs/dirtydlg.h | 4 +- quanta/dialogs/dtepeditdlg.cpp | 58 +- quanta/dialogs/dtepeditdlg.h | 36 +- quanta/dialogs/filecombo.cpp | 44 +- quanta/dialogs/filecombo.h | 20 +- quanta/dialogs/settings/abbreviation.cpp | 90 +- quanta/dialogs/settings/abbreviation.h | 12 +- quanta/dialogs/settings/filemasks.cpp | 12 +- quanta/dialogs/settings/filemasks.h | 2 +- quanta/dialogs/settings/parseroptions.cpp | 14 +- quanta/dialogs/settings/parseroptions.h | 2 +- quanta/dialogs/settings/previewoptions.cpp | 30 +- quanta/dialogs/settings/previewoptions.h | 18 +- quanta/dialogs/specialchardialog.cpp | 38 +- quanta/dialogs/specialchardialog.h | 10 +- quanta/dialogs/tagdialogs/colorcombo.cpp | 70 +- quanta/dialogs/tagdialogs/colorcombo.h | 30 +- quanta/dialogs/tagdialogs/corewidgetdlg.cpp | 12 +- quanta/dialogs/tagdialogs/listdlg.cpp | 12 +- quanta/dialogs/tagdialogs/listdlg.h | 4 +- quanta/dialogs/tagdialogs/pictureview.cpp | 22 +- quanta/dialogs/tagdialogs/pictureview.h | 16 +- quanta/dialogs/tagdialogs/tagattr.cpp | 32 +- quanta/dialogs/tagdialogs/tagattr.h | 64 +- quanta/dialogs/tagdialogs/tagdialog.cpp | 146 +-- quanta/dialogs/tagdialogs/tagdialog.h | 38 +- quanta/dialogs/tagdialogs/tagimgdlg.cpp | 26 +- quanta/dialogs/tagdialogs/tagimgdlg.h | 48 +- quanta/dialogs/tagdialogs/tagimgdlgdata.cpp | 30 +- quanta/dialogs/tagdialogs/tagmaildlg.cpp | 24 +- quanta/dialogs/tagdialogs/tagmaildlg.h | 2 +- quanta/dialogs/tagdialogs/tagmiscdlg.cpp | 12 +- quanta/dialogs/tagdialogs/tagmiscdlg.h | 6 +- quanta/dialogs/tagdialogs/tagquicklistdlg.cpp | 20 +- quanta/dialogs/tagdialogs/tagquicklistdlg.h | 24 +- quanta/dialogs/tagdialogs/tagquicklistdlgdata.cpp | 22 +- quanta/dialogs/tagdialogs/tagwidget.cpp | 34 +- quanta/dialogs/tagdialogs/tagwidget.h | 28 +- quanta/dialogs/tagdialogs/tagxml.cpp | 124 +-- quanta/dialogs/tagdialogs/tagxml.h | 26 +- quanta/messages/annotationoutput.cpp | 102 +- quanta/messages/annotationoutput.h | 28 +- quanta/messages/messageitem.cpp | 24 +- quanta/messages/messageitem.h | 16 +- quanta/messages/messageoutput.cpp | 56 +- quanta/messages/messageoutput.h | 22 +- quanta/parsers/dtd/dtd.cpp | 128 +-- quanta/parsers/dtd/dtd.h | 34 +- quanta/parsers/dtd/dtdparser.cpp | 84 +- quanta/parsers/dtd/dtdparser.h | 22 +- quanta/parsers/node.cpp | 50 +- quanta/parsers/node.h | 30 +- quanta/parsers/parser.cpp | 134 +-- quanta/parsers/parser.h | 28 +- quanta/parsers/parsercommon.cpp | 26 +- quanta/parsers/parsercommon.h | 12 +- quanta/parsers/qtag.cpp | 28 +- quanta/parsers/qtag.h | 170 +-- quanta/parsers/sagroupparser.cpp | 28 +- quanta/parsers/sagroupparser.h | 4 +- quanta/parsers/saparser.cpp | 50 +- quanta/parsers/saparser.h | 30 +- quanta/parsers/tag.cpp | 114 +- quanta/parsers/tag.h | 56 +- quanta/parts/kafka/cursors.h | 10 +- quanta/parts/kafka/domtreeview.cpp | 40 +- quanta/parts/kafka/domtreeview.h | 24 +- quanta/parts/kafka/htmldocumentproperties.cpp | 82 +- quanta/parts/kafka/htmldocumentproperties.h | 16 +- quanta/parts/kafka/htmlenhancer.cpp | 4 +- quanta/parts/kafka/kafkacommon.cpp | 216 ++-- quanta/parts/kafka/kafkacommon.h | 94 +- quanta/parts/kafka/kafkadragobject.cpp | 34 +- quanta/parts/kafka/kafkadragobject.h | 14 +- quanta/parts/kafka/kafkahtmlpart.cpp | 88 +- quanta/parts/kafka/kafkahtmlpart.h | 22 +- quanta/parts/kafka/kafkasyncoptions.cpp | 12 +- quanta/parts/kafka/kafkasyncoptions.h | 2 +- quanta/parts/kafka/undoredo.cpp | 46 +- quanta/parts/kafka/undoredo.h | 36 +- quanta/parts/kafka/wkafkapart.cpp | 178 +-- quanta/parts/kafka/wkafkapart.h | 36 +- quanta/parts/preview/whtmlpart.cpp | 38 +- quanta/parts/preview/whtmlpart.h | 26 +- quanta/plugins/quantaplugin.cpp | 76 +- quanta/plugins/quantaplugin.h | 54 +- quanta/plugins/quantapluginconfig.cpp | 28 +- quanta/plugins/quantapluginconfig.h | 4 +- quanta/plugins/quantaplugineditor.cpp | 76 +- quanta/plugins/quantaplugineditor.h | 22 +- quanta/plugins/quantaplugininterface.cpp | 58 +- quanta/plugins/quantaplugininterface.h | 36 +- quanta/project/eventconfigurationdlg.cpp | 38 +- quanta/project/eventconfigurationdlg.h | 6 +- quanta/project/eventeditordlg.cpp | 90 +- quanta/project/eventeditordlg.h | 24 +- quanta/project/membereditdlg.cpp | 42 +- quanta/project/membereditdlg.h | 6 +- quanta/project/project.cpp | 302 ++--- quanta/project/project.h | 82 +- quanta/project/projectlist.cpp | 30 +- quanta/project/projectlist.h | 18 +- quanta/project/projectnewfinal.cpp | 6 +- quanta/project/projectnewfinal.h | 2 +- quanta/project/projectnewgeneral.cpp | 68 +- quanta/project/projectnewgeneral.h | 14 +- quanta/project/projectnewlocal.cpp | 66 +- quanta/project/projectnewlocal.h | 6 +- quanta/project/projectnewweb.cpp | 78 +- quanta/project/projectnewweb.h | 18 +- quanta/project/projectprivate.cpp | 382 +++---- quanta/project/projectprivate.h | 78 +- quanta/project/projectupload.cpp | 168 +-- quanta/project/projectupload.h | 40 +- quanta/project/projecturl.h | 16 +- quanta/project/rescanprj.cpp | 70 +- quanta/project/rescanprj.h | 12 +- quanta/project/teammembersdlg.cpp | 66 +- quanta/project/teammembersdlg.h | 10 +- quanta/project/uploadprofiles.cpp | 28 +- quanta/project/uploadprofiles.h | 26 +- quanta/src/dcopquanta.cpp | 34 +- quanta/src/dcopquanta.h | 6 +- quanta/src/dcopquantaif.h | 8 +- quanta/src/dcopsettings.cpp | 8 +- quanta/src/dcopsettings.h | 6 +- quanta/src/dcopsettingsif.h | 8 +- quanta/src/dcopwindowmanagerif.h | 30 +- quanta/src/document.cpp | 556 ++++----- quanta/src/document.h | 140 +-- quanta/src/dtds.cpp | 274 ++--- quanta/src/dtds.h | 36 +- quanta/src/kqapp.cpp | 32 +- quanta/src/kqapp.h | 2 +- quanta/src/main.cpp | 14 +- quanta/src/quanta.cpp | 960 ++++++++-------- quanta/src/quanta.h | 162 +-- quanta/src/quanta_init.cpp | 830 +++++++------- quanta/src/quanta_init.h | 18 +- quanta/src/quantadoc.cpp | 68 +- quanta/src/quantadoc.h | 6 +- quanta/src/quantaview.cpp | 152 +-- quanta/src/quantaview.h | 52 +- quanta/src/viewmanager.cpp | 112 +- quanta/src/viewmanager.h | 16 +- quanta/treeviews/basetreeview.cpp | 228 ++-- quanta/treeviews/basetreeview.h | 50 +- quanta/treeviews/docfolder.cpp | 34 +- quanta/treeviews/docfolder.h | 12 +- quanta/treeviews/docitem.cpp | 8 +- quanta/treeviews/docitem.h | 12 +- quanta/treeviews/doctreeview.cpp | 74 +- quanta/treeviews/doctreeview.h | 22 +- quanta/treeviews/filestreeview.cpp | 70 +- quanta/treeviews/filestreeview.h | 8 +- quanta/treeviews/newtemplatedirdlg.cpp | 8 +- quanta/treeviews/newtemplatedirdlg.h | 4 +- quanta/treeviews/projecttreeview.cpp | 112 +- quanta/treeviews/projecttreeview.h | 24 +- quanta/treeviews/scripttreeview.cpp | 114 +- quanta/treeviews/scripttreeview.h | 20 +- quanta/treeviews/servertreeview.cpp | 62 +- quanta/treeviews/servertreeview.h | 10 +- quanta/treeviews/structtreetag.cpp | 26 +- quanta/treeviews/structtreetag.h | 8 +- quanta/treeviews/structtreeview.cpp | 176 +-- quanta/treeviews/structtreeview.h | 64 +- quanta/treeviews/tagattributeitems.cpp | 124 +-- quanta/treeviews/tagattributeitems.h | 60 +- quanta/treeviews/tagattributetree.cpp | 108 +- quanta/treeviews/tagattributetree.h | 36 +- quanta/treeviews/templatestreeview.cpp | 270 ++--- quanta/treeviews/templatestreeview.h | 32 +- quanta/treeviews/uploadtreefile.cpp | 22 +- quanta/treeviews/uploadtreefile.h | 6 +- quanta/treeviews/uploadtreefolder.cpp | 28 +- quanta/treeviews/uploadtreefolder.h | 16 +- quanta/treeviews/uploadtreeview.cpp | 64 +- quanta/treeviews/uploadtreeview.h | 30 +- quanta/utility/newstuff.cpp | 22 +- quanta/utility/newstuff.h | 12 +- quanta/utility/qpevents.cpp | 64 +- quanta/utility/qpevents.h | 32 +- quanta/utility/quantabookmarks.cpp | 58 +- quanta/utility/quantabookmarks.h | 16 +- quanta/utility/quantacommon.cpp | 212 ++-- quanta/utility/quantacommon.h | 102 +- quanta/utility/quantanetaccess.cpp | 40 +- quanta/utility/quantanetaccess.h | 28 +- quanta/utility/resource.h | 18 +- quanta/utility/tagaction.cpp | 232 ++-- quanta/utility/tagaction.h | 40 +- quanta/utility/tagactionmanager.cpp | 8 +- quanta/utility/tagactionmanager.h | 10 +- quanta/utility/tagactionset.cpp | 74 +- quanta/utility/tagactionset.h | 36 +- quanta/utility/toolbartabwidget.cpp | 154 +-- quanta/utility/toolbartabwidget.h | 50 +- quanta/utility/toolbarxmlgui.cpp | 2 +- quanta/utility/toolbarxmlgui.h | 2 +- 716 files changed, 24134 insertions(+), 24134 deletions(-) diff --git a/kfilereplace/commandengine.cpp b/kfilereplace/commandengine.cpp index 56cc50b1..ffb1919d 100644 --- a/kfilereplace/commandengine.cpp +++ b/kfilereplace/commandengine.cpp @@ -17,10 +17,10 @@ ***************************************************************************/ // QT -#include -#include -#include -#include +#include +#include +#include +#include // KDE #include @@ -30,24 +30,24 @@ // local #include "commandengine.h" -QString CommandEngine::datetime(const QString& opt, const QString& arg) +TQString CommandEngine::datetime(const TQString& opt, const TQString& arg) { Q_UNUSED(arg); if(opt == "iso") - return QDateTime::currentDateTime(Qt::LocalTime).toString(Qt::ISODate); + return TQDateTime::currentDateTime(Qt::LocalTime).toString(Qt::ISODate); if(opt == "local") - return QDateTime::currentDateTime(Qt::LocalTime).toString(Qt::LocalDate); - return QString::null; + return TQDateTime::currentDateTime(Qt::LocalTime).toString(Qt::LocalDate); + return TQString::null; } -QString CommandEngine::user(const QString& opt, const QString& arg) +TQString CommandEngine::user(const TQString& opt, const TQString& arg) { Q_UNUSED(arg); KUser u; if(opt == "uid") - return QString::number(u.uid(),10); + return TQString::number(u.uid(),10); if(opt == "gid") - return QString::number(u.gid(),10); + return TQString::number(u.gid(),10); if(opt == "loginname") return u.loginName(); if(opt == "fullname") @@ -56,47 +56,47 @@ QString CommandEngine::user(const QString& opt, const QString& arg) return u.homeDir(); if(opt == "shell") return u.shell(); - return QString::null; + return TQString::null; } -QString CommandEngine::loadfile(const QString& opt, const QString& arg) +TQString CommandEngine::loadfile(const TQString& opt, const TQString& arg) { Q_UNUSED(arg); - QFile f(opt); - if(!f.open(IO_ReadOnly)) return QString::null; + TQFile f(opt); + if(!f.open(IO_ReadOnly)) return TQString::null; - QTextStream t(&f); + TQTextStream t(&f); - QString s = t.read(); + TQString s = t.read(); f.close(); return s; } -QString CommandEngine::empty(const QString& opt, const QString& arg) +TQString CommandEngine::empty(const TQString& opt, const TQString& arg) { Q_UNUSED(opt); Q_UNUSED(arg); return ""; } -QString CommandEngine::mathexp(const QString& opt, const QString& arg) +TQString CommandEngine::mathexp(const TQString& opt, const TQString& arg) { /* We will use bc 1.06 by Philip A. Nelson */ //Q_UNUSED(opt); Q_UNUSED(arg); - QString tempOpt = opt; + TQString 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;"; + TQString program = "var=("+tempOpt+");print var"; + TQString script = "echo '"+program+"' | bc -l;"; KProcess* proc = new KProcess(); @@ -104,14 +104,14 @@ QString CommandEngine::mathexp(const QString& opt, const QString& arg) *(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*))); + connect(proc, TQT_SIGNAL(receivedStdout(KProcess*,char*,int)), this, TQT_SLOT(slotGetScriptOutput(KProcess*,char*,int))); + connect(proc, TQT_SIGNAL(receivedStderr(KProcess*,char*,int)), this, TQT_SLOT(slotGetScriptError(KProcess*,char*,int))); + connect(proc, TQT_SIGNAL(processExited(KProcess*)), this, TQT_SLOT(slotProcessExited(KProcess*))); //Through slotGetScriptOutput, m_processOutput contains the result of the KProcess call if(!proc->start(KProcess::Block, KProcess::All)) { - return QString::null; + return TQString::null; } else { @@ -120,39 +120,39 @@ QString CommandEngine::mathexp(const QString& opt, const QString& arg) if(proc) delete proc; - QString tempbuf = m_processOutput; - m_processOutput = QString::null; + TQString tempbuf = m_processOutput; + m_processOutput = TQString::null; return tempbuf; } -QString CommandEngine::random(const QString& opt, const QString& arg) +TQString CommandEngine::random(const TQString& opt, const TQString& arg) { Q_UNUSED(arg); long seed; if(opt.isEmpty()) { - QDateTime dt; + TQDateTime dt; seed = dt.toTime_t(); } else seed = opt.toLong(); KRandomSequence seq(seed); - return QString::number(seq.getLong(1000000),10); + return TQString::number(seq.getLong(1000000),10); } -QString CommandEngine::stringmanip(const QString& opt, const QString& arg) +TQString CommandEngine::stringmanip(const TQString& opt, const TQString& arg) { Q_UNUSED(opt); Q_UNUSED(arg); return ""; } -QString CommandEngine::variableValue(const QString &variable) +TQString CommandEngine::variableValue(const TQString &variable) { - QString s = variable; + TQString s = variable; s.remove("[$").remove("$]").remove(" "); @@ -160,12 +160,12 @@ QString CommandEngine::variableValue(const QString &variable) return variable; else { - QString leftValue = s.section(":",0,0), + TQString leftValue = s.section(":",0,0), midValue = s.section(":",1,1), rightValue = s.section(":",2,2); - QString opt = midValue; - QString arg = rightValue; + TQString opt = midValue; + TQString arg = rightValue; if(leftValue == "stringmanip") return stringmanip(opt, arg); @@ -191,18 +191,18 @@ void CommandEngine::slotGetScriptError(KProcess* proc, char* s, int i) { Q_UNUSED(proc); Q_UNUSED(proc); - QCString temp(s,i+1); + TQCString 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); + TQCString temp(s,i+1); if(temp.isEmpty() || temp == "\n") return; - m_processOutput += QString::fromLocal8Bit(temp); + m_processOutput += TQString::fromLocal8Bit(temp); } void CommandEngine::slotProcessExited(KProcess* proc) diff --git a/kfilereplace/commandengine.h b/kfilereplace/commandengine.h index cff15b29..a3b7d374 100644 --- a/kfilereplace/commandengine.h +++ b/kfilereplace/commandengine.h @@ -21,7 +21,7 @@ // QT class QString; -#include +#include //KDE class KProcess; @@ -30,7 +30,7 @@ class CommandEngine : public QObject { Q_OBJECT private: - QString m_processOutput; + TQString m_processOutput; public: CommandEngine() {} @@ -39,14 +39,14 @@ class CommandEngine : public QObject /** 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); + TQString datetime(const TQString& opt, const TQString& arg); + TQString user(const TQString& opt, const TQString& arg); + TQString loadfile(const TQString& opt, const TQString& arg); + TQString empty(const TQString& opt, const TQString& arg); + TQString mathexp(const TQString& opt, const TQString& arg); + TQString random(const TQString& opt, const TQString& arg); + TQString stringmanip(const TQString& opt, const TQString& arg); + TQString variableValue(const TQString &variable); private slots: void slotGetScriptOutput(KProcess*,char*,int); diff --git a/kfilereplace/configurationclasses.cpp b/kfilereplace/configurationclasses.cpp index 848eafdc..f0c6bcc4 100644 --- a/kfilereplace/configurationclasses.cpp +++ b/kfilereplace/configurationclasses.cpp @@ -84,14 +84,14 @@ RCOptions& RCOptions::operator=(const RCOptions& ci) } //ResultViewEntry Class -ResultViewEntry::ResultViewEntry(QString nkey, QString ndata, bool regexp, bool caseSensitive) +ResultViewEntry::ResultViewEntry(TQString nkey, TQString ndata, bool regexp, bool caseSensitive) { m_caseSensitive = caseSensitive; m_regexp = regexp; if(regexp) { - m_rxKey = QRegExp("("+nkey+")", caseSensitive, false); + m_rxKey = TQRegExp("("+nkey+")", caseSensitive, false); } else { @@ -102,12 +102,12 @@ ResultViewEntry::ResultViewEntry(QString nkey, QString ndata, bool regexp, bool m_pos = 0; } -int ResultViewEntry::lineNumber(const QString& line) const +int ResultViewEntry::lineNumber(const TQString& line) const { return line.mid(0,m_pos).contains('\n')+1; } -int ResultViewEntry::columnNumber(const QString& line) const +int ResultViewEntry::columnNumber(const TQString& line) const { return(m_pos - line.findRev('\n',m_pos)); } @@ -127,7 +127,7 @@ bool ResultViewEntry::regexp()const return m_regexp; } -int ResultViewEntry::pos(const QString& line) +int ResultViewEntry::pos(const TQString& line) { if(m_regexp) m_pos = m_rxKey.search(line,m_pos); @@ -149,9 +149,9 @@ void ResultViewEntry::incPos() } -QString ResultViewEntry::capturedText(const QString& line) +TQString ResultViewEntry::capturedText(const TQString& line) { - QString cap; + TQString cap; if(m_regexp) cap = m_rxKey.cap(1); @@ -161,11 +161,11 @@ QString ResultViewEntry::capturedText(const QString& line) return cap; } -QString ResultViewEntry::message(const QString& capturedText, int x, int y) const +TQString ResultViewEntry::message(const TQString& 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)); + TQString data = m_data; + //return i18n(" captured text \"%1\" replaced with \"%2\" at line: %3, column: %4 ").arg(capturedText).arg(data).arg(TQString::number(x,10)).arg(TQString::number(y,10)); + return i18n(" Line:%3,Col:%4 - \"%1\" -> \"%2\"").arg(capturedText).arg(data).arg(TQString::number(x,10)).arg(TQString::number(y,10)); } int ResultViewEntry::keyLength() const @@ -181,7 +181,7 @@ int ResultViewEntry::dataLength() const return m_data.length(); } -void ResultViewEntry::updateLine(QString& line) +void ResultViewEntry::updateLine(TQString& line) { line.insert(m_pos, m_data); line.remove(m_pos + dataLength(), keyLength()); diff --git a/kfilereplace/configurationclasses.h b/kfilereplace/configurationclasses.h index 82bff991..0d36261b 100644 --- a/kfilereplace/configurationclasses.h +++ b/kfilereplace/configurationclasses.h @@ -18,44 +18,44 @@ #define CONFIGURATIONCLASSES_H // QT -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include -typedef QMap KeyValueMap; +typedef TQMap 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"; +const TQString rcDirectoriesList = "Directories list"; +const TQString rcFiltersList = "Filters list"; +const TQString rcRecentFiles = "Recent files"; +const TQString rcAllStringsMustBeFound = "All strings must be found"; +const TQString rcEncoding = "Encoding"; +const TQString rcCaseSensitive = "Case sensitive"; +const TQString rcConfirmStrings = "Confirm strings"; +const TQString rcConfirmFiles = "Confirm files"; +const TQString rcConfirmDirs = "Confirm directories"; +const TQString rcFollowSymLinks = "Follow symbolic links"; +const TQString rcHaltOnFirstOccur = "Halt on first occurrence"; +const TQString rcIgnoreHidden = "Ignore hidden files"; +const TQString rcRecursive = "Search/replace in sub folders"; +const TQString rcVariables = "Enable variables"; +const TQString rcRegularExpressions = "Enable regular expressions"; +const TQString rcMinFileSize = "Minimum file size"; +const TQString rcMaxFileSize = "Maximum file size"; +const TQString rcValidAccessDate = "Access mode"; +const TQString rcMinDate = "Minimum access date"; +const TQString rcMaxDate = "Maximum access date"; +const TQString rcOwnerUser = "Owner user filters"; +const TQString rcOwnerGroup = "Owner group filters"; +const TQString rcSearchMode = "Search only mode"; +const TQString rcBackupExtension = "Backup file extension"; +const TQString rcIgnoreFiles = "Ignore files if there is no match"; +const TQString rcNotifyOnErrors = "NotifyOnErrors"; +const TQString rcAskConfirmReplace = "Ask confirmation on replace"; +const TQString rcDontAskAgain = "Dont ask again"; // Default configuration options -const QString EncodingOption = "utf8"; +const TQString EncodingOption = "utf8"; const bool RecursiveOption = true; const bool CaseSensitiveOption = false; const bool FollowSymbolicLinksOption = false; @@ -64,11 +64,11 @@ 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 TQString AccessDateOption="unknown"; +const TQString ValidAccessDateOption="unknown"; +const TQString OwnerOption="false,Name,Equals To"; const bool SearchModeOption=true; -const QString BackupExtensionOption="false,~"; +const TQString BackupExtensionOption="false,~"; const bool IgnoreFilesOption = true; const bool NotifyOnErrorsOption = false; const bool AskConfirmReplaceOption = false; @@ -82,18 +82,18 @@ class RCOptions bool m_askConfirmReplace, m_dontAskAgain; - QStringList m_directories; - QStringList m_filters; - QString m_currentDirectory; + TQStringList m_directories; + TQStringList m_filters; + TQString m_currentDirectory; int m_minSize, m_maxSize; - QString m_dateAccess, + TQString m_dateAccess, m_minDate, m_maxDate; - QString m_encoding; + TQString m_encoding; bool m_caseSensitive, m_recursive, @@ -111,23 +111,23 @@ class RCOptions bool m_ownerUserIsChecked, m_ownerGroupIsChecked; - QString m_ownerUserType, + TQString m_ownerUserType, m_ownerGroupType, m_ownerUserValue, m_ownerGroupValue, m_ownerUserBool, m_ownerGroupBool; - QString m_backupExtension; + TQString m_backupExtension; bool m_ignoreFiles; KeyValueMap m_mapStringsView; - QString m_quickSearchString, + TQString m_quickSearchString, m_quickReplaceString; - QStringList m_recentStringFileList; + TQStringList m_recentStringFileList; bool m_notifyOnErrors; @@ -139,27 +139,27 @@ class RCOptions class ResultViewEntry { private: - QString m_key; - QString m_data; - QRegExp m_rxKey; + TQString m_key; + TQString m_data; + TQRegExp 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 ; + ResultViewEntry(TQString nkey, TQString ndata, bool regexp, bool caseSensitive); + int lineNumber(const TQString& line) const ; + int columnNumber(const TQString& line) const ; void incOccurrences(); int occurrences() const ; bool regexp()const ; - int pos(const QString& line) ; + int pos(const TQString& line) ; void incPos(); - QString capturedText(const QString& line) ; - QString message(const QString& capturedText, int x, int y) const; + TQString capturedText(const TQString& line) ; + TQString message(const TQString& capturedText, int x, int y) const; int keyLength() const; int dataLength() const; - void updateLine(QString& line); + void updateLine(TQString& line); }; #endif diff --git a/kfilereplace/kaddstringdlg.cpp b/kfilereplace/kaddstringdlg.cpp index 44b51f30..18f8895d 100644 --- a/kfilereplace/kaddstringdlg.cpp +++ b/kfilereplace/kaddstringdlg.cpp @@ -16,13 +16,13 @@ * * ***************************************************************************/ // QT -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include // KDE #include @@ -37,7 +37,7 @@ using namespace whatthisNameSpace; -KAddStringDlg::KAddStringDlg(RCOptions* info, bool wantEdit, QWidget *parent, const char *name) : KAddStringDlgS(parent,name,true) +KAddStringDlg::KAddStringDlg(RCOptions* info, bool wantEdit, TQWidget *parent, const char *name) : KAddStringDlgS(parent,name,true) { m_option = info; m_wantEdit = wantEdit; @@ -45,12 +45,12 @@ KAddStringDlg::KAddStringDlg(RCOptions* info, bool wantEdit, QWidget *parent, co 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())); + connect(m_pbOK, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotOK())); + connect(m_rbSearchOnly, TQT_SIGNAL(pressed()), this, TQT_SLOT(slotSearchOnly())); + connect(m_rbSearchReplace, TQT_SIGNAL(pressed()), this, TQT_SLOT(slotSearchReplace())); + connect(m_pbAdd, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotAddStringToView())); + connect(m_pbDel, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotDeleteStringFromView())); + connect(m_pbHelp, TQT_SIGNAL(clicked()), this ,TQT_SLOT(slotHelp())); whatsThis(); } @@ -58,8 +58,8 @@ KAddStringDlg::KAddStringDlg(RCOptions* info, bool wantEdit, QWidget *parent, co //PRIVATE void KAddStringDlg::initGUI() { - m_pbAdd->setIconSet(SmallIconSet(QString::fromLatin1("forward"))); - m_pbDel->setIconSet(SmallIconSet(QString::fromLatin1("back"))); + m_pbAdd->setIconSet(SmallIconSet(TQString::fromLatin1("forward"))); + m_pbDel->setIconSet(SmallIconSet(TQString::fromLatin1("back"))); m_stack->addWidget(m_stringView); m_stack->addWidget(m_stringView_2); @@ -94,14 +94,14 @@ void KAddStringDlg::initGUI() void KAddStringDlg::eraseViewItems() { - QListViewItem* item = m_sv->firstChild(); + TQListViewItem* item = m_sv->firstChild(); if(item == 0) return; else { while(item) { - QListViewItem* tempItem = item; + TQListViewItem* tempItem = item; item = item->nextSibling(); delete tempItem; } @@ -118,9 +118,9 @@ void KAddStringDlg::raiseView() m_stack->raiseWidget(m_sv); } -bool KAddStringDlg::columnContains(QListView* lv,const QString& s, int column) +bool KAddStringDlg::columnContains(TQListView* lv,const TQString& s, int column) { - QListViewItem* i = lv->firstChild(); + TQListViewItem* i = lv->firstChild(); while (i != 0) { if(i->text(column) == s) @@ -132,11 +132,11 @@ bool KAddStringDlg::columnContains(QListView* lv,const QString& s, int column) void KAddStringDlg::saveViewContentIntoMap() { - QListViewItem* i = m_sv->firstChild(); + TQListViewItem* i = m_sv->firstChild(); while(i != 0) { if(m_option->m_searchingOnlyMode) - m_currentMap[i->text(0)] = QString::null; + m_currentMap[i->text(0)] = TQString::null; else m_currentMap[i->text(0)] = i->text(1); i = i->nextSibling(); @@ -149,7 +149,7 @@ void KAddStringDlg::loadMapIntoView() for (itMap = m_currentMap.begin(); itMap != m_currentMap.end(); ++itMap) { - QListViewItem* temp = new QListViewItem(m_sv); + TQListViewItem* temp = new TQListViewItem(m_sv); temp->setText(0,itMap.key()); if(!m_option->m_searchingOnlyMode) temp->setText(1,itMap.data()); @@ -158,10 +158,10 @@ void KAddStringDlg::loadMapIntoView() void KAddStringDlg::whatsThis() { - QWhatsThis::add(m_rbSearchOnly, rbSearchOnlyWhatthis); - QWhatsThis::add(m_rbSearchReplace, rbSearchReplaceWhatthis); - QWhatsThis::add(m_edSearch, edSearchWhatthis); - QWhatsThis::add(m_edReplace, edReplaceWhatthis); + TQWhatsThis::add(m_rbSearchOnly, rbSearchOnlyWhatthis); + TQWhatsThis::add(m_rbSearchReplace, rbSearchReplaceWhatthis); + TQWhatsThis::add(m_edSearch, edSearchWhatthis); + TQWhatsThis::add(m_edReplace, edReplaceWhatthis); } //PRIVATE SLOTS @@ -208,24 +208,24 @@ void KAddStringDlg::slotAddStringToView() { if(m_option->m_searchingOnlyMode) { - QString text = m_edSearch->text(); + TQString text = m_edSearch->text(); if(!(text.isEmpty() || columnContains(m_sv, text, 0))) { - QListViewItem* lvi = new QListViewItem(m_sv); + TQListViewItem* lvi = new TQListViewItem(m_sv); lvi->setMultiLinesEnabled(true); lvi->setText(0,text); - m_currentMap[text] = QString::null; + m_currentMap[text] = TQString::null; m_edSearch->clear(); } } else { - QString searchText = m_edSearch->text(), + TQString 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); + TQListViewItem* lvi = new TQListViewItem(m_sv); lvi->setMultiLinesEnabled(true); lvi->setText(0,searchText); m_edSearch->clear(); @@ -239,7 +239,7 @@ void KAddStringDlg::slotAddStringToView() void KAddStringDlg::slotDeleteStringFromView() { // Choose current item or selected item - QListViewItem* currentItem = m_sv->currentItem(); + TQListViewItem* currentItem = m_sv->currentItem(); // Do nothing if list is empty if(currentItem == 0) @@ -266,7 +266,7 @@ void KAddStringDlg::slotDeleteStringFromView() void KAddStringDlg::slotHelp() { - kapp->invokeHelp(QString::null, "kfilereplace"); + kapp->invokeHelp(TQString::null, "kfilereplace"); } #include "kaddstringdlg.moc" diff --git a/kfilereplace/kaddstringdlg.h b/kfilereplace/kaddstringdlg.h index f51e7f77..23c446f4 100644 --- a/kfilereplace/kaddstringdlg.h +++ b/kfilereplace/kaddstringdlg.h @@ -30,12 +30,12 @@ class KAddStringDlg : public KAddStringDlgS Q_OBJECT private: RCOptions* m_option; - QListView* m_sv; + TQListView* m_sv; KeyValueMap m_currentMap; bool m_wantEdit; public: //Constructors - KAddStringDlg(RCOptions* info, bool wantEdit, QWidget *parent=0, const char *name=0); + KAddStringDlg(RCOptions* info, bool wantEdit, TQWidget *parent=0, const char *name=0); private slots: void slotOK(); @@ -65,7 +65,7 @@ class KAddStringDlg : public KAddStringDlgS /** * Verifies whether 'lv' contains 's' */ - bool columnContains(QListView* lv,const QString& s, int column); + bool columnContains(TQListView* lv,const TQString& s, int column); void saveViewContentIntoMap(); void loadMapIntoView(); void whatsThis(); diff --git a/kfilereplace/kfilereplace.cpp b/kfilereplace/kfilereplace.cpp index a6ade0fe..48b26f83 100644 --- a/kfilereplace/kfilereplace.cpp +++ b/kfilereplace/kfilereplace.cpp @@ -36,9 +36,9 @@ KFileReplace::KFileReplace() 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()); + KStdAction::quit(this, TQT_SLOT(close()), actionCollection()); + KStdAction::keyBindings(this, TQT_SLOT(slotConfigureKeys()), actionCollection()); + KStdAction::configureToolbars(this, TQT_SLOT(slotConfigureToolbars()), actionCollection()); setStandardToolBarMenuEnabled(true); createGUI(m_part); removeDuplicatedActions(); @@ -65,8 +65,8 @@ void KFileReplace::openURL(const KURL &url) void KFileReplace::slotConfigureKeys() { KKeyDialog dlg( false, this ); - QPtrList clients = guiFactory()->clients(); - for( QPtrListIterator it( clients ); + TQPtrList clients = guiFactory()->clients(); + for( TQPtrListIterator it( clients ); it.current(); ++it ) { dlg.insert( (*it)->actionCollection() ); @@ -78,8 +78,8 @@ void KFileReplace::slotConfigureToolbars() { saveMainWindowSettings(KGlobal::config(), autoSaveGroup()); KEditToolbar dlg(factory()); - connect(&dlg, SIGNAL(newToolbarConfig()), - this, SLOT(applyNewToolbarConfig())); + connect(&dlg, TQT_SIGNAL(newToolbarConfig()), + this, TQT_SLOT(applyNewToolbarConfig())); dlg.exec(); } @@ -99,7 +99,7 @@ void KFileReplace::removeDuplicatedActions() if (!part_about_action || !part_report_action || !part_help_action || !part_action_collection) return; - QWidget* container = part_about_action->container(0); + TQWidget* container = part_about_action->container(0); part_about_action->unplug(container); part_report_action->unplug(container); part_help_action->unplug(container); diff --git a/kfilereplace/kfilereplaceiface.h b/kfilereplace/kfilereplaceiface.h index ab7348d2..3c62ae99 100644 --- a/kfilereplace/kfilereplaceiface.h +++ b/kfilereplace/kfilereplaceiface.h @@ -24,7 +24,7 @@ class KFileReplaceIface : virtual public DCOPObject K_DCOP k_dcop: - virtual void openURL(const QString& url) = 0; + virtual void openURL(const TQString& url) = 0; }; #endif // KFILEREPLACEIFACE_H diff --git a/kfilereplace/kfilereplacelib.cpp b/kfilereplace/kfilereplacelib.cpp index e57a3a84..6e0d8323 100644 --- a/kfilereplace/kfilereplacelib.cpp +++ b/kfilereplace/kfilereplacelib.cpp @@ -20,10 +20,10 @@ ***************************************************************************/ //QT -#include -#include -#include -#include +#include +#include +#include +#include //KDE #include @@ -48,10 +48,10 @@ const double tera = 1099511627776.0;//1024^4 .................* 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) +TQString KFileReplaceLib::formatFullPath(const TQString& basePath, const TQString &fileName) { - QString fullPath = basePath; - QString fname = fileName; + TQString fullPath = basePath; + TQString fname = fileName; if (fname.startsWith("/")) // skip beginning '/' fname = fname.remove(0,1); @@ -70,10 +70,10 @@ QString KFileReplaceLib::formatFullPath(const QString& basePath, const QString & .................* extension: extension to add without "." (ex: "html", "kfr") Return values:...* Filename / Filepath with the extension */ -QString KFileReplaceLib::addExtension(const QString& fileName, const QString& extension) +TQString KFileReplaceLib::addExtension(const TQString& fileName, const TQString& extension) { - QString fullExtension = "."; - QString fname = fileName; + TQString fullExtension = "."; + TQString fname = fileName; fullExtension.append(extension); @@ -89,9 +89,9 @@ QString KFileReplaceLib::addExtension(const QString& fileName, const QString& ex return fname; } -QString KFileReplaceLib::formatFileSize(double size) +TQString KFileReplaceLib::formatFileSize(double size) { - QString stringSize; + TQString stringSize; if(size < kilo) { @@ -102,24 +102,24 @@ QString KFileReplaceLib::formatFileSize(double size) if(size >= kilo && size < mega) { double d = size / kilo; - stringSize = i18n("%1 KB").arg(QString::number(d,'f',2)); + stringSize = i18n("%1 KB").arg(TQString::number(d,'f',2)); } else if(size >= mega && size < giga) { double d = size / mega; - stringSize = i18n("%1 MB").arg(QString::number(d,'f',2)); + stringSize = i18n("%1 MB").arg(TQString::number(d,'f',2)); } else if(size >= giga) { double d = size / giga; - stringSize = i18n("%1 GB").arg(QString::number(d,'f',2)); + stringSize = i18n("%1 GB").arg(TQString::number(d,'f',2)); } return stringSize; } -void KFileReplaceLib::convertOldToNewKFRFormat(const QString& fileName, KListView* stringView) +void KFileReplaceLib::convertOldToNewKFRFormat(const TQString& fileName, KListView* stringView) { //this method convert old format in new XML-based format typedef struct @@ -133,7 +133,7 @@ void KFileReplaceLib::convertOldToNewKFRFormat(const QString& fileName, KListVie FILE* f = fopen(fileName.ascii(),"rb"); int err = fread(&head, sizeof(KFRHeader), 1, f); - QString pgm(head.pgm); + TQString pgm(head.pgm); if(!f || (err != 1) || (pgm != "KFileReplace")) { @@ -147,7 +147,7 @@ void KFileReplaceLib::convertOldToNewKFRFormat(const QString& fileName, KListVie newTextSize, errors = 0, stringSize; - QStringList l; + TQStringList l; int i ; for (i=0; i < head.stringNumber; i++) @@ -177,7 +177,7 @@ void KFileReplaceLib::convertOldToNewKFRFormat(const QString& fileName, KListVie KMessageBox::error(0, i18n("Cannot read data.")); else { - QListViewItem* lvi = new QListViewItem(stringView); + TQListViewItem* lvi = new TQListViewItem(stringView); lvi->setText(0,oldString); lvi->setText(1,newString); @@ -195,13 +195,13 @@ void KFileReplaceLib::convertOldToNewKFRFormat(const QString& fileName, KListVie return ; } -bool KFileReplaceLib::isAnAccessibleFile(const QString& filePath, const QString& fileName, RCOptions* info) +bool KFileReplaceLib::isAnAccessibleFile(const TQString& filePath, const TQString& fileName, RCOptions* info) { - QString bkExt = info->m_backupExtension; + TQString bkExt = info->m_backupExtension; if(fileName == ".." || fileName == "." || (!bkExt.isEmpty() && fileName.right(bkExt.length()) == bkExt)) return false; - QFileInfo fi; + TQFileInfo fi; if(filePath.isEmpty()) fi.setFile(fileName); else @@ -212,12 +212,12 @@ bool KFileReplaceLib::isAnAccessibleFile(const QString& filePath, const QString& int minSize = info->m_minSize, maxSize = info->m_maxSize; - QString minDate = info->m_minDate, + TQString minDate = info->m_minDate, maxDate = info->m_maxDate, dateAccess = info->m_dateAccess; // Avoid files that not match access date requirements - QString last = "unknown"; + TQString last = "unknown"; if(dateAccess == "Last Writing Access") last = fi.lastModified().toString(Qt::ISODate); if(dateAccess == "Last Reading Access") @@ -255,11 +255,11 @@ bool KFileReplaceLib::isAnAccessibleFile(const QString& filePath, const QString& // Avoid files that not match ownership requirements if(info->m_ownerUserIsChecked) { - QString fileOwnerUser; + TQString fileOwnerUser; if(info->m_ownerUserType == "Name") fileOwnerUser = fi.owner(); else - fileOwnerUser = QString::number(fi.ownerId(),10); + fileOwnerUser = TQString::number(fi.ownerId(),10); if(info->m_ownerUserBool == "Equals To") { @@ -275,11 +275,11 @@ bool KFileReplaceLib::isAnAccessibleFile(const QString& filePath, const QString& if(info->m_ownerGroupIsChecked) { - QString fileOwnerGroup; + TQString fileOwnerGroup; if(info->m_ownerGroupType == "Name") fileOwnerGroup = fi.group(); else - fileOwnerGroup = QString::number(fi.groupId(),10); + fileOwnerGroup = TQString::number(fi.groupId(),10); if(info->m_ownerGroupBool == "Equals To") { if(info->m_ownerGroupValue != fileOwnerGroup) @@ -296,10 +296,10 @@ bool KFileReplaceLib::isAnAccessibleFile(const QString& filePath, const QString& return true; } -void KFileReplaceLib::setIconForFileEntry(QListViewItem* item, QString path) +void KFileReplaceLib::setIconForFileEntry(TQListViewItem* item, TQString path) { - QFileInfo fi(path); - QString extension = fi.extension(), + TQFileInfo fi(path); + TQString extension = fi.extension(), baseName = fi.baseName(); KeyValueMap extensionMap; diff --git a/kfilereplace/kfilereplacelib.h b/kfilereplace/kfilereplacelib.h index e5c14c72..de80d17d 100644 --- a/kfilereplace/kfilereplacelib.h +++ b/kfilereplace/kfilereplacelib.h @@ -38,7 +38,7 @@ class KFileReplaceLib .................* 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); + static TQString formatFullPath(const TQString& basePath, const TQString& fileName); /** Add an extension to a filename, or a filepath @@ -46,20 +46,20 @@ class KFileReplaceLib .................* 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 TQString addExtension(const TQString& fileName, const TQString& extension); - static QString formatFileSize(double size); + static TQString formatFileSize(double size); /** converts the old kfr format file in the new xml-based format. */ - static void convertOldToNewKFRFormat(const QString& fileName, KListView* stringView); + static void convertOldToNewKFRFormat(const TQString& 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 bool isAnAccessibleFile(const TQString& filePath, const TQString& fileName, RCOptions* info); - static void setIconForFileEntry(QListViewItem* item, QString path); + static void setIconForFileEntry(TQListViewItem* item, TQString path); }; #endif // KFILEREPLACEFILELIB_H diff --git a/kfilereplace/kfilereplacepart.cpp b/kfilereplace/kfilereplacepart.cpp index 9e0be192..adfd6a4f 100644 --- a/kfilereplace/kfilereplacepart.cpp +++ b/kfilereplace/kfilereplacepart.cpp @@ -13,11 +13,11 @@ // // QT -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include // KDE #include @@ -60,7 +60,7 @@ typedef KParts::GenericFactory FileReplaceFactory; K_EXPORT_COMPONENT_FACTORY( libkfilereplacepart, FileReplaceFactory ) -KFileReplacePart::KFileReplacePart(QWidget* parentWidget, const char* , QObject* parent, const char* name, const QStringList & ) : KParts::ReadOnlyPart(parent,name) +KFileReplacePart::KFileReplacePart(TQWidget* parentWidget, const char* , TQObject* parent, const char* name, const TQStringList & ) : KParts::ReadOnlyPart(parent,name) { setInstance(FileReplaceFactory::instance()); KGlobal::locale()->insertCatalogue("kfilereplace"); @@ -68,7 +68,7 @@ KFileReplacePart::KFileReplacePart(QWidget* parentWidget, const char* , QObject* m_config = new KConfig("kfilereplacerc"); m_aboutDlg = 0; m_stop = false; - m_optionMask = QDir::Files; + m_optionMask = TQDir::Files; m_w = widget(); m_option = 0; @@ -114,13 +114,13 @@ void KFileReplacePart::slotSearchingOperation() rv->setSorting(-1); // show wait cursor - QApplication::setOverrideCursor( Qt::waitCursor ); + TQApplication::setOverrideCursor( Qt::waitCursor ); freezeActions(); setOptionMask(); - QString currentDirectory = m_option->m_directories[0], + TQString currentDirectory = m_option->m_directories[0], currentFilter = m_option->m_filters[0]; //m_currentDir = currentDirectory; @@ -146,7 +146,7 @@ void KFileReplacePart::slotSearchingOperation() // restore false status for stop button m_stop = false; - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); emit setStatusBarText(i18n("Search completed.")); @@ -179,7 +179,7 @@ void KFileReplacePart::slotReplacingOperation() rv->setColumnText(4,i18n("Replaced strings")); } // show wait cursor - QApplication::setOverrideCursor( Qt::waitCursor ); + TQApplication::setOverrideCursor( Qt::waitCursor ); freezeActions(); @@ -189,7 +189,7 @@ void KFileReplacePart::slotReplacingOperation() m_view->showSemaphore("green"); - QString currentDirectory = m_option->m_directories[0]; + TQString currentDirectory = m_option->m_directories[0]; m_view->showSemaphore("red"); @@ -210,7 +210,7 @@ void KFileReplacePart::slotReplacingOperation() // restore false status for stop button m_stop = false; - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); m_option->m_searchingOnlyMode = false; @@ -232,7 +232,7 @@ void KFileReplacePart::slotStop() { emit setStatusBarText(i18n("Stopping...")); m_stop = true; - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); resetActions(); } @@ -248,21 +248,21 @@ void KFileReplacePart::slotCreateReport() 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")); + TQString documentName = KFileDialog::getSaveFileName(TQString::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); + TQFileInfo fileInfo(documentName); if(fileInfo.exists()) { KMessageBox::error(m_w, i18n("A folder or a file named %1 already exists.").arg(documentName)); return ; } - QDir directoryName; + TQDir directoryName; if(!directoryName.mkdir(documentName, true)) { @@ -272,7 +272,7 @@ void KFileReplacePart::slotCreateReport() directoryName.cd(documentName); - QString documentPath = documentName+"/"+directoryName.dirName(); + TQString documentPath = documentName+"/"+directoryName.dirName(); Report report(m_option, rv, sv); report.createDocument(documentPath); @@ -291,8 +291,8 @@ 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; + TQString qs = m_option->m_quickSearchString; + TQStringList map; map.append(qs.left(1)); map.append(qs.right(qs.length()-1)); @@ -344,8 +344,8 @@ void KFileReplacePart::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")); + TQString menu = "*.kfr|" + i18n("KFileReplace strings") + " (*.kfr)\n*|"+i18n("All Files") + " (*)"; + TQString fileName = KFileDialog::getOpenFileName(TQString::null, menu, m_w, i18n("Load Strings From File")); if(!fileName.isEmpty()) loadRulesFile(fileName); @@ -367,14 +367,14 @@ void KFileReplacePart::slotStringsInvertAll() void KFileReplacePart::slotOpenRecentStringFile(const KURL& urlFile) { - QString fileName; + TQString 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; + TQFileInfo fileInfo; fileInfo.setFile(fileName); if(fileInfo.isDir()) { @@ -431,7 +431,7 @@ void KFileReplacePart::slotOptionPreferences() void KFileReplacePart::showAboutApplication() { - m_aboutDlg = new KAboutApplication(createAboutData(), (QWidget *)0, (const char *)0, false); + m_aboutDlg = new KAboutApplication(createAboutData(), (TQWidget *)0, (const char *)0, false); if(m_aboutDlg == 0) return; @@ -443,7 +443,7 @@ void KFileReplacePart::showAboutApplication() void KFileReplacePart::appHelpActivated() { - kapp->invokeHelp(QString::null, "kfilereplace"); + kapp->invokeHelp(TQString::null, "kfilereplace"); } void KFileReplacePart::reportBug() @@ -567,48 +567,48 @@ void KFileReplacePart::initGUI() } } // 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"); + (void)new KAction(i18n("Customize Search/Replace Session..."), "projectopen", 0, this, TQT_SLOT(slotSetNewParameters()), actionCollection(), "new_project"); + (void)new KAction(i18n("&Search"), "filesearch", 0, this, TQT_SLOT(slotSearchingOperation()), actionCollection(), "search"); + (void)new KAction(i18n("S&imulate"), "filesimulate", 0, this, TQT_SLOT(slotSimulatingOperation()), actionCollection(), "file_simulate"); + (void)new KAction(i18n("&Replace"), "filereplace", 0, this, TQT_SLOT(slotReplacingOperation()), actionCollection(), "replace"); + (void)new KAction(i18n("Sto&p"), "stop", 0, this, TQT_SLOT(slotStop()), actionCollection(), "stop"); + (void)new KAction(i18n("Cre&ate Report File..."), "filesaveas", 0, this, TQT_SLOT(slotCreateReport()), actionCollection(), "save_results"); // Strings - (void)new KAction(i18n("&Add String..."), "editadd", 0, this, SLOT(slotStringsAdd()), actionCollection(), "strings_add"); + (void)new KAction(i18n("&Add String..."), "editadd", 0, this, TQT_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"); + (void)new KAction(i18n("&Delete String"), "editremove", 0, this, TQT_SLOT(slotStringsDeleteItem()), actionCollection(), "strings_del"); + (void)new KAction(i18n("&Empty Strings List"), "editdelete", 0, this, TQT_SLOT(slotStringsEmpty()), actionCollection(), "strings_empty"); + (void)new KAction(i18n("Edit Selected String..."), "edit", 0, this, TQT_SLOT(slotStringsEdit()), actionCollection(), "strings_edit"); + (void)new KAction(i18n("&Save Strings List to File..."), "filesaveas", 0, this, TQT_SLOT(slotStringsSave()), actionCollection(), "strings_save"); + (void)new KAction(i18n("&Load Strings List From File..."), "unsortedList", 0, this, TQT_SLOT(slotStringsLoad()), actionCollection(), "strings_load"); + (void)new KRecentFilesAction(i18n("&Load Recent Strings Files"), "fileopen", 0, this, TQT_SLOT(slotOpenRecentStringFile(const KURL&)), actionCollection(),"strings_load_recent"); + (void)new KAction(i18n("&Invert Current String (search <--> replace)"), "invert", 0, this, TQT_SLOT(slotStringsInvertCur()), actionCollection(), "strings_invert"); + (void)new KAction(i18n("&Invert All Strings (search <--> replace)"), "invert", 0, this, TQT_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"); + (void)new KToggleAction(i18n("&Include Sub-Folders"), "recursive_option", 0, this, TQT_SLOT(slotOptionRecursive()), actionCollection(), "options_recursive"); + (void)new KToggleAction(i18n("Create &Backup Files"), "backup_option", 0, this, TQT_SLOT(slotOptionBackup()), actionCollection(), "options_backup"); + (void)new KToggleAction(i18n("Case &Sensitive"), "casesensitive_option", 0, this, TQT_SLOT(slotOptionCaseSensitive()), actionCollection(), "options_case"); + (void)new KToggleAction(i18n("Enable Commands &in Replace String: [$command:option$]"), "command_option", 0, this, TQT_SLOT(slotOptionVariables()), actionCollection(), "options_var"); + (void)new KToggleAction(i18n("Enable &Regular Expressions"), "regularexpression_option", 0, this, TQT_SLOT(slotOptionRegularExpressions()), actionCollection(), "options_regularexpressions"); + (void)new KAction(i18n("Configure &KFileReplace..."), "configure", 0, this, TQT_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"); + (void)new KAction(i18n("&Properties"), "informations", 0, m_view, TQT_SLOT(slotResultProperties()), actionCollection(), "results_infos"); + (void)new KAction(i18n("&Open"), "filenew", 0, m_view, TQT_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("&Edit in Quanta"), "quanta", 0, m_view, TQT_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)new KAction(i18n("Open Parent &Folder"), "fileopen", 0, m_view, TQT_SLOT(slotResultDirOpen()), actionCollection(), "results_opendir"); + (void)new KAction(i18n("&Delete"), "editdelete", 0, m_view, TQT_SLOT(slotResultDelete()), actionCollection(), "results_delete"); + (void)new KAction(i18n("E&xpand Tree"), 0, m_view, TQT_SLOT(slotResultTreeExpand()), actionCollection(), "results_treeexpand"); + (void)new KAction(i18n("&Reduce Tree"), 0, m_view, TQT_SLOT(slotResultTreeReduce()), actionCollection(), "results_treereduce"); + (void)new KAction(i18n("&About KFileReplace"), "kfilereplace", 0, this, TQT_SLOT(showAboutApplication()), actionCollection(), "help_about_kfilereplace"); + (void)new KAction(i18n("KFileReplace &Handbook"), "help", 0, this, TQT_SLOT(appHelpActivated()), actionCollection(), "help_kfilereplace"); + (void)new KAction(i18n("&Report Bug"), 0, 0, this, TQT_SLOT(reportBug()), actionCollection(), "report_bug"); } @@ -703,7 +703,7 @@ void KFileReplacePart::loadOptions() m_option->m_askConfirmReplace = m_config->readBoolEntry(rcAskConfirmReplace, AskConfirmReplaceOption); - QString dontAskAgain = m_config->readEntry(rcDontAskAgain, "no"); + TQString dontAskAgain = m_config->readEntry(rcDontAskAgain, "no"); if(dontAskAgain == "yes") m_option->m_askConfirmReplace = false; @@ -730,7 +730,7 @@ void KFileReplacePart::loadOwnerOptions() { m_config->setGroup("Owner options"); - QStringList ownerList = QStringList::split(',',m_config->readEntry(rcOwnerUser, OwnerOption),true); + TQStringList ownerList = TQStringList::split(',',m_config->readEntry(rcOwnerUser, OwnerOption),true); if(ownerList[0] == "true") m_option->m_ownerUserIsChecked = true; else @@ -740,7 +740,7 @@ void KFileReplacePart::loadOwnerOptions() m_option->m_ownerUserBool = ownerList[2]; m_option->m_ownerUserValue = ownerList[3]; - ownerList = QStringList::split(',',m_config->readEntry(rcOwnerGroup, OwnerOption),true); + ownerList = TQStringList::split(',',m_config->readEntry(rcOwnerGroup, OwnerOption),true); if(ownerList[0] == "true") m_option->m_ownerGroupIsChecked = true; @@ -755,7 +755,7 @@ void KFileReplacePart::loadOwnerOptions() void KFileReplacePart::loadLocationsList() { m_config->setGroup("Directories"); - QStringList locationsEntryList; + TQStringList locationsEntryList; #if KDE_IS_VERSION(3,1,3) locationsEntryList = m_config->readPathListEntry(rcDirectoriesList); #else @@ -763,14 +763,14 @@ void KFileReplacePart::loadLocationsList() #endif if(locationsEntryList.isEmpty()) - locationsEntryList.append(QDir::current().path()); + locationsEntryList.append(TQDir::current().path()); m_option->m_directories = locationsEntryList; } void KFileReplacePart::loadFiltersList() { - QStringList filtersEntryList; + TQStringList filtersEntryList; m_config->setGroup("Filters"); #if KDE_IS_VERSION(3,1,3) @@ -788,7 +788,7 @@ void KFileReplacePart::loadFiltersList() void KFileReplacePart::loadBackupExtensionOptions() { m_config->setGroup("Options"); - QStringList bkList = QStringList::split(',', + TQStringList bkList = TQStringList::split(',', m_config->readEntry(rcBackupExtension, BackupExtensionOption), true); if(bkList[0] == "true") @@ -866,7 +866,7 @@ void KFileReplacePart::saveOwnerOptions() { m_config->setGroup("Owner options"); - QString list; + TQString list; if(m_option->m_ownerUserIsChecked) list = "true,"; else @@ -916,7 +916,7 @@ void KFileReplacePart::saveFiltersList() void KFileReplacePart::saveBackupExtensionOptions() { m_config->setGroup("Options"); - QString bkOptions; + TQString bkOptions; if(m_option->m_backup) bkOptions = "true," + m_option->m_backupExtension; else @@ -928,21 +928,21 @@ void KFileReplacePart::saveBackupExtensionOptions() void KFileReplacePart::fileReplace() { - QString directoryName = m_option->m_directories[0]; - QDir d(directoryName); + TQString directoryName = m_option->m_directories[0]; + TQDir d(directoryName); d.setMatchAllDirs(true); d.setFilter(m_optionMask); - QString currentFilter = m_option->m_filters[0]; - QStringList filesList = d.entryList(currentFilter); - QStringList::iterator filesIt; + TQString currentFilter = m_option->m_filters[0]; + TQStringList filesList = d.entryList(currentFilter); + TQStringList::iterator filesIt; int filesNumber = 0; m_view->displayScannedFiles(filesNumber); for (filesIt = filesList.begin(); filesIt != filesList.end() ; ++filesIt) { - QString fileName = (*filesIt); + TQString fileName = (*filesIt); // m_stop == true means that we pushed the stop button if(m_stop) @@ -962,21 +962,21 @@ void KFileReplacePart::fileReplace() } } -void KFileReplacePart::recursiveFileReplace(const QString& directoryName, int& filesNumber) +void KFileReplacePart::recursiveFileReplace(const TQString& directoryName, int& filesNumber) { //if m_stop == true then interrupts recursion if(m_stop) return; else { - QDir d(directoryName); + TQDir d(directoryName); d.setMatchAllDirs(true); d.setFilter(m_optionMask); - QString currentFilter = m_option->m_filters[0]; - QStringList filesList = d.entryList(currentFilter); - QStringList::iterator filesIt; + TQString currentFilter = m_option->m_filters[0]; + TQStringList filesList = d.entryList(currentFilter); + TQStringList::iterator filesIt; for(filesIt = filesList.begin(); filesIt != filesList.end(); ++filesIt) { @@ -984,15 +984,15 @@ void KFileReplacePart::recursiveFileReplace(const QString& directoryName, int& f if(m_stop) break; - QString fileName = (*filesIt); + TQString fileName = (*filesIt); // Avoids files that not match requirements if(!KFileReplaceLib::isAnAccessibleFile(d.canonicalPath(),fileName, m_option)) continue; - QString filePath = d.canonicalPath()+"/"+fileName; + TQString filePath = d.canonicalPath()+"/"+fileName; - QFileInfo qi(filePath); + TQFileInfo qi(filePath); m_view->displayScannedFiles(filesNumber); @@ -1014,30 +1014,30 @@ void KFileReplacePart::recursiveFileReplace(const QString& directoryName, int& f } } -void KFileReplacePart::replaceAndBackup(const QString& currentDir, const QString& oldFileName) +void KFileReplacePart::replaceAndBackup(const TQString& currentDir, const TQString& oldFileName) { //Creates a path string - QString oldPathString = currentDir+"/"+oldFileName; + TQString oldPathString = currentDir+"/"+oldFileName; - QFile currentFile(oldPathString); + TQFile currentFile(oldPathString); if(!currentFile.open(IO_ReadOnly)) { - KMessageBox::information(m_w, i18n("Cannot open file %1 for reading.").arg(oldFileName),QString::null, rcNotifyOnErrors); + KMessageBox::information(m_w, i18n("Cannot open file %1 for reading.").arg(oldFileName),TQString::null, rcNotifyOnErrors); return ; } - QTextStream currentStream(¤tFile); + TQTextStream currentStream(¤tFile); if (m_option->m_encoding == "utf8") - currentStream.setEncoding(QTextStream::UnicodeUTF8); + currentStream.setEncoding(TQTextStream::UnicodeUTF8); else - currentStream.setCodec(QTextCodec::codecForName(m_option->m_encoding)); - QString line = currentStream.read(), + currentStream.setCodec(TQTextCodec::codecForName(m_option->m_encoding)); + TQString line = currentStream.read(), backupLine = line; - QString backupSize = KFileReplaceLib::formatFileSize(currentFile.size()); + TQString backupSize = KFileReplaceLib::formatFileSize(currentFile.size()); currentFile.close(); - QString backupExtension = m_option->m_backupExtension; + TQString backupExtension = m_option->m_backupExtension; bool atLeastOneStringFound = false; KListViewItem *item = 0; @@ -1058,17 +1058,17 @@ void KFileReplacePart::replaceAndBackup(const QString& currentDir, const QString { if(atLeastOneStringFound) { - QFile newFile(oldPathString); + TQFile newFile(oldPathString); if(!newFile.open(IO_WriteOnly)) { - KMessageBox::information(m_w, i18n("Cannot open file %1 for writing.").arg(oldFileName),QString::null, rcNotifyOnErrors); + KMessageBox::information(m_w, i18n("Cannot open file %1 for writing.").arg(oldFileName),TQString::null, rcNotifyOnErrors); return ; } - QTextStream newStream(&newFile); + TQTextStream newStream(&newFile); if (m_option->m_encoding == "utf8") - newStream.setEncoding(QTextStream::UnicodeUTF8); + newStream.setEncoding(TQTextStream::UnicodeUTF8); else - newStream.setCodec(QTextCodec::codecForName(m_option->m_encoding)); + newStream.setCodec(TQTextCodec::codecForName(m_option->m_encoding)); newStream << line; newFile.close(); } @@ -1077,14 +1077,14 @@ void KFileReplacePart::replaceAndBackup(const QString& currentDir, const QString if(!m_option->m_ignoreFiles) atLeastOneStringFound = true; - QFileInfo oldFileInfo(oldPathString); + TQFileInfo 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()); + TQString newSize = KFileReplaceLib::formatFileSize(oldFileInfo.size()); if(!m_option->m_simulation) { item->setText(2, backupSize); @@ -1096,33 +1096,33 @@ void KFileReplacePart::replaceAndBackup(const QString& currentDir, const QString 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())); + item->setText(4,TQString::number(occurrence,10)); + item->setText(5,TQString("%1[%2]").arg(oldFileInfo.owner()).arg(oldFileInfo.ownerId())); + item->setText(6,TQString("%1[%2]").arg(oldFileInfo.group()).arg(oldFileInfo.groupId())); } } -void KFileReplacePart::replaceAndOverwrite(const QString& currentDir, const QString& oldFileName) +void KFileReplacePart::replaceAndOverwrite(const TQString& currentDir, const TQString& oldFileName) { - QString oldPathString = currentDir+"/"+oldFileName; - QFile oldFile(oldPathString); - QFileInfo oldFileInfo(oldPathString); + TQString oldPathString = currentDir+"/"+oldFileName; + TQFile oldFile(oldPathString); + TQFileInfo oldFileInfo(oldPathString); if (!oldFile.open(IO_ReadOnly)) { - KMessageBox::information(m_w, i18n("Cannot open file %1 for reading.").arg(oldFile.name()),QString::null, rcNotifyOnErrors); + KMessageBox::information(m_w, i18n("Cannot open file %1 for reading.").arg(oldFile.name()),TQString::null, rcNotifyOnErrors); return ; } - QString fileSizeBeforeReplacing = KFileReplaceLib::formatFileSize(oldFileInfo.size()); + TQString fileSizeBeforeReplacing = KFileReplaceLib::formatFileSize(oldFileInfo.size()); KListViewItem *item = 0; - QTextStream oldStream( &oldFile ); + TQTextStream oldStream( &oldFile ); if (m_option->m_encoding == "utf8") - oldStream.setEncoding(QTextStream::UnicodeUTF8); + oldStream.setEncoding(TQTextStream::UnicodeUTF8); else - oldStream.setCodec(QTextCodec::codecForName(m_option->m_encoding)); - QString line = oldStream.read(); + oldStream.setCodec(TQTextCodec::codecForName(m_option->m_encoding)); + TQString line = oldStream.read(); oldFile.close(); @@ -1136,24 +1136,24 @@ void KFileReplacePart::replaceAndOverwrite(const QString& currentDir, const QStr { if(atLeastOneStringFound) { - QFile newFile(oldPathString); + TQFile newFile(oldPathString); if(!newFile.open(IO_WriteOnly)) { - KMessageBox::information(m_w, i18n("Cannot open file %1 for writing.").arg(newFile.name()),QString::null, rcNotifyOnErrors); + KMessageBox::information(m_w, i18n("Cannot open file %1 for writing.").arg(newFile.name()),TQString::null, rcNotifyOnErrors); return ; } - QTextStream newStream( &newFile ); + TQTextStream newStream( &newFile ); if (m_option->m_encoding == "utf8") - newStream.setEncoding(QTextStream::UnicodeUTF8); + newStream.setEncoding(TQTextStream::UnicodeUTF8); else - newStream.setCodec(QTextCodec::codecForName(m_option->m_encoding)); + newStream.setCodec(TQTextCodec::codecForName(m_option->m_encoding)); newStream << line; newFile.close(); } } - QFileInfo nf(oldPathString); - QString fileSizeAfterReplacing = KFileReplaceLib::formatFileSize(nf.size()); + TQFileInfo nf(oldPathString); + TQString fileSizeAfterReplacing = KFileReplaceLib::formatFileSize(nf.size()); //if ignoreFiles == false then every files must be show if(!m_option->m_ignoreFiles) @@ -1170,13 +1170,13 @@ void KFileReplacePart::replaceAndOverwrite(const QString& currentDir, const QStr 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())); + item->setText(4,TQString::number(occurrence,10)); + item->setText(5,TQString("%1[%2]").arg(oldFileInfo.owner()).arg(oldFileInfo.ownerId())); + item->setText(6,TQString("%1[%2]").arg(oldFileInfo.group()).arg(oldFileInfo.groupId())); } } -void KFileReplacePart::replacingLoop(QString& line, KListViewItem** item, bool& atLeastOneStringFound, int& occur, bool regularExpression, bool& askConfirmReplace) +void KFileReplacePart::replacingLoop(TQString& line, KListViewItem** item, bool& atLeastOneStringFound, int& occur, bool regularExpression, bool& askConfirmReplace) { KeyValueMap tempMap = m_replacementMap; KeyValueMap::Iterator it; @@ -1204,7 +1204,7 @@ void KFileReplacePart::replacingLoop(QString& line, KListViewItem** item, bool& if(answer == KMessageBox::Yes) { atLeastOneStringFound = true; - QString msg = entry.message(entry.capturedText(line), + TQString msg = entry.message(entry.capturedText(line), entry.lineNumber(line), entry.columnNumber(line)); @@ -1226,7 +1226,7 @@ void KFileReplacePart::replacingLoop(QString& line, KListViewItem** item, bool& else { atLeastOneStringFound = true; - QString msg = entry.message(entry.capturedText(line), + TQString msg = entry.message(entry.capturedText(line), entry.lineNumber(line), entry.columnNumber(line)); @@ -1244,16 +1244,16 @@ void KFileReplacePart::replacingLoop(QString& line, KListViewItem** item, bool& } } -void KFileReplacePart::fileSearch(const QString& directoryName, const QString& filters) +void KFileReplacePart::fileSearch(const TQString& directoryName, const TQString& filters) { - QDir d(directoryName); + TQDir d(directoryName); d.setMatchAllDirs(true); d.setFilter(m_optionMask); - QStringList filesList = d.entryList(filters); - QString filePath = d.canonicalPath(); - QStringList::iterator filesIt; + TQStringList filesList = d.entryList(filters); + TQString filePath = d.canonicalPath(); + TQStringList::iterator filesIt; uint filesNumber = 0; m_view->displayScannedFiles(filesNumber); @@ -1264,13 +1264,13 @@ void KFileReplacePart::fileSearch(const QString& directoryName, const QString& f if(m_stop) break; - QString fileName = (*filesIt); + TQString fileName = (*filesIt); // Avoids files that not match if(!KFileReplaceLib::isAnAccessibleFile(filePath, fileName, m_option)) continue; - QFileInfo fileInfo(filePath+"/"+fileName); + TQFileInfo fileInfo(filePath+"/"+fileName); if(fileInfo.isDir()) continue; kapp->processEvents(); @@ -1280,21 +1280,21 @@ void KFileReplacePart::fileSearch(const QString& directoryName, const QString& f } } -void KFileReplacePart::recursiveFileSearch(const QString& directoryName, const QString& filters, uint& filesNumber) +void KFileReplacePart::recursiveFileSearch(const TQString& directoryName, const TQString& filters, uint& filesNumber) { // if m_stop == true then interrupt recursion if(m_stop) return; else { - QDir d(directoryName); + TQDir d(directoryName); d.setMatchAllDirs(true); d.setFilter(m_optionMask); - QStringList filesList = d.entryList(filters); - QString filePath = d.canonicalPath(); - QStringList::iterator filesIt; + TQStringList filesList = d.entryList(filters); + TQString filePath = d.canonicalPath(); + TQStringList::iterator filesIt; for(filesIt = filesList.begin(); filesIt != filesList.end(); ++filesIt) { @@ -1302,13 +1302,13 @@ void KFileReplacePart::recursiveFileSearch(const QString& directoryName, const Q if(m_stop) break; - QString fileName = (*filesIt); + TQString fileName = (*filesIt); // Avoids files that not match if(!KFileReplaceLib::isAnAccessibleFile(filePath, fileName, m_option)) continue; // Composes file path string - QFileInfo fileInfo(filePath+"/"+fileName); + TQFileInfo fileInfo(filePath+"/"+fileName); m_view->displayScannedFiles(filesNumber); @@ -1326,25 +1326,25 @@ void KFileReplacePart::recursiveFileSearch(const QString& directoryName, const Q } } -void KFileReplacePart::search(const QString& currentDir, const QString& fileName) +void KFileReplacePart::search(const TQString& currentDir, const TQString& fileName) { - QFile file(currentDir+"/"+fileName); + TQFile file(currentDir+"/"+fileName); if(!file.open(IO_ReadOnly)) { - KMessageBox::information(m_w, i18n("Cannot open file %1 for reading.").arg(fileName), QString::null, rcNotifyOnErrors); + KMessageBox::information(m_w, i18n("Cannot open file %1 for reading.").arg(fileName), TQString::null, rcNotifyOnErrors); return ; } // Creates a stream with the file - QTextStream stream( &file ); + TQTextStream stream( &file ); if (m_option->m_encoding == "utf8") - stream.setEncoding(QTextStream::UnicodeUTF8); + stream.setEncoding(TQTextStream::UnicodeUTF8); else - stream.setCodec(QTextCodec::codecForName(m_option->m_encoding)); - QString line = stream.read(); + stream.setCodec(TQTextCodec::codecForName(m_option->m_encoding)); + TQString line = stream.read(); file.close(); - QFileInfo fileInfo(currentDir+"/"+fileName); + TQFileInfo fileInfo(currentDir+"/"+fileName); KListViewItem *item = 0; @@ -1366,12 +1366,12 @@ void KFileReplacePart::search(const QString& currentDir, const QString& fileName if(m_stop) break; - QString key = it.key(); - QString strKey; - QRegExp rxKey; + TQString key = it.key(); + TQString strKey; + TQRegExp rxKey; if(m_option->m_regularExpressions) - rxKey = QRegExp("("+key+")", m_option->m_caseSensitive, false); + rxKey = TQRegExp("("+key+")", m_option->m_caseSensitive, false); else strKey = key; /* If this option is true then for any string in @@ -1395,7 +1395,7 @@ void KFileReplacePart::search(const QString& currentDir, const QString& fileName item = new KListViewItem(rv); KListViewItem* tempItem= new KListViewItem(item); - QString msg, + TQString msg, capturedText; if(m_option->m_regularExpressions) @@ -1403,7 +1403,7 @@ void KFileReplacePart::search(const QString& currentDir, const QString& fileName 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)); + msg = i18n(" Line:%2, Col:%3 - \"%1\"").arg(capturedText).arg(TQString::number(lineNumber,10)).arg(TQString::number(columnNumber,10)); tempItem->setMultiLinesEnabled(true); tempItem->setText(0,msg); occurrence = 1; @@ -1427,7 +1427,7 @@ void KFileReplacePart::search(const QString& currentDir, const QString& fileName break; atLeastOneStringFound = true; - QString msg, + TQString msg, capturedText; int lineNumber = line.mid(0,pos).contains('\n')+1; int columnNumber = pos - line.findRev('\n',pos); @@ -1443,7 +1443,7 @@ void KFileReplacePart::search(const QString& currentDir, const QString& fileName 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)); + msg = i18n(" Line:%2, Col:%3 - \"%1\"").arg(capturedText).arg(TQString::number(lineNumber,10)).arg(TQString::number(columnNumber,10)); if(!item) item = new KListViewItem(rv); @@ -1474,22 +1474,22 @@ void KFileReplacePart::search(const QString& currentDir, const QString& 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())); + item->setText(3,TQString::number(occurrence,10)); + item->setText(4,TQString("%1[%2]").arg(fileInfo.owner()).arg(fileInfo.ownerId())); + item->setText(5,TQString("%1[%2]").arg(fileInfo.group()).arg(fileInfo.groupId())); } } void KFileReplacePart::loadViewContent() { - /* Maps the content of the strings view to a QMap */ + /* Maps the content of the strings view to a TQMap */ KeyValueMap tempMap; CommandEngine command; - QListViewItemIterator itlv(m_view->getStringsView()); + TQListViewItemIterator itlv(m_view->getStringsView()); while(itlv.current()) { - QListViewItem *item = itlv.current(); + TQListViewItem *item = itlv.current(); if(m_option->m_variables) tempMap[item->text(0)] = command.variableValue(item->text(1)); else @@ -1499,12 +1499,12 @@ void KFileReplacePart::loadViewContent() m_replacementMap = tempMap; } -void KFileReplacePart::loadRulesFile(const QString& fileName) +void KFileReplacePart::loadRulesFile(const TQString& fileName) { /* Loads a file with kfr extension. * creates a xml document and browses it*/ - QDomDocument doc("mydocument"); - QFile file(fileName); + TQDomDocument doc("mydocument"); + TQFile file(fileName); KListView* sv = m_view->getStringsView(); if(!file.open(IO_ReadOnly)) @@ -1529,9 +1529,9 @@ void KFileReplacePart::loadRulesFile(const QString& fileName) //clears view sv->clear(); - QDomElement docElem = doc.documentElement(); - QDomNode n = docElem.firstChild(); - QString searchAttribute = n.toElement().attribute("search").latin1(); + TQDomElement docElem = doc.documentElement(); + TQDomNode n = docElem.firstChild(); + TQString searchAttribute = n.toElement().attribute("search").latin1(); KeyValueMap docMap; @@ -1557,10 +1557,10 @@ void KFileReplacePart::loadRulesFile(const QString& fileName) //Reads the string list while(!n.isNull()) { - QDomElement e = n.toElement(); // tries to convert the node to an element. + TQDomElement e = n.toElement(); // tries to convert the node to an element. if(!e.isNull()) { - QString oldString = e.firstChild().toElement().text(), + TQString oldString = e.firstChild().toElement().text(), newString = e.lastChild().toElement().text(); docMap[oldString] = newString; } @@ -1568,7 +1568,7 @@ void KFileReplacePart::loadRulesFile(const QString& fileName) } // Adds file to "load strings form file" menu - QStringList fileList = m_option->m_recentStringFileList; + TQStringList fileList = m_option->m_recentStringFileList; if(!fileList.contains(fileName)) { fileList.append(fileName); @@ -1609,13 +1609,13 @@ bool KFileReplacePart::launchNewProjectDialog(const KURL & startURL) void KFileReplacePart::setOptionMask() { - m_optionMask |= QDir::Dirs; + m_optionMask |= TQDir::Dirs; if(!m_option->m_ignoreHidden) - m_optionMask |= QDir::Hidden; + m_optionMask |= TQDir::Hidden; if(!m_option->m_followSymLinks) - m_optionMask |= QDir::NoSymLinks; + m_optionMask |= TQDir::NoSymLinks; } bool KFileReplacePart::checkBeforeOperation() @@ -1631,11 +1631,11 @@ bool KFileReplacePart::checkBeforeOperation() } // Checks if the main directory can be accessed - QString currentDirectory = m_option->m_directories[0]; - QDir dir; + TQString currentDirectory = m_option->m_directories[0]; + TQDir dir; dir.setPath(currentDirectory); - QString directory = dir.absPath(); + TQString directory = dir.absPath(); if(!dir.exists()) { @@ -1643,7 +1643,7 @@ bool KFileReplacePart::checkBeforeOperation() return false; } - QFileInfo dirInfo(directory); + TQFileInfo dirInfo(directory); if(!(dirInfo.isReadable() && dirInfo.isExecutable()) || (!m_option->m_searchingOnlyMode && !m_option->m_simulation && !(dirInfo.isWritable()))) { @@ -1660,7 +1660,7 @@ bool KFileReplacePart::checkBeforeOperation() bool KFileReplacePart::dontAskAgain() { m_config->setGroup("Notification Messages"); - QString dontAskAgain = m_config->readEntry(rcDontAskAgain, "no"); + TQString dontAskAgain = m_config->readEntry(rcDontAskAgain, "no"); if(dontAskAgain == "yes") return true; else diff --git a/kfilereplace/kfilereplacepart.h b/kfilereplace/kfilereplacepart.h index 1c133cb5..a5044ff9 100644 --- a/kfilereplace/kfilereplacepart.h +++ b/kfilereplace/kfilereplacepart.h @@ -35,7 +35,7 @@ class KFileReplacePart: public KParts::ReadOnlyPart private: //MEMBERS KFileReplaceView* m_view; - QWidget* m_parentWidget, + TQWidget* m_parentWidget, * m_w; KConfig* m_config; KAboutApplication* m_aboutDlg; @@ -46,11 +46,11 @@ class KFileReplacePart: public KParts::ReadOnlyPart int m_optionMask; public://Constructors - KFileReplacePart(QWidget *parentWidget, + KFileReplacePart(TQWidget *parentWidget, const char *widgetName, - QObject *parent, + TQObject *parent, const char *name, - const QStringList &args); + const TQStringList &args); ~KFileReplacePart(); //SLOTS @@ -132,23 +132,23 @@ class KFileReplacePart: public KParts::ReadOnlyPart * 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); + void recursiveFileReplace(const TQString& dirName, int& filesNumber); + void replaceAndBackup(const TQString& currentDir, const TQString& oldFileName); + void replaceAndOverwrite(const TQString& currentDir, const TQString& oldFileName); + void replacingLoop(TQString& 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); + void fileSearch(const TQString& dirName, const TQString& filters); + void recursiveFileSearch(const TQString& dirName, const TQString& filters, uint& filesNumber); + void search(const TQString& currentDir, const TQString& fileName); /** * Others methods */ void loadViewContent(); - void loadRulesFile(const QString& fileName); + void loadRulesFile(const TQString& fileName); bool launchNewProjectDialog(const KURL& startURL); void setOptionMask(); bool checkBeforeOperation(); diff --git a/kfilereplace/kfilereplaceview.cpp b/kfilereplace/kfilereplaceview.cpp index 16ca82da..fc0d08aa 100644 --- a/kfilereplace/kfilereplaceview.cpp +++ b/kfilereplace/kfilereplaceview.cpp @@ -16,9 +16,9 @@ *****************************************************************************/ // Qt -#include -#include -#include +#include +#include +#include // KDE #include @@ -43,35 +43,35 @@ using namespace whatthisNameSpace; -KFileReplaceView::KFileReplaceView(RCOptions* info, QWidget *parent,const char *name):KFileReplaceViewWdg(parent,name) +KFileReplaceView::KFileReplaceView(RCOptions* info, TQWidget *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())); + connect(m_lvResults, TQT_SIGNAL(mouseButtonClicked(int, TQListViewItem *, const TQPoint &, int)), this, TQT_SLOT(slotMouseButtonClicked(int, TQListViewItem *, const TQPoint &))); + connect(m_lvResults_2, TQT_SIGNAL(mouseButtonClicked(int, TQListViewItem *, const TQPoint &, int)), this, TQT_SLOT(slotMouseButtonClicked(int, TQListViewItem *, const TQPoint &))); + connect(m_lvStrings, TQT_SIGNAL(doubleClicked(TQListViewItem *)), this, TQT_SLOT(slotStringsEdit())); + connect(m_lvStrings_2, TQT_SIGNAL(doubleClicked(TQListViewItem *)), this, TQT_SLOT(slotStringsEdit())); whatsThis(); } -QString KFileReplaceView::currentPath() +TQString KFileReplaceView::currentPath() { - QListViewItem *lvi; + TQListViewItem *lvi; if(! m_lviCurrent) lvi = m_rv->currentItem(); - else lvi = (QListViewItem*) m_lviCurrent; + else lvi = (TQListViewItem*) m_lviCurrent; while (lvi->parent()) lvi = lvi->parent(); - return QString(lvi->text(1)+"/"+lvi->text(0)); + return TQString(lvi->text(1)+"/"+lvi->text(0)); } -void KFileReplaceView::showSemaphore(QString s) +void KFileReplaceView::showSemaphore(TQString s) { if(s == "green") { @@ -97,7 +97,7 @@ void KFileReplaceView::showSemaphore(QString s) void KFileReplaceView::stringsInvert(bool invertAll) { - QListViewItem* lviCurItem, + TQListViewItem* lviCurItem, * lviFirst; KListView* sv = getStringsView(); @@ -111,7 +111,7 @@ void KFileReplaceView::stringsInvert(bool invertAll) do { - QString searchText = lviCurItem->text(0), + TQString searchText = lviCurItem->text(0), replaceText = lviCurItem->text(1); // Cannot invert the string when search string is empty @@ -169,13 +169,13 @@ KListView* KFileReplaceView::getStringsView() } //PUBLIC SLOTS -void KFileReplaceView::slotMouseButtonClicked (int button, QListViewItem *lvi, const QPoint &pos) +void KFileReplaceView::slotMouseButtonClicked (int button, TQListViewItem *lvi, const TQPoint &pos) { if (lvi == 0) // No item selected return; // RIGHT BUTTON - if (button == QMouseEvent::RightButton) + if (button == TQMouseEvent::RightButton) { m_lviCurrent = static_cast(lvi); m_menuResult->popup(pos); @@ -184,7 +184,7 @@ void KFileReplaceView::slotMouseButtonClicked (int button, QListViewItem *lvi, c void KFileReplaceView::slotResultProperties() { - QString currItem = currentPath(); + TQString currItem = currentPath(); if(! currItem.isEmpty()) { KURL url(currItem); @@ -195,7 +195,7 @@ void KFileReplaceView::slotResultProperties() void KFileReplaceView::slotResultOpen() { - QString currItem = currentPath(); + TQString currItem = currentPath(); if(!currItem.isEmpty()) { (void) new KRun(KURL(currItem), 0, true, true); @@ -205,7 +205,7 @@ void KFileReplaceView::slotResultOpen() void KFileReplaceView::slotResultOpenWith() { - QString currItem = currentPath(); + TQString currItem = currentPath(); if(!currItem.isEmpty()) { KURL::List kurls; @@ -217,10 +217,10 @@ void KFileReplaceView::slotResultOpenWith() void KFileReplaceView::slotResultDirOpen() { - QString currItem = currentPath(); + TQString currItem = currentPath(); if(!currItem.isEmpty()) { - QFileInfo fi; + TQFileInfo fi; fi.setFile(currItem); (void) new KRun (KURL::fromPathOrURL(fi.dirPath()), 0, true, true); m_lviCurrent = 0; @@ -229,14 +229,14 @@ void KFileReplaceView::slotResultDirOpen() void KFileReplaceView::slotResultEdit() { - QListViewItem *lvi = m_rv->firstChild(); + TQListViewItem *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; + TQString path = TQString(lvi->text(1)+"/"+lvi->text(0)); + TQListViewItem *lviChild = lvi; while(lviChild) { @@ -256,7 +256,7 @@ void KFileReplaceView::slotResultEdit() if(!success) { - QString message = i18n("File %1 cannot be opened. Might be a DCOP problem.").arg(path); + TQString message = i18n("File %1 cannot be opened. Might be a DCOP problem.").arg(path); KMessageBox::error(parentWidget(), message); } } @@ -274,12 +274,12 @@ void KFileReplaceView::slotResultEdit() void KFileReplaceView::slotResultDelete() { - QString currItem = currentPath(); + TQString currItem = currentPath(); if (!currItem.isEmpty()) { - QFile fi; + TQFile fi; int answer = KMessageBox::warningContinueCancel(this, i18n("Do you really want to delete %1?").arg(currItem), - QString::null,KStdGuiItem::del()); + TQString::null,KStdGuiItem::del()); if(answer == KMessageBox::Continue) { @@ -294,7 +294,7 @@ void KFileReplaceView::slotResultDelete() void KFileReplaceView::slotResultTreeExpand() { - QListViewItem *lviRoot = getResultsView()->firstChild(); + TQListViewItem *lviRoot = getResultsView()->firstChild(); if(lviRoot) expand(lviRoot, true); @@ -302,7 +302,7 @@ void KFileReplaceView::slotResultTreeExpand() void KFileReplaceView::slotResultTreeReduce() { - QListViewItem *lviRoot = getResultsView()->firstChild(); + TQListViewItem *lviRoot = getResultsView()->firstChild(); if(lviRoot) expand(lviRoot, false); @@ -331,14 +331,14 @@ void KFileReplaceView::slotStringsAdd() loadMapIntoView(addedStringsMap); } -void KFileReplaceView::slotQuickStringsAdd(const QString& quickSearch, const QString& quickReplace) +void KFileReplaceView::slotQuickStringsAdd(const TQString& quickSearch, const TQString& quickReplace) { if(!quickSearch.isEmpty()) { KeyValueMap map; if(quickReplace.isEmpty()) { - map[quickSearch] = QString::null; + map[quickSearch] = TQString::null; m_option->m_searchingOnlyMode = true; } else @@ -402,7 +402,7 @@ void KFileReplaceView::slotStringsSave() return ; } - QString header("\n"), + TQString header("\n"), footer("\n"), body; if(m_option->m_searchingOnlyMode) @@ -410,11 +410,11 @@ void KFileReplaceView::slotStringsSave() else header += "\n\t"; - QListViewItem* lvi = sv->firstChild(); + TQListViewItem* lvi = sv->firstChild(); while( lvi ) { - body += QString("\n\t" + body += TQString("\n\t" "\n\t\t" "\n\t\t" "\n\t").arg(lvi->text(0)).arg(lvi->text(1)); @@ -422,8 +422,8 @@ void KFileReplaceView::slotStringsSave() } // 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")); + TQString menu = "*.kfr|" + i18n("KFileReplace Strings") + " (*.kfr)\n*|" + i18n("All Files") + " (*)"; + TQString fileName = KFileDialog::getSaveFileName(TQString::null, menu, 0, i18n("Save Strings to File")); if (fileName.isEmpty()) return; @@ -431,14 +431,14 @@ void KFileReplaceView::slotStringsSave() fileName = KFileReplaceLib::addExtension(fileName, "kfr"); - QFile file( fileName ); + TQFile 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); + TQTextStream oTStream( &file ); + oTStream.setEncoding(TQTextStream::UnicodeUTF8); oTStream << header << body << footer; @@ -447,7 +447,7 @@ void KFileReplaceView::slotStringsSave() void KFileReplaceView::slotStringsDeleteItem() { - QListViewItem* item = m_sv->currentItem(); + TQListViewItem* item = m_sv->currentItem(); if(item != 0) { KeyValueMap m = m_option->m_mapStringsView; @@ -459,10 +459,10 @@ void KFileReplaceView::slotStringsDeleteItem() void KFileReplaceView::slotStringsEmpty() { - QListViewItem * myChild = m_sv->firstChild(); + TQListViewItem * myChild = m_sv->firstChild(); while( myChild ) { - QListViewItem* item = myChild; + TQListViewItem* item = myChild; myChild = myChild->nextSibling(); delete item; } @@ -498,15 +498,15 @@ void KFileReplaceView::initGUI() - m_menuResult->insertItem(SmallIconSet(QString::fromLatin1("fileopen")), + m_menuResult->insertItem(SmallIconSet(TQString::fromLatin1("fileopen")), i18n("&Open"), this, - SLOT(slotResultOpen())); + TQT_SLOT(slotResultOpen())); if(!quantaFound) { m_menuResult->insertItem(i18n("Open &With..."), this, - SLOT(slotResultOpenWith())); + TQT_SLOT(slotResultOpenWith())); } if(quantaFound) @@ -514,22 +514,22 @@ void KFileReplaceView::initGUI() m_menuResult->insertItem(SmallIconSet("quanta"), i18n("&Edit in Quanta"), this, - SLOT(slotResultEdit())); + TQT_SLOT(slotResultEdit())); } - m_menuResult->insertItem(SmallIconSet(QString::fromLatin1("up")), + m_menuResult->insertItem(SmallIconSet(TQString::fromLatin1("up")), i18n("Open Parent &Folder"), this, - SLOT(slotResultDirOpen())); - m_menuResult->insertItem(SmallIconSet(QString::fromLatin1("editdelete")), + TQT_SLOT(slotResultDirOpen())); + m_menuResult->insertItem(SmallIconSet(TQString::fromLatin1("editdelete")), i18n("&Delete"), this, - SLOT(slotResultDelete())); + TQT_SLOT(slotResultDelete())); m_menuResult->insertSeparator(); - m_menuResult->insertItem(SmallIconSet(QString::fromLatin1("info")), + m_menuResult->insertItem(SmallIconSet(TQString::fromLatin1("info")), i18n("&Properties"), this, - SLOT(slotResultProperties())); + TQT_SLOT(slotResultProperties())); raiseResultsView(); raiseStringsView(); } @@ -554,18 +554,18 @@ void KFileReplaceView::raiseResultsView() m_stackResults->raiseWidget(m_rv); } -coord KFileReplaceView::extractWordCoordinates(QListViewItem* lvi) +coord KFileReplaceView::extractWordCoordinates(TQListViewItem* 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); + TQString s = lvi->text(0); //qWarning("WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW=%s",s.latin1()); /* if(lvi->parent()) s = lvi->text(0); else return c;*/ - QString temp; + TQString temp; int i = 0; //extracts line and column from lvi->text(0) @@ -591,7 +591,7 @@ coord KFileReplaceView::extractWordCoordinates(QListViewItem* lvi) break; } c.line = temp.toInt(); - temp = QString::null; + temp = TQString::null; while(true) { @@ -618,7 +618,7 @@ coord KFileReplaceView::extractWordCoordinates(QListViewItem* lvi) return c; } -void KFileReplaceView::expand(QListViewItem *lviCurrent, bool b) +void KFileReplaceView::expand(TQListViewItem *lviCurrent, bool b) { // current item lviCurrent->setOpen(b); @@ -636,11 +636,11 @@ void KFileReplaceView::expand(QListViewItem *lviCurrent, bool b) void KFileReplaceView::setMap() { KeyValueMap map; - QListViewItem* i = m_sv->firstChild(); + TQListViewItem* i = m_sv->firstChild(); while(i != 0) { if(m_option->m_searchingOnlyMode) - map[i->text(0)] = QString::null; + map[i->text(0)] = TQString::null; else map[i->text(0)] = i->text(1); i = i->nextSibling(); @@ -655,7 +655,7 @@ void KFileReplaceView::loadMapIntoView(KeyValueMap map) for(itMap = map.begin(); itMap != map.end(); ++itMap) { - QListViewItem* lvi = new QListViewItem(m_sv); + TQListViewItem* lvi = new TQListViewItem(m_sv); lvi->setMultiLinesEnabled(true); lvi->setText(0,itMap.key()); if(!m_option->m_searchingOnlyMode) @@ -666,7 +666,7 @@ void KFileReplaceView::loadMapIntoView(KeyValueMap map) void KFileReplaceView::whatsThis() { - QWhatsThis::add(getResultsView(), lvResultWhatthis); - QWhatsThis::add(getStringsView(), lvStringsWhatthis); + TQWhatsThis::add(getResultsView(), lvResultWhatthis); + TQWhatsThis::add(getStringsView(), lvStringsWhatthis); } #include "kfilereplaceview.moc" diff --git a/kfilereplace/kfilereplaceview.h b/kfilereplace/kfilereplaceview.h index 21ac6a29..1c6af2d9 100644 --- a/kfilereplace/kfilereplaceview.h +++ b/kfilereplace/kfilereplaceview.h @@ -23,8 +23,8 @@ #endif //QT -#include -#include +#include +#include class QPixMap; //KDE @@ -65,12 +65,12 @@ class KFileReplaceView : public KFileReplaceViewWdg * m_sv; public://Constructors - KFileReplaceView(RCOptions* info, QWidget *parent,const char *name); + KFileReplaceView(RCOptions* info, TQWidget *parent,const char *name); public: - QString currentPath(); - void showSemaphore(QString s); - void displayScannedFiles(int filesNumber) { m_lcdFilesNumber->display(QString::number(filesNumber,10)); } + TQString currentPath(); + void showSemaphore(TQString s); + void displayScannedFiles(int filesNumber) { m_lcdFilesNumber->display(TQString::number(filesNumber,10)); } void stringsInvert(bool invertAll); void changeView(bool searchingOnlyMode); KListView* getResultsView(); @@ -82,7 +82,7 @@ class KFileReplaceView : public KFileReplaceViewWdg //void emitSearchingOnlyMode(bool b) { emit searchingOnlyMode(b); } public slots: - void slotMouseButtonClicked (int button, QListViewItem *lvi, const QPoint &pos); + void slotMouseButtonClicked (int button, TQListViewItem *lvi, const TQPoint &pos); void slotResultProperties(); void slotResultOpen(); void slotResultOpenWith(); @@ -92,7 +92,7 @@ class KFileReplaceView : public KFileReplaceViewWdg void slotResultTreeExpand(); void slotResultTreeReduce(); void slotStringsAdd(); - void slotQuickStringsAdd(const QString& quickSearch, const QString& quickReplace); + void slotQuickStringsAdd(const TQString& quickSearch, const TQString& quickReplace); void slotStringsDeleteItem(); void slotStringsEmpty(); void slotStringsEdit(); @@ -102,8 +102,8 @@ class KFileReplaceView : public KFileReplaceViewWdg void initGUI(); void raiseStringsView(); void raiseResultsView(); - coord extractWordCoordinates(QListViewItem* lvi); - void expand(QListViewItem *lviCurrent, bool b); + coord extractWordCoordinates(TQListViewItem* lvi); + void expand(TQListViewItem *lviCurrent, bool b); void setMap(); void loadMapIntoView(KeyValueMap map); void whatsThis(); diff --git a/kfilereplace/knewprojectdlg.cpp b/kfilereplace/knewprojectdlg.cpp index 5428473b..b23c1eec 100644 --- a/kfilereplace/knewprojectdlg.cpp +++ b/kfilereplace/knewprojectdlg.cpp @@ -18,14 +18,14 @@ //QT -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include //KDE #include @@ -51,28 +51,28 @@ using namespace whatthisNameSpace; -KNewProjectDlg::KNewProjectDlg(RCOptions* info, QWidget *parent, const char *name) : KNewProjectDlgS(parent, name) +KNewProjectDlg::KNewProjectDlg(RCOptions* info, TQWidget *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())); + connect(m_pbLocation, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotDir())); + connect(m_pbCancel, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotReject())); + connect(m_pbSearchNow, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotSearchNow())); + connect(m_pbSearchLater, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotSearchLater())); + connect(m_leSearch, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotSearchLineEdit(const TQString&))); + connect(m_chbSizeMin, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotEnableSpinboxSizeMin(bool))); + connect(m_chbSizeMax, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotEnableSpinboxSizeMax(bool))); + connect(m_chbDateMin, TQT_SIGNAL(toggled(bool)), m_dedDateMin, TQT_SLOT(setEnabled(bool))); + connect(m_chbDateMax, TQT_SIGNAL(toggled(bool)), m_dedDateMax, TQT_SLOT(setEnabled(bool))); + connect(m_chbDateMin,TQT_SIGNAL(toggled(bool)),this, TQT_SLOT(slotEnableCbValidDate(bool))); + connect(m_chbDateMax,TQT_SIGNAL(toggled(bool)),this, TQT_SLOT(slotEnableCbValidDate(bool))); + connect(m_chbOwnerUser, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotEnableChbUser(bool))); + connect(m_chbOwnerGroup, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotEnableChbGroup(bool))); + connect(m_chbBackup, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotEnableChbBackup(bool))); + connect(m_pbHelp, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotHelp())); whatsThis(); } @@ -94,7 +94,7 @@ void KNewProjectDlg::saveRCOptions() void KNewProjectDlg::slotDir() { - QString directoryString = KFileDialog::getExistingDirectory(QString::null, this, i18n("Project Directory")); + TQString directoryString = KFileDialog::getExistingDirectory(TQString::null, this, i18n("Project Directory")); if(!directoryString.isEmpty()) m_cbLocation->setEditText(directoryString); } @@ -161,7 +161,7 @@ void KNewProjectDlg::slotSearchLater() slotOK(); } -void KNewProjectDlg::slotSearchLineEdit(const QString& t) +void KNewProjectDlg::slotSearchLineEdit(const TQString& t) { m_pbSearchNow->setEnabled(!t.isEmpty()); } @@ -205,8 +205,8 @@ void KNewProjectDlg::slotEnableChbBackup(bool b) //PRIVATE void KNewProjectDlg::initGUI() { - QIconSet iconSet = SmallIconSet("fileopen"); - QPixmap pixMap = iconSet.pixmap( QIconSet::Small, QIconSet::Normal ); + TQIconSet iconSet = SmallIconSet("fileopen"); + TQPixmap pixMap = iconSet.pixmap( TQIconSet::Small, TQIconSet::Normal ); m_pbLocation->setIconSet(iconSet); m_pbLocation->setFixedSize(pixMap.width() + 8, pixMap.height() + 8); @@ -224,7 +224,7 @@ void KNewProjectDlg::initGUI() void KNewProjectDlg::loadOptions() { - QStringList availableEncodingNames(KGlobal::charsets()->availableEncodingNames()); + TQStringList availableEncodingNames(KGlobal::charsets()->availableEncodingNames()); m_cbEncoding->insertStringList(availableEncodingNames); int idx = -1; int utf8Idx = -1; @@ -286,7 +286,7 @@ void KNewProjectDlg::loadDateAccessOptions() { // ================== DATE OPTIONS ======================== - QString date = m_option->m_minDate; + TQString date = m_option->m_minDate; if(date == AccessDateOption) { m_chbDateMin->setChecked(false); @@ -296,7 +296,7 @@ void KNewProjectDlg::loadDateAccessOptions() else { m_chbDateMin->setChecked(true); - m_dedDateMin->setDate(QDate::fromString(date,Qt::ISODate)); + m_dedDateMin->setDate(TQDate::fromString(date,Qt::ISODate)); m_dedDateMin->setEnabled(true); } @@ -310,7 +310,7 @@ void KNewProjectDlg::loadDateAccessOptions() else { m_chbDateMax->setChecked(true); - m_dedDateMax->setDate(QDate::fromString(date,Qt::ISODate)); + m_dedDateMax->setDate(TQDate::fromString(date,Qt::ISODate)); m_dedDateMax->setEnabled(true); } @@ -395,7 +395,7 @@ void KNewProjectDlg::saveDateAccessOptions() if(m_chbDateMin->isChecked()) { - QString date = m_dedDateMin->date().toString(Qt::ISODate); + TQString date = m_dedDateMin->date().toString(Qt::ISODate); m_option->m_minDate = date; } else @@ -403,7 +403,7 @@ void KNewProjectDlg::saveDateAccessOptions() if(m_chbDateMax->isChecked()) { - QString date = m_dedDateMax->date().toString(Qt::ISODate); + TQString date = m_dedDateMax->date().toString(Qt::ISODate); m_option->m_maxDate = date; } else @@ -447,14 +447,14 @@ void KNewProjectDlg::saveOwnerOptions() void KNewProjectDlg::saveLocationsList() { - QString current = m_cbLocation->currentText(); - QStringList list = current; + TQString current = m_cbLocation->currentText(); + TQStringList list = current; int count = m_cbLocation->listBox()->count(), i; for(i = 0; i < count; i++) { - QString text = m_cbLocation->listBox()->item(i)->text(); + TQString text = m_cbLocation->listBox()->item(i)->text(); if(text != current) list.append(text); } @@ -463,14 +463,14 @@ void KNewProjectDlg::saveLocationsList() void KNewProjectDlg::saveFiltersList() { - QString current = m_cbFilter->currentText(); - QStringList list = current; + TQString current = m_cbFilter->currentText(); + TQStringList list = current; int count = m_cbFilter->listBox()->count(), i; for(i = 0; i < count; i++) { - QString text = m_cbFilter->listBox()->item(i)->text(); + TQString text = m_cbFilter->listBox()->item(i)->text(); if(text != current) list.append(text); } @@ -479,12 +479,12 @@ void KNewProjectDlg::saveFiltersList() void KNewProjectDlg::saveBackupExtensionOptions() { - QString backupExt = m_leBackup->text(); + TQString 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) +void KNewProjectDlg::setDatas(const TQString& directoryString, const TQString& filterString) { if (!directoryString.isEmpty()) m_cbLocation->setEditText(directoryString); @@ -493,9 +493,9 @@ void KNewProjectDlg::setDatas(const QString& directoryString, const QString& fil m_cbFilter->setEditText(filterString); } -bool KNewProjectDlg::contains(QListView* lv,const QString& s, int column) +bool KNewProjectDlg::contains(TQListView* lv,const TQString& s, int column) { - QListViewItem* i = lv->firstChild(); + TQListViewItem* i = lv->firstChild(); while (i != 0) { if(i->text(column) == s) @@ -507,24 +507,24 @@ bool KNewProjectDlg::contains(QListView* lv,const QString& s, int column) 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); + TQWhatsThis::add(m_cbLocation, cbLocationWhatthis); + TQWhatsThis::add(m_cbFilter, cbFilterWhatthis); + + TQWhatsThis::add(m_spbSizeMin, edSizeMinWhatthis); + TQWhatsThis::add(m_spbSizeMax, edSizeMaxWhatthis); + + TQWhatsThis::add(m_cbDateValid, cbDateValidWhatthis); + TQWhatsThis::add(m_chbDateMin, chbDateMinWhatthis); + TQWhatsThis::add(m_chbDateMax, chbDateMaxWhatthis); + + TQWhatsThis::add(m_chbIncludeSubfolders, chbRecursiveWhatthis); + TQWhatsThis::add(m_chbRegularExpressions, chbRegularExpressionsWhatthis); + TQWhatsThis::add(m_chbEnableVariables, chbVariablesWhatthis); + TQWhatsThis::add(m_chbCaseSensitive, chbCaseSensitiveWhatthis); + TQWhatsThis::add(m_chbBackup, chbBackupWhatthis); + TQWhatsThis::add(m_leBackup, chbBackupWhatthis); + TQWhatsThis::add(m_leSearch, leSearchWhatthis); + TQWhatsThis::add(m_leReplace, leReplaceWhatthis); } #include "knewprojectdlg.moc" diff --git a/kfilereplace/knewprojectdlg.h b/kfilereplace/knewprojectdlg.h index e4852cb8..ac537eac 100644 --- a/kfilereplace/knewprojectdlg.h +++ b/kfilereplace/knewprojectdlg.h @@ -31,11 +31,11 @@ class KNewProjectDlg : public KNewProjectDlgS Q_OBJECT private: - QString m_searchNowFlag; + TQString m_searchNowFlag; RCOptions* m_option; public: - KNewProjectDlg(RCOptions* info, QWidget *parent=0, const char *name=0); + KNewProjectDlg(RCOptions* info, TQWidget *parent=0, const char *name=0); ~KNewProjectDlg(); public: @@ -48,14 +48,14 @@ class KNewProjectDlg : public KNewProjectDlgS void slotReject(); void slotSearchNow(); void slotSearchLater(); - void slotSearchLineEdit(const QString& t); + void slotSearchLineEdit(const TQString& 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"); } + void slotHelp(){ kapp->invokeHelp(TQString::null, "kfilereplace"); } private: void initGUI(); @@ -76,8 +76,8 @@ class KNewProjectDlg : public KNewProjectDlgS void saveFiltersList(); void saveBackupExtensionOptions(); - bool contains(QListView* lv,const QString& s, int column); - void setDatas(const QString& directoryString, const QString& filterString); + bool contains(TQListView* lv,const TQString& s, int column); + void setDatas(const TQString& directoryString, const TQString& filterString); void whatsThis(); }; diff --git a/kfilereplace/koptionsdlg.cpp b/kfilereplace/koptionsdlg.cpp index 3980a7a6..fc0dc899 100644 --- a/kfilereplace/koptionsdlg.cpp +++ b/kfilereplace/koptionsdlg.cpp @@ -17,12 +17,12 @@ ***************************************************************************/ // QT -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include // KDE #include @@ -41,19 +41,19 @@ using namespace whatthisNameSpace; -KOptionsDlg::KOptionsDlg(RCOptions* info, QWidget *parent, const char *name) : KOptionsDlgS(parent,name,true) +KOptionsDlg::KOptionsDlg(RCOptions* info, TQWidget *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))); + connect(m_pbOK, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotOK())); + connect(m_pbDefault, TQT_SIGNAL(clicked()),this,TQT_SLOT(slotDefaults())); + connect(m_chbBackup, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotChbBackup(bool))); + connect(m_pbHelp, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotHelp())); + connect(m_chbConfirmStrings, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotChbConfirmStrings(bool))); + connect(m_chbShowConfirmDialog, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotChbShowConfirmDialog(bool))); whatsThis(); } @@ -82,7 +82,7 @@ void KOptionsDlg::slotDefaults() m_chbIgnoreFiles->setChecked(IgnoreFilesOption); m_chbConfirmStrings->setChecked(AskConfirmReplaceOption); - QStringList bkList = QStringList::split(",",BackupExtensionOption,true); + TQStringList bkList = TQStringList::split(",",BackupExtensionOption,true); bool enableBackup = (bkList[0] == "true" ? true : false); @@ -141,7 +141,7 @@ void KOptionsDlg::initGUI() m_config->setGroup("Notification Messages"); m_option->m_notifyOnErrors = m_config->readBoolEntry(rcNotifyOnErrors, true); - QString dontAskAgain = m_config->readEntry(rcDontAskAgain,"no"); + TQString dontAskAgain = m_config->readEntry(rcDontAskAgain,"no"); m_chbConfirmStrings->setChecked(m_option->m_askConfirmReplace); @@ -153,7 +153,7 @@ void KOptionsDlg::initGUI() m_chbShowConfirmDialog->setChecked(true); } - QStringList availableEncodingNames(KGlobal::charsets()->availableEncodingNames()); + TQStringList availableEncodingNames(KGlobal::charsets()->availableEncodingNames()); m_cbEncoding->insertStringList( availableEncodingNames ); int idx = -1; int utf8Idx = -1; @@ -200,7 +200,7 @@ 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(); + TQString 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(); @@ -221,16 +221,16 @@ void KOptionsDlg::saveRCOptions() 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); + TQWhatsThis::add(m_chbCaseSensitive, chbCaseSensitiveWhatthis); + TQWhatsThis::add(m_chbRecursive, chbRecursiveWhatthis); + TQWhatsThis::add(m_chbHaltOnFirstOccurrence, chbHaltOnFirstOccurrenceWhatthis); + TQWhatsThis::add(m_chbFollowSymLinks, chbFollowSymLinksWhatthis); + TQWhatsThis::add(m_chbIgnoreHidden, chbIgnoreHiddenWhatthis); + TQWhatsThis::add(m_chbIgnoreFiles, chbIgnoreFilesWhatthis); + TQWhatsThis::add(m_chbRegularExpressions, chbRegularExpressionsWhatthis); + TQWhatsThis::add(m_chbVariables, chbVariablesWhatthis); + TQWhatsThis::add(m_chbBackup, chbBackupWhatthis); + TQWhatsThis::add(m_chbConfirmStrings, chbConfirmStringsWhatthis); } #include "koptionsdlg.moc" diff --git a/kfilereplace/koptionsdlg.h b/kfilereplace/koptionsdlg.h index 993f2c7d..973393d6 100644 --- a/kfilereplace/koptionsdlg.h +++ b/kfilereplace/koptionsdlg.h @@ -34,7 +34,7 @@ class KOptionsDlg : public KOptionsDlgS { Q_OBJECT public: - KOptionsDlg(RCOptions* info, QWidget *parent, const char *name); + KOptionsDlg(RCOptions* info, TQWidget *parent, const char *name); ~KOptionsDlg(); private: @@ -47,7 +47,7 @@ class KOptionsDlg : public KOptionsDlgS void slotChbBackup(bool b); void slotChbConfirmStrings(bool b); void slotChbShowConfirmDialog(bool b); - void slotHelp(){ kapp->invokeHelp(QString::null, "kfilereplace"); } + void slotHelp(){ kapp->invokeHelp(TQString::null, "kfilereplace"); } private: void initGUI(); diff --git a/kfilereplace/report.cpp b/kfilereplace/report.cpp index cae0dfe4..6d485eba 100644 --- a/kfilereplace/report.cpp +++ b/kfilereplace/report.cpp @@ -16,8 +16,8 @@ * * ***************************************************************************/ // QT -#include -#include +#include +#include // KDE #include @@ -30,12 +30,12 @@ void Report::createReportFile() { - QString xmlFileName = m_docPath + ".xml", + TQString xmlFileName = m_docPath + ".xml", cssFileName = m_docPath + ".css"; // Generates a report file // a) Open the file - QFile report(xmlFileName); + TQFile report(xmlFileName); if (!report.open( IO_WriteOnly )) { KMessageBox::error(0, i18n("Cannot open the file %1.").arg(xmlFileName)); @@ -44,10 +44,10 @@ void Report::createReportFile() // b) Write the header of the XML file - QDateTime datetime = QDateTime::currentDateTime(Qt::LocalTime); - QString dateString = datetime.toString(Qt::LocalDate); + TQDateTime datetime = TQDateTime::currentDateTime(Qt::LocalTime); + TQString dateString = datetime.toString(Qt::LocalDate); KUser user; - QString columnTextFour, + TQString columnTextFour, columnReplaceWith; if(!m_isSearchFlag) { @@ -60,8 +60,8 @@ void Report::createReportFile() columnReplaceWith = i18n("-"); } - QString css = cssFileName.mid(cssFileName.findRev("/")+1,cssFileName.length()-(cssFileName.findRev("/")+1)); - QTextStream oTStream( &report ); + TQString css = cssFileName.mid(cssFileName.findRev("/")+1,cssFileName.length()-(cssFileName.findRev("/")+1)); + TQTextStream oTStream( &report ); oTStream << "\n" "" "\n" @@ -81,7 +81,7 @@ void Report::createReportFile() oTStream<< " \n" " \n"; // c) Write the strings list - QListViewItem *lviCurItem, + TQListViewItem *lviCurItem, *lviFirst; lviCurItem = lviFirst = m_stringsView->firstChild(); @@ -89,10 +89,10 @@ void Report::createReportFile() if(lviCurItem == 0) return ; - QString rowType="a1"; + TQString rowType="a1"; do - { QString rowTag = "\n" + { TQString rowTag = "\n" " text(0)+"]]>\n" " text(1)+"]]>\n" "\n"; @@ -140,7 +140,7 @@ void Report::createReportFile() rowType="a1"; do - { QString rowTag = " \n" + { TQString rowTag = " \n" " text(0)+"]]>\n" " text(1)+"]]>\n"; if(m_isSearchFlag) @@ -187,17 +187,17 @@ void Report::createReportFile() void Report::createStyleSheet() { - QString cssFileName = m_docPath +".css"; - QFile styleSheet(cssFileName); + TQString cssFileName = m_docPath +".css"; + TQFile styleSheet(cssFileName); if (!styleSheet.open( IO_WriteOnly )) { KMessageBox::error(0, i18n("Cannot open the file %1.").arg(cssFileName)); return ; } - QTextStream oTStream( &styleSheet ); + TQTextStream oTStream( &styleSheet ); - QString css = "title { display:block;font:40px bold sans-serif; }\n\n" + TQString 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" @@ -272,7 +272,7 @@ void Report::createStyleSheet() styleSheet.close(); } -void Report::createDocument(const QString& docPath) +void Report::createDocument(const TQString& docPath) { m_docPath = docPath; diff --git a/kfilereplace/report.h b/kfilereplace/report.h index 98996f92..af221bc1 100644 --- a/kfilereplace/report.h +++ b/kfilereplace/report.h @@ -36,7 +36,7 @@ class Report private: KListView* m_stringsView, * m_resultsView; - QString m_docPath; + TQString m_docPath; bool m_isSearchFlag; RCOptions* m_option; @@ -52,7 +52,7 @@ class Report void createStyleSheet(); public: - void createDocument(const QString& docPath); + void createDocument(const TQString& docPath); }; #endif // REPORT_H diff --git a/kfilereplace/whatthis.h b/kfilereplace/whatthis.h index c91356dd..09f6ac80 100644 --- a/kfilereplace/whatthis.h +++ b/kfilereplace/whatthis.h @@ -18,7 +18,7 @@ #define WHATTHIS_H // QT -#include +#include // KDE #include @@ -26,76 +26,76 @@ 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 TQString 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."); + const TQString 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 TQString 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 TQString 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 TQString 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 TQString 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 TQString 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 TQString 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 TQString 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 TQString chbDateMinWhatthis = i18n("Minimum value for access date."); - const QString chbDateMaxWhatthis = i18n("Maximum value for access date."); + const TQString chbDateMaxWhatthis = i18n("Maximum value for access date."); - const QString leSearchWhatthis = i18n("Insert here the string to search for."); + const TQString leSearchWhatthis = i18n("Insert here the string to search for."); - const QString leReplaceWhatthis = i18n("Insert here the string to replace with."); + const TQString 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 TQString 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 TQString 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 TQString 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 TQString chbIgnoreWhitespacesWhatthis =""; - const QString chbFollowSymLinksWhatthis = i18n("If kfilereplace encounters a symbolic link treats it like a normal folder or file."); + const TQString 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 TQString 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 TQString 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 TQString 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 TQString 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 TQString 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."); + const TQString 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 TQString fileSimulateWhatthis = i18n("Enable this option to perform replacing as a simulation, i.e. without make any changes in files."); - const QString optionsRegularExpressionsWhatthis = chbRegularExpressionsWhatthis; + const TQString optionsRegularExpressionsWhatthis = chbRegularExpressionsWhatthis; - const QString optionsBackupWhatthis = chbBackupWhatthis; + const TQString optionsBackupWhatthis = chbBackupWhatthis; - const QString optionsCaseWhatthis = chbCaseSensitiveWhatthis; + const TQString optionsCaseWhatthis = chbCaseSensitiveWhatthis; - const QString optionsVarWhatthis = chbVariablesWhatthis; + const TQString optionsVarWhatthis = chbVariablesWhatthis; - const QString optionsRecursiveWhatthis = chbRecursiveWhatthis; + const TQString optionsRecursiveWhatthis = chbRecursiveWhatthis; //KAddStringDlg - const QString rbSearchOnlyWhatthis = i18n("Select search-only mode."); + const TQString rbSearchOnlyWhatthis = i18n("Select search-only mode."); - const QString rbSearchReplaceWhatthis = i18n("Select search-and-replace mode."); + const TQString rbSearchReplaceWhatthis = i18n("Select search-and-replace mode."); - const QString edSearchWhatthis = i18n("Insert here a string you want search for."); + const TQString 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."); + const TQString edReplaceWhatthis = i18n("Insert here the string that KFR will use to replace the search string."); } #endif diff --git a/kimagemapeditor/arealistview.cpp b/kimagemapeditor/arealistview.cpp index 80cd3265..203a741f 100644 --- a/kimagemapeditor/arealistview.cpp +++ b/kimagemapeditor/arealistview.cpp @@ -17,10 +17,10 @@ // QT #include -#include -#include -#include -#include +#include +#include +#include +#include // KDE #include @@ -31,30 +31,30 @@ #include "arealistview.h" -AreaListView::AreaListView(QWidget *parent, const char *name) - : QVBox(parent, name) +AreaListView::AreaListView(TQWidget *parent, const char *name) + : TQVBox(parent, name) { listView = new KListView(this); listView->addColumn(i18n("Areas")); listView->addColumn(i18n("Preview")); listView->setMultiSelection(true); - listView->setSelectionMode( QListView::Extended ); + listView->setSelectionMode( TQListView::Extended ); listView->setSorting(-1); // The user can't sort by clicking on the header listView->setFullWidth(true); - QWhatsThis::add( listView, i18n("

Area List

The area list shows you all areas of the map.
" + TQWhatsThis::add( listView, i18n("

Area List

The area list shows you all areas of the map.
" "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.
" "The maximum size of the preview images can be configured.")); - QToolTip::add( listView, i18n("A list of all areas")); + TQToolTip::add( listView, i18n("A list of all areas")); - QHBox *hbox= new QHBox(this); - upBtn= new QPushButton("",hbox); + TQHBox *hbox= new TQHBox(this); + upBtn= new TQPushButton("",hbox); upBtn->setIconSet(SmallIconSet("up")); - downBtn= new QPushButton("",hbox); + downBtn= new TQPushButton("",hbox); downBtn->setIconSet(SmallIconSet("down")); } diff --git a/kimagemapeditor/arealistview.h b/kimagemapeditor/arealistview.h index 6037f5ee..9171cd44 100644 --- a/kimagemapeditor/arealistview.h +++ b/kimagemapeditor/arealistview.h @@ -18,8 +18,8 @@ #ifndef _AREALISTVIEW_H_ #define _AREALISTVIEW_H_ -#include -#include +#include +#include class KListView; class QPushButton; @@ -35,12 +35,12 @@ class AreaListView : public QVBox Q_OBJECT public: - AreaListView(QWidget *parent, const char *name); + AreaListView(TQWidget *parent, const char *name); ~AreaListView(); KListView* listView; - QPushButton *upBtn; - QPushButton *downBtn; + TQPushButton *upBtn; + TQPushButton *downBtn; }; diff --git a/kimagemapeditor/drawzone.cpp b/kimagemapeditor/drawzone.cpp index a5bf5612..60b6fe9f 100644 --- a/kimagemapeditor/drawzone.cpp +++ b/kimagemapeditor/drawzone.cpp @@ -16,10 +16,10 @@ ***************************************************************************/ // QT -#include -#include -#include -#include +#include +#include +#include +#include // KDE #include @@ -37,11 +37,11 @@ #include "kimecommon.h" -DrawZone::DrawZone(QWidget *parent,KImageMapEditor* _imageMapEditor) - : QScrollView(parent) +DrawZone::DrawZone(TQWidget *parent,KImageMapEditor* _imageMapEditor) + : TQScrollView(parent) { imageMapEditor=_imageMapEditor; -// setPicture(QImage()); +// setPicture(TQImage()); currentAction=None; currentArea=0L; oldArea=0L; @@ -57,9 +57,9 @@ DrawZone::DrawZone(QWidget *parent,KImageMapEditor* _imageMapEditor) setDragAutoScroll(true); // The cross rectangle cursor - QBitmap b(32,32,true); - QBitmap b2(32,32,true); - QPainter p(&b); + TQBitmap b(32,32,true); + TQBitmap b2(32,32,true); + TQPainter p(&b); // the cross p.drawLine(0,8,6,8); p.drawLine(10,8,16,8); @@ -96,12 +96,12 @@ DrawZone::DrawZone(QWidget *parent,KImageMapEditor* _imageMapEditor) p.end(); - RectangleCursor = QCursor(b,b2,8,8); + RectangleCursor = TQCursor(b,b2,8,8); // The cross circle cursor - b = QBitmap(32,32,true); - b2 = QBitmap(32,32,true); + b = TQBitmap(32,32,true); + b2 = TQBitmap(32,32,true); p.begin(&b); // the cross p.drawLine(0,8,6,8); @@ -139,25 +139,25 @@ DrawZone::DrawZone(QWidget *parent,KImageMapEditor* _imageMapEditor) p.end(); - CircleCursor = QCursor(b,b2,8,8); + CircleCursor = TQCursor(b,b2,8,8); - QString path = KGlobal::dirs()->findResourceDir( "data", "kimagemapeditor/polygoncursor.png" ) + "kimagemapeditor/polygoncursor.png"; - PolygonCursor = QCursor(QPixmap(path),8,8); + TQString path = KGlobal::dirs()->findResourceDir( "data", "kimagemapeditor/polygoncursor.png" ) + "kimagemapeditor/polygoncursor.png"; + PolygonCursor = TQCursor(TQPixmap(path),8,8); path = KGlobal::dirs()->findResourceDir( "data", "kimagemapeditor/freehandcursor.png" ) + "kimagemapeditor/freehandcursor.png"; - FreehandCursor = QCursor(QPixmap(path),8,8); + FreehandCursor = TQCursor(TQPixmap(path),8,8); path = KGlobal::dirs()->findResourceDir( "data", "kimagemapeditor/addpointcursor.png" ) + "kimagemapeditor/addpointcursor.png"; - AddPointCursor = QCursor(QPixmap(path),8,8); + AddPointCursor = TQCursor(TQPixmap(path),8,8); path = KGlobal::dirs()->findResourceDir( "data", "kimagemapeditor/removepointcursor.png" ) + "kimagemapeditor/removepointcursor.png"; - RemovePointCursor = QCursor(QPixmap(path),8,8); + RemovePointCursor = TQCursor(TQPixmap(path),8,8); } DrawZone::~DrawZone(){ } -void DrawZone::setPicture(const QImage &_image) { +void DrawZone::setPicture(const TQImage &_image) { image=_image; //- zoomedImage.convertFromImage(image); setZoom(_zoom); @@ -168,22 +168,22 @@ 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); + zoomedImage=TQPixmap(imageRect.width(),imageRect.height()); + TQPainter p(&zoomedImage); p.scale(z,z); - QPixmap pix; + TQPixmap 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)); + TQPixmap backPix(32,32); + TQPainter p2(&backPix); + p2.fillRect(0,0,32,32,TQColor(156,149,156)); + p2.fillRect(0,16,16,16,TQColor(98,105,98)); + p2.fillRect(16,0,16,16,TQColor(98,105,98)); p2.flush(); - p.setPen(QPen()); - p.fillRect(imageRect.left(),imageRect.top(),imageRect.width(),imageRect.height(),QBrush(QColor("black"),backPix)); + p.setPen(TQPen()); + p.fillRect(imageRect.left(),imageRect.top(),imageRect.width(),imageRect.height(),TQBrush(TQColor("black"),backPix)); } p.drawPixmap(imageRect.left(),imageRect.top(),pix); p.flush(); @@ -192,31 +192,31 @@ void DrawZone::setZoom(double z) repaintContents(0,0,contentsWidth(),contentsHeight(),true); } -QPoint DrawZone::translateFromZoom(const QPoint & p) const { - return QPoint((int)(p.x()/_zoom),(int)(p.y()/_zoom)); +TQPoint DrawZone::translateFromZoom(const TQPoint & p) const { + return TQPoint((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), +TQRect DrawZone::translateFromZoom(const TQRect & p) const { + return TQRect((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)); +TQPoint DrawZone::translateToZoom(const TQPoint & p) const { + return TQPoint(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), +TQRect DrawZone::translateToZoom(const TQRect & r) const { +// return TQRect(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), + return TQRect((int)(r.x()*_zoom),(int)(r.y()*_zoom), (int)(r.width()*_zoom+2),(int)(r.height()*_zoom+2)); } -void DrawZone::contentsMouseDoubleClickEvent(QMouseEvent* e) { +void DrawZone::contentsMouseDoubleClickEvent(TQMouseEvent* e) { if ( ! imageMapEditor->isReadWrite()) return; - QPoint point=e->pos(); + TQPoint point=e->pos(); point-=imageRect.topLeft(); point=translateFromZoom(point); if ( currentAction==None && @@ -230,7 +230,7 @@ void DrawZone::contentsMouseDoubleClickEvent(QMouseEvent* e) { } -void DrawZone::contentsMousePressEvent(QMouseEvent* e) +void DrawZone::contentsMousePressEvent(TQMouseEvent* e) { if ( ! imageMapEditor->isReadWrite()) return; @@ -251,7 +251,7 @@ void DrawZone::contentsMousePressEvent(QMouseEvent* e) // Translate it to picture coordinates drawStart-=imageRect.topLeft(); - QPoint zoomedPoint = drawStart; + TQPoint zoomedPoint = drawStart; drawStart=translateFromZoom(drawStart); delete oldArea; oldArea=0L; @@ -339,7 +339,7 @@ void DrawZone::contentsMousePressEvent(QMouseEvent* e) { currentArea=AreaCreator::create(imageMapEditor->currentToolType()); - currentArea->setRect(QRect(drawStart,drawStart)); + currentArea->setRect(TQRect(drawStart,drawStart)); currentArea->setSelected(false); imageMapEditor->deselectAll(); @@ -374,7 +374,7 @@ void DrawZone::contentsMousePressEvent(QMouseEvent* e) } - QRect r; + TQRect r; if (oldArea) r=oldArea->selectionRect(); if (currentArea) { @@ -385,11 +385,11 @@ void DrawZone::contentsMousePressEvent(QMouseEvent* e) } -void DrawZone::contentsMouseReleaseEvent(QMouseEvent *e) { +void DrawZone::contentsMouseReleaseEvent(TQMouseEvent *e) { if ( ! imageMapEditor->isReadWrite()) return; - QPoint drawEnd=e->pos(); + TQPoint drawEnd=e->pos(); // Check if it's on picture if not // move it to the picture's border @@ -405,7 +405,7 @@ void DrawZone::contentsMouseReleaseEvent(QMouseEvent *e) { } // Translate it to picture coordinates drawEnd-=imageRect.topLeft(); - QPoint zoomedPoint=drawEnd; + TQPoint zoomedPoint=drawEnd; drawEnd=translateFromZoom(drawEnd); @@ -441,8 +441,8 @@ void DrawZone::contentsMouseReleaseEvent(QMouseEvent *e) { new CreateCommand( imageMapEditor, currentArea ), true); } else if (currentAction==MoveArea) { - QPoint p1 = oldArea->rect().topLeft(); - QPoint p2 = imageMapEditor->selected()->rect().topLeft(); + TQPoint p1 = oldArea->rect().topLeft(); + TQPoint p2 = imageMapEditor->selected()->rect().topLeft(); if (p1 != p2) { @@ -484,7 +484,7 @@ void DrawZone::contentsMouseReleaseEvent(QMouseEvent *e) { if (currentAction==DoSelect) { currentAction=None; - QRect r(drawStart.x(),drawStart.y(),drawCurrent.x()-drawStart.x(),drawCurrent.y()-drawStart.y()); + TQRect r(drawStart.x(),drawStart.y(),drawCurrent.x()-drawStart.x(),drawCurrent.y()-drawStart.y()); r = r.normalize(); AreaListIterator it=imageMapEditor->areaList(); @@ -518,7 +518,7 @@ void DrawZone::contentsMouseReleaseEvent(QMouseEvent *e) { } -void DrawZone::contentsMouseMoveEvent(QMouseEvent *e) +void DrawZone::contentsMouseMoveEvent(TQMouseEvent *e) { if ( ! imageMapEditor->isReadWrite()) return; @@ -541,20 +541,20 @@ void DrawZone::contentsMouseMoveEvent(QMouseEvent *e) // Translate to image coordinates drawCurrent-=imageRect.topLeft(); - QPoint zoomedPoint=drawCurrent; + TQPoint 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; + TQRect oldRect=translateToZoom(currentArea->rect()); + currentArea->setRect(TQRect(drawStart,drawCurrent).normalize()); + TQRect newRect=translateToZoom(currentArea->selectionRect()); + TQRect r=oldRect | newRect; repaintContents(r,false); imageMapEditor->slotUpdateSelectionCoords( currentArea->rect() ); } else if (currentAction==DrawCircle) { - QRect oldRect=translateToZoom(currentArea->rect()); + TQRect oldRect=translateToZoom(currentArea->rect()); // We don't want ellipses int maxDistance=myabs(drawStart.x()-drawCurrent.x()) > @@ -571,49 +571,49 @@ void DrawZone::contentsMouseMoveEvent(QMouseEvent *e) if ( drawStart.y()-drawCurrent.y() > 0) yDiff=-yDiff; - QPoint endPoint( drawStart.x()+xDiff, drawStart.y()+yDiff); + TQPoint endPoint( drawStart.x()+xDiff, drawStart.y()+yDiff); - currentArea->setRect(QRect(drawStart,endPoint).normalize()); - QRect newRect=translateToZoom(currentArea->rect()); - QRect r=oldRect | newRect; + currentArea->setRect(TQRect(drawStart,endPoint).normalize()); + TQRect newRect=translateToZoom(currentArea->rect()); + TQRect r=oldRect | newRect; repaintContents(r,false); imageMapEditor->slotUpdateSelectionCoords( currentArea->rect() ); } else if ( currentAction==DrawPolygon ) { - QRect oldRect=translateToZoom(currentArea->rect()); + TQRect oldRect=translateToZoom(currentArea->rect()); currentArea->moveSelectionPoint(currentSelectionPoint,drawCurrent); - QRect newRect=translateToZoom(currentArea->rect()); - QRect r=oldRect | newRect; + TQRect newRect=translateToZoom(currentArea->rect()); + TQRect r=oldRect | newRect; repaintContents(r,false); } else if ( currentAction==DrawFreehand) { - QRect oldRect=translateToZoom(currentArea->rect()); + TQRect oldRect=translateToZoom(currentArea->rect()); currentArea->insertCoord(currentArea->countSelectionPoints(), drawCurrent); - QRect newRect=translateToZoom(currentArea->rect()); - QRect r=oldRect | newRect; + TQRect newRect=translateToZoom(currentArea->rect()); + TQRect r=oldRect | newRect; repaintContents(r,false); } else if ( currentAction==MoveArea ) { - QRect oldRect=translateToZoom(currentArea->selectionRect()); + TQRect oldRect=translateToZoom(currentArea->selectionRect()); currentArea->moveBy((drawCurrent-drawStart).x(),(drawCurrent-drawStart).y()); - QRect newRect=translateToZoom(currentArea->selectionRect()); - QRect r=oldRect | newRect; + TQRect newRect=translateToZoom(currentArea->selectionRect()); + TQRect r=oldRect | newRect; currentArea->setMoving(true); repaintContents(r,false); drawStart=drawCurrent; imageMapEditor->slotUpdateSelectionCoords(); } else if ( currentAction==MoveSelectionPoint ) { - QRect oldRect=translateToZoom(currentArea->selectionRect()); + TQRect oldRect=translateToZoom(currentArea->selectionRect()); currentArea->moveSelectionPoint(currentSelectionPoint,drawCurrent); - QRect newRect=translateToZoom(currentArea->selectionRect()); - QRect r=oldRect | newRect; + TQRect newRect=translateToZoom(currentArea->selectionRect()); + TQRect 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()); + TQRect r(drawStart.x(),drawStart.y(),drawCurrent.x()-drawStart.x(),drawCurrent.y()-drawStart.y()); r = r.normalize(); // r = translateFromZoom(r); /* @@ -634,7 +634,7 @@ void DrawZone::contentsMouseMoveEvent(QMouseEvent *e) // So we have to create 4 rectangles for every rectangle // which represent the borders and then repaint them. - QRect lb,rb,tb,bb; + TQRect lb,rb,tb,bb; createBorderRectangles(translateToZoom(r),lb,rb,tb,bb); repaintContents(lb,false); repaintContents(rb,false); @@ -653,9 +653,9 @@ void DrawZone::contentsMouseMoveEvent(QMouseEvent *e) //+ imageMapEditor->updateSelection(); -// QRect r(drawStart.x(),drawStart.y(),drawCurrent.x()-drawStart.x(),drawCurrent.y()-drawStart.y()); +// TQRect 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()); +// TQRect r2(drawStart.x(),drawStart.y(),drawOld.x()-drawStart.x(),drawOld.y()-drawStart.y()); // r2 = r2.normalize(); // r = translateToZoom(r | r2); // repaintContents(r,false); @@ -679,7 +679,7 @@ void DrawZone::contentsMouseMoveEvent(QMouseEvent *e) } else { - QPoint center=imageMapEditor->selected()->rect().center(); + TQPoint center=imageMapEditor->selected()->rect().center(); if (drawCurrent.x() < center.x()) { if (drawCurrent.y() < center.y()) viewport()->setCursor(sizeFDiagCursor); @@ -726,7 +726,7 @@ void DrawZone::contentsMouseMoveEvent(QMouseEvent *e) imageMapEditor->slotChangeStatusCoords(drawCurrent.x(),drawCurrent.y()); } -void DrawZone::createBorderRectangles(const QRect & r,QRect & rb,QRect & lb,QRect & tb,QRect & bb) +void DrawZone::createBorderRectangles(const TQRect & r,TQRect & rb,TQRect & lb,TQRect & tb,TQRect & bb) { int bw; bw = (int) (2+2*_zoom); // Border width @@ -753,8 +753,8 @@ void DrawZone::createBorderRectangles(const QRect & r,QRect & rb,QRect & lb,QRec } -void DrawZone::resizeEvent(QResizeEvent* e) { - QScrollView::resizeEvent(e); +void DrawZone::resizeEvent(TQResizeEvent* e) { + TQScrollView::resizeEvent(e); int width=(int) (image.width()*_zoom); int height=(int) (image.height()*_zoom); if (visibleWidth()>width) @@ -779,7 +779,7 @@ void DrawZone::cancelDrawing() ) { currentAction = None; - QRect r = translateToZoom(currentArea->selectionRect()); + TQRect r = translateToZoom(currentArea->selectionRect()); delete currentArea; currentArea = 0L; repaintContents(r,false); @@ -791,39 +791,39 @@ void DrawZone::repaintArea(const Area & a) { repaintContents(translateToZoom(a.selectionRect()),false); } -void DrawZone::repaintRect(const QRect & r) { +void DrawZone::repaintRect(const TQRect & r) { repaintContents(translateToZoom(r),false); } -void DrawZone::drawContents(QPainter* p,int clipx,int clipy,int clipw,int cliph) +void DrawZone::drawContents(TQPainter* p,int clipx,int clipy,int clipw,int cliph) { // Erase background without flicker - QRect updateRect(clipx,clipy,clipw,cliph); + TQRect updateRect(clipx,clipy,clipw,cliph); // Pixmap for double-buffering - QPixmap doubleBuffer(updateRect.size()); + TQPixmap doubleBuffer(updateRect.size()); if (doubleBuffer.isNull()) return; - QPainter p2(&doubleBuffer); + TQPainter 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) ); + p2.eraseRect( TQRect(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.eraseRect( TQRect(0,cliph-eraseHeight,clipw,eraseHeight) ); } p2.translate(-clipx, -clipy); p2.scale(_zoom,_zoom); - QRect areaUpdateRect; + TQRect areaUpdateRect; areaUpdateRect.setX(myround(clipx/_zoom)-1); areaUpdateRect.setY(myround(clipy/_zoom)-1); areaUpdateRect.setWidth(myround(clipw/_zoom)+2); @@ -847,12 +847,12 @@ void DrawZone::drawContents(QPainter* p,int clipx,int clipy,int clipw,int cliph) if (currentAction == DoSelect ) { - QPen pen = QPen(QColor("white"),1); + TQPen pen = TQPen(TQColor("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()); + TQRect r( drawStart.x(),drawStart.y(),drawCurrent.x()-drawStart.x(),drawCurrent.y()-drawStart.y()); r = r.normalize(); p2.drawRect(r); } @@ -867,7 +867,7 @@ void DrawZone::drawContents(QPainter* p,int clipx,int clipy,int clipw,int cliph) } -void DrawZone::contentsDragEnterEvent(QDragEnterEvent*e) { +void DrawZone::contentsDragEnterEvent(TQDragEnterEvent*e) { if (!KURLDrag::canDecode(e)) return; @@ -881,13 +881,13 @@ void DrawZone::contentsDragEnterEvent(QDragEnterEvent*e) { e->accept(); } -void DrawZone::contentsDropEvent( QDropEvent* e) { +void DrawZone::contentsDropEvent( TQDropEvent* e) { viewportDropEvent(e); } -void DrawZone::viewportDropEvent( QDropEvent* e) { +void DrawZone::viewportDropEvent( TQDropEvent* e) { KURL::List urlList; // A file from konqueror was dropped if (KURLDrag::decode(e,urlList)) { diff --git a/kimagemapeditor/drawzone.h b/kimagemapeditor/drawzone.h index 764e6951..58887288 100644 --- a/kimagemapeditor/drawzone.h +++ b/kimagemapeditor/drawzone.h @@ -18,11 +18,11 @@ #ifndef IMAGEMAP_H #define IMAGEMAP_H -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include "kdeversion.h" @@ -35,39 +35,39 @@ class Area; *@internal *@see Area */ -class DrawZone : public QScrollView { +class DrawZone : public TQScrollView { public: - DrawZone(QWidget *parent,KImageMapEditor* _imageMapEditor); + DrawZone(TQWidget *parent,KImageMapEditor* _imageMapEditor); ~DrawZone(); - QImage picture() const; + TQImage picture() const; void repaintArea(const Area & a); - void repaintRect(const QRect & r); + void repaintRect(const TQRect & r); void cancelDrawing(); - void setPicture(const QImage &_image); + void setPicture(const TQImage &_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; + TQPoint translateFromZoom(const TQPoint & p) const; + TQRect translateFromZoom(const TQRect & p) const; + TQPoint translateToZoom(const TQPoint & p) const; + TQRect translateToZoom(const TQRect & p) const; - QRect getImageRect() const { return image.rect(); } + TQRect 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*); + virtual void contentsMouseDoubleClickEvent(TQMouseEvent*); + virtual void contentsMousePressEvent(TQMouseEvent*); + virtual void contentsMouseReleaseEvent(TQMouseEvent*); + virtual void contentsMouseMoveEvent(TQMouseEvent*); + virtual void resizeEvent(TQResizeEvent*); + virtual void drawContents(TQPainter*,int,int,int,int); + virtual void viewportDropEvent(TQDropEvent*); + virtual void contentsDragEnterEvent(TQDragEnterEvent*); + virtual void contentsDropEvent(TQDropEvent*); /** * Represents whats currently going on @@ -80,7 +80,7 @@ protected: */ 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); + void createBorderRectangles(const TQRect & r,TQRect & rb,TQRect & lb,TQRect & tb,TQRect & bb); private: @@ -88,33 +88,33 @@ private: // The currently drawing area Area *currentArea; // Needed when moving selectionpoints - QRect *currentSelectionPoint; + TQRect *currentSelectionPoint; // The point where the user clicked the mouse - QPoint drawStart; - QPoint drawCurrent; + TQPoint drawStart; + TQPoint drawCurrent; // The original image - QImage image; + TQImage image; KImageMapEditor *imageMapEditor; // Only the rect of the zoomed image, perhaps redundant - QRect imageRect; + TQRect imageRect; // Only for repaint issues Area *oldArea; - QRect oldSelectionRect; + TQRect oldSelectionRect; // Holds the zoomed image for efficiency reasons - QPixmap zoomedImage; + TQPixmap zoomedImage; // The current zoom-factor double _zoom; - QCursor RectangleCursor; - QCursor CircleCursor; - QCursor PolygonCursor; - QCursor FreehandCursor; - QCursor AddPointCursor; - QCursor RemovePointCursor; + TQCursor RectangleCursor; + TQCursor CircleCursor; + TQCursor PolygonCursor; + TQCursor FreehandCursor; + TQCursor AddPointCursor; + TQCursor RemovePointCursor; }; -inline QImage DrawZone::picture() const { +inline TQImage DrawZone::picture() const { return image; } diff --git a/kimagemapeditor/imagemap.cpp b/kimagemapeditor/imagemap.cpp index 665ef000..4489508d 100644 --- a/kimagemapeditor/imagemap.cpp +++ b/kimagemapeditor/imagemap.cpp @@ -17,9 +17,9 @@ #include "imagemap.h" #include "kimagemapeditor.h" -#include "qpainter.h" +#include "tqpainter.h" #include "kdebug.h" -#include +#include int round(double d) { if ( (d-((int) d)) < 0.5 ) @@ -28,11 +28,11 @@ int round(double d) { return ((int) d)+1; } -ImageMap::ImageMap(QWidget *parent,KImageMapEditor* _imageMapEditor) - : QScrollView(parent) +ImageMap::ImageMap(TQWidget *parent,KImageMapEditor* _imageMapEditor) + : TQScrollView(parent) { imageMapEditor=_imageMapEditor; -// setPicture(QImage()); +// setPicture(TQImage()); currentAction=None; currentArea=0L; eraseOldArea=false; @@ -46,7 +46,7 @@ ImageMap::ImageMap(QWidget *parent,KImageMapEditor* _imageMapEditor) ImageMap::~ImageMap(){ } -void ImageMap::setPicture(const QImage &_image) { +void ImageMap::setPicture(const TQImage &_image) { image=_image; zoomedImage.convertFromImage(image); setZoom(_zoom); @@ -56,22 +56,22 @@ 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); + zoomedImage=TQPixmap(imageRect.width(),imageRect.height()); + TQPainter p(&zoomedImage); p.scale(z,z); - QPixmap pix; + TQPixmap 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)); + TQPixmap backPix(32,32); + TQPainter p2(&backPix); + p2.fillRect(0,0,32,32,TQColor(156,149,156)); + p2.fillRect(0,16,16,16,TQColor(98,105,98)); + p2.fillRect(16,0,16,16,TQColor(98,105,98)); p2.flush(); - p.setPen(QPen()); - p.fillRect(imageRect.left(),imageRect.top(),imageRect.width(),imageRect.height(),QBrush(QColor("black"),backPix)); + p.setPen(TQPen()); + p.fillRect(imageRect.left(),imageRect.top(),imageRect.width(),imageRect.height(),TQBrush(TQColor("black"),backPix)); } p.drawPixmap(imageRect.left(),imageRect.top(),pix); p.flush(); @@ -80,21 +80,21 @@ void ImageMap::setZoom(double z) { repaintContents(0,0,contentsWidth(),contentsHeight(),true); } -QPoint ImageMap::translateFromZoom(const QPoint & p) const { - return QPoint(p.x()/_zoom,p.y()/_zoom); +TQPoint ImageMap::translateFromZoom(const TQPoint & p) const { + return TQPoint(p.x()/_zoom,p.y()/_zoom); } -QPoint ImageMap::translateToZoom(const QPoint & p) const { - return QPoint(round(p.x()*_zoom),round(p.y()*_zoom)); +TQPoint ImageMap::translateToZoom(const TQPoint & p) const { + return TQPoint(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), +TQRect ImageMap::translateToZoom(const TQRect & r) const { + return TQRect(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(); +void ImageMap::contentsMouseDoubleClickEvent(TQMouseEvent* e) { + TQPoint point=e->pos(); point-=imageRect.topLeft(); point=translateFromZoom(point); if ( currentAction==None && @@ -103,7 +103,7 @@ void ImageMap::contentsMouseDoubleClickEvent(QMouseEvent* e) { } -void ImageMap::contentsMousePressEvent(QMouseEvent* e) { +void ImageMap::contentsMousePressEvent(TQMouseEvent* e) { drawStart=e->pos(); // Check if it's on picture if not // move it to the picture's border @@ -141,7 +141,7 @@ void ImageMap::contentsMousePressEvent(QMouseEvent* e) { } else if (imageMapEditor->currentShapeType()!=Area::None) { currentArea=new Area(imageMapEditor->currentShapeType()); - currentArea->setRect(QRect(drawStart,drawStart)); + currentArea->setRect(TQRect(drawStart,drawStart)); currentArea->setSelected(false); if (imageMapEditor->selected()) imageMapEditor->selected()->setSelected(false); @@ -167,7 +167,7 @@ void ImageMap::contentsMousePressEvent(QMouseEvent* e) { } - QRect r; + TQRect r; if (oldArea) r=oldArea->selectionRect(); if (currentArea) { @@ -177,7 +177,7 @@ void ImageMap::contentsMousePressEvent(QMouseEvent* e) { } -void ImageMap::contentsMouseReleaseEvent(QMouseEvent *e) { +void ImageMap::contentsMouseReleaseEvent(TQMouseEvent *e) { drawEnd=e->pos(); // Check if it's on picture if not @@ -238,7 +238,7 @@ void ImageMap::contentsMouseReleaseEvent(QMouseEvent *e) { } -void ImageMap::contentsMouseMoveEvent(QMouseEvent *e) { +void ImageMap::contentsMouseMoveEvent(TQMouseEvent *e) { drawCurrent=e->pos(); // If outside the image @@ -260,51 +260,51 @@ void ImageMap::contentsMouseMoveEvent(QMouseEvent *e) { 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; + TQRect oldRect=translateToZoom(currentArea->rect()); + currentArea->setRect(TQRect(drawStart,drawCurrent).normalize()); + TQRect newRect=translateToZoom(currentArea->rect()); + TQRect 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; + TQRect oldRect=translateToZoom(currentArea->rect()); + currentArea->setRect(TQRect(drawStart,drawCurrent).normalize()); + TQRect newRect=translateToZoom(currentArea->rect()); + TQRect r=oldRect | newRect; repaintContents(r,false); imageMapEditor->slotUpdateSelectionCoords(currentArea->rect()); } else if ( currentAction==DrawPolygon ) { - QRect oldRect=translateToZoom(currentArea->rect()); + TQRect oldRect=translateToZoom(currentArea->rect()); currentArea->moveSelectionPoint(currentSelectionPoint,drawCurrent); - QRect newRect=translateToZoom(currentArea->rect()); - QRect r=oldRect | newRect; + TQRect newRect=translateToZoom(currentArea->rect()); + TQRect r=oldRect | newRect; repaintContents(r,false); imageMapEditor->slotUpdateSelectionCoords(currentArea->rect()); } else if ( currentAction==MoveArea ) { - QRect oldRect=translateToZoom(currentArea->selectionRect()); + TQRect oldRect=translateToZoom(currentArea->selectionRect()); currentArea->moveBy((drawCurrent-drawStart).x(),(drawCurrent-drawStart).y()); - QRect newRect=translateToZoom(currentArea->selectionRect()); - QRect r=oldRect | newRect; + TQRect newRect=translateToZoom(currentArea->selectionRect()); + TQRect r=oldRect | newRect; repaintContents(r,false); drawStart=drawCurrent; imageMapEditor->slotUpdateSelectionCoords(); } else if ( currentAction==MoveSelectionPoint ) { - QRect oldRect=translateToZoom(currentArea->selectionRect()); + TQRect oldRect=translateToZoom(currentArea->selectionRect()); currentArea->moveSelectionPoint(currentSelectionPoint,drawCurrent); - QRect newRect=translateToZoom(currentArea->selectionRect()); - QRect r=oldRect | newRect; + TQRect newRect=translateToZoom(currentArea->selectionRect()); + TQRect r=oldRect | newRect; repaintContents(r,false); imageMapEditor->slotUpdateSelectionCoords(); } imageMapEditor->slotChangeStatusCoords(drawCurrent.x(),drawCurrent.y()); } -void ImageMap::resizeEvent(QResizeEvent* e) { - QScrollView::resizeEvent(e); +void ImageMap::resizeEvent(TQResizeEvent* e) { + TQScrollView::resizeEvent(e); int width=(int) (image.width()*_zoom); int height=(int) (image.height()*_zoom); if (visibleWidth()>width) @@ -325,7 +325,7 @@ void ImageMap::repaintArea(const Area & a) { repaintContents(translateToZoom(a.selectionRect()),false); } -void ImageMap::drawContents(QPainter* p,int clipx,int clipy,int clipw,int cliph) { +void ImageMap::drawContents(TQPainter* 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()) { @@ -334,16 +334,16 @@ void ImageMap::drawContents(QPainter* p,int clipx,int clipy,int clipw,int cliph) // } else /* if (currentAction==DrawRectangle) { p->setClipping(true); - QRect r(currentArea->rect()); + TQRect r(currentArea->rect()); r.moveBy(imageRect.left()-5,imageRect.top()-5); - r.setSize(r.size()+QSize(10,10)); + r.setSize(r.size()+TQSize(10,10)); p->setClipRegion(r); } */ - QRect updateRect(clipx,clipy,clipw,cliph); - QPixmap doubleBuffer(updateRect.size()); // Pixmap for double-buffering - QPainter p2(&doubleBuffer); + TQRect updateRect(clipx,clipy,clipw,cliph); + TQPixmap doubleBuffer(updateRect.size()); // Pixmap for double-buffering + TQPainter p2(&doubleBuffer); p2.drawPixmap(0,0,zoomedImage,clipx,clipy,clipw,cliph); p2.translate(-updateRect.x(), -updateRect.y()); p2.scale(_zoom,_zoom); @@ -365,8 +365,8 @@ void ImageMap::drawContents(QPainter* p,int clipx,int clipy,int clipw,int cliph) // 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)); + TQRegion region(contentsX(),contentsY(),visibleWidth(),visibleHeight()); + region=region.subtract(TQRegion(imageRect)); for (int i=0;ieraseRect(region.rects()[i]); } diff --git a/kimagemapeditor/imagemap.h b/kimagemapeditor/imagemap.h index 7576baa0..fe14c9d4 100644 --- a/kimagemapeditor/imagemap.h +++ b/kimagemapeditor/imagemap.h @@ -18,10 +18,10 @@ #ifndef IMAGEMAP_H #define IMAGEMAP_H -#include -#include -#include -#include +#include +#include +#include +#include #include "kdeversion.h" @@ -31,45 +31,45 @@ class KImageMapEditor; class Area; -class ImageMap : public QScrollView { +class ImageMap : public TQScrollView { public: enum DrawAction { None, DrawCircle, DrawRectangle, DrawPolygon, MoveSelectionPoint, MoveArea }; private: - QRect imageRect; - QPoint drawStart; - QPoint drawCurrent; - QPoint drawEnd; + TQRect imageRect; + TQPoint drawStart; + TQPoint drawCurrent; + TQPoint drawEnd; bool eraseOldArea; Area *oldArea; // Holds the original image - QImage image; + TQImage image; // Holds the zoomed image for efficiency reasons - QPixmap zoomedImage; + TQPixmap zoomedImage; Area *currentArea; DrawAction currentAction; - QRect *currentSelectionPoint; + TQRect *currentSelectionPoint; KImageMapEditor *imageMapEditor; double _zoom; public: - ImageMap(QWidget *parent,KImageMapEditor* _imageMapEditor); + ImageMap(TQWidget *parent,KImageMapEditor* _imageMapEditor); ~ImageMap(); void setZoom(double z); - void setPicture(const QImage &_image); + void setPicture(const TQImage &_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; + TQImage picture() const; + TQPoint translateFromZoom(const TQPoint & p) const; + TQPoint translateToZoom(const TQPoint & p) const; + TQRect translateToZoom(const TQRect & 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); + virtual void contentsMousePressEvent(TQMouseEvent* e); + virtual void contentsMouseDoubleClickEvent(TQMouseEvent* e); + virtual void contentsMouseReleaseEvent(TQMouseEvent *e); + virtual void contentsMouseMoveEvent(TQMouseEvent *e); + virtual void resizeEvent(TQResizeEvent* e); + virtual void drawContents(TQPainter* p,int clipx,int clipy,int clipw,int cliph); }; -inline QImage ImageMap::picture() const { +inline TQImage ImageMap::picture() const { return image; } diff --git a/kimagemapeditor/imageslistview.cpp b/kimagemapeditor/imageslistview.cpp index 55992101..7db15e1e 100644 --- a/kimagemapeditor/imageslistview.cpp +++ b/kimagemapeditor/imageslistview.cpp @@ -16,7 +16,7 @@ ***************************************************************************/ // QT -#include +#include // KDE @@ -27,7 +27,7 @@ #include "imageslistview.h" ImagesListViewItem::ImagesListViewItem(ImagesListView* parent, ImageTag* tag) - : QListViewItem(parent) + : TQListViewItem(parent) { _imageTag = tag; update(); @@ -35,8 +35,8 @@ ImagesListViewItem::ImagesListViewItem(ImagesListView* parent, ImageTag* tag) void ImagesListViewItem::update() { - QString src=""; - QString usemap=""; + TQString src=""; + TQString usemap=""; if (_imageTag->find("src")) src=*_imageTag->find("src"); if (_imageTag->find("usemap")) @@ -51,7 +51,7 @@ ImageTag* ImagesListViewItem::imageTag() { } -ImagesListView::ImagesListView(QWidget *parent, const char *name) +ImagesListView::ImagesListView(TQWidget *parent, const char *name) : KListView(parent, name) { addColumn(i18n("Images")); @@ -60,8 +60,8 @@ ImagesListView::ImagesListView(QWidget *parent, const char *name) setFullWidth(true); - connect( this, SIGNAL( selectionChanged(QListViewItem*)), - this, SLOT( slotSelectionChanged(QListViewItem*))); + connect( this, TQT_SIGNAL( selectionChanged(TQListViewItem*)), + this, TQT_SLOT( slotSelectionChanged(TQListViewItem*))); } @@ -79,7 +79,7 @@ void ImagesListView::addImage(ImageTag* tag) new ImagesListViewItem(this, tag); } -void ImagesListView::addImages(QPtrList * images) +void ImagesListView::addImages(TQPtrList * images) { for (ImageTag *tag = images->first(); tag!=0L; tag=images->next()) { addImage(tag); @@ -87,7 +87,7 @@ void ImagesListView::addImages(QPtrList * images) } void ImagesListView::clear() { - QListView::clear(); + TQListView::clear(); } void ImagesListView::removeImage(ImageTag* tag) { @@ -114,7 +114,7 @@ ImagesListViewItem* ImagesListView::findListViewItem(ImageTag* tag) { kdDebug() << "ImageListView::findListViewItem: start searching ... " << endl; - for (QListViewItem* item = firstChild(); item ; item = item->nextSibling()) { + for (TQListViewItem* item = firstChild(); item ; item = item->nextSibling()) { ImagesListViewItem *imageItem = static_cast(item); if (imageItem->imageTag() == tag) { kdDebug() << "ImageListView::findListViewItem: found it " << endl; @@ -128,8 +128,8 @@ ImagesListViewItem* ImagesListView::findListViewItem(ImageTag* tag) { } -void ImagesListView::slotSelectionChanged(QListViewItem* item) { - QString src = item->text(0); +void ImagesListView::slotSelectionChanged(TQListViewItem* item) { + TQString src = item->text(0); emit imageSelected(KURL(_baseUrl,src)); } diff --git a/kimagemapeditor/imageslistview.h b/kimagemapeditor/imageslistview.h index 55680405..ede6a87b 100644 --- a/kimagemapeditor/imageslistview.h +++ b/kimagemapeditor/imageslistview.h @@ -49,7 +49,7 @@ class ImagesListView : public KListView Q_OBJECT public: - ImagesListView(QWidget *parent, const char *name); + ImagesListView(TQWidget *parent, const char *name); virtual ~ImagesListView(); /** @@ -60,7 +60,7 @@ public: /** * Adds images */ - void addImages(QPtrList *); + void addImages(TQPtrList *); /** * Removes the given image from the list @@ -93,7 +93,7 @@ public: void setBaseUrl(const KURL & url) { _baseUrl = url; }; protected slots: - void slotSelectionChanged(QListViewItem*); + void slotSelectionChanged(TQListViewItem*); signals: void imageSelected(const KURL &); diff --git a/kimagemapeditor/kimagemapeditor.cpp b/kimagemapeditor/kimagemapeditor.cpp index ebfb0c7f..6a71f3a6 100644 --- a/kimagemapeditor/kimagemapeditor.cpp +++ b/kimagemapeditor/kimagemapeditor.cpp @@ -19,24 +19,24 @@ #include // QT -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include // KDE #include @@ -61,7 +61,7 @@ #if KDE_IS_VERSION(3,1,90) #include #else -#include +#include #endif // local @@ -84,8 +84,8 @@ typedef KParts::GenericFactory KimeFactory; K_EXPORT_COMPONENT_FACTORY( libkimagemapeditor , KimeFactory ) -KImageMapEditor::KImageMapEditor(QWidget *parentWidget, const char *, - QObject *parent, const char *name, const QStringList & ) +KImageMapEditor::KImageMapEditor(TQWidget *parentWidget, const char *, + TQObject *parent, const char *name, const TQStringList & ) : KParts::ReadWritePart(parent,name) { setInstance( KimeFactory::instance() ); @@ -95,7 +95,7 @@ KImageMapEditor::KImageMapEditor(QWidget *parentWidget, const char *, // Test if the MainWindow can handle DockWindows, if so create DockWidgets // instead of a Splitter mainDock = dynamic_cast(parent) ; - QSplitter * splitter = 0L; + TQSplitter * splitter = 0L; tabWidget = 0L; if (mainDock) { @@ -118,15 +118,15 @@ KImageMapEditor::KImageMapEditor(QWidget *parentWidget, const char *, mapsDock->manualDock( (KDockWidget*) areaDock, KDockWidget::DockCenter); imagesDock->manualDock( (KDockWidget*) mapsDock, KDockWidget::DockCenter); - connect( mainDock->manager(), SIGNAL(change()), this, SLOT(dockingStateChanged())); + connect( mainDock->manager(), TQT_SIGNAL(change()), this, TQT_SLOT(dockingStateChanged())); } else { areaDock = 0L; mapsDock = 0L; imagesDock = 0L; - splitter = new QSplitter(parentWidget); - tabWidget = new QTabWidget(splitter); + splitter = new TQSplitter(parentWidget); + tabWidget = new TQTabWidget(splitter); areaListView = new AreaListView(tabWidget,"AreaListView"); mapsListView = new MapsListView(tabWidget, "MapsListView"); imagesListView = new ImagesListView(tabWidget, "ImagesListView"); @@ -137,30 +137,30 @@ KImageMapEditor::KImageMapEditor(QWidget *parentWidget, const char *, } - 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( areaListView->listView, TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(slotSelectionChanged())); + connect( areaListView->listView, TQT_SIGNAL(doubleClicked(TQListViewItem*)), this, TQT_SLOT(showTagEditor(TQListViewItem*))); + connect( areaListView->listView, TQT_SIGNAL(rightButtonPressed(TQListViewItem*,const TQPoint &,int)), this, + TQT_SLOT(slotShowPopupMenu(TQListViewItem*,const TQPoint &))); - connect( mapsListView, SIGNAL( mapSelected(const QString &)), - this, SLOT( setMap(const QString &))); + connect( mapsListView, TQT_SIGNAL( mapSelected(const TQString &)), + this, TQT_SLOT( setMap(const TQString &))); - connect( mapsListView, SIGNAL( mapRenamed(const QString &)), - this, SLOT( setMapName(const QString &))); + connect( mapsListView, TQT_SIGNAL( mapRenamed(const TQString &)), + this, TQT_SLOT( setMapName(const TQString &))); - connect( mapsListView->listView(), SIGNAL(rightButtonPressed(QListViewItem*,const QPoint &,int)), this, - SLOT(slotShowMapPopupMenu(QListViewItem*,const QPoint &))); + connect( mapsListView->listView(), TQT_SIGNAL(rightButtonPressed(TQListViewItem*,const TQPoint &,int)), this, + TQT_SLOT(slotShowMapPopupMenu(TQListViewItem*,const TQPoint &))); - connect( imagesListView, SIGNAL( imageSelected(const KURL &)), - this, SLOT( setPicture(const KURL &))); + connect( imagesListView, TQT_SIGNAL( imageSelected(const KURL &)), + this, TQT_SLOT( setPicture(const KURL &))); - connect( imagesListView, SIGNAL(rightButtonPressed(QListViewItem*,const QPoint &,int)), this, - SLOT(slotShowImagePopupMenu(QListViewItem*,const QPoint &))); + connect( imagesListView, TQT_SIGNAL(rightButtonPressed(TQListViewItem*,const TQPoint &,int)), this, + TQT_SLOT(slotShowImagePopupMenu(TQListViewItem*,const TQPoint &))); // 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() ) { +/* TQString path = KGlobal::dirs()->findResourceDir( "data", "kimagemapeditor/dropimage.png" ) + "kimagemapeditor/dropimage.png"; + if ( ! TQFileInfo(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; @@ -170,8 +170,8 @@ KImageMapEditor::KImageMapEditor(QWidget *parentWidget, const char *, if (splitter) { drawZone = new DrawZone(splitter,this); - splitter->setResizeMode(drawZone,QSplitter::Stretch); - splitter->setResizeMode(tabWidget,QSplitter::KeepSize); + splitter->setResizeMode(drawZone,TQSplitter::Stretch); + splitter->setResizeMode(tabWidget,TQSplitter::KeepSize); setWidget(splitter); } else { drawZone = new DrawZone(parentWidget,this); @@ -225,14 +225,14 @@ KImageMapEditor::~KImageMapEditor() { MapTag::MapTag() { modified = false; - name = QString::null; + name = TQString::null; } void KImageMapEditor::init() { _htmlContent.clear(); - _imageUrl = QString::null; - m_url = QString::null; + _imageUrl = TQString::null; + m_url = TQString::null; HtmlElement* el = new HtmlElement("\n"); _htmlContent.append(el); el = new HtmlElement("\n"); @@ -401,8 +401,8 @@ void KImageMapEditor::slotConfigChanged() void KImageMapEditor::openLastURL(KConfig* config) { KURL lastURL ( config->readPathEntry("lastopenurl") ); - QString lastMap = config->readEntry("lastactivemap"); - QString lastImage = config->readPathEntry("lastactiveimage"); + TQString lastMap = config->readEntry("lastactivemap"); + TQString lastImage = config->readPathEntry("lastactiveimage"); // kdDebug() << "loading from group : " << config->group() << endl; @@ -414,7 +414,7 @@ void KImageMapEditor::openLastURL(KConfig* config) { if ( openHTMLFile(lastURL, lastMap, lastImage) ) m_url = lastURL; else - m_url = QString::null; + m_url = TQString::null; } } @@ -425,53 +425,53 @@ void KImageMapEditor::saveLastURL(KConfig* config) { // 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())); + //KMessageBox::information(0L, TQString("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") ); + KAction *temp=KStdAction::open(this, TQT_SLOT(fileOpen()), actionCollection()); + TQMimeSourceFactory::defaultFactory()->setPixmap( "openimage", SmallIcon("fileopen") ); temp->setWhatsThis(i18n("

Open File

Click this to open 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&)), + recentFilesAction = KStdAction::openRecent(this, TQT_SLOT(openURL(const KURL&)), actionCollection()); // File Save - temp =KStdAction::save(this, SLOT(fileSave()), actionCollection()); - QMimeSourceFactory::defaultFactory()->setPixmap( "saveimage", SmallIcon("filesave") ); + temp =KStdAction::save(this, TQT_SLOT(fileSave()), actionCollection()); + TQMimeSourceFactory::defaultFactory()->setPixmap( "saveimage", SmallIcon("filesave") ); temp->setWhatsThis(i18n("

Save File

Click this to save the changes to the HTML file.")); temp->setToolTip(i18n("Save HTML file")); // File Save As - (void)KStdAction::saveAs(this, SLOT(fileSaveAs()), actionCollection()); + (void)KStdAction::saveAs(this, TQT_SLOT(fileSaveAs()), actionCollection()); // File Close - temp=KStdAction::close(this, SLOT(fileClose()), actionCollection()); - QMimeSourceFactory::defaultFactory()->setPixmap( "closeimage", SmallIcon("fileclose") ); + temp=KStdAction::close(this, TQT_SLOT(fileClose()), actionCollection()); + TQMimeSourceFactory::defaultFactory()->setPixmap( "closeimage", SmallIcon("fileclose") ); temp->setWhatsThis(i18n("

Close File

Click this to close 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=KStdAction::copy(this, TQT_SLOT(slotCopy()), actionCollection()); + TQMimeSourceFactory::defaultFactory()->setPixmap( "editcopyimage", SmallIcon("editcopy") ); copyAction->setWhatsThis(i18n("

Copy

" "Click this to copy the selected area.")); copyAction->setEnabled(false); // Edit Cut - cutAction=KStdAction::cut(this, SLOT(slotCut()), actionCollection()); - QMimeSourceFactory::defaultFactory()->setPixmap( "editcutimage", SmallIcon("editcut") ); + cutAction=KStdAction::cut(this, TQT_SLOT(slotCut()), actionCollection()); + TQMimeSourceFactory::defaultFactory()->setPixmap( "editcutimage", SmallIcon("editcut") ); cutAction->setWhatsThis(i18n("

Cut

" "Click this to cut the selected area.")); cutAction->setEnabled(false); // Edit Paste - pasteAction=KStdAction::paste(this, SLOT(slotPaste()), actionCollection()); - QMimeSourceFactory::defaultFactory()->setPixmap( "editpasteimage", SmallIcon("editpaste") ); + pasteAction=KStdAction::paste(this, TQT_SLOT(slotPaste()), actionCollection()); + TQMimeSourceFactory::defaultFactory()->setPixmap( "editpasteimage", SmallIcon("editpaste") ); pasteAction->setWhatsThis(i18n("

Paste

" "Click this to paste the copied area.")); pasteAction->setEnabled(false); @@ -479,8 +479,8 @@ void KImageMapEditor::setupActions() // Edit Delete deleteAction=new KAction(i18n("&Delete"), "editdelete", - Key_Delete,this,SLOT (slotDelete()),actionCollection(), "edit_delete"); - QMimeSourceFactory::defaultFactory()->setPixmap( "editdeleteimage", SmallIcon("editdelete") ); + Key_Delete,this,TQT_SLOT (slotDelete()),actionCollection(), "edit_delete"); + TQMimeSourceFactory::defaultFactory()->setPixmap( "editdeleteimage", SmallIcon("editdelete") ); deleteAction->setWhatsThis(i18n("

Delete

" "Click this to delete the selected area.")); deleteAction->setEnabled(false); @@ -489,21 +489,21 @@ void KImageMapEditor::setupActions() _commandHistory = new KCommandHistory( actionCollection(), true); // Edit Properties - areaPropertiesAction= new KAction(i18n("Pr&operties"),0,this,SLOT(showTagEditor()), + areaPropertiesAction= new KAction(i18n("Pr&operties"),0,this,TQT_SLOT(showTagEditor()), actionCollection(), "edit_properties"); areaPropertiesAction->setEnabled(false); // View Zoom In - zoomInAction=KStdAction::zoomIn(this, SLOT(slotZoomIn()), actionCollection()); + zoomInAction=KStdAction::zoomIn(this, TQT_SLOT(slotZoomIn()), actionCollection()); // View Zoom Out - zoomOutAction=KStdAction::zoomOut(this, SLOT(slotZoomOut()), actionCollection()); + zoomOutAction=KStdAction::zoomOut(this, TQT_SLOT(slotZoomOut()), actionCollection()); // View Zoom - zoomAction=new KSelectAction(i18n("Zoom"), 0,this,SLOT (slotZoom()), + zoomAction=new KSelectAction(i18n("Zoom"), 0,this,TQT_SLOT (slotZoom()), actionCollection(), "view_zoom"); zoomAction->setWhatsThis(i18n("

Zoom

" "Choose the desired zoom level.")); - zoomAction->setItems(QStringList() + zoomAction->setItems(TQStringList() << i18n("25%") << i18n("50%") << i18n("100%") @@ -517,58 +517,58 @@ void KImageMapEditor::setupActions() zoomAction->setCurrentItem(2); - highlightAreasAction = new KToggleAction(i18n("Highlight Areas"),0, this, SLOT (slotHightlightAreas()), + highlightAreasAction = new KToggleAction(i18n("Highlight Areas"),0, this, TQT_SLOT (slotHightlightAreas()), actionCollection(), "view_highlightareas"); - showAltAction = new KToggleAction(i18n("Show Alt Tag"),0, this, SLOT (slotShowAltTag()), + showAltAction = new KToggleAction(i18n("Show Alt Tag"),0, this, TQT_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()), + mapNameAction= new KAction(i18n("Map &Name..."),0,this,TQT_SLOT(mapEditName()), actionCollection(), "map_name"); - mapNewAction = new KAction(i18n("Ne&w Map..."),0,this,SLOT(mapNew()), + mapNewAction = new KAction(i18n("Ne&w Map..."),0,this,TQT_SLOT(mapNew()), actionCollection(), "map_new"); mapNewAction->setToolTip(i18n("Create a new map")); - mapDeleteAction = new KAction(i18n("D&elete Map"),0,this,SLOT(mapDelete()), + mapDeleteAction = new KAction(i18n("D&elete Map"),0,this,TQT_SLOT(mapDelete()), actionCollection(), "map_delete"); mapDeleteAction->setToolTip(i18n("Delete the current active map")); - mapDefaultAreaAction = new KAction(i18n("Edit &Default Area..."),0,this,SLOT(mapDefaultArea()), + mapDefaultAreaAction = new KAction(i18n("Edit &Default Area..."),0,this,TQT_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()), + temp = new KAction(i18n("&Preview"),0,this,TQT_SLOT(mapPreview()), actionCollection(), "map_preview"); temp->setToolTip(i18n("Show a preview")); // IMAGE i18n("&Image"); - imageAddAction = new KAction(i18n("Add Image..."),0,this,SLOT(imageAdd()), + imageAddAction = new KAction(i18n("Add Image..."),0,this,TQT_SLOT(imageAdd()), actionCollection(), "image_add"); imageAddAction->setToolTip(i18n("Add a new image")); - imageRemoveAction = new KAction(i18n("Remove Image"),0,this,SLOT(imageRemove()), + imageRemoveAction = new KAction(i18n("Remove Image"),0,this,TQT_SLOT(imageRemove()), actionCollection(), "image_remove"); imageRemoveAction->setToolTip(i18n("Remove the current visible image")); - imageUsemapAction = new KAction(i18n("Edit Usemap..."),0,this,SLOT(imageUsemap()), + imageUsemapAction = new KAction(i18n("Edit Usemap..."),0,this,TQT_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()), + temp= new KAction(i18n("Show &HTML"),0,this,TQT_SLOT(mapShowHTML()), actionCollection(), "map_showhtml"); // Selection Tool arrowAction=new KRadioAction(i18n("&Selection"), "arrow", - 0,this,SLOT (slotDrawArrow()), + 0,this,TQT_SLOT (slotDrawArrow()), actionCollection(), "tool_arrow"); - QMimeSourceFactory::defaultFactory()->setPixmap( "arrowimage", SmallIcon("arrow") ); + TQMimeSourceFactory::defaultFactory()->setPixmap( "arrowimage", SmallIcon("arrow") ); arrowAction->setWhatsThis(i18n("

Selection

" "Click this to select areas.")); arrowAction->setExclusiveGroup("drawing"); @@ -576,54 +576,54 @@ void KImageMapEditor::setupActions() // Circle circleAction=new KRadioAction(i18n("&Circle"), "circle", - 0,this,SLOT (slotDrawCircle()), + 0,this,TQT_SLOT (slotDrawCircle()), actionCollection(), "tool_circle"); - QMimeSourceFactory::defaultFactory()->setPixmap( "circleimage", SmallIcon("drawcircle") ); + TQMimeSourceFactory::defaultFactory()->setPixmap( "circleimage", SmallIcon("drawcircle") ); circleAction->setWhatsThis(i18n("

Circle

" "Click this to start drawing a circle.")); circleAction->setExclusiveGroup("drawing"); // Rectangle rectangleAction=new KRadioAction(i18n("&Rectangle"), "rectangle", - 0,this,SLOT (slotDrawRectangle()), + 0,this,TQT_SLOT (slotDrawRectangle()), actionCollection(), "tool_rectangle"); - QMimeSourceFactory::defaultFactory()->setPixmap( "rectangleimage", SmallIcon("drawrectangle") ); + TQMimeSourceFactory::defaultFactory()->setPixmap( "rectangleimage", SmallIcon("drawrectangle") ); rectangleAction->setWhatsThis(i18n("

Rectangle

" "Click this to start drawing a rectangle.")); rectangleAction->setExclusiveGroup("drawing"); // Polygon polygonAction=new KRadioAction(i18n("&Polygon"), "polygon", - 0,this,SLOT (slotDrawPolygon()), + 0,this,TQT_SLOT (slotDrawPolygon()), actionCollection(), "tool_polygon"); - QMimeSourceFactory::defaultFactory()->setPixmap( "polygonimage", SmallIcon("drawpolygon") ); + TQMimeSourceFactory::defaultFactory()->setPixmap( "polygonimage", SmallIcon("drawpolygon") ); polygonAction->setWhatsThis(i18n("

Polygon

" "Click this to start drawing a polygon.")); polygonAction->setExclusiveGroup("drawing"); // Freehand freehandAction=new KRadioAction(i18n("&Freehand Polygon"), "freehand", - 0,this,SLOT (slotDrawFreehand()), + 0,this,TQT_SLOT (slotDrawFreehand()), actionCollection(), "tool_freehand"); - QMimeSourceFactory::defaultFactory()->setPixmap( "freehandimage", SmallIcon("freehand") ); + TQMimeSourceFactory::defaultFactory()->setPixmap( "freehandimage", SmallIcon("freehand") ); freehandAction->setWhatsThis(i18n("

Freehandpolygon

" "Click this to start drawing a freehand polygon.")); freehandAction->setExclusiveGroup("drawing"); // Add Point addPointAction=new KRadioAction(i18n("&Add Point"), "addpoint", - 0,this,SLOT (slotDrawAddPoint()), + 0,this,TQT_SLOT (slotDrawAddPoint()), actionCollection(), "tool_addpoint"); - QMimeSourceFactory::defaultFactory()->setPixmap( "addpointimage", SmallIcon("addpoint") ); + TQMimeSourceFactory::defaultFactory()->setPixmap( "addpointimage", SmallIcon("addpoint") ); addPointAction->setWhatsThis(i18n("

Add Point

" "Click this to add points to a polygon.")); addPointAction->setExclusiveGroup("drawing"); // Remove Point removePointAction=new KRadioAction(i18n("&Remove Point"), "removepoint", - 0,this,SLOT (slotDrawRemovePoint()), + 0,this,TQT_SLOT (slotDrawRemovePoint()), actionCollection(), "tool_removepoint"); - QMimeSourceFactory::defaultFactory()->setPixmap( "removepointimage", SmallIcon("removepoint") ); + TQMimeSourceFactory::defaultFactory()->setPixmap( "removepointimage", SmallIcon("removepoint") ); removePointAction->setWhatsThis(i18n("

Remove Point

" "Click this to remove points from a polygon.")); removePointAction->setExclusiveGroup("drawing"); @@ -631,31 +631,31 @@ void KImageMapEditor::setupActions() #if KDE_VERSION < 300 KAction *cancelAction = #endif - new KAction(i18n("Cancel Drawing"), Key_Escape, this, SLOT( slotCancelDrawing() ), + new KAction(i18n("Cancel Drawing"), Key_Escape, this, TQT_SLOT( slotCancelDrawing() ), actionCollection(), "canceldrawing" ); - moveLeftAction = new KAction(i18n("Move Left"), Key_Left, this, SLOT( slotMoveLeft() ), + moveLeftAction = new KAction(i18n("Move Left"), Key_Left, this, TQT_SLOT( slotMoveLeft() ), actionCollection() , "moveleft" ); - moveRightAction = new KAction(i18n("Move Right"), Key_Right, this, SLOT( slotMoveRight() ), + moveRightAction = new KAction(i18n("Move Right"), Key_Right, this, TQT_SLOT( slotMoveRight() ), actionCollection() , "moveright" ); - moveUpAction = new KAction(i18n("Move Up"), Key_Up, this, SLOT( slotMoveUp() ), + moveUpAction = new KAction(i18n("Move Up"), Key_Up, this, TQT_SLOT( slotMoveUp() ), actionCollection() , "moveup" ); - moveDownAction = new KAction(i18n("Move Down"), Key_Down, this, SLOT( slotMoveDown() ), + moveDownAction = new KAction(i18n("Move Down"), Key_Down, this, TQT_SLOT( slotMoveDown() ), actionCollection() , "movedown" ); - increaseWidthAction = new KAction(i18n("Increase Width"), Key_Right + SHIFT, this, SLOT( slotIncreaseWidth() ), + increaseWidthAction = new KAction(i18n("Increase Width"), Key_Right + SHIFT, this, TQT_SLOT( slotIncreaseWidth() ), actionCollection() , "increasewidth" ); - decreaseWidthAction = new KAction(i18n("Decrease Width"), Key_Left + SHIFT, this, SLOT( slotDecreaseWidth() ), + decreaseWidthAction = new KAction(i18n("Decrease Width"), Key_Left + SHIFT, this, TQT_SLOT( slotDecreaseWidth() ), actionCollection() , "decreasewidth" ); - increaseHeightAction = new KAction(i18n("Increase Height"), Key_Up + SHIFT, this, SLOT( slotIncreaseHeight() ), + increaseHeightAction = new KAction(i18n("Increase Height"), Key_Up + SHIFT, this, TQT_SLOT( slotIncreaseHeight() ), actionCollection() , "increaseheight" ); - decreaseHeightAction = new KAction(i18n("Decrease Height"), Key_Down + SHIFT, this, SLOT( slotDecreaseHeight() ), + decreaseHeightAction = new KAction(i18n("Decrease Height"), Key_Down + SHIFT, this, TQT_SLOT( slotDecreaseHeight() ), actionCollection() , "decreaseheight" ); #if KDE_VERSION < 300 accel = new KAccel(widget()); @@ -670,38 +670,38 @@ void KImageMapEditor::setupActions() decreaseHeightAction->plugAccel(accel, true); #endif - toFrontAction = new KAction(i18n("Bring to Front"), 0 , this, SLOT( slotToFront() ), + toFrontAction = new KAction(i18n("Bring to Front"), 0 , this, TQT_SLOT( slotToFront() ), actionCollection() , "tofront" ); - toBackAction = new KAction(i18n("Send to Back"), 0 , this, SLOT( slotToBack() ), + toBackAction = new KAction(i18n("Send to Back"), 0 , this, TQT_SLOT( slotToBack() ), actionCollection() , "toback" ); - forwardOneAction = new KAction(i18n("Bring Forward One"), "raise" ,0, this, SLOT( slotForwardOne() ), + forwardOneAction = new KAction(i18n("Bring Forward One"), "raise" ,0, this, TQT_SLOT( slotForwardOne() ), actionCollection() , "forwardone" ); - backOneAction = new KAction(i18n("Send Back One"), "lower" ,0, this, SLOT( slotBackOne() ), + backOneAction = new KAction(i18n("Send Back One"), "lower" ,0, this, TQT_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())); + connect( areaListView->upBtn, TQT_SIGNAL(pressed()), forwardOneAction, TQT_SLOT(activate())); + connect( areaListView->downBtn, TQT_SIGNAL(pressed()), backOneAction, TQT_SLOT(activate())); new KAction( i18n("Configure KImageMapEditor..."), "configure", 0, - this, SLOT(slotShowPreferences()), + this, TQT_SLOT(slotShowPreferences()), actionCollection(), "configure_kimagemapeditor" ); if (areaDock) { configureShowAreaListAction = new KToggleAction( i18n("Show Area List"), 0L, 0, - this, SLOT(configureShowAreaList()), + this, TQT_SLOT(configureShowAreaList()), actionCollection(), "configure_show_arealist" ); configureShowMapListAction = new KToggleAction( i18n("Show Map List"), 0L, 0, - this, SLOT(configureShowMapList()), + this, TQT_SLOT(configureShowMapList()), actionCollection(), "configure_show_maplist" ); configureShowImageListAction = new KToggleAction( i18n("Show Image List"), 0L, 0, - this, SLOT(configureShowImageList()), + this, TQT_SLOT(configureShowImageList()), actionCollection(), "configure_show_imagelist" ); #if KDE_IS_VERSION(3,2,90) configureShowAreaListAction->setCheckedState(i18n("Hide Area List")); @@ -725,30 +725,30 @@ void KImageMapEditor::setupStatusBar() void KImageMapEditor::slotShowPreferences() { PreferencesDialog *dialog = new PreferencesDialog(widget(),config()); - connect(dialog, SIGNAL(applyClicked()), this, SLOT(slotConfigChanged())); + connect(dialog, TQT_SIGNAL(applyClicked()), this, TQT_SLOT(slotConfigChanged())); dialog->exec(); delete dialog; } -void KImageMapEditor::showPopupMenu(const QPoint & pos, const QString & name) +void KImageMapEditor::showPopupMenu(const TQPoint & pos, const TQString & name) { - QPopupMenu* pop = static_cast(factory()->container(name, this)); + TQPopupMenu* pop = static_cast(factory()->container(name, this)); if (!pop) { - kdWarning() << QString("KImageMapEditorPart: Missing XML definition for %1\n").arg(name) << endl; + kdWarning() << TQString("KImageMapEditorPart: Missing XML definition for %1\n").arg(name) << endl; return; } pop->popup(pos); } -void KImageMapEditor::slotShowMainPopupMenu(const QPoint & pos) +void KImageMapEditor::slotShowMainPopupMenu(const TQPoint & pos) { showPopupMenu(pos,"popup_main"); } -void KImageMapEditor::slotShowMapPopupMenu(QListViewItem* item,const QPoint & pos) +void KImageMapEditor::slotShowMapPopupMenu(TQListViewItem* item,const TQPoint & pos) { if (isReadWrite()) { mapDeleteAction->setEnabled(item); @@ -762,7 +762,7 @@ void KImageMapEditor::slotShowMapPopupMenu(QListViewItem* item,const QPoint & po showPopupMenu(pos,"popup_map"); } -void KImageMapEditor::slotShowImagePopupMenu(QListViewItem* item,const QPoint & pos) +void KImageMapEditor::slotShowImagePopupMenu(TQListViewItem* item,const TQPoint & pos) { imageRemoveAction->setEnabled(item); imageUsemapAction->setEnabled(item); @@ -773,7 +773,7 @@ void KImageMapEditor::slotShowImagePopupMenu(QListViewItem* item,const QPoint & showPopupMenu(pos,"popup_image"); } -void KImageMapEditor::slotShowPopupMenu(QListViewItem* item,const QPoint & p) +void KImageMapEditor::slotShowPopupMenu(TQListViewItem* item,const TQPoint & p) { if (!item) return; @@ -794,14 +794,14 @@ void KImageMapEditor::updateStatusBar() void KImageMapEditor::slotChangeStatusCoords(int x,int y) { -// statusBar()->changeItem(QString(" Cursor : x: %1 ,y: %2 ").arg(x).arg(y),STATUS_CURSOR); +// statusBar()->changeItem(TQString(" 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(); + TQRect 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()); @@ -814,7 +814,7 @@ void KImageMapEditor::slotUpdateSelectionCoords() { updateStatusBar(); } -void KImageMapEditor::slotUpdateSelectionCoords( const QRect & r ) +void KImageMapEditor::slotUpdateSelectionCoords( const TQRect & 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(); @@ -827,57 +827,57 @@ KApplication* KImageMapEditor::app() const } -void KImageMapEditor::drawToCenter(QPainter* p, const QString & str, int y, int width) { +void KImageMapEditor::drawToCenter(TQPainter* p, const TQString & str, int y, int width) { int xmid = width / 2; - QFontMetrics fm = p->fontMetrics(); - QRect strBounds = fm.boundingRect(str); + TQFontMetrics fm = p->fontMetrics(); + TQRect strBounds = fm.boundingRect(str); p->drawText(xmid-(strBounds.width()/2),y,str); } -QImage KImageMapEditor::getBackgroundImage() { +TQImage 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; +// TQString filename = TQString("dropimage_")+KGlobal::locale()->language()+".png"; +// TQString path = TQString::null; //KGlobal::dirs()->findResourceDir( "data", "kimagemapeditor/"+filename ) + "kimagemapeditor/"+filename; // kdDebug() << "getBackgroundPic : loaded image : " << path << endl; -// if ( ! QFileInfo(path).exists() ) { +// if ( ! TQFileInfo(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); + TQPixmap pix(width,height); + pix.fill(TQColor(74,76,74)); + TQPainter p(&pix); - QFont font; + TQFont 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)); + p.setPen(TQPen(TQColor(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); + TQString str = i18n("Drop an image or HTML file"); + TQStringList strList = TQStringList::split(" ",str); // Get the string parts - QString tmp; - QStringList outputStrList; - QFontMetrics fm = p.fontMetrics(); + TQString tmp; + TQStringList outputStrList; + TQFontMetrics fm = p.fontMetrics(); - for ( QStringList::Iterator it = strList.begin(); it != strList.end(); ++it ) { - QString tmp2 = tmp + *it; + for ( TQStringList::Iterator it = strList.begin(); it != strList.end(); ++it ) { + TQString tmp2 = tmp + *it; if (fm.boundingRect(tmp2).width() > width-border) { outputStrList.append(tmp); @@ -894,7 +894,7 @@ QImage KImageMapEditor::getBackgroundImage() { int step = myround(float(height) / (outputStrList.size()+1)); int y = step; - for ( QStringList::Iterator it = outputStrList.begin(); it != outputStrList.end(); ++it ) { + for ( TQStringList::Iterator it = outputStrList.begin(); it != outputStrList.end(); ++it ) { drawToCenter(&p, *it, y, pix.width()); y += step; } @@ -908,19 +908,19 @@ QImage KImageMapEditor::getBackgroundImage() { return _backgroundImage; /* - QFontDatabase fdb; - QStringList families = fdb.families(); - for ( QStringList::Iterator f = families.begin(); f != families.end(); ++f ) { - QString family = *f; + TQFontDatabase fdb; + TQStringList families = fdb.families(); + for ( TQStringList::Iterator f = families.begin(); f != families.end(); ++f ) { + TQString 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 smoothies = fdb.smoothSizes( family, style ); - for ( QValueList::Iterator points = smoothies.begin(); + TQStringList styles = fdb.styles( family ); + for ( TQStringList::Iterator s = styles.begin(); s != styles.end(); ++s ) { + TQString style = *s; + TQString dstyle = "\t" + style + " ("; + TQValueList smoothies = fdb.smoothSizes( family, style ); + for ( TQValueList::Iterator points = smoothies.begin(); points != smoothies.end(); ++points ) { - dstyle += QString::number( *points ) + " "; + dstyle += TQString::number( *points ) + " "; } dstyle = dstyle.left( dstyle.length() - 1 ) + ")"; qDebug( dstyle ); @@ -933,7 +933,7 @@ QImage KImageMapEditor::getBackgroundImage() { pix.save(path,"PNG",100); } - if ( ! QFileInfo(path).exists() ) { + if ( ! TQFileInfo(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; @@ -957,14 +957,14 @@ void KImageMapEditor::addArea(Area* area) { for (Area* a = list.first(); a != 0L; a = list.next() ) { areas->prepend(a); - a->setListViewItem(new QListViewItem(areaListView->listView,a->attribute("href"))); + a->setListViewItem(new TQListViewItem(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->setListViewItem(new TQListViewItem(areaListView->listView,area->attribute("href"))); area->listViewItem()->setPixmap(1,makeListViewPix(*area)); } @@ -975,7 +975,7 @@ void KImageMapEditor::addArea(Area* area) { void KImageMapEditor::addAreaAndEdit(Area* s) { areas->prepend(s); - s->setListViewItem(new QListViewItem(areaListView->listView,s->attribute("href"))); + s->setListViewItem(new TQListViewItem(areaListView->listView,s->attribute("href"))); s->listViewItem()->setPixmap(1,makeListViewPix(*s)); deselectAll(); select(s); @@ -991,7 +991,7 @@ void KImageMapEditor::deleteArea( Area * area ) if (!area) return; // only for repaint reasons - QRect redrawRect = area->selectionRect(); + TQRect redrawRect = area->selectionRect(); // Perhaps we've got a selection of areas // so test it and delete the whole selection @@ -1112,7 +1112,7 @@ void KImageMapEditor::slotSelectionChanged() } -void KImageMapEditor::select( QListViewItem* item) +void KImageMapEditor::select( TQListViewItem* item) { AreaListIterator it = areaList(); @@ -1307,13 +1307,13 @@ void KImageMapEditor::updateUpDownBtn() void KImageMapEditor::deselectAll() { - QRect redrawRect= currentSelected->selectionRect(); + TQRect redrawRect= currentSelected->selectionRect(); currentSelected->reset(); drawZone->repaintRect(redrawRect); updateActionAccess(); } -Area* KImageMapEditor::onArea(const QPoint & p) const { +Area* KImageMapEditor::onArea(const TQPoint & p) const { for (Area* s=areas->first();s!=0L;s=areas->next()) { if (s->contains(p)) return s; @@ -1327,7 +1327,7 @@ int KImageMapEditor::showTagEditor(Area *a) { drawZone->repaintArea(*a); AreaDialog *dialog= new AreaDialog(this,a); - connect (dialog, SIGNAL(areaChanged(Area*)), this, SLOT(slotAreaChanged(Area*))); + connect (dialog, TQT_SIGNAL(areaChanged(Area*)), this, TQT_SLOT(slotAreaChanged(Area*))); int result = dialog->exec(); @@ -1336,7 +1336,7 @@ int KImageMapEditor::showTagEditor(Area *a) { } -int KImageMapEditor::showTagEditor(QListViewItem *item) { +int KImageMapEditor::showTagEditor(TQListViewItem *item) { if (!item) return 0; for (Area* a=areas->first();a!=0L;a=areas->next()) { if (a->listViewItem()==item) { @@ -1351,9 +1351,9 @@ int KImageMapEditor::showTagEditor() { } -QString KImageMapEditor::getHTMLImageMap() const { - QString retStr; - retStr+="\n"; +TQString KImageMapEditor::getHTMLImageMap() const { + TQString retStr; + retStr+="\n"; for (Area* a=areas->first();a!=0L;a=areas->next()) { retStr+=" "+a->getHTMLCode()+"\n"; @@ -1366,9 +1366,9 @@ QString KImageMapEditor::getHTMLImageMap() const { return retStr; } -QPixmap KImageMapEditor::makeListViewPix(Area & a) +TQPixmap KImageMapEditor::makeListViewPix(Area & a) { - QPixmap pix=a.cutOut(drawZone->picture()); + TQPixmap pix=a.cutOut(drawZone->picture()); double shrinkFactor=1; @@ -1376,12 +1376,12 @@ QPixmap KImageMapEditor::makeListViewPix(Area & a) if (maxAreaPreviewHeight < pix.height()) shrinkFactor = ( (double) maxAreaPreviewHeight / pix.height() ); - QPixmap pix2((int)(pix.width()*shrinkFactor), (int)(pix.height()*shrinkFactor)); + TQPixmap pix2((int)(pix.width()*shrinkFactor), (int)(pix.height()*shrinkFactor)); // Give all pixels a defined color pix2.fill(Qt::white); - QPainter p(&pix2); + TQPainter p(&pix2); p.scale(shrinkFactor,shrinkFactor); p.drawPixmap(0,0,pix); @@ -1389,7 +1389,7 @@ QPixmap KImageMapEditor::makeListViewPix(Area & a) return pix2; } -void KImageMapEditor::setMapName(const QString & s) { +void KImageMapEditor::setMapName(const TQString & s) { mapsListView->changeMapName(_mapName, s); _mapName=s; currentMapElement->mapTag->name = s; @@ -1398,8 +1398,8 @@ void KImageMapEditor::setMapName(const QString & s) { void KImageMapEditor::setPicture(const KURL & url) { _imageUrl=url; - if (QFileInfo(url.path()).exists()) { - QImage img(url.path()); + if (TQFileInfo(url.path()).exists()) { + TQImage img(url.path()); if (!img.isNull()) { setPicture(img); @@ -1407,13 +1407,13 @@ void KImageMapEditor::setPicture(const KURL & url) { imageUsemapAction->setEnabled(true); } else - kdError() << QString("The image %1 could not be opened.").arg(url.path()) << endl; + kdError() << TQString("The image %1 could not be opened.").arg(url.path()) << endl; } else - kdError() << QString("The image %1 does not exist.").arg(url.path()) << endl; + kdError() << TQString("The image %1 does not exist.").arg(url.path()) << endl; } -void KImageMapEditor::setPicture(const QImage & pix) { +void KImageMapEditor::setPicture(const TQImage & pix) { drawZone->setPicture(pix); updateAllAreas(); } @@ -1508,11 +1508,11 @@ void KImageMapEditor::mapEditName() { bool ok=false; #if KDE_IS_VERSION(3, 1, 90) - QString input = KInputDialog::getText(i18n("Enter Map Name"), + TQString 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"), + TQString input = KLineEditDlg::getText(i18n("Enter Map Name"), i18n("Enter the name of the map:"), _mapName,&ok,widget()); #endif @@ -1529,12 +1529,12 @@ void KImageMapEditor::mapEditName() void KImageMapEditor::mapShowHTML() { - KDialogBase *dialog= new KDialogBase(widget(),QString::null,true,i18n("HTML Code of Map"),KDialogBase::Ok); - QMultiLineEdit *edit = new QMultiLineEdit(dialog); + KDialogBase *dialog= new KDialogBase(widget(),TQString::null,true,i18n("HTML Code of Map"),KDialogBase::Ok); + TQMultiLineEdit *edit = new TQMultiLineEdit(dialog); edit->setText(getHtmlCode()); edit->setReadOnly(true); - edit->setWordWrap(QTextEdit::NoWrap); + edit->setWordWrap(TQTextEdit::NoWrap); dialog->setMainWidget(edit); // dialog->resize(dialog->calculateSize(edit->maxLineWidth(),edit->numLines()*)); // dialog->adjustSize(); @@ -1544,7 +1544,7 @@ void KImageMapEditor::mapShowHTML() void KImageMapEditor::openFile(const KURL & url) { if ( ! url.isEmpty()) { - QString ext=QFileInfo(url.path()).extension().lower(); + TQString ext=TQFileInfo(url.path()).extension().lower(); if (ext=="png" || ext=="jpg" || ext=="jpeg" || ext=="gif" || ext=="bmp" || ext=="xbm" || ext=="xpm" || ext=="mng" || ext=="pnm") @@ -1561,14 +1561,14 @@ bool KImageMapEditor::openURL(const KURL & url) { // For non local files, we cannot check // the existance if (url.isLocalFile() && - ! QFile::exists(url.path())) + ! TQFile::exists(url.path())) return true; return KParts::ReadOnlyPart::openURL(url); } void KImageMapEditor::fileOpen() { - QString fileName = KFileDialog::getOpenFileName(QString::null, + TQString fileName = KFileDialog::getOpenFileName(TQString::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" @@ -1617,7 +1617,7 @@ void KImageMapEditor::fileSaveAs() { } - QFileInfo fileInfo(url.path()); + TQFileInfo fileInfo(url.path()); if ( fileInfo.exists() ) { @@ -1641,7 +1641,7 @@ void KImageMapEditor::fileSaveAs() { bool KImageMapEditor::openFile() { - QFileInfo fileInfo(url().path()); + TQFileInfo fileInfo(url().path()); if ( !fileInfo.exists() ) { @@ -1661,28 +1661,28 @@ bool KImageMapEditor::openFile() } /** - * This methods supposes that the given QTextStream s has just read + * This methods supposes that the given TQTextStream s has just read * the < of a tag. It now reads all attributes of the tag until a > * The tagname itself is also read and stored as a tagname - * attribute. After parsing the whole tag it returns a QDict + * attribute. After parsing the whole tag it returns a TQDict * with all attributes and their values. It stores the whole read text in the * parameter readText. */ -QDict KImageMapEditor::getTagAttributes(QTextStream & s, QString & readText) +TQDict KImageMapEditor::getTagAttributes(TQTextStream & s, TQString & readText) { - QDict dict(17,false); + TQDict dict(17,false); // the "<" is already read - QChar w; - QString attr,value; + TQChar w; + TQString attr,value; - readText = QString::null; + readText = TQString::null; // get the tagname while (!s.atEnd() && w!=" ") { s >> w; readText.append(w); if (w==" " || w==">") { - dict.insert("tagname",new QString(value)); + dict.insert("tagname",new TQString(value)); break; } value+=w; @@ -1715,10 +1715,10 @@ QDict KImageMapEditor::getTagAttributes(QTextStream & s, QString & read 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 ? + TQChar quotation='\0'; // currently reading a value with quotation marks ? bool php=false; // currently reading a php script - attr=QString::null; - value=QString::null; + attr=TQString::null; + value=TQString::null; //get the other attributes while (!s.atEnd() && w!=">") @@ -1761,7 +1761,7 @@ QDict KImageMapEditor::getTagAttributes(QTextStream & s, QString & read // finished ? if (w==">") { if (valueRead) - dict.insert(attr,new QString(value)); + dict.insert(attr,new TQString(value)); return dict; } else // currently reading an attribute ? @@ -1801,16 +1801,16 @@ QDict KImageMapEditor::getTagAttributes(QTextStream & s, QString & read } else { quotation='\0'; valueRead=false; - dict.insert(attr,new QString(value)); - attr = value = QString::null; + dict.insert(attr,new TQString(value)); + attr = value = TQString::null; } } else // a whitespace indicates that the value has finished if (w==" ") { valueRead=false; - dict.insert(attr,new QString(value)); - attr = value = QString::null; + dict.insert(attr,new TQString(value)); + attr = value = TQString::null; } } else { if (w!=" ") { @@ -1825,25 +1825,25 @@ QDict KImageMapEditor::getTagAttributes(QTextStream & s, QString & read } -bool KImageMapEditor::openHTMLFile(const KURL & url, const QString & mapName, const QString & imagePath) +bool KImageMapEditor::openHTMLFile(const KURL & url, const TQString & mapName, const TQString & imagePath) { - QFile f(url.path()); + TQFile f(url.path()); if ( !f.exists () ) return false; f.open(IO_ReadOnly); - QTextStream s(&f); - QString str; - QChar w; - QDict *attr=0L; - QPtrList *images= new QPtrList; + TQTextStream s(&f); + TQString str; + TQChar w; + TQDict *attr=0L; + TQPtrList *images= new TQPtrList; MapTag *map=0L; - QPtrList *maps = new QPtrList; + TQPtrList *maps = new TQPtrList; _htmlContent.clear(); currentMapElement = 0L; - QString temp; - QString origcode; + TQString temp; + TQString origcode; bool readMap=false; @@ -1854,11 +1854,11 @@ bool KImageMapEditor::openHTMLFile(const KURL & url, const QString & mapName, co { if (!readMap && !origcode.isEmpty()) { _htmlContent.append( new HtmlElement(origcode)); - origcode = QString::null; + origcode = TQString::null; } origcode.append("<"); - attr=new QDict(getTagAttributes(s,temp)); + attr=new TQDict(getTagAttributes(s,temp)); origcode.append(temp); if (attr->find("tagname")) { @@ -1869,7 +1869,7 @@ bool KImageMapEditor::openHTMLFile(const KURL & url, const QString & mapName, co images->append(el->imgTag); _htmlContent.append(el); - origcode = QString::null; + origcode = TQString::null; } else if (attr->find("tagname")->lower()=="map") { map = new MapTag(); @@ -1883,7 +1883,7 @@ bool KImageMapEditor::openHTMLFile(const KURL & url, const QString & mapName, co el->mapTag = map; _htmlContent.append(el); - origcode = QString::null; + origcode = TQString::null; } else if (readMap) { if (attr->find("tagname")->lower()=="area") { @@ -1891,7 +1891,7 @@ bool KImageMapEditor::openHTMLFile(const KURL & url, const QString & mapName, co } } else { _htmlContent.append(new HtmlElement(origcode)); - origcode = QString::null; + origcode = TQString::null; } } @@ -1924,7 +1924,7 @@ bool KImageMapEditor::openHTMLFile(const KURL & url, const QString & mapName, co if (images->count() == 1) { if (images->first()) { ImageTag* imgTag = images->first(); - QString *src = imgTag->find("src"); + TQString *src = imgTag->find("src"); if (src) imageUrl = KURL(url,*src); } @@ -1936,12 +1936,12 @@ bool KImageMapEditor::openHTMLFile(const KURL & url, const QString & mapName, co ImageTag* imageTag; for ( imageTag = images->first(); imageTag; imageTag = images->next() ) { - QString *usemap = imageTag->find("usemap"); + TQString *usemap = imageTag->find("usemap"); if (usemap) { // Remove the # - QString usemapName = usemap->right(usemap->length()-1); + TQString usemapName = usemap->right(usemap->length()-1); if (usemapName == map->name) { - QString *src = imageTag->find("src"); + TQString *src = imageTag->find("src"); if (src) imageUrl = KURL(url,*src); } @@ -2003,7 +2003,7 @@ bool KImageMapEditor::openHTMLFile(const KURL & url, const QString & mapName, co * Returns the first matching element. * Returns 0L if no element was found. */ -HtmlElement* KImageMapEditor::findHtmlElement(const QString & containingText) { +HtmlElement* KImageMapEditor::findHtmlElement(const TQString & containingText) { for (HtmlElement * el = _htmlContent.first(); el; el = _htmlContent.next() ) { if (el->htmlCode.contains(containingText,false)) { return el; @@ -2027,7 +2027,7 @@ HtmlImgElement* KImageMapEditor::findHtmlImgElement(ImageTag* tag) { return 0L; } -void KImageMapEditor::addMap(const QString & name = QString::null) { +void KImageMapEditor::addMap(const TQString & name = TQString::null) { HtmlMapElement* el = new HtmlMapElement("\n"); MapTag* map = new MapTag(); map->name = name; @@ -2062,7 +2062,7 @@ void KImageMapEditor::addMap(const QString & name = QString::null) { * to the given map name.
* Returns 0L if there exists no map with the given name */ -HtmlMapElement* KImageMapEditor::findHtmlMapElement(const QString & mapName) { +HtmlMapElement* KImageMapEditor::findHtmlMapElement(const TQString & mapName) { for (HtmlElement * el = _htmlContent.first(); el; el = _htmlContent.next() ) { if (dynamic_cast(el)) { HtmlMapElement *tagEl = static_cast(el); @@ -2079,7 +2079,7 @@ HtmlMapElement* KImageMapEditor::findHtmlMapElement(const QString & mapName) { /** * Calls setMap with the HtmlMapElement with the given map name */ -void KImageMapEditor::setMap(const QString & mapName) { +void KImageMapEditor::setMap(const TQString & mapName) { HtmlMapElement* el = findHtmlMapElement(mapName); if (!el) { kdWarning() << "KImageMapEditor::setMap : Couldn't set map '" << mapName << "', because it wasn't found !" << endl; @@ -2106,34 +2106,34 @@ void KImageMapEditor::setMap(MapTag* map) { void KImageMapEditor::saveAreasToMapTag(MapTag* map) { map->clear(); for (Area* a=areas->first();a!=0L;a=areas->next()) { - QDict *dict = new QDict(17,false); - QString *shapeStr = 0L; + TQDict *dict = new TQDict(17,false); + TQString *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; + case Area::Rectangle : shapeStr = new TQString("rect");break; + case Area::Circle : shapeStr = new TQString("circle");break; + case Area::Polygon : shapeStr = new TQString("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(it.key(),new TQString(it.data())); } - dict->insert("coords",new QString(a->coordsToString())); + dict->insert("coords",new TQString(a->coordsToString())); map->append(dict); } if (defaultArea && defaultArea->finished()) { - QDict *dict = new QDict(17,false); - dict->insert("shape",new QString("default")); + TQDict *dict = new TQDict(17,false); + dict->insert("shape",new TQString("default")); for (AttributeIterator it = defaultArea->firstAttribute();it!=defaultArea->lastAttribute();++it) { - dict->insert(it.key(),new QString(it.data())); + dict->insert(it.key(),new TQString(it.data())); } map->append(dict); @@ -2159,7 +2159,7 @@ void KImageMapEditor::setMap(HtmlMapElement* mapElement) { _mapName = map->name; for (AreaTag *tag=map->first();tag!=0L;tag=map->next()) { - QString shape="rect"; + TQString shape="rect"; if (tag->find("shape")) shape=*tag->find("shape"); @@ -2245,12 +2245,12 @@ void KImageMapEditor::setMapActionsEnabled(bool b) { } -QString KImageMapEditor::getHtmlCode() { +TQString KImageMapEditor::getHtmlCode() { if (currentMapElement) { currentMapElement->htmlCode = getHTMLImageMap(); } - QString result; + TQString result; HtmlElement *el; for ( el = _htmlContent.first(); el; el = _htmlContent.next() ) { @@ -2263,16 +2263,16 @@ QString KImageMapEditor::getHtmlCode() { void KImageMapEditor::saveImageMap(const KURL & url) { - QFileInfo fileInfo(url.path()); + TQFileInfo fileInfo(url.path()); - if (!QFileInfo(url.directory()).isWritable()) { + if (!TQFileInfo(url.directory()).isWritable()) { KMessageBox::error(widget(), i18n("The file %1 could not be saved, because you do not have the required write permissions.").arg(url.path())); return; } if (!backupFileCreated) { - QString backupFile = url.path()+"~"; + TQString backupFile = url.path()+"~"; KIO::file_copy(url, KURL::fromPathOrURL( backupFile ), -1, true, false, false); backupFileCreated = true; } @@ -2282,10 +2282,10 @@ void KImageMapEditor::saveImageMap(const KURL & url) if (mapName().isEmpty()) { mapEditName(); } - QFile file(url.path()); + TQFile file(url.path()); file.open(IO_WriteOnly); - QTextStream t(&file); + TQTextStream t(&file); if (_htmlContent.isEmpty()) { t << "\n" @@ -2432,7 +2432,7 @@ void KImageMapEditor::slotToFront() void KImageMapEditor::slotMoveUp() { - QRect r=selected()->rect(); + TQRect r=selected()->rect(); selected()->setMoving(true); selected()->moveBy(0,-1); @@ -2445,7 +2445,7 @@ void KImageMapEditor::slotMoveUp() void KImageMapEditor::slotMoveDown() { - QRect r=selected()->rect(); + TQRect r=selected()->rect(); selected()->setMoving(true); selected()->moveBy(0,1); @@ -2458,7 +2458,7 @@ void KImageMapEditor::slotMoveDown() void KImageMapEditor::slotMoveLeft() { - QRect r=selected()->rect(); + TQRect r=selected()->rect(); selected()->setMoving(true); selected()->moveBy(-1,0); @@ -2471,7 +2471,7 @@ void KImageMapEditor::slotMoveLeft() void KImageMapEditor::slotMoveRight() { - QRect r=selected()->rect(); + TQRect r=selected()->rect(); selected()->setMoving(true); selected()->moveBy(1,0); @@ -2491,7 +2491,7 @@ void KImageMapEditor::slotIncreaseHeight() { Area *oldArea=selected()->clone(); - QRect r = selected()->rect(); + TQRect r = selected()->rect(); r.setHeight( r.height()+1 ); r.moveBy(0,-1); @@ -2507,7 +2507,7 @@ void KImageMapEditor::slotDecreaseHeight() { Area *oldArea=selected()->clone(); - QRect r = selected()->rect(); + TQRect r = selected()->rect(); r.setHeight( r.height()-1 ); r.moveBy(0,1); @@ -2523,7 +2523,7 @@ void KImageMapEditor::slotIncreaseWidth() { Area *oldArea=selected()->clone(); - QRect r = selected()->rect(); + TQRect r = selected()->rect(); r.setWidth( r.width()+1 ); selected()->setRect(r); @@ -2538,7 +2538,7 @@ void KImageMapEditor::slotDecreaseWidth() { Area *oldArea=selected()->clone(); - QRect r = selected()->rect(); + TQRect r = selected()->rect(); r.setWidth( r.width()-1 ); selected()->setRect(r); @@ -2569,7 +2569,7 @@ void KImageMapEditor::slotShowAltTag() void KImageMapEditor::mapNew() { - QString mapName = mapsListView->getUnusedMapName(); + TQString mapName = mapsListView->getUnusedMapName(); addMap(mapName); mapEditName(); } @@ -2579,7 +2579,7 @@ void KImageMapEditor::mapDelete() if (mapsListView->count() == 0) return; - QString selectedMap = mapsListView->selectedMap(); + TQString selectedMap = mapsListView->selectedMap(); int result = KMessageBox::warningContinueCancel(widget(), i18n("Are you sure you want to delete the map %1?" @@ -2631,7 +2631,7 @@ bool KImageMapEditor::queryClose() { return true; switch ( KMessageBox::warningYesNoCancel( widget(), - i18n("The file %1 has been modified.
Do you want to save it?
").arg(url().fileName()), QString::null, KStdGuiItem::save(), KStdGuiItem::discard()) ) { + i18n("The file %1 has been modified.
Do you want to save it?
").arg(url().fileName()), TQString::null, KStdGuiItem::save(), KStdGuiItem::discard()) ) { case KMessageBox::Yes : saveFile(); return true; @@ -2671,12 +2671,12 @@ void KImageMapEditor::addImage(const KURL & imgUrl) { if (imgUrl.isEmpty()) return; - QString relativePath ( QExtFileInfo::toRelative(imgUrl, KURL( url().directory() )).path() ); + TQString relativePath ( QExtFileInfo::toRelative(imgUrl, KURL( url().directory() )).path() ); - QString imgHtml = QString(""); + TQString imgHtml = TQString(""); ImageTag *imgTag = new ImageTag(); - imgTag->insert("tagname",new QString("img")); - imgTag->insert("src", new QString(relativePath)); + imgTag->insert("tagname",new TQString("img")); + imgTag->insert("src", new TQString(relativePath)); HtmlImgElement *imgEl = new HtmlImgElement(imgHtml); imgEl->imgTag = imgTag; @@ -2727,7 +2727,7 @@ void KImageMapEditor::imageRemove() { else { ImageTag* selected = imagesListView->selectedImage(); if (selected) { - QString *url = selected->find("src"); + TQString *url = selected->find("src"); if (url) { setPicture(KURL(*url)); } @@ -2744,12 +2744,12 @@ void KImageMapEditor::imageUsemap() { if ( ! imageTag) return; - QString usemap; + TQString usemap; if (imageTag->find("usemap")) usemap=*imageTag->find("usemap"); - QStringList maps = mapsListView->getMaps(); + TQStringList maps = mapsListView->getMaps(); int index = maps.findIndex(usemap); if (index == -1) { maps.prepend(""); @@ -2757,14 +2757,14 @@ void KImageMapEditor::imageUsemap() { } #if KDE_IS_VERSION(3, 1, 90) - QString input = KInputDialog::getItem(i18n("Enter Usemap"), + TQString input = KInputDialog::getItem(i18n("Enter Usemap"), #else - QString input = QInputDialog::getItem(i18n("Enter Usemap"), + TQString 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)); + imageTag->replace("usemap", new TQString(input)); imagesListView->updateImage(imageTag); setModified(true); @@ -2772,10 +2772,10 @@ void KImageMapEditor::imageUsemap() { HtmlImgElement* imgEl = findHtmlImgElement(imageTag); imgEl->htmlCode = "<"; - QString *tagName = imgEl->imgTag->find("tagname"); - imgEl->htmlCode += QString(*tagName); + TQString *tagName = imgEl->imgTag->find("tagname"); + imgEl->htmlCode += TQString(*tagName); - QDictIterator it( *imgEl->imgTag ); + TQDictIterator it( *imgEl->imgTag ); for( ; it.current(); ++it ) { if (it.currentKey() != "tagname") { imgEl->htmlCode += " " + it.currentKey() + "=\""; diff --git a/kimagemapeditor/kimagemapeditor.h b/kimagemapeditor/kimagemapeditor.h index bf76349e..6d655746 100644 --- a/kimagemapeditor/kimagemapeditor.h +++ b/kimagemapeditor/kimagemapeditor.h @@ -18,10 +18,10 @@ #ifndef KIMAGEMAPDIALOG_H #define KIMAGEMAPDIALOG_H -#include -#include -#include -#include +#include +#include +#include +#include #include #include #include @@ -49,39 +49,39 @@ class KToggleAction; /** * Stores an area tag and all its attributes */ -typedef QDict AreaTag; +typedef TQDict AreaTag; /** * Stores an image tag and all its attributes * the origcode attribute hold the original htmlcode * of this tag */ -typedef QDict ImageTag; +typedef TQDict ImageTag; /** * Only a small class to give a list of AreaTags a name */ -class MapTag : public QPtrList { +class MapTag : public TQPtrList { public: MapTag(); - QString name; + TQString name; bool modified; }; class HtmlElement { public: - HtmlElement(const QString & s) { + HtmlElement(const TQString & s) { htmlCode = s; }; virtual ~HtmlElement() {} ; - QString htmlCode; + TQString htmlCode; }; class HtmlMapElement : public HtmlElement { public: - HtmlMapElement(const QString & s) : HtmlElement(s) { + HtmlMapElement(const TQString & s) : HtmlElement(s) { mapTag = 0L; }; @@ -92,7 +92,7 @@ public: class HtmlImgElement : public HtmlElement { public: -HtmlImgElement(const QString & s) : HtmlElement(s) { +HtmlImgElement(const TQString & s) : HtmlElement(s) { imgTag = 0L; }; virtual ~HtmlImgElement() {} @@ -103,7 +103,7 @@ HtmlImgElement(const QString & s) : HtmlElement(s) { /** * Stores the hole HTML content in a List. */ -class HtmlContent : public QPtrList {} +class HtmlContent : public TQPtrList {} ; @@ -133,8 +133,8 @@ class KImageMapEditor : public KParts::ReadWritePart { public : enum ToolType { Selection, Rectangle, Circle, Polygon, Freehand, AddPoint, RemovePoint }; - KImageMapEditor(QWidget *parentWidget, const char *, - QObject *parent, const char *name, const QStringList & args = QStringList()); + KImageMapEditor(TQWidget *parentWidget, const char *, + TQObject *parent, const char *name, const TQStringList & args = TQStringList()); virtual ~KImageMapEditor(); static KAboutData *createAboutData(); @@ -161,15 +161,15 @@ public : void deselectAll(); void deselect(Area* s); void deselectWithoutUpdate(Area*); - QString getHTMLImageMap() const; - Area* onArea(const QPoint & p) const; - QPixmap makeListViewPix(Area &) ; - QString mapName() const; + TQString getHTMLImageMap() const; + Area* onArea(const TQPoint & p) const; + TQPixmap makeListViewPix(Area &) ; + TQString mapName() const; void select(Area*); void selectWithoutUpdate(Area*); - void select(QListViewItem*); + void select(TQListViewItem*); AreaSelection* selected() const; - void setPicture(const QImage & pix); + void setPicture(const TQImage & pix); int showTagEditor(Area *); KCommandHistory *commandHistory() const; @@ -186,7 +186,7 @@ public : virtual bool closeURL(); bool queryClose(); virtual void setReadWrite(bool); - QString getHtmlCode(); + TQString getHtmlCode(); /** * Reimplemented to disable and enable Save action @@ -213,14 +213,14 @@ public : protected: void init(); - bool openHTMLFile(const KURL &, const QString & mapName = QString::null, const QString & imagePath = QString::null); + bool openHTMLFile(const KURL &, const TQString & mapName = TQString::null, const TQString & imagePath = TQString::null); void saveImageMap(const KURL &); /** * Returns a language dependend background picture, with * the text : Drop an image or html file */ - QImage getBackgroundImage(); + TQImage getBackgroundImage(); /** @@ -236,8 +236,8 @@ private: // the url of the working image; KURL _imageUrl; - QString _mapName; - QImage _backgroundImage; + TQString _mapName; + TQImage _backgroundImage; bool backupFileCreated; @@ -247,7 +247,7 @@ private: AreaSelection *copyArea; Area *defaultArea; DrawZone* drawZone; - QTabWidget* tabWidget; + TQTabWidget* tabWidget; AreaListView *areaListView; ImagesListView* imagesListView; MapsListView* mapsListView; @@ -320,8 +320,8 @@ private: KCommandHistory *_commandHistory; int maxAreaPreviewHeight; - QString cursorStatusText; - QString selectionStatusText; + TQString cursorStatusText; + TQString selectionStatusText; void setupActions(); void setupStatusBar(); @@ -331,37 +331,37 @@ private: void updateAllAreas(); void updateUpDownBtn(); - QDict getTagAttributes(QTextStream & s,QString &); + TQDict getTagAttributes(TQTextStream & s,TQString &); void setMap(HtmlMapElement*); void setMap(MapTag*); - void addMap(const QString &); + void addMap(const TQString &); // Returns the entire html file as a String - HtmlElement* findHtmlElement(const QString &); + HtmlElement* findHtmlElement(const TQString &); HtmlImgElement* findHtmlImgElement(ImageTag*); - HtmlMapElement* findHtmlMapElement(const QString &); + HtmlMapElement* findHtmlMapElement(const TQString &); 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); + void showPopupMenu(const TQPoint &, const TQString &); + void drawToCenter(TQPainter* p, const TQString & str, int y, int width); public slots: void slotChangeStatusCoords(int x,int y); void slotUpdateSelectionCoords(); - void slotUpdateSelectionCoords( const QRect &); + void slotUpdateSelectionCoords( const TQRect &); void slotAreaChanged(Area *); - void slotShowMainPopupMenu(const QPoint &); - void slotShowMapPopupMenu(QListViewItem *, const QPoint &); - void slotShowImagePopupMenu(QListViewItem *, const QPoint &); + void slotShowMainPopupMenu(const TQPoint &); + void slotShowMapPopupMenu(TQListViewItem *, const TQPoint &); + void slotShowImagePopupMenu(TQListViewItem *, const TQPoint &); void slotConfigChanged(); void setPicture(const KURL & url); - void setMap(const QString &); - void setMapName(const QString & s); + void setMap(const TQString &); + void setMapName(const TQString & s); protected slots: @@ -379,13 +379,13 @@ protected slots: void fileSave(); void fileClose(); - void slotShowPopupMenu(QListViewItem*,const QPoint &); + void slotShowPopupMenu(TQListViewItem*,const TQPoint &); void slotShowPreferences(); void slotHightlightAreas(); void slotShowAltTag(); void slotSelectionChanged(); - int showTagEditor(QListViewItem *item); + int showTagEditor(TQListViewItem *item); int showTagEditor(); void slotZoom(); @@ -448,7 +448,7 @@ inline KImageMapEditor::ToolType KImageMapEditor::currentToolType() const { return _currentToolType; } -inline QString KImageMapEditor::mapName() const { +inline TQString KImageMapEditor::mapName() const { return _mapName; } diff --git a/kimagemapeditor/kimearea.cpp b/kimagemapeditor/kimearea.cpp index cb873564..cee54b8a 100644 --- a/kimagemapeditor/kimearea.cpp +++ b/kimagemapeditor/kimearea.cpp @@ -15,16 +15,16 @@ * * ***************************************************************************/ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include @@ -41,7 +41,7 @@ bool Area::showAlt; Area::Area() { - _coords=new QPointArray(); + _coords=new TQPointArray(); _selectionPoints= new SelectionPointList(); _selectionPoints->setAutoDelete(true); _finished=false; @@ -61,13 +61,13 @@ Area* Area::clone() const return areaClone; } -QPointArray* Area::coords() const { +TQPointArray* Area::coords() const { return _coords; } -QString Area::getHTMLAttributes() const +TQString Area::getHTMLAttributes() const { - QString retStr=""; + TQString retStr=""; for (AttributeIterator it = firstAttribute();it!=lastAttribute();++it) { @@ -85,20 +85,20 @@ Area::~Area() { } -bool Area::contains(const QPoint &) const { +bool Area::contains(const TQPoint &) const { return false; } -QString Area::getHTMLCode() const { +TQString Area::getHTMLCode() const { return ""; } -QString Area::attribute(const QString & name) const +TQString Area::attribute(const TQString & name) const { return _attributes[name.lower()]; } -void Area::setAttribute(const QString & name, const QString & value) +void Area::setAttribute(const TQString & name, const TQString & value) { _attributes.replace(name.lower(),value); if (value.isEmpty()) @@ -116,16 +116,16 @@ AttributeIterator Area::lastAttribute() const } -bool Area::setCoords(const QString &) { +bool Area::setCoords(const TQString &) { return true; } -void Area::moveSelectionPoint(QRect*, const QPoint &) +void Area::moveSelectionPoint(TQRect*, const TQPoint &) {} // Default implementation; is specified by subclasses -QString Area::coordsToString() const +TQString Area::coordsToString() const { return ""; } @@ -139,13 +139,13 @@ void Area::setArea(const Area & copy) { delete _coords; delete _selectionPoints; - _coords=new QPointArray(copy.coords()->copy()); + _coords=new TQPointArray(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() ) ); + for (TQRect *r=copy.selectionPoints()->first();r!=0L;r=copy.selectionPoints()->next()) + _selectionPoints->append(new TQRect( r->topLeft(),r->bottomRight() ) ); _finished=copy.finished(); _isSelected=copy.isSelected(); @@ -162,7 +162,7 @@ void Area::setArea(const Area & copy) } -void Area::setListViewItem(QListViewItem* item) { +void Area::setListViewItem(TQListViewItem* item) { _listViewItem=item; } @@ -173,13 +173,13 @@ void Area::deleteListViewItem() } -void Area::setRect(const QRect & r) +void Area::setRect(const TQRect & r) { _rect=r; updateSelectionPoints(); } -QRect Area::rect() const { +TQRect Area::rect() const { return _rect; } @@ -196,7 +196,7 @@ void Area::moveBy(int dx, int dy) { _coords->setPoint(i,newX,newY); } - for (QRect *r=_selectionPoints->first();r!=0L;r=_selectionPoints->next()) { + for (TQRect *r=_selectionPoints->first();r!=0L;r=_selectionPoints->next()) { r->moveBy(dx,dy); } } @@ -213,12 +213,12 @@ uint Area::countSelectionPoints() const return (uint) selectionPoints()->count(); } -int Area::addCoord(const QPoint & p) +int Area::addCoord(const TQPoint & p) { _coords->resize(_coords->size()+1); _coords->setPoint(_coords->size()-1,p); - QRect *r= new QRect(0,0,SELSIZE,SELSIZE); + TQRect *r= new TQRect(0,0,SELSIZE,SELSIZE); r->moveCenter(p); _selectionPoints->append(r); setRect(_coords->boundingRect()); @@ -226,7 +226,7 @@ int Area::addCoord(const QPoint & p) return _coords->size()-1; } -void Area::insertCoord(int pos, const QPoint & p) +void Area::insertCoord(int pos, const TQPoint & p) { /* @@ -253,7 +253,7 @@ void Area::insertCoord(int pos, const QPoint & p) } _coords->setPoint(pos, p); - QRect *r= new QRect(0,0,SELSIZE,SELSIZE); + TQRect *r= new TQRect(0,0,SELSIZE,SELSIZE); r->moveCenter(p); _selectionPoints->insert(pos,r); setRect(_coords->boundingRect()); @@ -277,7 +277,7 @@ void Area::removeCoord(int pos) { setRect(_coords->boundingRect()); } -bool Area::removeSelectionPoint(QRect * r) +bool Area::removeSelectionPoint(TQRect * r) { if (_selectionPoints->contains(r)) { @@ -289,7 +289,7 @@ bool Area::removeSelectionPoint(QRect * r) } -void Area::moveCoord(int pos, const QPoint & p) { +void Area::moveCoord(int pos, const TQPoint & p) { _coords->setPoint(pos,p); _selectionPoints->at(pos)->moveCenter(p); setRect(_coords->boundingRect()); @@ -307,21 +307,21 @@ void Area::highlightSelectionPoint(int number){ currentHighlighted=number; } -QRect Area::selectionRect() const { - QRect r = rect(); +TQRect Area::selectionRect() const { + TQRect r = rect(); r.moveBy(-SELSIZE*2,-SELSIZE*2); - r.setSize(r.size()+QSize(SELSIZE*4,SELSIZE*4)); + r.setSize(r.size()+TQSize(SELSIZE*4,SELSIZE*4)); return r; } -void Area::drawHighlighting(QPainter & p) +void Area::drawHighlighting(TQPainter & p) { if (Area::highlightArea && !isMoving() && _highlightedPixmap) { p.setRasterOp(Qt::CopyROP); - QPoint point = QPoint(rect().x(),rect().y()); + TQPoint point = TQPoint(rect().x(),rect().y()); if (point.x()<0) point.setX(0); if (point.y()<0) @@ -332,21 +332,21 @@ void Area::drawHighlighting(QPainter & p) } } -void Area::drawAlt(QPainter & p) +void Area::drawAlt(TQPainter & p) { double x,y; double scalex = p.worldMatrix().m11(); // double scaley = p.worldMatrix().m12(); - QWMatrix oldMatrix = p.worldMatrix(); + TQWMatrix oldMatrix = p.worldMatrix(); - p.setWorldMatrix(QWMatrix(1,oldMatrix.m12(), oldMatrix.m21(), 1, oldMatrix.dx(), oldMatrix.dy() )); + p.setWorldMatrix(TQWMatrix(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(); + TQFontMetrics metrics = p.fontMetrics(); int w = metrics.width(attribute("alt")); x -= w/2; @@ -362,7 +362,7 @@ void Area::drawAlt(QPainter & p) else { p.setRasterOp(Qt::XorROP); - p.setPen(QPen(QColor("white"),1)); + p.setPen(TQPen(TQColor("white"),1)); } p.drawText(myround(x),myround(y),attribute("alt")); @@ -370,7 +370,7 @@ void Area::drawAlt(QPainter & p) p.setWorldMatrix(oldMatrix); } -void Area::draw(QPainter & p) +void Area::draw(TQPainter & p) { // Only draw the selection points at base class @@ -382,45 +382,45 @@ void Area::draw(QPainter & p) double scalex = p.worldMatrix().m11(); // double scaley = p.worldMatrix().m12(); - QWMatrix oldMatrix = p.worldMatrix(); + TQWMatrix oldMatrix = p.worldMatrix(); - p.setWorldMatrix(QWMatrix(1,oldMatrix.m12(), oldMatrix.m21(), 1, oldMatrix.dx(), oldMatrix.dy() )); + p.setWorldMatrix(TQWMatrix(1,oldMatrix.m12(), oldMatrix.m21(), 1, oldMatrix.dx(), oldMatrix.dy() )); - for (QRect *r=_selectionPoints->first();r!=0L;r=_selectionPoints->next()) { + for (TQRect *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); + TQRect r2(0,0,15,15); r2.moveCenter(r->center()*scalex); p.setRasterOp(Qt::CopyROP); - p.setPen(QPen(QColor("lightgreen"),2)); + p.setPen(TQPen(TQColor("lightgreen"),2)); p.drawEllipse(r2); p.setRasterOp(Qt::XorROP); - p.setPen(QPen(QColor("white"),1)); + p.setPen(TQPen(TQColor("white"),1)); } // Draw the selection point p.setRasterOp(Qt::XorROP); - QRect r3(*r); + TQRect r3(*r); int d = 1; if (scalex > 2) d=0; - r3.moveCenter( QPoint((int)(r3.center().x()*scalex),(int)(r3.center().y()*scalex)) ); + r3.moveCenter( TQPoint((int)(r3.center().x()*scalex),(int)(r3.center().y()*scalex)) ); - p.fillRect(r3,QBrush("white")); + p.fillRect(r3,TQBrush("white")); /* - QRect r3(*r); - r3.moveTopLeft( QPoint(r3.left()*scalex+2*(scalex-1), r3.top()*scalex+2*(scalex-1)) ); + TQRect r3(*r); + r3.moveTopLeft( TQPoint(r3.left()*scalex+2*(scalex-1), r3.top()*scalex+2*(scalex-1)) ); - r3.setSize(r3.size()+QSize(2,2)); + r3.setSize(r3.size()+TQSize(2,2)); //+ r3.moveBy(-1,-1); p.setRasterOp(Qt::CopyROP); - p.setPen(QPen(QColor("lightgreen"),1)); - p.setBrush(QColor("lightgreen")); + p.setPen(TQPen(TQColor("lightgreen"),1)); + p.setBrush(TQColor("lightgreen")); p.drawPie(r3,0,5760); - p.setPen(QPen(QColor("black"),1)); - r3.setSize(r3.size()+QSize(2,2)); + p.setPen(TQPen(TQColor("black"),1)); + r3.setSize(r3.size()+TQSize(2,2)); r3.moveBy(-1,-1); p.drawEllipse(r3); */ @@ -439,11 +439,11 @@ void Area::draw(QPainter & p) } -QRect* Area::onSelectionPoint(const QPoint & p, double zoom) const +TQRect* Area::onSelectionPoint(const TQPoint & p, double zoom) const { - for (QRect *r=_selectionPoints->first();r!=0L;r=_selectionPoints->next()) + for (TQRect *r=_selectionPoints->first();r!=0L;r=_selectionPoints->next()) { - QRect r2(r->topLeft(),r->bottomRight()); + TQRect r2(r->topLeft(),r->bottomRight()); r2.moveCenter(r2.center()*zoom); @@ -464,13 +464,13 @@ QRect* Area::onSelectionPoint(const QPoint & p, double zoom) const * returns only the part of the image which is * covered by the area */ -QPixmap Area::cutOut(const QImage & image) +TQPixmap Area::cutOut(const TQImage & image) { if ( 0>=rect().width() || 0>=rect().height() || !rect().intersects(image.rect()) ) { - QPixmap dummyPix(10,10); + TQPixmap dummyPix(10,10); dummyPix.fill(); delete _highlightedPixmap; _highlightedPixmap = 0L; @@ -478,11 +478,11 @@ QPixmap Area::cutOut(const QImage & image) } // Get the mask from the subclasses - QBitmap mask=getMask(); + TQBitmap mask=getMask(); // The rectangle which is part of the image - QRect partOfImage=rect(); - QRect partOfMask(0,0,mask.width(),mask.height()); + TQRect partOfImage=rect(); + TQRect partOfMask(0,0,mask.width(),mask.height()); // If the area is outside of the image make the @@ -507,13 +507,13 @@ QPixmap Area::cutOut(const QImage & image) partOfMask.setY(myabs(rect().y())); } - QImage tempImage=mask.convertToImage().copy(partOfMask); + TQImage tempImage=mask.convertToImage().copy(partOfMask); mask.convertFromImage(tempImage); // partOfImage = partOfImage.normalize(); - QImage cut=image.copy(partOfImage); + TQImage cut=image.copy(partOfImage); - QPixmap pix; + TQPixmap pix; // partOfMask = partOfMask.normalize(); if (!partOfMask.isValid()) @@ -521,9 +521,9 @@ QPixmap Area::cutOut(const QImage & image) << partOfMask.width() << "," << partOfMask.height() << "," << endl; /* - QBitmap mask2(partOfMask.width(), partOfMask.height()); - QPainter p4(&mask2); - p4.drawPixmap( QPoint(0,0) ,mask,partOfMask); + TQBitmap mask2(partOfMask.width(), partOfMask.height()); + TQPainter p4(&mask2); + p4.drawPixmap( TQPoint(0,0) ,mask,partOfMask); p4.flush(); p4.end(); */ @@ -532,27 +532,27 @@ QPixmap Area::cutOut(const QImage & image) setHighlightedPixmap(cut, mask); - QPixmap retPix(pix.width(),pix.height()); - QPainter p3(&retPix); + TQPixmap retPix(pix.width(),pix.height()); + TQPainter p3(&retPix); // if transparent image fill the background // with gimp-like rectangles if (pix.mask()) { - QPixmap backPix(32,32); + TQPixmap 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)); + TQPainter p2(&backPix); + p2.fillRect(0,0,32,32,TQColor(156,149,156)); + p2.fillRect(0,16,16,16,TQColor(98,105,98)); + p2.fillRect(16,0,16,16,TQColor(98,105,98)); p2.flush(); - p3.setPen(QPen()); - p3.fillRect(0,0,pix.width(),pix.height(),QBrush(QColor("black"),backPix)); + p3.setPen(TQPen()); + p3.fillRect(0,0,pix.width(),pix.height(),TQBrush(TQColor("black"),backPix)); } - p3.drawPixmap(QPoint(0,0),pix); + p3.drawPixmap(TQPoint(0,0),pix); p3.flush(); p3.end(); retPix.setMask(mask); @@ -560,22 +560,22 @@ QPixmap Area::cutOut(const QImage & image) return retPix; } -QBitmap Area::getMask() const +TQBitmap Area::getMask() const { - QBitmap b; + TQBitmap b; return b; } -void Area::setHighlightedPixmap( QImage & im, QBitmap & mask ) +void Area::setHighlightedPixmap( TQImage & im, TQBitmap & mask ) { if (!Area::highlightArea) return; delete _highlightedPixmap; - QImage image = im.convertDepth( 32 ); - QSize size = image.size(); - QColor pixel; + TQImage image = im.convertDepth( 32 ); + TQSize size = image.size(); + TQColor pixel; double r,g,b; @@ -596,7 +596,7 @@ void Area::setHighlightedPixmap( QImage & im, QBitmap & mask ) } } - _highlightedPixmap = new QPixmap(); + _highlightedPixmap = new TQPixmap(); _highlightedPixmap->convertFromImage( image ); _highlightedPixmap->setMask( mask ); @@ -613,13 +613,13 @@ void Area::setHighlightedPixmap( QImage & im, QBitmap & mask ) RectArea::RectArea() : Area() { - QRect *p = new QRect(0,0,SELSIZE,SELSIZE); + TQRect *p = new TQRect(0,0,SELSIZE,SELSIZE); _selectionPoints->append(p); - p = new QRect(0,0,SELSIZE,SELSIZE); + p = new TQRect(0,0,SELSIZE,SELSIZE); _selectionPoints->append(p); - p = new QRect(0,0,SELSIZE,SELSIZE); + p = new TQRect(0,0,SELSIZE,SELSIZE); _selectionPoints->append(p); - p = new QRect(0,0,SELSIZE,SELSIZE); + p = new TQRect(0,0,SELSIZE,SELSIZE); _selectionPoints->append(p); _type=Area::Rectangle; @@ -635,21 +635,21 @@ Area* RectArea::clone() const return areaClone; } -void RectArea::draw(QPainter & p) +void RectArea::draw(TQPainter & 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)); +// TQBrush b(TQBrush::SolidPattern); +// TQBrush b(TQBrush::Dense4Pattern); +// TQBrush b(TQBrush::BDiagPattern); +// b.setColor(TQColor(32,32,32)); // p.fillRect(rect(), b); p.setRasterOp(Qt::XorROP); - p.setPen(QPen(QColor("white"),1)); - QRect r(rect()); + p.setPen(TQPen(TQColor("white"),1)); + TQRect r(rect()); r.setWidth(r.width()+1); r.setHeight(r.height()+1); p.drawRect(r); @@ -657,12 +657,12 @@ void RectArea::draw(QPainter & p) Area::draw(p); } -QBitmap RectArea::getMask() const +TQBitmap RectArea::getMask() const { - QBitmap mask(rect().width(),rect().height()); + TQBitmap mask(rect().width(),rect().height()); mask.fill(Qt::color0); - QPainter p(&mask); + TQPainter p(&mask); p.setBackgroundColor(Qt::color0); p.setPen(Qt::color1); p.setBrush(Qt::color1); @@ -672,9 +672,9 @@ QBitmap RectArea::getMask() const return mask; } -QString RectArea::coordsToString() const +TQString RectArea::coordsToString() const { - QString retStr=QString("%1,%2,%3,%4") + TQString retStr=TQString("%1,%2,%3,%4") .arg(rect().left()) .arg(rect().top()) .arg(rect().right()) @@ -683,20 +683,20 @@ QString RectArea::coordsToString() const return retStr; } -bool RectArea::contains(const QPoint & p) const{ +bool RectArea::contains(const TQPoint & p) const{ return rect().contains(p); } -void RectArea::moveSelectionPoint(QRect* selectionPoint, const QPoint & p) +void RectArea::moveSelectionPoint(TQRect* selectionPoint, const TQPoint & p) { selectionPoint->moveCenter(p); int i=0; - for (QRect *r=_selectionPoints->first();r!=0L;r=_selectionPoints->next()) { + for (TQRect *r=_selectionPoints->first();r!=0L;r=_selectionPoints->next()) { if (r==selectionPoint) break; i++; } - QRect r2(_rect); + TQRect r2(_rect); switch (i) { case 0 : _rect.setLeft(p.x()); _rect.setTop(p.y()); @@ -720,19 +720,19 @@ void RectArea::moveSelectionPoint(QRect* selectionPoint, const QPoint & p) 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)); + _selectionPoints->next()->moveCenter(_rect.topRight()+TQPoint(1,0)); + _selectionPoints->next()->moveCenter(_rect.bottomLeft()+TQPoint(0,1)); + _selectionPoints->next()->moveCenter(_rect.bottomRight()+TQPoint(1,1)); } -bool RectArea::setCoords(const QString & s) +bool RectArea::setCoords(const TQString & s) { _finished=true; - QStringList list=QStringList::split(",",s); - QRect r; + TQStringList list=TQStringList::split(",",s); + TQRect r; bool ok=true; - QStringList::Iterator it = list.begin(); + TQStringList::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++; @@ -744,8 +744,8 @@ bool RectArea::setCoords(const QString & s) return false; } -QString RectArea::getHTMLCode() const { - QString retStr; +TQString RectArea::getHTMLCode() const { + TQString retStr; retStr+="append(p); - p = new QRect(0,0,SELSIZE,SELSIZE); + p = new TQRect(0,0,SELSIZE,SELSIZE); _selectionPoints->append(p); - p = new QRect(0,0,SELSIZE,SELSIZE); + p = new TQRect(0,0,SELSIZE,SELSIZE); _selectionPoints->append(p); - p = new QRect(0,0,SELSIZE,SELSIZE); + p = new TQRect(0,0,SELSIZE,SELSIZE); _selectionPoints->append(p); } @@ -786,26 +786,26 @@ Area* CircleArea::clone() const return areaClone; } -void CircleArea::draw(QPainter & p) +void CircleArea::draw(TQPainter & p) { drawHighlighting(p); /* p.setRasterOp(Qt::CopyROP); - QBrush bold = p.brush(); - QBrush b(QBrush::Dense5Pattern); - b.setColor(QColor("green")); + TQBrush bold = p.brush(); + TQBrush b(TQBrush::Dense5Pattern); + b.setColor(TQColor("green")); p.setBrush(b); - QRect r = _rect; + TQRect r = _rect; r.moveBy(1,1); - r.setSize( r.size()-QSize(2,2) ); + r.setSize( r.size()-TQSize(2,2) ); p.drawChord(r,0,5760); p.setBrush(bold); */ p.setRasterOp(Qt::XorROP); - p.setPen(QPen(QColor("white"),1)); + p.setPen(TQPen(TQColor("white"),1)); - QRect r(_rect); + TQRect r(_rect); r.setWidth(r.width()+1); r.setHeight(r.height()+1); p.drawEllipse(r); @@ -813,16 +813,16 @@ void CircleArea::draw(QPainter & p) Area::draw(p); } -QBitmap CircleArea::getMask() const +TQBitmap CircleArea::getMask() const { - QBitmap mask(_rect.width(),_rect.height()); + TQBitmap mask(_rect.width(),_rect.height()); mask.fill(Qt::color0); - QPainter p(&mask); + TQPainter 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.drawPie(TQRect(0,0,_rect.width(),_rect.height()),0,5760); p.flush(); p.end(); @@ -831,9 +831,9 @@ QBitmap CircleArea::getMask() const } -QString CircleArea::coordsToString() const +TQString CircleArea::coordsToString() const { - QString retStr=QString("%1,%2,%3") + TQString retStr=TQString("%1,%2,%3") .arg(_rect.center().x()) .arg(_rect.center().y()) .arg(_rect.width()/2); @@ -841,18 +841,18 @@ QString CircleArea::coordsToString() const return retStr; } -bool CircleArea::contains(const QPoint & p) const +bool CircleArea::contains(const TQPoint & p) const { - QRegion r(_rect,QRegion::Ellipse); + TQRegion r(_rect,TQRegion::Ellipse); return r.contains(p); } -void CircleArea::moveSelectionPoint(QRect* selectionPoint, const QPoint & p) +void CircleArea::moveSelectionPoint(TQRect* selectionPoint, const TQPoint & p) { selectionPoint->moveCenter(p); int i=0; - for (QRect *r=_selectionPoints->first();r!=0L;r=_selectionPoints->next()) { + for (TQRect *r=_selectionPoints->first();r!=0L;r=_selectionPoints->next()) { if (r==selectionPoint) break; i++; @@ -860,7 +860,7 @@ void CircleArea::moveSelectionPoint(QRect* selectionPoint, const QPoint & p) // The code below really sucks, but I have no better idea. // it only makes sure that the circle is perfektly round - QPoint newPoint; + TQPoint newPoint; int diff=myabs(p.x()-_rect.center().x()); if (myabs(p.y()-_rect.center().y())>diff) diff=myabs(p.y()-_rect.center().y()); @@ -910,9 +910,9 @@ void CircleArea::moveSelectionPoint(QRect* selectionPoint, const QPoint & p) } -void CircleArea::setRect(const QRect & r) +void CircleArea::setRect(const TQRect & r) { - QRect r2 = r; + TQRect r2 = r; if ( r2.height() != r2.width() ) r2.setHeight( r2.width() ); @@ -928,26 +928,26 @@ void CircleArea::updateSelectionPoints() _selectionPoints->next()->moveCenter(_rect.bottomRight()); } -bool CircleArea::setCoords(const QString & s) +bool CircleArea::setCoords(const TQString & s) { _finished=true; - QStringList list=QStringList::split(",",s); + TQStringList list=TQStringList::split(",",s); bool ok=true; - QStringList::Iterator it = list.begin(); + TQStringList::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; + TQRect r; r.setWidth(rad*2); r.setHeight(rad*2); - r.moveCenter(QPoint(x,y)); + r.moveCenter(TQPoint(x,y)); setRect(r); return true; } -QString CircleArea::getHTMLCode() const { - QString retStr; +TQString CircleArea::getHTMLCode() const { + TQString retStr; retStr+="count()==0) return; @@ -1007,32 +1007,32 @@ void PolyArea::draw(QPainter & p) Area::draw(p); } -QBitmap PolyArea::getMask() const +TQBitmap PolyArea::getMask() const { - QBitmap mask(_rect.width(),_rect.height()); + TQBitmap mask(_rect.width(),_rect.height()); mask.fill(Qt::color0); - QPainter p(&mask); + TQPainter p(&mask); p.setBackgroundColor(Qt::color0); p.setPen(Qt::color1); p.setBrush(Qt::color1); p.setClipping(true); - QRegion r(*_coords); + TQRegion r(*_coords); r.translate(-_rect.left(),-_rect.top()); p.setClipRegion(r); - p.fillRect(QRect(0,0,_rect.width(),_rect.height()),Qt::color1); + p.fillRect(TQRect(0,0,_rect.width(),_rect.height()),Qt::color1); p.flush(); p.end(); return mask; } -QString PolyArea::coordsToString() const +TQString PolyArea::coordsToString() const { - QString retStr; + TQString retStr; for (uint i=0;i<_coords->count();i++) { - retStr.append(QString("%1,%2,") + retStr.append(TQString("%1,%2,") .arg(_coords->point(i).x()) .arg(_coords->point(i).y())); } @@ -1042,13 +1042,13 @@ QString PolyArea::coordsToString() const return retStr; } -int PolyArea::distance(const QPoint &p1, const QPoint &p2) +int PolyArea::distance(const TQPoint &p1, const TQPoint &p2) { - QPoint temp = p1-p2; + TQPoint temp = p1-p2; return temp.manhattanLength(); } -bool PolyArea::isBetween(const QPoint &p, const QPoint &p1, const QPoint &p2) +bool PolyArea::isBetween(const TQPoint &p, const TQPoint &p1, const TQPoint &p2) { int dist = distance(p,p1)+distance(p,p2)-distance(p1,p2); @@ -1063,7 +1063,7 @@ void PolyArea::simplifyCoords() if (_coords->size()<4) return; - QPoint p = _coords->point(0) - _coords->point(1); + TQPoint p = _coords->point(0) - _coords->point(1); uint i = 1; @@ -1119,7 +1119,7 @@ void PolyArea::simplifyCoords() } -int PolyArea::addCoord(const QPoint & p) +int PolyArea::addCoord(const TQPoint & p) { if (_coords->size()<3) { @@ -1135,7 +1135,7 @@ int PolyArea::addCoord(const QPoint & p) int n=_coords->size(); -// QPoint temp = p-_coords->point(0); +// TQPoint temp = p-_coords->point(0); int nearest = 0; int olddist = distance(p,_coords->point(0)); int mindiff = 999999999; @@ -1160,23 +1160,23 @@ int PolyArea::addCoord(const QPoint & p) } -bool PolyArea::contains(const QPoint & p) const +bool PolyArea::contains(const TQPoint & p) const { // A line can't contain a point if (_coords->count() >2 ) { - QRegion r(*_coords); + TQRegion r(*_coords); return r.contains(p); } else return false; } -void PolyArea::moveSelectionPoint(QRect* selectionPoint, const QPoint & p) +void PolyArea::moveSelectionPoint(TQRect* selectionPoint, const TQPoint & p) { selectionPoint->moveCenter(p); int i=0; - for (QRect *r=_selectionPoints->first();r!=0L;r=_selectionPoints->next()) { + for (TQRect *r=_selectionPoints->first();r!=0L;r=_selectionPoints->next()) { if (r==selectionPoint) break; i++; @@ -1187,7 +1187,7 @@ void PolyArea::moveSelectionPoint(QRect* selectionPoint, const QPoint & p) void PolyArea::updateSelectionPoints() { - QRect *r; + TQRect *r; r=_selectionPoints->first(); for (uint i=0;i<_coords->size();i++) @@ -1198,14 +1198,14 @@ void PolyArea::updateSelectionPoints() } -bool PolyArea::setCoords(const QString & s) +bool PolyArea::setCoords(const TQString & s) { _finished=true; - QStringList list=QStringList::split(",",s); - _coords=new QPointArray(); + TQStringList list=TQStringList::split(",",s); + _coords=new TQPointArray(); _selectionPoints= new SelectionPointList(); - for (QStringList::Iterator it = list.begin(); it !=list.end(); ++it) + for (TQStringList::Iterator it = list.begin(); it !=list.end(); ++it) { bool ok=true; int newXCoord=(*it).toInt(&ok,10); @@ -1214,15 +1214,15 @@ bool PolyArea::setCoords(const QString & s) if (it==list.end()) break; int newYCoord=(*it).toInt(&ok,10); if (!ok) return false; - insertCoord(_coords->size(), QPoint(newXCoord,newYCoord)); + insertCoord(_coords->size(), TQPoint(newXCoord,newYCoord)); } return true; } -QString PolyArea::getHTMLCode() const { - QString retStr; +TQString PolyArea::getHTMLCode() const { + TQString retStr; retStr+="count() != 1) @@ -1439,7 +1439,7 @@ void AreaSelection::moveBy(int dx, int dy) invalidate(); } -QString AreaSelection::typeString() const +TQString AreaSelection::typeString() const { // if there is only one Area selected // show the name of that Area @@ -1480,12 +1480,12 @@ void AreaSelection::updateSelectionPoints() -QRect AreaSelection::selectionRect() const +TQRect AreaSelection::selectionRect() const { if (!_selectionCacheValid) { _selectionCacheValid=true; - QRect r; + TQRect r; AreaListIterator it=getAreaListIterator(); for ( ; it.current() != 0L; ++it ) @@ -1551,7 +1551,7 @@ void AreaSelection::setAreaList( const AreaList & areas ) invalidate(); } -void AreaSelection::setRect(const QRect & r) +void AreaSelection::setRect(const TQRect & r) { if ( _areas->count()==1 ) { @@ -1563,12 +1563,12 @@ void AreaSelection::setRect(const QRect & r) updateSelectionPoints(); } -QRect AreaSelection::rect() const +TQRect AreaSelection::rect() const { if (!_rectCacheValid) { _rectCacheValid=true; - QRect r; + TQRect r; AreaListIterator it=getAreaListIterator(); for ( ; it.current() != 0L; ++it ) @@ -1581,7 +1581,7 @@ QRect AreaSelection::rect() const } -int AreaSelection::addCoord(const QPoint & p) +int AreaSelection::addCoord(const TQPoint & p) { if ( _areas->count()==1 ) { @@ -1592,7 +1592,7 @@ int AreaSelection::addCoord(const QPoint & p) return 0; } -void AreaSelection::insertCoord(int pos, const QPoint & p) +void AreaSelection::insertCoord(int pos, const TQPoint & p) { if ( _areas->count()==1 ) { @@ -1610,7 +1610,7 @@ void AreaSelection::removeCoord(int pos) } } -bool AreaSelection::removeSelectionPoint(QRect * r) +bool AreaSelection::removeSelectionPoint(TQRect * r) { bool result=false; @@ -1634,7 +1634,7 @@ SelectionPointList* AreaSelection::selectionPoints() const } -void AreaSelection::moveCoord(int pos,const QPoint & p) +void AreaSelection::moveCoord(int pos,const TQPoint & p) { if ( _areas->count()==1 ) { @@ -1653,7 +1653,7 @@ void AreaSelection::highlightSelectionPoint(int i) } -QPointArray* AreaSelection::coords() const +TQPointArray* AreaSelection::coords() const { if ( _areas->count()==1 ) { @@ -1663,7 +1663,7 @@ QPointArray* AreaSelection::coords() const return Area::coords(); } -QString AreaSelection::attribute(const QString & name) const +TQString AreaSelection::attribute(const TQString & name) const { if ( _areas->count()==1 ) { @@ -1673,7 +1673,7 @@ QString AreaSelection::attribute(const QString & name) const return Area::attribute(name); } -void AreaSelection::setAttribute(const QString & name, const QString & value) +void AreaSelection::setAttribute(const TQString & name, const TQString & value) { AreaListIterator it=getAreaListIterator(); @@ -1728,7 +1728,7 @@ bool AreaSelection::isMoving() const * 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 +bool AreaSelection::allAreasWithin(const TQRect & r) const { if ( ! r.contains(rect()) ) { @@ -1743,7 +1743,7 @@ bool AreaSelection::allAreasWithin(const QRect & r) const } -void AreaSelection::draw(QPainter &) +void AreaSelection::draw(TQPainter &) {} diff --git a/kimagemapeditor/kimearea.h b/kimagemapeditor/kimearea.h index 581bba94..8cd9677a 100644 --- a/kimagemapeditor/kimearea.h +++ b/kimagemapeditor/kimearea.h @@ -18,11 +18,11 @@ #ifndef KIMEAREA_H #define KIMEAREA_H -#include -#include -#include +#include +#include +#include #include -#include +#include #include "kdeversion.h" @@ -31,10 +31,10 @@ class QPointArray; class QListViewItem; class QBitmap; -typedef QPtrList SelectionPointList; +typedef TQPtrList SelectionPointList; -typedef QMap AttributeMap; -typedef QMapConstIterator AttributeIterator; +typedef TQMap AttributeMap; +typedef TQMapConstIterator AttributeIterator; @@ -46,26 +46,26 @@ public: static bool showAlt; protected: - QRect _rect; + TQRect _rect; ShapeType _type; - QString _name; - QString _href; - QString _alt; - QString _target; + TQString _name; + TQString _href; + TQString _alt; + TQString _target; AttributeMap _attributes; bool _isSelected; bool _finished; bool _isMoving; int currentHighlighted; - QListViewItem* _listViewItem; + TQListViewItem* _listViewItem; // Only used for Polygons - QPointArray *_coords; + TQPointArray *_coords; SelectionPointList *_selectionPoints; - QPixmap *_highlightedPixmap; + TQPixmap *_highlightedPixmap; - void drawHighlighting(QPainter & p); - void drawAlt(QPainter & p); - QString getHTMLAttributes() const; + void drawHighlighting(TQPainter & p); + void drawAlt(TQPainter & p); + TQString getHTMLAttributes() const; public: Area(); @@ -73,60 +73,60 @@ public: virtual Area* clone() const; // Default implementation; is specified by subclasses - virtual bool contains(const QPoint &) const; + virtual bool contains(const TQPoint &) const; // Default implementation; is specified by subclasses - virtual QString coordsToString() const; - virtual void draw(QPainter &); + virtual TQString coordsToString() const; + virtual void draw(TQPainter &); - virtual QBitmap getMask() const; - virtual QString getHTMLCode() const; + virtual TQBitmap getMask() const; + virtual TQString getHTMLCode() const; - virtual void setHighlightedPixmap( QImage &, QBitmap &); + virtual void setHighlightedPixmap( TQImage &, TQBitmap &); virtual void moveBy(int, int); virtual void moveTo(int, int); - virtual void moveSelectionPoint(QRect*, const QPoint &); + virtual void moveSelectionPoint(TQRect*, const TQPoint &); - virtual QRect* onSelectionPoint(const QPoint &,double zoom) const; - virtual bool removeSelectionPoint(QRect * r); + virtual TQRect* onSelectionPoint(const TQPoint &,double zoom) const; + virtual bool removeSelectionPoint(TQRect * r); virtual SelectionPointList* selectionPoints() const { return _selectionPoints; } - virtual QRect rect() const; + virtual TQRect rect() const; - virtual QRect selectionRect() const; + virtual TQRect selectionRect() const; virtual void setArea(const Area &); - virtual bool setCoords(const QString &); + virtual bool setCoords(const TQString &); /** finished drawing only important for polygon */ virtual void setFinished(bool b) { _finished=b; } - virtual void setRect(const QRect &); + virtual void setRect(const TQRect &); virtual void setMoving(bool b); virtual bool isMoving() const; // Default implementation; is specified by subclasses - virtual QString typeString() const { return ""; } + virtual TQString 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 int addCoord(const TQPoint &); + virtual void insertCoord(int, const TQPoint &); virtual void removeCoord(int); - virtual void moveCoord(int,const QPoint &); - virtual QPointArray* coords() const; + virtual void moveCoord(int,const TQPoint &); + virtual TQPointArray* coords() const; virtual void highlightSelectionPoint(int); - virtual QString attribute(const QString &) const; - virtual void setAttribute(const QString &, const QString &); + virtual TQString attribute(const TQString &) const; + virtual void setAttribute(const TQString &, const TQString &); virtual AttributeIterator firstAttribute() const; virtual AttributeIterator lastAttribute() const; - QPixmap cutOut(const QImage &) ; - void setListViewItem(QListViewItem*); + TQPixmap cutOut(const TQImage &) ; + void setListViewItem(TQListViewItem*); void deleteListViewItem(); - QListViewItem* listViewItem() const; - void setName(const QString &); - QString name() const; + TQListViewItem* listViewItem() const; + void setName(const TQString &); + TQString name() const; void setSelected(bool b); bool isSelected() const; bool finished() const; @@ -136,15 +136,15 @@ public: -inline QListViewItem* Area::listViewItem() const { +inline TQListViewItem* Area::listViewItem() const { return _listViewItem; } -inline void Area::setName(const QString & name) { +inline void Area::setName(const TQString & name) { _name=name; } -inline QString Area::name() const { +inline TQString Area::name() const { return _name; } @@ -172,14 +172,14 @@ class RectArea : public Area 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 bool contains(const TQPoint & p) const; + virtual TQString coordsToString() const; + virtual void draw(TQPainter & p); + virtual void moveSelectionPoint(TQRect* selectionPoint, const TQPoint & p); + virtual bool setCoords(const TQString & s); + virtual TQString typeString() const { return i18n("Rectangle"); } + virtual TQBitmap getMask() const; + virtual TQString getHTMLCode() const; virtual void updateSelectionPoints(); }; @@ -194,15 +194,15 @@ class CircleArea : public Area 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 bool contains(const TQPoint & p) const; + virtual TQString coordsToString() const; + virtual void draw(TQPainter & p); + virtual void moveSelectionPoint(TQRect* selectionPoint, const TQPoint & p); + virtual bool setCoords(const TQString & s); + virtual void setRect(const TQRect & r); + virtual TQString typeString() const { return i18n("Circle"); } + virtual TQBitmap getMask() const; + virtual TQString getHTMLCode() const; virtual void updateSelectionPoints(); }; @@ -217,23 +217,23 @@ class PolyArea :public Area 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 bool contains(const TQPoint & p) const; + virtual TQString coordsToString() const; + virtual void draw(TQPainter & p); + virtual void moveSelectionPoint(TQRect* selectionPoint, const TQPoint & p); virtual void simplifyCoords(); - virtual int addCoord(const QPoint & p); - virtual bool setCoords(const QString & s); - virtual QRect selectionRect() const; + virtual int addCoord(const TQPoint & p); + virtual bool setCoords(const TQString & s); + virtual TQRect selectionRect() const; virtual void setFinished(bool b); - virtual QString typeString() const { return i18n("Polygon"); } - virtual QBitmap getMask() const; - virtual QString getHTMLCode() const; + virtual TQString typeString() const { return i18n("Polygon"); } + virtual TQBitmap getMask() const; + virtual TQString 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); + static int distance(const TQPoint &p1, const TQPoint &p2); + static bool isBetween(const TQPoint &p, const TQPoint &p1, const TQPoint &p2); }; @@ -248,15 +248,15 @@ class DefaultArea :public Area 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; + virtual void draw(TQPainter & p); + virtual TQString typeString() const { return i18n("Default"); } + virtual TQString getHTMLCode() const; }; -typedef QPtrList AreaList; -typedef QPtrListIterator AreaListIterator; +typedef TQPtrList AreaList; +typedef TQPtrListIterator AreaListIterator; /** * This class represents a selection of areas @@ -294,18 +294,18 @@ class AreaSelection : public Area { /** * Overiden Methods of the Area class */ - virtual bool contains(const QPoint & p) const; + virtual bool contains(const TQPoint & p) const; /** * **/ - virtual QRect* onSelectionPoint(const QPoint & p, double zoom) const; + virtual TQRect* onSelectionPoint(const TQPoint & 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 void moveSelectionPoint(TQRect* selectionPoint, const TQPoint & p); virtual SelectionPointList* selectionPoints() const; @@ -327,16 +327,16 @@ class AreaSelection : public Area { * 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 void setRect(const TQRect & r); + virtual TQRect rect() const; - virtual QString typeString() const; + virtual TQString typeString() const; virtual ShapeType type() const; // The selection is only a container // so it is never drawn - virtual void draw(QPainter & p); + virtual void draw(TQPainter & p); /** @@ -345,18 +345,18 @@ class AreaSelection : public Area { virtual Area* clone() const; virtual void updateSelectionPoints(); - virtual int addCoord(const QPoint & p); - virtual void insertCoord(int pos, const QPoint & p); + virtual int addCoord(const TQPoint & p); + virtual void insertCoord(int pos, const TQPoint & p); virtual void removeCoord(int pos); - virtual bool removeSelectionPoint(QRect * r); - virtual void moveCoord(int pos,const QPoint & p); - virtual QPointArray* coords() const; + virtual bool removeSelectionPoint(TQRect * r); + virtual void moveCoord(int pos,const TQPoint & p); + virtual TQPointArray* coords() const; virtual void highlightSelectionPoint(int); - virtual QRect selectionRect() const; + virtual TQRect selectionRect() const; - virtual QString attribute(const QString & name) const; - virtual void setAttribute(const QString & name, const QString & value); + virtual TQString attribute(const TQString & name) const; + virtual void setAttribute(const TQString & name, const TQString & value); virtual AttributeIterator firstAttribute() const; virtual AttributeIterator lastAttribute() const; @@ -364,7 +364,7 @@ class AreaSelection : public Area { virtual bool isMoving() const; - bool allAreasWithin(const QRect & r) const; + bool allAreasWithin(const TQRect & r) const; // makes the cache invalid void invalidate(); @@ -374,8 +374,8 @@ class AreaSelection : public Area { // The selectionRect and the rect are cached // so even in const functions they must be changeable - mutable QRect _cachedSelectionRect; - mutable QRect _cachedRect; + mutable TQRect _cachedSelectionRect; + mutable TQRect _cachedRect; mutable bool _selectionCacheValid; mutable bool _rectCacheValid; diff --git a/kimagemapeditor/kimecommands.cpp b/kimagemapeditor/kimecommands.cpp index e061a463..59157f9d 100644 --- a/kimagemapeditor/kimecommands.cpp +++ b/kimagemapeditor/kimecommands.cpp @@ -14,7 +14,7 @@ * (at your option) any later version. * * * ***************************************************************************/ -#include +#include #include #include @@ -122,7 +122,7 @@ void PasteCommand::unexecute() } -MoveCommand::MoveCommand (KImageMapEditor *document, AreaSelection * a, const QPoint & oldPoint) +MoveCommand::MoveCommand (KImageMapEditor *document, AreaSelection * a, const TQPoint & oldPoint) : #if KDE_VERSION < 300 KCommand @@ -231,7 +231,7 @@ void ResizeCommand::unexecute() -AddPointCommand::AddPointCommand (KImageMapEditor *document, AreaSelection *a, const QPoint & p) +AddPointCommand::AddPointCommand (KImageMapEditor *document, AreaSelection *a, const TQPoint & p) : #if KDE_VERSION < 300 KCommand @@ -268,7 +268,7 @@ void AddPointCommand::execute() void AddPointCommand::unexecute() { -// QRect *selectionPoint = _areaSelection->onSelectionPoint(_point); +// TQRect *selectionPoint = _areaSelection->onSelectionPoint(_point); Area* repaintArea = _areaSelection->clone(); _areaSelection->removeCoord(_coordpos); diff --git a/kimagemapeditor/kimecommands.h b/kimagemapeditor/kimecommands.h index 946c09b4..87b5b87b 100644 --- a/kimagemapeditor/kimecommands.h +++ b/kimagemapeditor/kimecommands.h @@ -90,15 +90,15 @@ KNamedCommand #endif { public: - MoveCommand (KImageMapEditor *document, AreaSelection *a,const QPoint & oldPoint); + MoveCommand (KImageMapEditor *document, AreaSelection *a,const TQPoint & oldPoint); ~MoveCommand (); virtual void execute(); virtual void unexecute(); protected: - QPoint _newPoint; - QPoint _oldPoint; + TQPoint _newPoint; + TQPoint _oldPoint; KImageMapEditor* _document; AreaSelection *_areaSelection; @@ -135,7 +135,7 @@ KNamedCommand #endif { public: - AddPointCommand (KImageMapEditor *document, AreaSelection *a, const QPoint & p); + AddPointCommand (KImageMapEditor *document, AreaSelection *a, const TQPoint & p); ~AddPointCommand (); virtual void execute(); @@ -145,7 +145,7 @@ KNamedCommand KImageMapEditor* _document; AreaSelection *_areaSelection; - QPoint _point; + TQPoint _point; int _coordpos; }; diff --git a/kimagemapeditor/kimedialogs.cpp b/kimagemapeditor/kimedialogs.cpp index 27f104cb..0196b0e5 100644 --- a/kimagemapeditor/kimedialogs.cpp +++ b/kimagemapeditor/kimedialogs.cpp @@ -16,22 +16,22 @@ ***************************************************************************/ // QT -//#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -//#include +//#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +//#include // KDE #include #include @@ -47,8 +47,8 @@ // LOCAL #include "kimedialogs.h" -CoordsEdit::CoordsEdit(QWidget *parent, Area* a) - : QWidget(parent) +CoordsEdit::CoordsEdit(TQWidget *parent, Area* a) + : TQWidget(parent) { area=a; } @@ -66,52 +66,52 @@ CoordsEdit::~CoordsEdit() { } -RectCoordsEdit::RectCoordsEdit(QWidget *parent, Area* a) +RectCoordsEdit::RectCoordsEdit(TQWidget *parent, Area* a) : CoordsEdit(parent,a) { - QGridLayout *layout= new QGridLayout(this,5,2,5,5); + TQGridLayout *layout= new TQGridLayout(this,5,2,5,5); - topXSpin = new QSpinBox(this); + topXSpin = new TQSpinBox(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())); + connect( topXSpin, TQT_SIGNAL(valueChanged(const TQString &)), this, TQT_SLOT(slotTriggerUpdate())); - QLabel *lbl= new QLabel(i18n("Top &X:"),this); + TQLabel *lbl= new TQLabel(i18n("Top &X:"),this); lbl->setBuddy(topXSpin); layout->addWidget(lbl,0,0); - topYSpin = new QSpinBox(this); + topYSpin = new TQSpinBox(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())); + connect( topYSpin, TQT_SIGNAL(valueChanged(const TQString &)), this, TQT_SLOT(slotTriggerUpdate())); - lbl= new QLabel(i18n("Top &Y:"),this); + lbl= new TQLabel(i18n("Top &Y:"),this); lbl->setBuddy(topYSpin); layout->addWidget(lbl,1,0); - widthSpin = new QSpinBox(this); + widthSpin = new TQSpinBox(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())); + connect( widthSpin, TQT_SIGNAL(valueChanged(const TQString &)), this, TQT_SLOT(slotTriggerUpdate())); - lbl= new QLabel(i18n("&Width:"),this); + lbl= new TQLabel(i18n("&Width:"),this); lbl->setBuddy(widthSpin); layout->addWidget(lbl,2,0); - heightSpin = new QSpinBox(this); + heightSpin = new TQSpinBox(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())); + connect( heightSpin, TQT_SIGNAL(valueChanged(const TQString &)), this, TQT_SLOT(slotTriggerUpdate())); - lbl= new QLabel(i18n("Hei&ght:"),this); + lbl= new TQLabel(i18n("Hei&ght:"),this); lbl->setBuddy(heightSpin); layout->addWidget(lbl,3,0); @@ -119,7 +119,7 @@ RectCoordsEdit::RectCoordsEdit(QWidget *parent, Area* a) } void RectCoordsEdit::applyChanges() { - QRect r; + TQRect r; r.setLeft(topXSpin->text().toInt()); r.setTop(topYSpin->text().toInt()); r.setWidth(widthSpin->text().toInt()); @@ -127,43 +127,43 @@ void RectCoordsEdit::applyChanges() { area->setRect(r); } -CircleCoordsEdit::CircleCoordsEdit(QWidget *parent, Area* a) +CircleCoordsEdit::CircleCoordsEdit(TQWidget *parent, Area* a) : CoordsEdit(parent,a) { - QGridLayout *layout= new QGridLayout(this,4,2,5,5); + TQGridLayout *layout= new TQGridLayout(this,4,2,5,5); - centerXSpin = new QSpinBox(this); + centerXSpin = new TQSpinBox(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())); + connect( centerXSpin, TQT_SIGNAL(valueChanged(const TQString &)), this, TQT_SLOT(slotTriggerUpdate())); - QLabel *lbl= new QLabel(i18n("Center &X:"),this); + TQLabel *lbl= new TQLabel(i18n("Center &X:"),this); lbl->setBuddy(centerXSpin); layout->addWidget(lbl,0,0); - centerYSpin = new QSpinBox(this); + centerYSpin = new TQSpinBox(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())); + connect( centerYSpin, TQT_SIGNAL(valueChanged(const TQString &)), this, TQT_SLOT(slotTriggerUpdate())); - lbl= new QLabel(i18n("Center &Y:"),this); + lbl= new TQLabel(i18n("Center &Y:"),this); lbl->setBuddy(centerYSpin); layout->addWidget(lbl,1,0); - radiusSpin = new QSpinBox(this); + radiusSpin = new TQSpinBox(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())); + connect( radiusSpin, TQT_SIGNAL(valueChanged(const TQString &)), this, TQT_SLOT(slotTriggerUpdate())); - lbl= new QLabel(i18n("&Radius:"),this); + lbl= new TQLabel(i18n("&Radius:"),this); lbl->setBuddy(radiusSpin); layout->addWidget(lbl,2,0); @@ -172,34 +172,34 @@ CircleCoordsEdit::CircleCoordsEdit(QWidget *parent, Area* a) } void CircleCoordsEdit::applyChanges() { - QRect r; + TQRect r; r.setWidth(radiusSpin->text().toInt()*2); r.setHeight(radiusSpin->text().toInt()*2); - r.moveCenter(QPoint(centerXSpin->text().toInt(), + r.moveCenter(TQPoint(centerXSpin->text().toInt(), centerYSpin->text().toInt())); area->setRect(r); } -PolyCoordsEdit::PolyCoordsEdit(QWidget *parent, Area* a) +PolyCoordsEdit::PolyCoordsEdit(TQWidget *parent, Area* a) : CoordsEdit(parent,a) { if (!a) return; - QVBoxLayout *layout= new QVBoxLayout(this); + TQVBoxLayout *layout= new TQVBoxLayout(this); int numPoints=a->coords()->count(); - coordsTable= new QTable(numPoints,2,this); + coordsTable= new TQTable(numPoints,2,this); coordsTable->horizontalHeader()->setLabel(0,"X"); coordsTable->horizontalHeader()->setLabel(1,"Y"); coordsTable->verticalHeader()->hide(); coordsTable->setLeftMargin(0); - coordsTable->setSelectionMode( QTable::Single ); + coordsTable->setSelectionMode( TQTable::Single ); for (int i=0;isetText(i,0, QString::number(area->coords()->point(i).x()) ); - coordsTable->setText(i,1, QString::number(area->coords()->point(i).y()) ); + coordsTable->setText(i,0, TQString::number(area->coords()->point(i).x()) ); + coordsTable->setText(i,1, TQString::number(area->coords()->point(i).y()) ); } - connect( coordsTable, SIGNAL(currentChanged(int,int)), this, SLOT(slotHighlightPoint(int))); + connect( coordsTable, TQT_SIGNAL(currentChanged(int,int)), this, TQT_SLOT(slotHighlightPoint(int))); // coordsTable->setMinimumHeight(50); // coordsTable->setMaximumHeight(400); @@ -207,11 +207,11 @@ PolyCoordsEdit::PolyCoordsEdit(QWidget *parent, Area* a) 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())); + TQHBox *hbox= new TQHBox(this); + TQPushButton *addBtn=new TQPushButton(i18n("Add"),hbox); + connect( addBtn, TQT_SIGNAL(pressed()), this, TQT_SLOT(slotAddPoint())); + TQPushButton *removeBtn=new TQPushButton(i18n("Remove"),hbox); + connect( removeBtn, TQT_SIGNAL(pressed()), this, TQT_SLOT(slotRemovePoint())); layout->addWidget(hbox); slotHighlightPoint(1); @@ -231,7 +231,7 @@ void PolyCoordsEdit::slotHighlightPoint(int row) { void PolyCoordsEdit::slotAddPoint() { int newPos= coordsTable->currentRow(); - QPoint currentPoint=area->coords()->point(newPos); + TQPoint currentPoint=area->coords()->point(newPos); area->insertCoord(newPos,currentPoint); int count=area->coords()->size(); @@ -239,8 +239,8 @@ void PolyCoordsEdit::slotAddPoint() { coordsTable->setNumRows(count); for (int i=0;isetText(i,0, QString::number(area->coords()->point(i).x()) ); - coordsTable->setText(i,1, QString::number(area->coords()->point(i).y()) ); + coordsTable->setText(i,0, TQString::number(area->coords()->point(i).x()) ); + coordsTable->setText(i,1, TQString::number(area->coords()->point(i).y()) ); } emit update(); @@ -256,8 +256,8 @@ void PolyCoordsEdit::slotRemovePoint() { coordsTable->setNumRows(count); for (int i=0;isetText(i,0, QString::number(area->coords()->point(i).x()) ); - coordsTable->setText(i,1, QString::number(area->coords()->point(i).y()) ); + coordsTable->setText(i,0, TQString::number(area->coords()->point(i).x()) ); + coordsTable->setText(i,1, TQString::number(area->coords()->point(i).y()) ); } emit update(); @@ -267,37 +267,37 @@ void PolyCoordsEdit::applyChanges() { int count=coordsTable->numRows(); for (int i=0;itext(i,0).toInt(), + TQPoint newPoint( coordsTable->text(i,0).toInt(), coordsTable->text(i,1).toInt()); area->moveCoord(i,newPoint); } } -SelectionCoordsEdit::SelectionCoordsEdit(QWidget *parent, Area* a) +SelectionCoordsEdit::SelectionCoordsEdit(TQWidget *parent, Area* a) : CoordsEdit(parent,a) { - QGridLayout *layout= new QGridLayout(this,2,2); + TQGridLayout *layout= new TQGridLayout(this,2,2); - topXSpin = new QSpinBox(this); + topXSpin = new TQSpinBox(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())); + connect( topXSpin, TQT_SIGNAL(valueChanged(const TQString &)), this, TQT_SLOT(slotTriggerUpdate())); - QLabel *lbl= new QLabel(i18n("Top &X"),this); + TQLabel *lbl= new TQLabel(i18n("Top &X"),this); lbl->setBuddy(topXSpin); layout->addWidget(lbl,0,0); - topYSpin = new QSpinBox(this); + topYSpin = new TQSpinBox(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())); + connect( topYSpin, TQT_SIGNAL(valueChanged(const TQString &)), this, TQT_SLOT(slotTriggerUpdate())); - lbl= new QLabel(i18n("Top &Y"),this); + lbl= new TQLabel(i18n("Top &Y"),this); lbl->setBuddy(topYSpin); layout->addWidget(lbl,1,0); } @@ -308,32 +308,32 @@ void SelectionCoordsEdit::applyChanges() { -QLineEdit* AreaDialog::createLineEdit(QWidget* parent, QGridLayout *layout, int y, const QString & value, const QString & name) +TQLineEdit* AreaDialog::createLineEdit(TQWidget* parent, TQGridLayout *layout, int y, const TQString & value, const TQString & name) { - QLineEdit* edit=new QLineEdit(value,parent); + TQLineEdit* edit=new TQLineEdit(value,parent); layout->addWidget(edit,y,2); - QLabel* lbl=new QLabel(name,parent); + TQLabel* lbl=new TQLabel(name,parent); lbl->setBuddy(edit); layout->addWidget(lbl,y,1); return edit; } -QWidget* AreaDialog::createGeneralPage() +TQWidget* AreaDialog::createGeneralPage() { - QFrame* page = new QFrame(this); - QGridLayout* layout = new QGridLayout(page,5,2,5,5); + TQFrame* page = new TQFrame(this); + TQGridLayout* layout = new TQGridLayout(page,5,2,5,5); - QHBox *hbox= new QHBox(page); - hrefEdit = new QLineEdit(area->attribute("href"),hbox); - QPushButton *btn = new QPushButton("",hbox); + TQHBox *hbox= new TQHBox(page); + hrefEdit = new TQLineEdit(area->attribute("href"),hbox); + TQPushButton *btn = new TQPushButton("",hbox); btn->setPixmap(SmallIcon("fileopen")); - connect( btn, SIGNAL(pressed()), this, SLOT(slotChooseHref())); + connect( btn, TQT_SIGNAL(pressed()), this, TQT_SLOT(slotChooseHref())); hbox->setMinimumHeight(hbox->height()); layout->addWidget(hbox,0,2); - QLabel *lbl=new QLabel(i18n( "&HREF:" ),page); + TQLabel *lbl=new TQLabel(i18n( "&HREF:" ),page); lbl->setBuddy(hrefEdit); layout->addWidget(lbl,0,1); @@ -343,7 +343,7 @@ QWidget* AreaDialog::createGeneralPage() if (area->type()==Area::Default) { - defaultAreaChk = new QCheckBox(i18n("Enable default map"),page); + defaultAreaChk = new TQCheckBox(i18n("Enable default map"),page); if (area->finished()) defaultAreaChk->setChecked(true); layout->addWidget(defaultAreaChk,3,2); @@ -355,23 +355,23 @@ QWidget* AreaDialog::createGeneralPage() return page; } -QWidget* AreaDialog::createCoordsPage() +TQWidget* AreaDialog::createCoordsPage() { - QFrame* page = new QFrame(this); - QVBoxLayout *layout = new QVBoxLayout(page); + TQFrame* page = new TQFrame(this); + TQVBoxLayout *layout = new TQVBoxLayout(page); layout->setMargin(5); coordsEdit = createCoordsEdit(page,area); layout->addWidget(coordsEdit); - connect( coordsEdit, SIGNAL(update()), this, SLOT(slotUpdateArea())); + connect( coordsEdit, TQT_SIGNAL(update()), this, TQT_SLOT(slotUpdateArea())); return page; } -QWidget* AreaDialog::createJavascriptPage() +TQWidget* AreaDialog::createJavascriptPage() { - QFrame* page = new QFrame(this); - QGridLayout* layout = new QGridLayout(page,8,2,5,5); + TQFrame* page = new TQFrame(this); + TQGridLayout* layout = new TQGridLayout(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:")); @@ -387,17 +387,17 @@ QWidget* AreaDialog::createJavascriptPage() return page; } -QWidget* AreaDialog::createButtonBar() +TQWidget* 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); + TQHBox *box = new TQHBox(this); + TQWidget *spacer = new TQWidget(box); + TQPushButton *okBtn = new KPushButton(KStdGuiItem::ok(),box); + TQPushButton *applyBtn = new KPushButton(KStdGuiItem::apply(),box); + TQPushButton *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())); + connect(okBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotOk())); + connect(applyBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotApply())); + connect(cancelBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotCancel())); box->setSpacing(5); box->setStretchFactor(spacer,10); @@ -423,7 +423,7 @@ AreaDialog::AreaDialog(KImageMapEditor* parent,Area * a) setCaption(i18n("Area Tag Editor")); area=a; - QString shape="Default"; + TQString shape="Default"; areaCopy= a->clone(); oldArea= new Area(); oldArea->setRect( a->rect() ); @@ -439,20 +439,20 @@ AreaDialog::AreaDialog(KImageMapEditor* parent,Area * a) // To get a margin around everything - QVBoxLayout *layout = new QVBoxLayout(this); + TQVBoxLayout *layout = new TQVBoxLayout(this); layout->setMargin(5); - QLabel *lbl = new QLabel(""+shape+"",this); + TQLabel *lbl = new TQLabel(""+shape+"",this); lbl->setTextFormat(Qt::RichText); layout->addWidget(lbl); - QFrame *line = new QFrame(this); - line->setFrameStyle(QFrame::HLine | QFrame::Sunken); + TQFrame *line = new TQFrame(this); + line->setFrameStyle(TQFrame::HLine | TQFrame::Sunken); line->setFixedHeight(10); layout->addWidget(line); - QTabWidget *tab = new QTabWidget(this); + TQTabWidget *tab = new TQTabWidget(this); layout->addWidget(tab); @@ -467,8 +467,8 @@ AreaDialog::AreaDialog(KImageMapEditor* parent,Area * a) tab->addTab(createJavascriptPage(),i18n("&JavaScript")); - line = new QFrame(this); - line->setFrameStyle(QFrame::HLine | QFrame::Sunken); + line = new TQFrame(this); + line->setFrameStyle(TQFrame::HLine | TQFrame::Sunken); line->setFixedHeight(10); layout->addWidget(line); @@ -485,7 +485,7 @@ AreaDialog::~AreaDialog() { delete oldArea; } -CoordsEdit* AreaDialog::createCoordsEdit(QWidget *parent, Area *a) { +CoordsEdit* AreaDialog::createCoordsEdit(TQWidget *parent, Area *a) { if (!a) return 0; switch (a->type()) { case Area::Rectangle : @@ -506,7 +506,7 @@ CoordsEdit* AreaDialog::createCoordsEdit(QWidget *parent, Area *a) { } void AreaDialog::slotChooseHref() { - KURL url=KFileDialog::getOpenURL(QString::null, "*|" + i18n( "All Files" ), this, i18n("Choose File")); + KURL url=KFileDialog::getOpenURL(TQString::null, "*|" + i18n( "All Files" ), this, i18n("Choose File")); if (!url.isEmpty()) { hrefEdit->setText(url.url()); } @@ -570,59 +570,59 @@ void AreaDialog::slotUpdateArea() { oldArea->setRect(area->rect()); } -ImageMapChooseDialog::ImageMapChooseDialog(QWidget* parent,QPtrList *_maps,QPtrList *_images,const KURL & _baseUrl) +ImageMapChooseDialog::ImageMapChooseDialog(TQWidget* parent,TQPtrList *_maps,TQPtrList *_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); + TQWidget *page=new TQWidget(this); setMainWidget(page); setCaption(baseUrl.fileName()); - QVBoxLayout *layout = new QVBoxLayout(page,5,5); + TQVBoxLayout *layout = new TQVBoxLayout(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)); + TQLabel *lbl= new TQLabel(i18n("Select an image and/or a map that you want to edit"),page); + lbl->setFont(TQFont("Sans Serif",12, TQFont::Bold)); layout->addWidget(lbl); - QFrame *line= new QFrame(page); - line->setFrameStyle(QFrame::HLine | QFrame::Sunken); + TQFrame *line= new TQFrame(page); + line->setFrameStyle(TQFrame::HLine | TQFrame::Sunken); line->setFixedHeight(10); layout->addWidget(line,0); - QGridLayout *gridLayout= new QGridLayout(layout,2,3,5); + TQGridLayout *gridLayout= new TQGridLayout(layout,2,3,5); gridLayout->setRowStretch(0,0); gridLayout->setRowStretch(1,100); - lbl=new QLabel(i18n("&Maps"),page); - mapListBox= new QListBox(page); + lbl=new TQLabel(i18n("&Maps"),page); + mapListBox= new TQListBox(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= new TQFrame(page); + line->setFrameStyle(TQFrame::VLine | TQFrame::Sunken); line->setFixedWidth(10); -// line->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Expanding)); +// line->setSizePolicy(TQSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Expanding)); gridLayout->addWidget(line,1,1); - lbl=new QLabel(i18n("Image Preview"),page); + lbl=new TQLabel(i18n("Image Preview"),page); gridLayout->addWidget(lbl,0,2); - imagePreview= new QLabel(page); + imagePreview= new TQLabel(page); imagePreview->setFixedSize(310,210); - imagePreview->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Expanding)); - imagePreview->setFrameStyle(QLabel::Panel | QLabel::Sunken); + imagePreview->setSizePolicy(TQSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Expanding)); + imagePreview->setFrameStyle(TQLabel::Panel | TQLabel::Sunken); imagePreview->setIndent(5); - imagePreview->setBackgroundColor(QColor("white")); + imagePreview->setBackgroundColor(TQColor("white")); // imagePreview->setLineWidth(2); // imagePreview->setScaledContents(true); -// lbl= new QLabel(i18n("&Maps"),page); +// lbl= new TQLabel(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= new TQFrame(page); + line->setFrameStyle(TQFrame::HLine | TQFrame::Sunken); line->setFixedHeight(10); layout->addWidget(line,0); @@ -635,7 +635,7 @@ ImageMapChooseDialog::ImageMapChooseDialog(QWidget* parent,QPtrList *_ma for (MapTag *tag = maps->first(); tag!=0L; tag=maps->next()) { mapListBox->insertItem(tag->name); } - connect (mapListBox, SIGNAL(highlighted(int)), this, SLOT(slotMapChanged(int))); + connect (mapListBox, TQT_SIGNAL(highlighted(int)), this, TQT_SLOT(slotMapChanged(int))); } initImageListTable(page); @@ -648,25 +648,25 @@ ImageMapChooseDialog::ImageMapChooseDialog(QWidget* parent,QPtrList *_ma resize(510,460); } -void ImageMapChooseDialog::initImageListTable(QWidget* parent) { +void ImageMapChooseDialog::initImageListTable(TQWidget* parent) { if (images->isEmpty()) { - imageListTable= new QTable(1,1,parent); + imageListTable= new TQTable(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= new TQTable(images->count(),2,parent); imageListTable->setColumnStretchable(0,true); } imageListTable->verticalHeader()->hide(); imageListTable->setLeftMargin(0); - QLabel *lbl= new QLabel(i18n("&Images"),parent); + TQLabel *lbl= new TQLabel(i18n("&Images"),parent); lbl->setBuddy(imageListTable); parent->layout()->add(lbl); @@ -678,15 +678,15 @@ void ImageMapChooseDialog::initImageListTable(QWidget* parent) { imageListTable->horizontalHeader()->setLabel(0,i18n("Path")); imageListTable->horizontalHeader()->setLabel(1,"usemap"); - imageListTable->setSelectionMode(QTable::SingleRow); - imageListTable->setFocusStyle(QTable::FollowStyle); + imageListTable->setSelectionMode(TQTable::SingleRow); + imageListTable->setFocusStyle(TQTable::FollowStyle); imageListTable->clearSelection(true); int row=0; for (ImageTag *tag = images->first(); tag!=0L; tag=images->next()) { - QString src=""; - QString usemap=""; + TQString src=""; + TQString usemap=""; if (tag->find("src")) src=*tag->find("src"); if (tag->find("usemap")) @@ -696,7 +696,7 @@ void ImageMapChooseDialog::initImageListTable(QWidget* parent) { imageListTable->setText(row,1,usemap); row++; } - connect (imageListTable, SIGNAL(selectionChanged()), this, SLOT(slotImageChanged())); + connect (imageListTable, TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(slotImageChanged())); imageListTable->selectRow(0); slotImageChanged(); @@ -710,12 +710,12 @@ ImageMapChooseDialog::~ImageMapChooseDialog() { void ImageMapChooseDialog::slotImageChanged() { int i=imageListTable->currentRow(); - QImage pix; + TQImage pix; if (images->at(i)->find("src")) { - QString str=*images->at(i)->find("src"); + TQString str=*images->at(i)->find("src"); // relative url pixUrl=KURL(baseUrl,str); - pix=QImage(pixUrl.path()); + pix=TQImage(pixUrl.path()); double zoom1=1; double zoom2=1; if (pix.width()>300) @@ -727,14 +727,14 @@ void ImageMapChooseDialog::slotImageChanged() zoom1= zoom1 < zoom2 ? zoom1 : zoom2; pix=pix.smoothScale((int)(pix.width()*zoom1),int(pix.height()*zoom1)); } - QPixmap pix2; + TQPixmap pix2; pix2.convertFromImage(pix); imagePreview->setPixmap(pix2); // imagePreview->repaint(); } -void ImageMapChooseDialog::selectImageWithUsemap(const QString & usemap) { +void ImageMapChooseDialog::selectImageWithUsemap(const TQString & usemap) { for (int i=0; inumRows(); i++) { if (imageListTable->text(i,1)==usemap) { imageListTable->selectRow(i); @@ -749,18 +749,18 @@ void ImageMapChooseDialog::slotMapChanged(int i) { selectImageWithUsemap(currentMap->name); } -PreferencesDialog::PreferencesDialog(QWidget *parent, KConfig* conf) +PreferencesDialog::PreferencesDialog(TQWidget *parent, KConfig* conf) : KDialogBase(parent,"",true,i18n("Preferences"),Ok|Apply|Cancel,Ok,true) { config = conf; - QVBox *page=new QVBox(this); + TQVBox *page=new TQVBox(this); page->setSpacing(6); setMainWidget(page); - QHBox *hbox= new QHBox(page); + TQHBox *hbox= new TQHBox(page); - QLabel *lbl = new QLabel(i18n("&Maximum image preview height:")+" ",hbox); - rowHeightSpinBox = new QSpinBox(hbox); + TQLabel *lbl = new TQLabel(i18n("&Maximum image preview height:")+" ",hbox); + rowHeightSpinBox = new TQSpinBox(hbox); lbl->setBuddy(rowHeightSpinBox); config->setGroup("Appearance"); @@ -771,9 +771,9 @@ PreferencesDialog::PreferencesDialog(QWidget *parent, KConfig* conf) config->setGroup("General"); - hbox= new QHBox(page); - lbl = new QLabel(i18n("&Undo limit:")+" ",hbox); - undoSpinBox = new QSpinBox(hbox); + hbox= new TQHBox(page); + lbl = new TQLabel(i18n("&Undo limit:")+" ",hbox); + undoSpinBox = new TQSpinBox(hbox); undoSpinBox->setFixedWidth(60); lbl->setBuddy(undoSpinBox); @@ -781,31 +781,31 @@ PreferencesDialog::PreferencesDialog(QWidget *parent, KConfig* conf) undoSpinBox->setMinValue(1); undoSpinBox->setValue(config->readNumEntry("undo-level",20)); - hbox= new QHBox(page); - lbl = new QLabel(i18n("&Redo limit:")+" ",hbox); + hbox= new TQHBox(page); + lbl = new TQLabel(i18n("&Redo limit:")+" ",hbox); - redoSpinBox = new QSpinBox(hbox); + redoSpinBox = new TQSpinBox(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 = new TQCheckBox(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); + hbox= new TQHBox(page); + (void)new TQLabel(i18n("Highlight Areas")+" ",hbox); - colorizeAreaChk = new QCheckBox(hbox); + colorizeAreaChk = new TQCheckBox(hbox); colorizeAreaChk->setFixedWidth(60); colorizeAreaChk->setChecked(kapp->config()->readBoolEntry("highlightareas",true)); - hbox= new QHBox(page); - (void)new QLabel(i18n("Show alternative text")+" ",hbox); + hbox= new TQHBox(page); + (void)new TQLabel(i18n("Show alternative text")+" ",hbox); - showAltChk = new QCheckBox(hbox); + showAltChk = new TQCheckBox(hbox); showAltChk->setFixedWidth(60); showAltChk->setChecked(kapp->config()->readBoolEntry("showalt",true)); */ @@ -836,7 +836,7 @@ void PreferencesDialog::slotApply( void ) { emit applyClicked(); } -HTMLPreviewDialog::HTMLPreviewDialog(QWidget* parent, KURL url, const QString & htmlCode) +HTMLPreviewDialog::HTMLPreviewDialog(TQWidget* parent, KURL url, const TQString & htmlCode) : KDialogBase(parent, "", true, i18n("Preview"), KDialogBase::Ok) { tempFile = new KTempFile(url.directory(false), ".html"); @@ -845,17 +845,17 @@ HTMLPreviewDialog::HTMLPreviewDialog(QWidget* parent, KURL url, const QString & kdDebug() << "HTMLPreviewDialog: TempFile : " << tempFile->name() << endl; tempFile->close(); - QVBox *page = makeVBoxMainWidget(); + TQVBox *page = makeVBoxMainWidget(); htmlPart = new KHTMLPart(page,"htmlpart"); // htmlView = new KHTMLView(htmlPart, page); -// htmlView->setVScrollBarMode(QScrollView::Auto); -// htmlView->setHScrollBarMode(QScrollView::Auto); +// htmlView->setVScrollBarMode(TQScrollView::Auto); +// htmlView->setHScrollBarMode(TQScrollView::Auto); // dialog->resize(dialog->calculateSize(edit->maxLineWidth(),edit->numLines()*)); // dialog->adjustSize(); - QLabel* lbl = new QLabel(page,"urllabel"); + TQLabel* lbl = new TQLabel(page,"urllabel"); - connect( htmlPart, SIGNAL( onURL(const QString&)), lbl, SLOT( setText(const QString&))); + connect( htmlPart, TQT_SIGNAL( onURL(const TQString&)), lbl, TQT_SLOT( setText(const TQString&))); } HTMLPreviewDialog::~HTMLPreviewDialog() { diff --git a/kimagemapeditor/kimedialogs.h b/kimagemapeditor/kimedialogs.h index c87f8dfe..7e4f3809 100644 --- a/kimagemapeditor/kimedialogs.h +++ b/kimagemapeditor/kimedialogs.h @@ -31,10 +31,10 @@ class QMultiLineEdit; class QSpinBox; -class CoordsEdit : public QWidget { +class CoordsEdit : public TQWidget { Q_OBJECT public : - CoordsEdit(QWidget *parent, Area* a); + CoordsEdit(TQWidget *parent, Area* a); virtual ~CoordsEdit(); virtual void applyChanges(); protected: @@ -47,23 +47,23 @@ Q_OBJECT class RectCoordsEdit : public CoordsEdit { public: - RectCoordsEdit(QWidget *parent, Area* a); + RectCoordsEdit(TQWidget *parent, Area* a); virtual void applyChanges(); private: - QSpinBox *topXSpin; - QSpinBox *topYSpin; - QSpinBox *widthSpin; - QSpinBox *heightSpin; + TQSpinBox *topXSpin; + TQSpinBox *topYSpin; + TQSpinBox *widthSpin; + TQSpinBox *heightSpin; }; class CircleCoordsEdit : public CoordsEdit { public: - CircleCoordsEdit(QWidget *parent, Area* a); + CircleCoordsEdit(TQWidget *parent, Area* a); virtual void applyChanges(); private: - QSpinBox *centerXSpin; - QSpinBox *centerYSpin; - QSpinBox *radiusSpin; + TQSpinBox *centerXSpin; + TQSpinBox *centerYSpin; + TQSpinBox *radiusSpin; }; class QTable; @@ -71,11 +71,11 @@ class QTable; class PolyCoordsEdit : public CoordsEdit { Q_OBJECT public: - PolyCoordsEdit(QWidget *parent, Area* a); + PolyCoordsEdit(TQWidget *parent, Area* a); ~PolyCoordsEdit(); virtual void applyChanges(); private: - QTable *coordsTable; + TQTable *coordsTable; protected slots: void slotAddPoint(); void slotRemovePoint(); @@ -86,11 +86,11 @@ Q_OBJECT class SelectionCoordsEdit : public CoordsEdit { Q_OBJECT public: - SelectionCoordsEdit(QWidget *parent, Area* a); + SelectionCoordsEdit(TQWidget *parent, Area* a); virtual void applyChanges(); private: - QSpinBox *topXSpin; - QSpinBox *topYSpin; + TQSpinBox *topXSpin; + TQSpinBox *topYSpin; }; @@ -104,22 +104,22 @@ Q_OBJECT 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; + TQLineEdit *hrefEdit; + TQLineEdit *altEdit; + TQLineEdit *targetEdit; + TQLineEdit *titleEdit; - QLineEdit *onClickEdit; - QLineEdit *onDblClickEdit; - QLineEdit *onMouseDownEdit; - QLineEdit *onMouseUpEdit; - QLineEdit *onMouseOverEdit; - QLineEdit *onMouseMoveEdit; - QLineEdit *onMouseOutEdit; + TQLineEdit *onClickEdit; + TQLineEdit *onDblClickEdit; + TQLineEdit *onMouseDownEdit; + TQLineEdit *onMouseUpEdit; + TQLineEdit *onMouseOverEdit; + TQLineEdit *onMouseMoveEdit; + TQLineEdit *onMouseOutEdit; CoordsEdit *coordsEdit; - CoordsEdit* createCoordsEdit(QWidget *parent, Area *a); - QCheckBox *defaultAreaChk; + CoordsEdit* createCoordsEdit(TQWidget *parent, Area *a); + TQCheckBox *defaultAreaChk; KImageMapEditor *_document; @@ -133,11 +133,11 @@ Q_OBJECT 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(); + TQLineEdit* createLineEdit(TQWidget* parent, TQGridLayout *layout, int y, const TQString & value, const TQString & name); + TQWidget* createGeneralPage(); + TQWidget* createCoordsPage(); + TQWidget* createJavascriptPage(); + TQWidget* createButtonBar(); signals: void areaChanged(Area* a); }; @@ -150,23 +150,23 @@ class QLabel; class ImageMapChooseDialog : public KDialogBase { Q_OBJECT private: - QTable *imageListTable; - QLabel *imagePreview; - QListBox *mapListBox; - QLineEdit *mapNameEdit; - QPtrList *maps; - QPtrList *images; + TQTable *imageListTable; + TQLabel *imagePreview; + TQListBox *mapListBox; + TQLineEdit *mapNameEdit; + TQPtrList *maps; + TQPtrList *images; KURL baseUrl; - void initImageListTable(QWidget*); + void initImageListTable(TQWidget*); public: - ImageMapChooseDialog(QWidget* parent,QPtrList *_maps,QPtrList *_images, const KURL & _baseUrl); + ImageMapChooseDialog(TQWidget* parent,TQPtrList *_maps,TQPtrList *_images, const KURL & _baseUrl); ~ImageMapChooseDialog(); KURL pixUrl; MapTag* currentMap; protected slots: void slotImageChanged(); void slotMapChanged(int i); - void selectImageWithUsemap(const QString & usemap); + void selectImageWithUsemap(const TQString & usemap); }; @@ -175,19 +175,19 @@ class KConfig; class PreferencesDialog : public KDialogBase { Q_OBJECT public: - PreferencesDialog(QWidget *parent,KConfig*); + PreferencesDialog(TQWidget *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; + TQSpinBox *rowHeightSpinBox; + TQSpinBox *undoSpinBox; + TQSpinBox *redoSpinBox; +// TQCheckBox *colorizeAreaChk; +// TQCheckBox *showAltChk; + TQCheckBox *startWithCheck; KConfig *config; }; @@ -196,7 +196,7 @@ class KTempFile; class HTMLPreviewDialog : public KDialogBase { public: - HTMLPreviewDialog(QWidget *, KURL, const QString &); + HTMLPreviewDialog(TQWidget *, KURL, const TQString &); ~HTMLPreviewDialog(); virtual void show(); private: diff --git a/kimagemapeditor/kimeshell.cpp b/kimagemapeditor/kimeshell.cpp index d919d2b7..071f3299 100644 --- a/kimagemapeditor/kimeshell.cpp +++ b/kimagemapeditor/kimeshell.cpp @@ -29,7 +29,7 @@ #include #include -#include +#include #include "drawzone.h" #include "kimagemapeditor.h" // the KPart @@ -44,8 +44,8 @@ KimeShell::KimeShell(const char *name ) KDockWidget* mainDock; mainDock = createDockWidget( "MainDockWidget", 0L, 0L, "main_dock_widget"); - QWidget *w = new QHBox( mainDock ); -// QLayout* layout = new QGridLayout( mainDock ); + TQWidget *w = new TQHBox( mainDock ); +// TQLayout* layout = new TQGridLayout( mainDock ); mainDock->setWidget( w ); // allow others to dock to the 4 sides @@ -67,17 +67,17 @@ KimeShell::KimeShell(const char *name ) createShellGUI( true ); guiFactory()->addClient( m_part ); KParts::GUIActivateEvent ev( true ); - QApplication::sendEvent( m_part, &ev ); + TQApplication::sendEvent( m_part, &ev ); //setCentralWidget(part->widget()); if (!initialGeometrySet()) - resize( QSize(725, 525).expandedTo(minimumSizeHint())); + resize( TQSize(725, 525).expandedTo(minimumSizeHint())); - connect( m_part, SIGNAL(setStatusBarText(const QString &)), - this, SLOT(slotSetStatusBarText ( const QString & ))); + connect( m_part, TQT_SIGNAL(setStatusBarText(const TQString &)), + this, TQT_SLOT(slotSetStatusBarText ( const TQString & ))); - connect( m_part, SIGNAL(setWindowCaption(const QString &)), - this, SLOT(setCaption( const QString &))); + connect( m_part, TQT_SIGNAL(setWindowCaption(const TQString &)), + this, TQT_SLOT(setCaption( const TQString &))); setAutoSaveSettings( "General Options" ); @@ -109,16 +109,16 @@ bool KimeShell::queryExit() void KimeShell::setupActions() { - (void)KStdAction::openNew(this, SLOT(fileNew()), actionCollection()); + (void)KStdAction::openNew(this, TQT_SLOT(fileNew()), actionCollection()); // File Quit - (void)KStdAction::quit(this, SLOT(close()),actionCollection()); + (void)KStdAction::quit(this, TQT_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)KStdAction::showToolbar(this, TQT_SLOT(optionsShowToolbar()), actionCollection()); + (void)KStdAction::keyBindings(this, TQT_SLOT(optionsConfigureKeys()), actionCollection()); + (void)KStdAction::configureToolbars(this, TQT_SLOT(optionsConfigureToolbars()), actionCollection()); + (void)KStdAction::showStatusbar(this, TQT_SLOT(optionsShowStatusbar()), actionCollection()); } @@ -155,7 +155,7 @@ void KimeShell::openLastFile() void KimeShell::fileOpen() { - KURL url=KFileDialog::getOpenURL(QString::null, + KURL url=KFileDialog::getOpenURL(TQString::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" @@ -258,8 +258,8 @@ void KimeShell::optionsConfigureToolbars() // use the standard toolbar editor KEditToolbar dlg(factory()); - connect(&dlg, SIGNAL(newToolbarConfig()), - this, SLOT(applyNewToolbarConfig())); + connect(&dlg, TQT_SIGNAL(newToolbarConfig()), + this, TQT_SLOT(applyNewToolbarConfig())); dlg.exec(); } diff --git a/kimagemapeditor/mapslistview.cpp b/kimagemapeditor/mapslistview.cpp index ec89ae4a..d3a9ebe9 100644 --- a/kimagemapeditor/mapslistview.cpp +++ b/kimagemapeditor/mapslistview.cpp @@ -23,40 +23,40 @@ #include "mapslistview.h" -MapsListView::MapsListView(QWidget *parent, const char *name) -: QVBox(parent, name) { +MapsListView::MapsListView(TQWidget *parent, const char *name) +: TQVBox(parent, name) { _listView = new KListView(this); _listView->addColumn(i18n("Maps")); _listView->setFullWidth(true); - _listView->setSelectionMode(QListView::Single); + _listView->setSelectionMode(TQListView::Single); _listView->setItemsRenameable(true); - connect( _listView, SIGNAL( selectionChanged(QListViewItem*)), - this, SLOT( slotSelectionChanged(QListViewItem*))); + connect( _listView, TQT_SIGNAL( selectionChanged(TQListViewItem*)), + this, TQT_SLOT( slotSelectionChanged(TQListViewItem*))); - connect( _listView, SIGNAL( itemRenamed(QListViewItem*)), - this, SLOT( slotItemRenamed(QListViewItem*))); + connect( _listView, TQT_SIGNAL( itemRenamed(TQListViewItem*)), + this, TQT_SLOT( slotItemRenamed(TQListViewItem*))); } MapsListView::~MapsListView() { } -void MapsListView::addMap(const QString & name = QString::null) { - new QListViewItem(_listView,name); +void MapsListView::addMap(const TQString & name = TQString::null) { + new TQListViewItem(_listView,name); //kdDebug() << "MapsListView::addMap : Added map '" << name << "'" << endl; } -void MapsListView::addMaps(QPtrList * maps) { +void MapsListView::addMaps(TQPtrList * 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); +void MapsListView::selectMap(const TQString & name) { + TQListViewItem* item = _listView->findItem(name,0); if (item) { selectMap(item); } else @@ -64,16 +64,16 @@ void MapsListView::selectMap(const QString & name) { } -void MapsListView::selectMap(QListViewItem* item) { +void MapsListView::selectMap(TQListViewItem* item) { if (item) _listView->setSelected(item,true); } -QString MapsListView::selectedMap() { - QString result; +TQString MapsListView::selectedMap() { + TQString result; - QListViewItem* item = _listView->selectedItem(); + TQListViewItem* item = _listView->selectedItem(); if (item) result = item->text(0); else @@ -82,8 +82,8 @@ QString MapsListView::selectedMap() { return result; } -void MapsListView::removeMap(const QString & name) { - QListViewItem* item = _listView->findItem(name,0); +void MapsListView::removeMap(const TQString & name) { + TQListViewItem* item = _listView->findItem(name,0); if (item) { _listView->takeItem(item); _listView->setSelected(_listView->currentItem(),true); @@ -96,19 +96,19 @@ void MapsListView::clear() { _listView->clear(); } -void MapsListView::slotSelectionChanged(QListViewItem* item) { - QString name = item->text(0); +void MapsListView::slotSelectionChanged(TQListViewItem* item) { + TQString name = item->text(0); emit mapSelected(name); } -void MapsListView::slotItemRenamed(QListViewItem* item) { - QString name = item->text(0); +void MapsListView::slotItemRenamed(TQListViewItem* item) { + TQString name = item->text(0); emit mapRenamed(name); } -void MapsListView::changeMapName(const QString & oldName, const QString & newName) { +void MapsListView::changeMapName(const TQString & oldName, const TQString & newName) { // kdDebug() << "MapsListView::changeMapName : " << oldName << " to " << newName << endl; - QListViewItem* item = _listView->findItem(oldName,0); + TQListViewItem* item = _listView->findItem(oldName,0); if (item) { item->setText(0,newName); // kdDebug() << "MapsListView::changeMapName : successful" << endl; @@ -120,12 +120,12 @@ void MapsListView::changeMapName(const QString & oldName, const QString & newNam } -bool MapsListView::nameAlreadyExists(const QString & name) { +bool MapsListView::nameAlreadyExists(const TQString & name) { // kdDebug() << "MapsListView::nameAlreadyExists : " << name << " ? " << endl; bool result = false; - QListViewItem* item = 0L; + TQListViewItem* item = 0L; for(item = _listView->firstChild(); item; item = item->nextSibling()) { - QString otherMap = item->text(0); + TQString otherMap = item->text(0); if(name == otherMap) { result = true; break; @@ -137,26 +137,26 @@ bool MapsListView::nameAlreadyExists(const QString & name) { return result; } -QStringList MapsListView::getMaps() { - QStringList result; +TQStringList MapsListView::getMaps() { + TQStringList result; - QListViewItem* item = 0L; + TQListViewItem* item = 0L; for(item = _listView->firstChild(); item; item = item->nextSibling()) { - QString map = item->text(0); + TQString map = item->text(0); result << map; } return result; } -QString MapsListView::getUnusedMapName() { - QString result; - QString attempt; +TQString MapsListView::getUnusedMapName() { + TQString result; + TQString attempt; int i=0; while(result.isEmpty()) { i++; attempt = i18n("unnamed"); - attempt += QString::number(i); + attempt += TQString::number(i); if (nameAlreadyExists(attempt)) continue; diff --git a/kimagemapeditor/mapslistview.h b/kimagemapeditor/mapslistview.h index 559725a2..467279ae 100644 --- a/kimagemapeditor/mapslistview.h +++ b/kimagemapeditor/mapslistview.h @@ -18,7 +18,7 @@ #ifndef _MAPSLISTVIEW_H_ #define _MAPSLISTVIEW_H_ -#include +#include #include "kimagemapeditor.h" class KListView; @@ -32,44 +32,44 @@ class MapsListView : public QVBox { Q_OBJECT public: - MapsListView(QWidget *parent, const char *name); + MapsListView(TQWidget *parent, const char *name); ~MapsListView(); /** * Adds the given map to the ListView */ - void addMap(const QString &); + void addMap(const TQString &); /** * Adds all maps of the given QList to the ListView */ - void addMaps(QPtrList *); + void addMaps(TQPtrList *); /** * Removes the given map from the ListView */ - void removeMap(const QString &); + void removeMap(const TQString &); /** * Set the the given map selected in the ListView. * it does not emit mapSelected afterwards. */ - void selectMap(const QString &); + void selectMap(const TQString &); /** * Selects the given ListViewItem and deselects the current selected item */ - void selectMap(QListViewItem* item); + void selectMap(TQListViewItem* item); /** * Changes the name of the map with the @p oldName to @p newName */ - void changeMapName(const QString & oldName, const QString & newName); + void changeMapName(const TQString & oldName, const TQString & newName); /** * Returns the current selected map */ - QString selectedMap(); + TQString selectedMap(); /** @@ -81,17 +81,17 @@ public: * Returns a name for a map which is not used yet. * Returns for example Unnamed1 */ - QString getUnusedMapName(); + TQString getUnusedMapName(); /** * Wether or not the given map name already exists */ - bool nameAlreadyExists(const QString &); + bool nameAlreadyExists(const TQString &); /** - * Returns a QStringList of all maps + * Returns a TQStringList of all maps */ - QStringList getMaps(); + TQStringList getMaps(); /** * Returns the number of maps @@ -103,8 +103,8 @@ protected: KListView* _listView; protected slots: - void slotSelectionChanged(QListViewItem*); - void slotItemRenamed(QListViewItem*); + void slotSelectionChanged(TQListViewItem*); + void slotItemRenamed(TQListViewItem*); signals: @@ -112,13 +112,13 @@ signals: * Gets emitted when the user selects a map in * the ListView */ - void mapSelected(const QString &); + void mapSelected(const TQString &); /** * Emitted when the user has renamed a map in the ListView */ - void mapRenamed(const QString & newName); + void mapRenamed(const TQString & newName); }; diff --git a/kimagemapeditor/qextfileinfo.cpp b/kimagemapeditor/qextfileinfo.cpp index c52c48b5..4c10d102 100644 --- a/kimagemapeditor/qextfileinfo.cpp +++ b/kimagemapeditor/qextfileinfo.cpp @@ -12,12 +12,12 @@ //qt includes -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include //kde includes #include @@ -32,7 +32,7 @@ //app includes #include "qextfileinfo.h" -QString QExtFileInfo::lastErrorMsg = ""; +TQString QExtFileInfo::lastErrorMsg = ""; /** create a relative short url based in baseURL*/ KURL QExtFileInfo::toRelative(const KURL& urlToConvert,const KURL& baseURL) @@ -40,8 +40,8 @@ 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); + TQString path = urlToConvert.path(); + TQString basePath = baseURL.path(1); if (path.startsWith("/")) { path.remove(0, 1); @@ -72,7 +72,7 @@ KURL QExtFileInfo::toRelative(const KURL& urlToConvert,const KURL& baseURL) }; } - resultURL.setPath(QDir::cleanDirPath(path)); + resultURL.setPath(TQDir::cleanDirPath(path)); } if (urlToConvert.path().endsWith("/")) resultURL.adjustPath(1); @@ -85,15 +85,15 @@ KURL QExtFileInfo::toAbsolute(const KURL& urlToConvert,const KURL& baseURL) if (urlToConvert.protocol() == baseURL.protocol() && !urlToConvert.path().startsWith("/")) { int pos; - QString cutname = urlToConvert.path(); - QString cutdir = baseURL.path(1); + TQString cutname = urlToConvert.path(); + TQString 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)); + resultURL.setPath(TQDir::cleanDirPath(cutdir+cutname)); } if (urlToConvert.path().endsWith("/")) resultURL.adjustPath(1); @@ -105,13 +105,13 @@ KURL QExtFileInfo::toAbsolute(const KURL& urlToConvert,const KURL& baseURL) 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) +KURL::List QExtFileInfo::allFiles( const KURL& path, const TQString& mask) { QExtFileInfo internalFileInfo; return internalFileInfo.allFilesInternal(path, mask); } -KURL::List QExtFileInfo::allFilesRelative( const KURL& path, const QString& mask) +KURL::List QExtFileInfo::allFilesRelative( const KURL& path, const TQString& mask) { QExtFileInfo internalFileInfo; KURL::List r = internalFileInfo.allFilesInternal( path, mask); @@ -153,7 +153,7 @@ bool QExtFileInfo::createDir( const KURL& path ) KURL QExtFileInfo::cdUp(const KURL &url) { KURL u = url; - QString dir = u.path(-1); + TQString dir = u.path(-1); while ( !dir.isEmpty() && dir.right(1) != "/" ) { dir.remove( dir.length()-1,1); @@ -162,7 +162,7 @@ KURL QExtFileInfo::cdUp(const KURL &url) return u; } -QString QExtFileInfo::shortName(const QString &fname) +TQString QExtFileInfo::shortName(const TQString &fname) { return fname.section("/",-1); } @@ -175,7 +175,7 @@ KURL QExtFileInfo::path( const KURL &url ) KURL QExtFileInfo::home() { KURL url; - url.setPath(QDir::currentDirPath()+"/"); + url.setPath(TQDir::currentDirPath()+"/"); return url; } @@ -189,7 +189,7 @@ bool QExtFileInfo::exists(const KURL& a_url) // No dialog when stating. if ( a_url.isLocalFile() ) { - return QFile::exists( a_url.path() ); + return TQFile::exists( a_url.path() ); } else { QExtFileInfo internalFileInfo; @@ -199,14 +199,14 @@ bool QExtFileInfo::exists(const KURL& 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 ) + bool overwrite, bool resume, TQWidget* window ) { QExtFileInfo internalFileInfo; return internalFileInfo.internalCopy( src, target, permissions, overwrite, resume, window ); } /** No descriptions */ -KURL::List QExtFileInfo::allFilesInternal(const KURL& startURL, const QString& mask) +KURL::List QExtFileInfo::allFilesInternal(const KURL& startURL, const TQString& mask) { dirListItems.clear(); if (internalExists(startURL)) @@ -214,16 +214,16 @@ KURL::List QExtFileInfo::allFilesInternal(const KURL& startURL, const QString& m 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 ) ); + TQStringList list = TQStringList::split( ' ', mask ); + for ( TQStringList::Iterator it = list.begin(); it != list.end(); ++it ) + lstFilters.append( new TQRegExp(*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 *) ) ); + connect(job, TQT_SIGNAL(entries(KIO::Job *, const KIO::UDSEntryList&)), + this, TQT_SLOT(slotNewEntries(KIO::Job *, const KIO::UDSEntryList&))); + connect( job, TQT_SIGNAL( result (KIO::Job *) ), + this, TQT_SLOT( slotResult (KIO::Job *) ) ); // kdDebug(24000) << "Now listing: " << startURL.url() << endl; enter_loop(); @@ -247,11 +247,11 @@ bool QExtFileInfo::internalExists(const KURL& url) 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 *) ) ); + connect( job, TQT_SIGNAL( result (KIO::Job *) ), + this, TQT_SLOT( slotResult (KIO::Job *) ) ); //To avoid lock-ups, start a timer. - QTimer::singleShot(10*1000, this,SLOT(slotTimeout())); + TQTimer::singleShot(10*1000, this,TQT_SLOT(slotTimeout())); // kdDebug(24000)<<"QExtFileInfo::internalExists:before enter_loop"<setWindow (window); - connect( job, SIGNAL( result (KIO::Job *) ), - this, SLOT( slotResult (KIO::Job *) ) ); + connect( job, TQT_SIGNAL( result (KIO::Job *) ), + this, TQT_SLOT( slotResult (KIO::Job *) ) ); enter_loop(); return bJobOK; } -void qt_enter_modal( QWidget *widget ); -void qt_leave_modal( QWidget *widget ); +void qt_enter_modal( TQWidget *widget ); +void qt_leave_modal( TQWidget *widget ); void QExtFileInfo::enter_loop() { - QWidget dummy(0,0,WType_Dialog | WShowModal); - dummy.setFocusPolicy( QWidget::NoFocus ); + TQWidget dummy(0,0,WType_Dialog | WShowModal); + dummy.setFocusPolicy( TQWidget::NoFocus ); qt_enter_modal(&dummy); // kdDebug(24000)<<"QExtFileInfo::enter_loop:before qApp->enter_loop()"<enter_loop(); @@ -306,15 +306,15 @@ void QExtFileInfo::slotNewEntries(KIO::Job *job, const KIO::UDSEntryList& udsLis KURL url = static_cast(job)->url(); url.adjustPath(-1); // avoid creating these QStrings again and again - static const QString& dot = KGlobal::staticQString("."); - static const QString& dotdot = KGlobal::staticQString(".."); + static const TQString& dot = KGlobal::staticQString("."); + static const TQString& dotdot = KGlobal::staticQString(".."); KIO::UDSEntryListConstIterator it = udsList.begin(); KIO::UDSEntryListConstIterator end = udsList.end(); KURL itemURL; for ( ; it != end; ++it ) { - QString name; + TQString name; // find out about the name KIO::UDSEntry::ConstIterator entit = (*it).begin(); @@ -330,7 +330,7 @@ void QExtFileInfo::slotNewEntries(KIO::Job *job, const KIO::UDSEntryList& udsLis KFileItem* item = new KFileItem( *it, url, false, true ); itemURL = item->url(); if (item->isDir()) itemURL.adjustPath(1); - for ( QPtrListIterator filterIt( lstFilters ); filterIt.current(); ++filterIt ) + for ( TQPtrListIterator filterIt( lstFilters ); filterIt.current(); ++filterIt ) if ( filterIt.current()->exactMatch( item->text() ) ) dirListItems.append(itemURL); delete item; diff --git a/kimagemapeditor/qextfileinfo.h b/kimagemapeditor/qextfileinfo.h index 20294bde..6f2b867c 100644 --- a/kimagemapeditor/qextfileinfo.h +++ b/kimagemapeditor/qextfileinfo.h @@ -17,9 +17,9 @@ #include #include -#include -#include -#include +#include +#include +#include class QExtFileInfo:public QObject { @@ -33,33 +33,33 @@ public: /** 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); + static KURL::List allFiles( const KURL& path, const TQString &mask); + static KURL::List allFilesRelative( const KURL& path, const TQString &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 TQString shortName(const TQString &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 ); + bool overwrite=false, bool resume=false, TQWidget* 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 overwrite, bool resume, TQWidget* window); bool bJobOK; - static QString lastErrorMsg; + static TQString lastErrorMsg; KIO::UDSEntry m_entry; KURL::List dirListItems; - QPtrList lstFilters; + TQPtrList lstFilters; /** No descriptions */ - KURL::List allFilesInternal(const KURL& startURL, const QString& mask); + KURL::List allFilesInternal(const KURL& startURL, const TQString& mask); // friend class I_like_this_class; diff --git a/klinkstatus/src/actionmanager.cpp b/klinkstatus/src/actionmanager.cpp index 9f60e7bf..f126d977 100644 --- a/klinkstatus/src/actionmanager.cpp +++ b/klinkstatus/src/actionmanager.cpp @@ -25,7 +25,7 @@ #include #include -#include +#include #include "klinkstatus_part.h" #include "ui/sessionwidget.h" @@ -63,8 +63,8 @@ public: SessionWidget* sessionWidget; }; -ActionManager::ActionManager(QObject *parent, const char *name) - : QObject(parent, name), d(new ActionManagerPrivate) +ActionManager::ActionManager(TQObject *parent, const char *name) + : TQObject(parent, name), d(new ActionManagerPrivate) {} ActionManager::~ActionManager() @@ -89,34 +89,34 @@ void ActionManager::initPart(KLinkStatusPart* part) new KAction(i18n("New Link Check"), "filenew", 0, - d->part, SLOT(slotNewLinkCheck()), + d->part, TQT_SLOT(slotNewLinkCheck()), d->actionCollection, "new_link_check"); new KAction(i18n("Open URL..."), "fileopen", 0, - d->part, SLOT(slotOpenLink()), + d->part, TQT_SLOT(slotOpenLink()), d->actionCollection, "open_link"); action = new KAction(i18n("Close Tab"), "fileclose", 0, - d->part, SLOT(slotClose()), + d->part, TQT_SLOT(slotClose()), d->actionCollection, "close_tab"); action->setEnabled(false); // *************** Settings menu ********************* (void) new KAction(i18n("Configure KLinkStatus..."), "configure", - 0, d->part, SLOT(slotConfigureKLinkStatus()), + 0, d->part, TQT_SLOT(slotConfigureKLinkStatus()), d->actionCollection, "configure_klinkstatus"); // *************** Help menu ********************* (void) new KAction(i18n("About KLinkStatus"), "klinkstatus", - 0, d->part, SLOT(slotAbout()), + 0, d->part, TQT_SLOT(slotAbout()), d->actionCollection, "about_klinkstatus"); (void) new KAction(i18n("&Report Bug..."), 0, 0, d->part, - SLOT(slotReportBug()), d->actionCollection, "report_bug"); + TQT_SLOT(slotReportBug()), d->actionCollection, "report_bug"); // *************** View menu ********************* } @@ -133,7 +133,7 @@ void ActionManager::initTabWidget(TabWidgetSession* tabWidgetSession) // *************** File menu ********************* KAction* action = new KAction(i18n("E&xport Results as HTML..."), "filesave", 0, - d->tabWidgetSession, SLOT(slotExportAsHTML()), + d->tabWidgetSession, TQT_SLOT(slotExportAsHTML()), d->actionCollection, "file_export_html"); action->setEnabled(false); @@ -142,38 +142,38 @@ void ActionManager::initTabWidget(TabWidgetSession* tabWidgetSession) // 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->tabWidgetSession, TQT_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->tabWidgetSession, TQT_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->tabWidgetSession, TQT_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->tabWidgetSession, TQT_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->tabWidgetSession, TQT_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->tabWidgetSession, TQT_SLOT(slotStopSearch()), d->actionCollection, "stop_search"); action->setEnabled(false); } @@ -189,7 +189,7 @@ void ActionManager::initSessionWidget(SessionWidget* sessionWidget) } -QWidget* ActionManager::container(const char* name) +TQWidget* ActionManager::container(const char* name) { return d->part->factory()->container(name, d->part); } diff --git a/klinkstatus/src/actionmanager.h b/klinkstatus/src/actionmanager.h index a33c37f4..53fc1003 100644 --- a/klinkstatus/src/actionmanager.h +++ b/klinkstatus/src/actionmanager.h @@ -20,7 +20,7 @@ #ifndef ACTIONMANAGER_H #define ACTIONMANAGER_H -#include +#include class KAction; class KActionCollection; @@ -38,14 +38,14 @@ class ActionManager : public QObject { Q_OBJECT public: - ActionManager(QObject* parent=0, const char* name=0); + ActionManager(TQObject* 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); + virtual TQWidget* container(const char* name); void initPart(KLinkStatusPart* part); void initSessionWidget(SessionWidget* sessionWidget); diff --git a/klinkstatus/src/engine/linkchecker.cpp b/klinkstatus/src/engine/linkchecker.cpp index bcc503ad..8186bda8 100644 --- a/klinkstatus/src/engine/linkchecker.cpp +++ b/klinkstatus/src/engine/linkchecker.cpp @@ -22,10 +22,10 @@ #include "../utils/utils.h" #include "../parser/htmlparser.h" -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -44,8 +44,8 @@ int LinkChecker::count_ = 0; LinkChecker::LinkChecker(LinkStatus* linkstatus, int time_out, - QObject *parent, const char *name) - : QObject(parent, name), search_manager_(0), + TQObject *parent, const char *name) + : TQObject(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) @@ -97,16 +97,16 @@ void LinkChecker::check() 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 &))); + TQObject::connect(t_job_, TQT_SIGNAL(data(KIO::Job *, const TQByteArray &)), + this, TQT_SLOT(slotData(KIO::Job *, const TQByteArray &))); + TQObject::connect(t_job_, TQT_SIGNAL(mimetype(KIO::Job *, const TQString &)), + this, TQT_SLOT(slotMimetype(KIO::Job *, const TQString &))); + TQObject::connect(t_job_, TQT_SIGNAL(result(KIO::Job *)), + this, TQT_SLOT(slotResult(KIO::Job *))); + TQObject::connect(t_job_, TQT_SIGNAL(redirection(KIO::Job *, const KURL &)), + this, TQT_SLOT(slotRedirection(KIO::Job *, const KURL &))); - QTimer::singleShot( time_out_ * 1000, this, SLOT(slotTimeOut()) ); + TQTimer::singleShot( time_out_ * 1000, this, TQT_SLOT(slotTimeOut()) ); t_job_->setInteractive(false); } @@ -136,7 +136,7 @@ void LinkChecker::slotTimeOut() } } -void LinkChecker::slotMimetype (KIO::Job* /*job*/, const QString &type) +void LinkChecker::slotMimetype (KIO::Job* /*job*/, const TQString &type) { if(finnished_) return; @@ -196,7 +196,7 @@ void LinkChecker::slotMimetype (KIO::Job* /*job*/, const QString &type) } } -void LinkChecker::slotData(KIO::Job* /*job*/, const QByteArray& data) +void LinkChecker::slotData(KIO::Job* /*job*/, const TQByteArray& data) { if(finnished_) return; @@ -275,18 +275,18 @@ void LinkChecker::slotData(KIO::Job* /*job*/, const QByteArray& data) if(!is_charset_checked_) findDocumentCharset(data); - QTextCodec* codec = 0; + TQTextCodec* codec = 0; if(has_defined_charset_) - codec = QTextCodec::codecForName(document_charset_); + codec = TQTextCodec::codecForName(document_charset_); if(!codec) - codec = QTextCodec::codecForName("iso8859-1"); // default + codec = TQTextCodec::codecForName("iso8859-1"); // default doc_html_ += codec->toUnicode(data); } } } -void LinkChecker::findDocumentCharset(QString const& doc) +void LinkChecker::findDocumentCharset(TQString const& doc) { Q_ASSERT(!is_charset_checked_); @@ -513,7 +513,7 @@ HttpResponseHeader LinkChecker::getHttpHeader(KIO::Job* /*job*/, bool remember_c Q_ASSERT(!finnished_); Q_ASSERT(t_job_); - QString header_string = t_job_->queryMetaData("HTTP-Headers"); + TQString 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; @@ -537,7 +537,7 @@ void LinkChecker::checkRef() KURL url(linkStatus()->absoluteUrl()); Q_ASSERT(url.hasRef()); - QString ref = url.ref(); + TQString ref = url.ref(); if(ref == "" || ref == "top") { linkstatus_->setStatusText("OK"); linkstatus_->setStatus(LinkStatus::SUCCESSFULL); @@ -545,7 +545,7 @@ void LinkChecker::checkRef() return; } - QString url_base; + TQString url_base; LinkStatus const* ls_parent = 0; int i_ref = -1; @@ -576,7 +576,7 @@ void LinkChecker::checkRef(KURL const& url) { Q_ASSERT(search_manager_); - QString url_string = url.url(); + TQString url_string = url.url(); KHTMLPart* html_part = search_manager_->htmlPart(url_string); if(!html_part) { @@ -585,10 +585,10 @@ void LinkChecker::checkRef(KURL const& url) html_part = new KHTMLPart(); html_part->setOnlyLocalReferences(true); - QString tmpFile; + TQString tmpFile; if(KIO::NetAccess::download(url, tmpFile, 0)) { - QString doc_html = FileManager::read(tmpFile); + TQString doc_html = FileManager::read(tmpFile); html_part->begin(); html_part->write(doc_html); html_part->end(); @@ -622,7 +622,7 @@ void LinkChecker::checkRef(LinkStatus const* linkstatus_parent) { Q_ASSERT(search_manager_); - QString url_string = linkstatus_parent->absoluteUrl().url(); + TQString url_string = linkstatus_parent->absoluteUrl().url(); KHTMLPart* html_part = search_manager_->htmlPart(url_string); if(!html_part) { @@ -653,7 +653,7 @@ void LinkChecker::checkRef(LinkStatus const* linkstatus_parent) finnish(); } -bool LinkChecker::hasAnchor(KHTMLPart* html_part, QString const& anchor) +bool LinkChecker::hasAnchor(KHTMLPart* html_part, TQString const& anchor) { DOM::HTMLDocument htmlDocument = html_part->htmlDocument(); DOM::HTMLCollection anchors = htmlDocument.anchors(); @@ -686,7 +686,7 @@ void LinkChecker::killJob() LinkStatus::Status LinkChecker::getHttpStatus() const { - QString status_code = QString::number(linkstatus_->httpHeader().statusCode()); + TQString status_code = TQString::number(linkstatus_->httpHeader().statusCode()); if(status_code[0] == '2') return LinkStatus::SUCCESSFULL; diff --git a/klinkstatus/src/engine/linkchecker.h b/klinkstatus/src/engine/linkchecker.h index a992e5fd..168776d9 100644 --- a/klinkstatus/src/engine/linkchecker.h +++ b/klinkstatus/src/engine/linkchecker.h @@ -20,9 +20,9 @@ #ifndef LINKCHECKER_H #define LINKCHECKER_H -#include -#include -#include +#include +#include +#include #include class KHTMLPart; @@ -42,7 +42,7 @@ class LinkChecker : public QObject Q_OBJECT public: LinkChecker(LinkStatus* linkstatus, int time_out = 50, - QObject *parent = 0, const char *name = 0); + TQObject *parent = 0, const char *name = 0); ~LinkChecker(); //virtual void run(); @@ -51,7 +51,7 @@ public: LinkStatus const* linkStatus() const; - static bool hasAnchor(KHTMLPart* html_part, QString const& anchor); + static bool hasAnchor(KHTMLPart* html_part, TQString const& anchor); signals: @@ -61,9 +61,9 @@ signals: protected slots: - void slotData(KIO::Job *, const QByteArray &data); + void slotData(KIO::Job *, const TQByteArray &data); void slotRedirection (KIO::Job *, const KURL &url); - void slotMimetype(KIO::Job *, const QString &type); + void slotMimetype(KIO::Job *, const TQString &type); void slotResult(KIO::Job* job); void slotTimeOut(); @@ -85,7 +85,7 @@ private: */ bool processRedirection(KURL const& url); - void findDocumentCharset(QString const& data); + void findDocumentCharset(TQString const& data); private: @@ -94,12 +94,12 @@ private: KIO::TransferJob* t_job_; int time_out_; LinkChecker* checker_; - QString document_charset_; + TQString 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_; + TQString doc_html_; bool header_checked_; bool finnished_; bool parsing_; diff --git a/klinkstatus/src/engine/linkfilter.cpp b/klinkstatus/src/engine/linkfilter.cpp index 4d15f2e6..1c7a3844 100644 --- a/klinkstatus/src/engine/linkfilter.cpp +++ b/klinkstatus/src/engine/linkfilter.cpp @@ -22,7 +22,7 @@ #include "linkstatus.h" -LinkMatcher::LinkMatcher(QString const& text, ResultView::Status status) +LinkMatcher::LinkMatcher(TQString const& text, ResultView::Status status) : m_text(text), m_status(status) { } diff --git a/klinkstatus/src/engine/linkfilter.h b/klinkstatus/src/engine/linkfilter.h index 84da16cb..6d211aa6 100644 --- a/klinkstatus/src/engine/linkfilter.h +++ b/klinkstatus/src/engine/linkfilter.h @@ -28,13 +28,13 @@ class LinkMatcher { public: - LinkMatcher(QString const& text, ResultView::Status status); + LinkMatcher(TQString 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 setText(const TQString& text) { m_text = text; } + TQString text() const { return m_text; } void setStatus(ResultView::Status status) { m_status = status; } ResultView::Status status() const { return m_status; } @@ -42,7 +42,7 @@ public: bool nullFilter() const { return m_text.isEmpty() && m_status == ResultView::none; } private: - QString m_text; + TQString m_text; ResultView::Status m_status; }; diff --git a/klinkstatus/src/engine/linkstatus.cpp b/klinkstatus/src/engine/linkstatus.cpp index c8b359ed..58841a63 100644 --- a/klinkstatus/src/engine/linkstatus.cpp +++ b/klinkstatus/src/engine/linkstatus.cpp @@ -25,7 +25,7 @@ #include #include -#include +#include LinkStatus::~LinkStatus() @@ -94,9 +94,9 @@ void LinkStatus::reset() base_URI_ = ""; } -QString const LinkStatus::toString() const +TQString const LinkStatus::toString() const { - QString aux; + TQString aux; if(!is_root_) { @@ -174,12 +174,12 @@ void LinkStatus::setMalformed(bool flag) } } -void LinkStatus::save(QDomElement& element) const +void LinkStatus::save(TQDomElement& element) const { - QDomElement child_element = element.ownerDocument().createElement("link"); + TQDomElement child_element = element.ownerDocument().createElement("link"); // - QDomElement tmp_1 = element.ownerDocument().createElement("url"); + TQDomElement tmp_1 = element.ownerDocument().createElement("url"); tmp_1.appendChild(element.ownerDocument().createTextNode(absoluteUrl().prettyURL())); child_element.appendChild(tmp_1); @@ -199,9 +199,9 @@ void LinkStatus::save(QDomElement& element) const // tmp_1 = element.ownerDocument().createElement("referrers"); - for(QValueVector::const_iterator it = referrers_.begin(); it != referrers_.end(); ++it) + for(TQValueVector::const_iterator it = referrers_.begin(); it != referrers_.end(); ++it) { - QDomElement tmp_2 = element.ownerDocument().createElement("url"); + TQDomElement tmp_2 = element.ownerDocument().createElement("url"); tmp_2.appendChild(element.ownerDocument().createTextNode(it->prettyURL())); tmp_1.appendChild(tmp_2); diff --git a/klinkstatus/src/engine/linkstatus.h b/klinkstatus/src/engine/linkstatus.h index e7567460..6e924129 100644 --- a/klinkstatus/src/engine/linkstatus.h +++ b/klinkstatus/src/engine/linkstatus.h @@ -30,9 +30,9 @@ class TreeView; class TreeViewItem; -#include -#include -#include +#include +#include +#include class QDomElement; #include @@ -64,20 +64,20 @@ public: LinkStatus(Node* node, LinkStatus* parent); ~LinkStatus(); - void save(QDomElement& element) const; + void save(TQDomElement& 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 setOriginalUrl(TQString const& url_original); + void setLabel(TQString const& label); void setAbsoluteUrl(KURL const& url_absoluto); - void setDocHtml(QString const& doc_html); + void setDocHtml(TQString 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 setStatusText(TQString const& statusText); // FIXME Legacy. This should be eliminated in favor of LinkStatus::Status + void setError(TQString const& error); void setIsRoot(bool flag); void setErrorOccurred(bool houve_error); void setIsRedirection(bool e_redirection); @@ -93,9 +93,9 @@ public: void setHasBaseURI(bool flag = true); void setHasHtmlDocTitle(bool flag = true); void setBaseURI(KURL const& base_url); - void setHtmlDocTitle(QString const& title); + void setHtmlDocTitle(TQString const& title); void setIgnored(bool flag = true); - void setMimeType(QString const& mimetype); + void setMimeType(TQString const& mimetype); void setIsErrorPage(bool flag); void setIsLocalRestrict(bool flag); void setTreeViewItem(TreeViewItem* tree_view_item); @@ -107,21 +107,21 @@ public: 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; + TQString const& originalUrl() const; + TQString const& label() const; KURL const& absoluteUrl() const; - QString const& docHtml() const; + TQString 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; + TQString statusText() const; // FIXME Legacy. This should be eliminated in favor of LinkStatus::Status + TQString const& error() const; bool isRoot() const; bool errorOccurred() const; bool isRedirection() const; LinkStatus* redirection() const; Node* node() const; vector const& childrenNodes() const; - QString const toString() const; + TQString const toString() const; bool checked() const; int externalDomainDepth() const; bool onlyCheckHeader() const; @@ -129,13 +129,13 @@ public: bool hasBaseURI() const; bool hasHtmlDocTitle() const; KURL const& baseURI() const; - QString const& htmlDocTitle() const; + TQString const& htmlDocTitle() const; bool ignored() const; bool redirectionExists(KURL const& url) const; // to avoid cyclic links - QString mimeType() const; + TQString mimeType() const; bool isErrorPage() const; TreeViewItem* treeViewItem() const; - QValueVector const& referrers() const; + TQValueVector const& referrers() const; static LinkStatus* lastRedirection(LinkStatus* ls); @@ -152,13 +152,13 @@ private: Status status_; int depth_; int external_domain_depth_; // Para se poder escolher explorar domains diferentes ate n depth - QString original_url_; - QString label_; + TQString original_url_; + TQString label_; KURL absolute_url_; - QString doc_html_; + TQString doc_html_; HttpResponseHeader http_header_; - QString status_text_; // FIXME Legacy. This should be eliminated in favor of LinkStatus::Status - QString error_; + TQString status_text_; // FIXME Legacy. This should be eliminated in favor of LinkStatus::Status + TQString error_; bool is_root_; bool error_occurred_; bool is_redirection_; @@ -172,13 +172,13 @@ private: bool has_base_URI_; bool has_html_doc_title_; KURL base_URI_; - QString html_doc_title_; + TQString html_doc_title_; bool ignored_; - QString mimetype_; + TQString mimetype_; bool is_error_page_; bool is_local_restrict_; TreeViewItem* tree_view_item_; - QValueVector referrers_; + TQValueVector referrers_; }; #include "../parser/url.h" diff --git a/klinkstatus/src/engine/linkstatus_impl.h b/klinkstatus/src/engine/linkstatus_impl.h index 3359664c..5a875b2e 100644 --- a/klinkstatus/src/engine/linkstatus_impl.h +++ b/klinkstatus/src/engine/linkstatus_impl.h @@ -78,17 +78,17 @@ inline void LinkStatus::setAbsoluteUrl(KURL const& url_absoluto) absolute_url_ = url_absoluto; } -inline void LinkStatus::setOriginalUrl(QString const& url_original) +inline void LinkStatus::setOriginalUrl(TQString const& url_original) { original_url_ = url_original; } -inline void LinkStatus::setLabel(QString const& label) +inline void LinkStatus::setLabel(TQString const& label) { label_ = label; } -inline void LinkStatus::setDocHtml(QString const& doc_html) +inline void LinkStatus::setDocHtml(TQString const& doc_html) { Q_ASSERT(!doc_html.isEmpty()); doc_html_ = doc_html; @@ -99,13 +99,13 @@ inline void LinkStatus::setHttpHeader(HttpResponseHeader const& cabecalho_http) http_header_ = cabecalho_http; } -inline void LinkStatus::setStatusText(QString const& status) +inline void LinkStatus::setStatusText(TQString const& status) { Q_ASSERT(!status.isEmpty()); status_text_ = status; } -inline void LinkStatus::setError(QString const& error) +inline void LinkStatus::setError(TQString const& error) { Q_ASSERT(!error.isEmpty()); error_ = error; @@ -186,7 +186,7 @@ inline void LinkStatus::setBaseURI(KURL const& base_url) base_URI_ = base_url; } -inline void LinkStatus::setHtmlDocTitle(QString const& title) +inline void LinkStatus::setHtmlDocTitle(TQString const& title) { if(title.isNull() || title.isEmpty()) { @@ -204,7 +204,7 @@ inline void LinkStatus::setIgnored(bool flag) ignored_ = flag; } -inline void LinkStatus::setMimeType(QString const& mimetype) +inline void LinkStatus::setMimeType(TQString const& mimetype) { Q_ASSERT(!mimetype.isNull() && !mimetype.isEmpty()); mimetype_ = mimetype; @@ -266,12 +266,12 @@ inline LinkStatus const* LinkStatus::parent() const return parent_; } -inline QString const& LinkStatus::originalUrl() const +inline TQString const& LinkStatus::originalUrl() const { return original_url_; } -inline QString const& LinkStatus::label() const +inline TQString const& LinkStatus::label() const { return label_; } @@ -281,7 +281,7 @@ inline KURL const& LinkStatus::absoluteUrl() const return absolute_url_; } -inline QString const& LinkStatus::docHtml() const +inline TQString const& LinkStatus::docHtml() const { return doc_html_; } @@ -296,7 +296,7 @@ inline HttpResponseHeader& LinkStatus::httpHeader() return http_header_; } -inline QString LinkStatus::statusText() const +inline TQString LinkStatus::statusText() const { if(errorOccurred()) return error(); @@ -304,7 +304,7 @@ inline QString LinkStatus::statusText() const return status_text_; else { - QString string_code = QString::number(httpHeader().statusCode()); + TQString string_code = TQString::number(httpHeader().statusCode()); if(absoluteUrl().hasRef()) // ref URL return status_text_; else if(string_code == "200"/* or string_code == "304"*/) @@ -314,7 +314,7 @@ inline QString LinkStatus::statusText() const } } -inline QString const& LinkStatus::error() const +inline TQString const& LinkStatus::error() const { return error_; } @@ -383,7 +383,7 @@ inline KURL const& LinkStatus::baseURI() const return base_URI_; } -inline QString const& LinkStatus::htmlDocTitle() const +inline TQString const& LinkStatus::htmlDocTitle() const { Q_ASSERT(has_html_doc_title_); return html_doc_title_; @@ -394,7 +394,7 @@ inline bool LinkStatus::ignored() const return ignored_; } -inline QString LinkStatus::mimeType() const +inline TQString LinkStatus::mimeType() const { Q_ASSERT(!mimetype_.isNull()); return mimetype_; @@ -410,7 +410,7 @@ inline TreeViewItem* LinkStatus::treeViewItem() const return tree_view_item_; } -inline QValueVector const& LinkStatus::referrers() const +inline TQValueVector const& LinkStatus::referrers() const { return referrers_; } diff --git a/klinkstatus/src/engine/searchmanager.cpp b/klinkstatus/src/engine/searchmanager.cpp index 81562a7a..c64c3a89 100644 --- a/klinkstatus/src/engine/searchmanager.cpp +++ b/klinkstatus/src/engine/searchmanager.cpp @@ -24,9 +24,9 @@ #include #include -#include -#include -#include +#include +#include +#include #include #include @@ -37,8 +37,8 @@ SearchManager::SearchManager(int max_simultaneous_connections, int time_out, - QObject *parent, const char *name) - : QObject(parent, name), + TQObject *parent, const char *name) + : TQObject(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), @@ -148,7 +148,7 @@ void SearchManager::startSearch(KURL const& root, SearchMode const& modo) searching_ = true; - //Q_ASSERT(domain_ != QString::null); + //Q_ASSERT(domain_ != TQString::null); checkRoot(); } @@ -191,11 +191,11 @@ 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, TQT_SIGNAL(transactionFinished(const LinkStatus *, LinkChecker *)), + this, TQT_SLOT(slotRootChecked(const LinkStatus *, LinkChecker *))); /* - connect(checker, SIGNAL(jobFinnished(LinkChecker *)), - this, SLOT(slotLinkCheckerFinnished(LinkChecker *))); + connect(checker, TQT_SIGNAL(jobFinnished(LinkChecker *)), + this, TQT_SLOT(slotLinkCheckerFinnished(LinkChecker *))); */ checker->check(); } @@ -335,7 +335,7 @@ bool SearchManager::existUrl(KURL const& url, KURL const& url_parent) const Q_ASSERT(tmp); if(tmp->absoluteUrl() == url) { // URL exists - QValueVector referrers(tmp->referrers()); + TQValueVector referrers(tmp->referrers()); // Add new referrer for(uint i = 0; i != referrers.size(); ++i) @@ -352,7 +352,7 @@ bool SearchManager::existUrl(KURL const& url, KURL const& url_parent) const return false; } -LinkStatus const* SearchManager::linkStatus(QString const& s_url) const +LinkStatus const* SearchManager::linkStatus(TQString const& s_url) const { Q_ASSERT(!s_url.isEmpty()); @@ -483,7 +483,7 @@ void SearchManager::checkLinksSimultaneously(vector const& links) LinkStatus* ls(links[i]); Q_ASSERT(ls); - QString protocol = ls->absoluteUrl().protocol(); + TQString protocol = ls->absoluteUrl().protocol(); ++links_being_checked_; Q_ASSERT(links_being_checked_ <= max_simultaneous_connections_); @@ -524,11 +524,11 @@ void SearchManager::checkLinksSimultaneously(vector const& links) 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, TQT_SIGNAL(transactionFinished(const LinkStatus *, LinkChecker *)), + this, TQT_SLOT(slotLinkChecked(const LinkStatus *, LinkChecker *))); /* - connect(checker, SIGNAL(jobFinnished(LinkChecker *)), - this, SLOT(slotLinkCheckerFinnished(LinkChecker *))); + connect(checker, TQT_SIGNAL(jobFinnished(LinkChecker *)), + this, TQT_SLOT(slotLinkCheckerFinnished(LinkChecker *))); */ checker->check(); } @@ -669,8 +669,8 @@ bool SearchManager::localDomain(KURL const& url) const } else { - vector referencia = tokenizeWordsSeparatedBy(domain_, QChar('/')); - vector a_comparar = tokenizeWordsSeparatedBy(url.host() + url.directory(), QChar('/')); + vector referencia = tokenizeWordsSeparatedBy(domain_, TQChar('/')); + vector a_comparar = tokenizeWordsSeparatedBy(url.host() + url.directory(), TQChar('/')); if(a_comparar.size() < referencia.size()) return false; @@ -713,8 +713,8 @@ bool SearchManager::isLocalRestrict(KURL const& url) const if(url_root.hasHost()) { - vector referencia = tokenizeWordsSeparatedBy(domain_, QChar('/')); - vector a_comparar = tokenizeWordsSeparatedBy(url.host() + url.directory(), QChar('/')); + vector referencia = tokenizeWordsSeparatedBy(domain_, TQChar('/')); + vector a_comparar = tokenizeWordsSeparatedBy(url.host() + url.directory(), TQChar('/')); if(a_comparar.size() < referencia.size()) return false; @@ -757,10 +757,10 @@ bool SearchManager::generalDomain() const } else { - vector palavras = tokenizeWordsSeparatedByDots(domain_); + vector palavras = tokenizeWordsSeparatedByDots(domain_); Q_ASSERT(palavras.size() >= 1); // host might be localhost - QString primeira_palavra = palavras[0]; + TQString primeira_palavra = palavras[0]; if(primeira_palavra == "www") { Q_ASSERT(palavras.size() >= 3); @@ -811,7 +811,7 @@ void SearchManager::slotLinkCheckerFinnished(LinkChecker * checker) checker = 0; } -KHTMLPart* SearchManager::htmlPart(QString const& key_url) const +KHTMLPart* SearchManager::htmlPart(TQString const& key_url) const { if(!html_parts_.contains(key_url)) return 0; @@ -819,7 +819,7 @@ KHTMLPart* SearchManager::htmlPart(QString const& key_url) const return html_parts_[key_url]; } -void SearchManager::addHtmlPart(QString const& key_url, KHTMLPart* html_part) +void SearchManager::addHtmlPart(TQString const& key_url, KHTMLPart* html_part) { Q_ASSERT(!key_url.isEmpty()); Q_ASSERT(html_part); @@ -843,10 +843,10 @@ void SearchManager::removeHtmlParts() html_parts_.clear(); } -void SearchManager::save(QDomElement& element) const +void SearchManager::save(TQDomElement& element) const { // - QDomElement child_element = element.ownerDocument().createElement("url"); + TQDomElement child_element = element.ownerDocument().createElement("url"); child_element.appendChild(element.ownerDocument().createTextNode(root_.absoluteUrl().prettyURL())); element.appendChild(child_element); @@ -859,7 +859,7 @@ void SearchManager::save(QDomElement& element) const // child_element = element.ownerDocument().createElement("depth"); child_element.appendChild(element.ownerDocument(). - createTextNode(searchMode() == domain ? QString("Unlimited") : QString::number(depth_))); + createTextNode(searchMode() == domain ? TQString("Unlimited") : TQString::number(depth_))); element.appendChild(child_element); // @@ -899,13 +899,13 @@ void SearchManager::save(QDomElement& element) const } } -QString SearchManager::toXML() const +TQString SearchManager::toXML() const { - QDomDocument doc; + TQDomDocument doc; doc.appendChild(doc.createProcessingInstruction( "xml", "version=\"1.0\" encoding=\"UTF-8\"")); - QDomElement root = doc.createElement("klinkstatus"); + TQDomElement root = doc.createElement("klinkstatus"); doc.appendChild(root); save(root); diff --git a/klinkstatus/src/engine/searchmanager.h b/klinkstatus/src/engine/searchmanager.h index 135d267a..4dc68352 100644 --- a/klinkstatus/src/engine/searchmanager.h +++ b/klinkstatus/src/engine/searchmanager.h @@ -23,11 +23,11 @@ #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include class QDomElement; #include @@ -39,7 +39,7 @@ class QDomElement; using namespace std; -typedef QMap KHTMLPartMap; +typedef TQMap KHTMLPartMap; class SearchManager: public QObject { @@ -54,16 +54,16 @@ public: }; SearchManager(int max_simultaneous_connections = 3, int time_out = 50, - QObject *parent = 0, const char *name = 0); + TQObject *parent = 0, const char *name = 0); ~SearchManager(); - QString toXML() const; - void save(QDomElement& element) const; + TQString toXML() const; + void save(TQDomElement& 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); + KHTMLPart* htmlPart(TQString const& key_url) const; + void addHtmlPart(TQString const& key_url, KHTMLPart* html_part); void removeHtmlParts(); void startSearch(KURL const& root); @@ -78,11 +78,11 @@ public: void setSearchMode(SearchMode modo); void setDepth(int depth); void setExternalDomainDepth(int depth); - void setDomain(QString const& domain); + void setDomain(TQString const& domain); void setCheckParentDirs(bool flag); void setCheckExternalLinks(bool flag); void setCheckRegularExpressions(bool flag); - void setRegularExpression(QString const& reg_exp, bool case_sensitive); + void setRegularExpression(TQString const& reg_exp, bool case_sensitive); void setTimeOut(int time_out); void cleanItems(); @@ -94,9 +94,9 @@ public: 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; + LinkStatus const* linkStatus(TQString const& s_url) const; int checkedLinks() const; - QTime timeElapsed() const; + TQTime timeElapsed() const; bool checkParentDirs() const; bool checkExternalLinks() const; LinkStatus const* linkStatusRoot() const; @@ -104,7 +104,7 @@ public: int timeOut() const; bool sendIdentification() const { return send_identification_; } - QString const& userAgent() const { return user_agent_; } + TQString const& userAgent() const { return user_agent_; } private: @@ -165,19 +165,19 @@ private: int links_being_checked_; int finished_connections_; int maximum_current_connections_; - QRegExp reg_exp_; - QString domain_; + TQRegExp reg_exp_; + TQString domain_; bool general_domain_; bool checked_general_domain_; int time_out_; int current_connections_; bool send_identification_; // user-agent - QString user_agent_; + TQString user_agent_; bool canceled_; bool searching_; int checked_links_; - QTime time_; + TQTime time_; int ignored_links_; bool check_parent_dirs_; bool check_external_links_; diff --git a/klinkstatus/src/engine/searchmanager_impl.h b/klinkstatus/src/engine/searchmanager_impl.h index eaa5e572..e472ccbb 100644 --- a/klinkstatus/src/engine/searchmanager_impl.h +++ b/klinkstatus/src/engine/searchmanager_impl.h @@ -38,11 +38,11 @@ inline int SearchManager::checkedLinks() const return checked_links_; } -inline QTime SearchManager::timeElapsed() const +inline TQTime SearchManager::timeElapsed() const { int ms = time_.elapsed(); //kdDebug(23100) << "Time elapsed (ms): " << ms << endl; - return QTime(0, 0).addMSecs(ms); + return TQTime(0, 0).addMSecs(ms); } inline void SearchManager::startSearch(KURL const& root) @@ -65,7 +65,7 @@ inline void SearchManager::setExternalDomainDepth(int depth) external_domain_depth_ = depth; } -inline void SearchManager::setDomain(QString const& domain) +inline void SearchManager::setDomain(TQString const& domain) { Q_ASSERT(domain.find("http://") == -1); domain_ = domain; @@ -88,9 +88,9 @@ inline void SearchManager::setCheckRegularExpressions(bool flag) check_regular_expressions_ = flag; } -inline void SearchManager::setRegularExpression(QString const& reg_exp, bool case_sensitive) +inline void SearchManager::setRegularExpression(TQString const& reg_exp, bool case_sensitive) { - reg_exp_ = QRegExp(reg_exp, case_sensitive); + reg_exp_ = TQRegExp(reg_exp, case_sensitive); } inline void SearchManager::setTimeOut(int time_out) diff --git a/klinkstatus/src/global.cpp b/klinkstatus/src/global.cpp index 10395f7b..cfbfe910 100644 --- a/klinkstatus/src/global.cpp +++ b/klinkstatus/src/global.cpp @@ -11,8 +11,8 @@ // #include "global.h" -#include -#include +#include +#include #include #include @@ -40,8 +40,8 @@ Global* Global::self() return m_self_; } -Global::Global(QObject *parent, const char *name) - : QObject(parent, name), loop_started_(false) +Global::Global(TQObject *parent, const char *name) + : TQObject(parent, name), loop_started_(false) { m_self_ = this; dcop_client_ = kapp->dcopClient(); @@ -55,7 +55,7 @@ Global::~Global() bool Global::isKLinkStatusEmbeddedInQuanta() { - QCString app_id = "quanta-" + QCString().setNum(getpid()); + TQCString app_id = "quanta-" + TQCString().setNum(getpid()); return self()->dcop_client_->isApplicationRegistered(app_id); } @@ -72,7 +72,7 @@ bool Global::isQuantaAvailableViaDCOP() else { self()->execCommand("ps h -o pid -C quanta -C quanta_be"); - QStringList ps_list = QStringList::split("\n", self()->script_output_); + TQStringList ps_list = TQStringList::split("\n", self()->script_output_); for(uint i = 0; i != ps_list.size(); ++i) { @@ -87,25 +87,25 @@ bool Global::isQuantaAvailableViaDCOP() } } -QCString Global::quantaDCOPAppId() +TQCString Global::quantaDCOPAppId() { DCOPClient* client = kapp->dcopClient(); - QCString app_id; + TQCString 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()); + TQCString app = "quanta-"; + TQCString pid = TQCString().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_); + TQStringList ps_list = TQStringList::split("\n", self()->script_output_); for(uint i = 0; i != ps_list.size(); ++i) { @@ -129,32 +129,32 @@ KURL Global::urlWithQuantaPreviewPrefix(KURL const& url) Q_ASSERT(isKLinkStatusEmbeddedInQuanta()); DCOPRef quanta(Global::quantaDCOPAppId(),"WindowManagerIf"); - QString string_url_with_prefix = quanta.call("urlWithPreviewPrefix", url.url()); + TQString 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) +void Global::openQuanta(TQStringList const& args) { - QString command(args.join(" ")); + TQString command(args.join(" ")); Global::execCommand("quanta " + command); } -void Global::execCommand(QString const& command) +void Global::execCommand(TQString 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); + *(self()->process_PS_) << TQStringList::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*))); + connect( self()->process_PS_, TQT_SIGNAL(receivedStdout(KProcess*,char*,int)), + self(), TQT_SLOT(slotGetScriptOutput(KProcess*,char*,int))); + connect( self()->process_PS_, TQT_SIGNAL(receivedStderr(KProcess*,char*,int)), + self(), TQT_SLOT(slotGetScriptError(KProcess*,char*,int))); + connect( self()->process_PS_, TQT_SIGNAL(processExited(KProcess*)), + self(), TQT_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)) @@ -163,9 +163,9 @@ void Global::execCommand(QString const& command) else { //To avoid lock-ups, start a timer. - QTimer* timer = new QTimer(self()); - connect(timer, SIGNAL(timeout()), - self(), SLOT(slotProcessTimeout())); + TQTimer* timer = new TQTimer(self()); + connect(timer, TQT_SIGNAL(timeout()), + self(), TQT_SLOT(slotProcessTimeout())); timer->start(120*1000, true); self()->loop_started_ = true; kapp->enter_loop(); @@ -175,9 +175,9 @@ void Global::execCommand(QString const& command) void Global::slotGetScriptOutput(KProcess* /*process*/, char* buf, int buflen) { - QCString tmp( buf, buflen + 1 ); - script_output_ = QString::null; - script_output_ = QString::fromLocal8Bit(tmp).remove(" "); + TQCString tmp( buf, buflen + 1 ); + script_output_ = TQString::null; + script_output_ = TQString::fromLocal8Bit(tmp).remove(" "); } void Global::slotGetScriptError(KProcess*, char* buf, int buflen) diff --git a/klinkstatus/src/global.h b/klinkstatus/src/global.h index 2ee2f0c0..6f94c482 100644 --- a/klinkstatus/src/global.h +++ b/klinkstatus/src/global.h @@ -12,7 +12,7 @@ #ifndef GLOBAL_H #define GLOBAL_H -#include +#include class QCString; class DCOPClient; @@ -32,15 +32,15 @@ public: static bool isKLinkStatusEmbeddedInQuanta(); static bool isQuantaRunningAsUnique(); static bool isQuantaAvailableViaDCOP(); - static QCString quantaDCOPAppId(); + static TQCString quantaDCOPAppId(); static KURL urlWithQuantaPreviewPrefix(KURL const& url); //static void setLoopStarted(bool flag); - static void openQuanta(QStringList const& args); + static void openQuanta(TQStringList const& args); private: - Global(QObject *parent = 0, const char *name = 0); - static void execCommand(QString const& command); + Global(TQObject *parent = 0, const char *name = 0); + static void execCommand(TQString const& command); private slots: void slotGetScriptOutput(KProcess* process, char* buffer, int buflen); @@ -53,7 +53,7 @@ private: DCOPClient* dcop_client_; bool loop_started_; - QString script_output_; + TQString script_output_; KProcess* process_PS_; }; diff --git a/klinkstatus/src/klinkstatus.cpp b/klinkstatus/src/klinkstatus.cpp index 7d984f0f..8628cd57 100644 --- a/klinkstatus/src/klinkstatus.cpp +++ b/klinkstatus/src/klinkstatus.cpp @@ -97,7 +97,7 @@ void KLinkStatus::load(const KURL& url) void KLinkStatus::setupActions() { - // KStdAction::quit(kapp, SLOT(quit()), actionCollection()); + // KStdAction::quit(kapp, TQT_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 @@ -113,13 +113,13 @@ void KLinkStatus::setupActions() administration. The easiest solution is to call close() on the mainwindow instead of KApplication::quit()*/ - KStdAction::quit(this, SLOT(close()), actionCollection()); + KStdAction::quit(this, TQT_SLOT(close()), actionCollection()); - //m_toolbarAction = KStdAction::showToolbar(this, SLOT(optionsShowToolbar()), actionCollection()); - //m_statusbarAction = KStdAction::showStatusbar(this, SLOT(optionsShowStatusbar()), actionCollection()); + //m_toolbarAction = KStdAction::showToolbar(this, TQT_SLOT(optionsShowToolbar()), actionCollection()); + //m_statusbarAction = KStdAction::showStatusbar(this, TQT_SLOT(optionsShowStatusbar()), actionCollection()); - KStdAction::keyBindings(this, SLOT(optionsConfigureKeys()), actionCollection()); - KStdAction::configureToolbars(this, SLOT(optionsConfigureToolbars()), actionCollection()); + KStdAction::keyBindings(this, TQT_SLOT(optionsConfigureKeys()), actionCollection()); + KStdAction::configureToolbars(this, TQT_SLOT(optionsConfigureToolbars()), actionCollection()); } void KLinkStatus::setupPartActions() @@ -137,7 +137,7 @@ void KLinkStatus::removeDuplicatedActions() 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 + TQWidget* 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); @@ -184,8 +184,8 @@ void KLinkStatus::optionsConfigureKeys() //KKeyDialog::configure(actionCollection()); KKeyDialog dlg( false, this ); - QPtrList clients = guiFactory()->clients(); - for( QPtrListIterator it( clients ); + TQPtrList clients = guiFactory()->clients(); + for( TQPtrListIterator it( clients ); it.current(); ++it ) { dlg.insert( (*it)->actionCollection() ); @@ -199,8 +199,8 @@ void KLinkStatus::optionsConfigureToolbars() // use the standard toolbar editor KEditToolbar dlg(factory()); - connect(&dlg, SIGNAL(newToolbarConfig()), - this, SLOT(applyNewToolbarConfig())); + connect(&dlg, TQT_SIGNAL(newToolbarConfig()), + this, TQT_SLOT(applyNewToolbarConfig())); dlg.exec(); } diff --git a/klinkstatus/src/klinkstatus_part.cpp b/klinkstatus/src/klinkstatus_part.cpp index cf04df7a..6d8df6a8 100644 --- a/klinkstatus/src/klinkstatus_part.cpp +++ b/klinkstatus/src/klinkstatus_part.cpp @@ -35,7 +35,7 @@ #include #include -#include +#include #include "global.h" #include "cfg/klsconfig.h" @@ -55,9 +55,9 @@ const char KLinkStatusPart::version_[] = "0.3.2"; typedef KParts::GenericFactory KLinkStatusFactory; K_EXPORT_COMPONENT_FACTORY( libklinkstatuspart, KLinkStatusFactory ) -KLinkStatusPart::KLinkStatusPart(QWidget *parentWidget, const char *widgetName, - QObject *parent, const char *name, - const QStringList & /*string_list*/) +KLinkStatusPart::KLinkStatusPart(TQWidget *parentWidget, const char *widgetName, + TQObject *parent, const char *name, + const TQStringList & /*string_list*/) : KParts::ReadOnlyPart(parent, name), m_dlgAbout(0) { setInstance(KLinkStatusFactory::instance()); @@ -132,7 +132,7 @@ void KLinkStatusPart::slotNewLinkCheck() void KLinkStatusPart::slotOpenLink() { - QString file_name = KFileDialog::getOpenURL().url(); + TQString file_name = KFileDialog::getOpenURL().url(); if (file_name.isEmpty() == false) { @@ -153,7 +153,7 @@ void KLinkStatusPart::slotConfigureKLinkStatus() dialog->addPage(new ConfigIdentificationDialog(0), i18n("Identification"), "agent", i18n("Configure the way KLinkstatus reports itself")); dialog->show(); - connect(dialog, SIGNAL(settingsChanged()), tabwidget_, SLOT(slotLoadSettings())); + connect(dialog, TQT_SIGNAL(settingsChanged()), tabwidget_, TQT_SLOT(slotLoadSettings())); } void KLinkStatusPart::slotAbout() diff --git a/klinkstatus/src/klinkstatus_part.h b/klinkstatus/src/klinkstatus_part.h index b32c8675..857a6a93 100644 --- a/klinkstatus/src/klinkstatus_part.h +++ b/klinkstatus/src/klinkstatus_part.h @@ -38,9 +38,9 @@ class KLinkStatusPart: public KParts::ReadOnlyPart { Q_OBJECT public: - KLinkStatusPart(QWidget *parentWidget, const char *widgetName, - QObject *parent, const char *name, - const QStringList& args); + KLinkStatusPart(TQWidget *parentWidget, const char *widgetName, + TQObject *parent, const char *name, + const TQStringList& args); virtual ~KLinkStatusPart(); /** Reimplemented to disable and enable Save action */ diff --git a/klinkstatus/src/parser/htmlparser.cpp b/klinkstatus/src/parser/htmlparser.cpp index 6bc93761..557d0d25 100644 --- a/klinkstatus/src/parser/htmlparser.cpp +++ b/klinkstatus/src/parser/htmlparser.cpp @@ -24,7 +24,7 @@ #include -HtmlParser::HtmlParser(QString const& documento) +HtmlParser::HtmlParser(TQString const& documento) : is_content_type_set_(false), document_(documento) { Q_ASSERT(!documento.isEmpty()); @@ -75,16 +75,16 @@ NodeTITLE const& HtmlParser::title() const return node_TITLE_; } -vector const& HtmlParser::parseNodesOfType(QString const& element) +vector const& HtmlParser::parseNodesOfType(TQString const& element) { HtmlParser::parseNodesOfType(element, document_, aux_); return aux_; } -void HtmlParser::parseNodesOfType(QString const& tipo, QString const& document, vector& nodes) +void HtmlParser::parseNodesOfType(TQString const& tipo, TQString const& document, vector& nodes) { - QString node; - QString doc(document); + TQString node; + TQString doc(document); int inicio = 0, fim = 0; nodes.clear(); @@ -100,7 +100,7 @@ void HtmlParser::parseNodesOfType(QString const& tipo, QString const& document, //if( (doc[inicio] != ' ' && doc[inicio] != '\n' && doc[inicio] != '\r') ) if(!::isSpace(doc[inicio])) { - doc.remove(0, QString("<" + tipo).length()); + doc.remove(0, TQString("<" + tipo).length()); continue; } @@ -118,7 +118,7 @@ void HtmlParser::parseNodesOfType(QString const& tipo, QString const& document, continue; } - int tag_begining_go_back = (tipo.length() + QString("<").length()); + int tag_begining_go_back = (tipo.length() + TQString("<").length()); node = doc.mid(inicio - tag_begining_go_back, fim - inicio + tag_begining_go_back); nodes.push_back(node); @@ -126,7 +126,7 @@ void HtmlParser::parseNodesOfType(QString const& tipo, QString const& document, } } -int HtmlParser::endOfTag(QString const& s, int index, QChar end_of_tag) +int HtmlParser::endOfTag(TQString const& s, int index, TQChar end_of_tag) { if( (uint)index >= s.length() ) return -1; @@ -167,9 +167,9 @@ vector const& HtmlParser::nodes() const void HtmlParser::parseNodesOfTypeA() { - vector const& aux = parseNodesOfType("A"); + vector const& aux = parseNodesOfType("A"); - for(vector::size_type i = 0; i != aux.size(); ++i) + for(vector::size_type i = 0; i != aux.size(); ++i) { nodes_.push_back( new NodeA(aux[i]) ); } @@ -177,9 +177,9 @@ void HtmlParser::parseNodesOfTypeA() void HtmlParser::parseNodesOfTypeAREA() { - vector const& aux = parseNodesOfType("AREA"); + vector const& aux = parseNodesOfType("AREA"); - for(vector::size_type i = 0; i != aux.size(); ++i) + for(vector::size_type i = 0; i != aux.size(); ++i) { nodes_.push_back( new NodeAREA(aux[i]) ); } @@ -187,72 +187,72 @@ void HtmlParser::parseNodesOfTypeAREA() void HtmlParser::parseNodesOfTypeLINK() { - vector const& aux = parseNodesOfType("LINK"); + vector const& aux = parseNodesOfType("LINK"); - for(vector::size_type i = 0; i != aux.size(); ++i) + for(vector::size_type i = 0; i != aux.size(); ++i) nodes_.push_back( new NodeLINK(aux[i]) ); } void HtmlParser::parseNodesOfTypeMETA() { - vector const& aux = parseNodesOfType("META"); + vector const& aux = parseNodesOfType("META"); - for(vector::size_type i = 0; i != aux.size(); ++i) + for(vector::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()) { + if(!is_content_type_set_ && node->atributoHTTP_EQUIV().lower() == TQString("Content-Type").lower()) { is_content_type_set_ = true; node_META_content_type_.setNode(aux[i]); } } } -QString HtmlParser::findCharsetInMetaElement(QString const& html) +TQString HtmlParser::findCharsetInMetaElement(TQString const& html) { - vector metaTags; + vector metaTags; parseNodesOfType("META", html, metaTags); - for(vector::size_type i = 0; i != metaTags.size(); ++i) + for(vector::size_type i = 0; i != metaTags.size(); ++i) { NodeMETA node(metaTags[i]); - if(node.atributoHTTP_EQUIV().lower() == QString("Content-Type").lower()) { + if(node.atributoHTTP_EQUIV().lower() == TQString("Content-Type").lower()) { return node.charset(); } } - return QString(); + return TQString(); } void HtmlParser::parseNodesOfTypeIMG() { - vector const& aux = parseNodesOfType("IMG"); + vector const& aux = parseNodesOfType("IMG"); - for(vector::size_type i = 0; i != aux.size(); ++i) + for(vector::size_type i = 0; i != aux.size(); ++i) nodes_.push_back( new NodeIMG(aux[i]) ); } void HtmlParser::parseNodesOfTypeFRAME() { - vector const& aux = parseNodesOfType("FRAME"); + vector const& aux = parseNodesOfType("FRAME"); - for(vector::size_type i = 0; i != aux.size(); ++i) + for(vector::size_type i = 0; i != aux.size(); ++i) nodes_.push_back( new NodeFRAME(aux[i]) ); } void HtmlParser::parseNodesOfTypeIFRAME() { - vector const& aux = parseNodesOfType("IFRAME"); + vector const& aux = parseNodesOfType("IFRAME"); - for(vector::size_type i = 0; i != aux.size(); ++i) + for(vector::size_type i = 0; i != aux.size(); ++i) nodes_.push_back( new NodeFRAME(aux[i]) ); } void HtmlParser::parseNodesOfTypeBASE() { - QString node; - QString doc = document_; + TQString node; + TQString doc = document_; int inicio = 0, fim = 0; inicio = findSeparableWord(doc, ""); @@ -289,8 +289,8 @@ void HtmlParser::parseNodesOfTypeTITLE() void HtmlParser::stripComments() { - QString begin_comment = ""; + TQString begin_comment = ""; uint const begin_comment_length = begin_comment.length(); int inicio = -1; @@ -319,8 +319,8 @@ void HtmlParser::stripComments() void HtmlParser::stripScriptContent() { int inicio = -1; - QString const begin_script = " +#include #include @@ -42,7 +42,7 @@ class HtmlParser public: HtmlParser(); - HtmlParser(QString const& documento); + HtmlParser(TQString const& documento); ~HtmlParser(); vector const& nodes() const; @@ -58,18 +58,18 @@ public: * Convenience function for performance as it only parse in order * to get the charset. */ - static QString findCharsetInMetaElement(QString const& html); + static TQString findCharsetInMetaElement(TQString const& html); // test: void mostra() const; private: - vector const& parseNodesOfType(QString const& element); + vector const& parseNodesOfType(TQString const& element); /** * Vector nodes passed for performance. */ - static void parseNodesOfType(QString const& element, QString const& doc, vector& nodes); + static void parseNodesOfType(TQString const& element, TQString const& doc, vector& nodes); void parseNodesOfTypeA(); void parseNodesOfTypeAREA(); @@ -89,20 +89,20 @@ private: e.g. endOfTag(" luck\">") => 22 (not 15) */ - static int endOfTag(QString const& s, int index = 0, QChar end_of_tag = '>'); + static int endOfTag(TQString const& s, int index = 0, TQChar end_of_tag = '>'); private: - vector aux_; // for what the hell is this? looks ugly... maybe I was drunk, can't remember + vector aux_; // for what the hell is this? looks ugly... maybe I was drunk, can't remember vector 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_; + TQString document_; + TQString script_; // Fica aqui guardado (JavaScript, etc) + TQString comments_; }; diff --git a/klinkstatus/src/parser/http.cpp b/klinkstatus/src/parser/http.cpp index 1133c937..6e086739 100644 --- a/klinkstatus/src/parser/http.cpp +++ b/klinkstatus/src/parser/http.cpp @@ -29,7 +29,7 @@ void HttpResponseHeader::parseLocation() { - QString cabecalho(toString()); + TQString cabecalho(toString()); int location = findWord(cabecalho, "Location: "); Q_ASSERT(location != -1); @@ -55,25 +55,25 @@ void HttpResponseHeader::parseLocation() location_ = cabecalho.mid(location, fim_de_linha - location); } -QString HttpResponseHeader::charset() const +TQString HttpResponseHeader::charset() const { return HttpResponseHeader::charset(value("content-type")); } -QString HttpResponseHeader::charset(QString const& contentTypeHttpHeaderLine) +TQString HttpResponseHeader::charset(TQString const& contentTypeHttpHeaderLine) { - QString _charset; + TQString _charset; if(contentTypeHttpHeaderLine.isEmpty()) return _charset; int index = contentTypeHttpHeaderLine.find("charset="); if(index != -1) - index += QString("charset=").length(); + index += TQString("charset=").length(); else { index = contentTypeHttpHeaderLine.find("charset:"); if(index != -1) - index += QString("charset:").length(); + index += TQString("charset:").length(); } if(index != -1) { diff --git a/klinkstatus/src/parser/http.h b/klinkstatus/src/parser/http.h index 5878cfd1..b955d25d 100644 --- a/klinkstatus/src/parser/http.h +++ b/klinkstatus/src/parser/http.h @@ -21,8 +21,8 @@ #ifndef HTTP_H #define HTTP_H -#include -#include +#include +#include class HttpResponseHeader: public QHttpResponseHeader @@ -30,39 +30,39 @@ class HttpResponseHeader: public QHttpResponseHeader public: HttpResponseHeader(); - HttpResponseHeader(const QHttpResponseHeader & header); - HttpResponseHeader(QString const& str); + HttpResponseHeader(const TQHttpResponseHeader & header); + HttpResponseHeader(TQString const& str); virtual ~HttpResponseHeader(); void parseLocation(); - QString const& location() const; - QString charset() const; + TQString const& location() const; + TQString 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); + static TQString charset(TQString const& contentTypeHttpHeaderLine); private: - QString location_; + TQString location_; }; inline HttpResponseHeader::HttpResponseHeader() - : QHttpResponseHeader() + : TQHttpResponseHeader() { } -inline HttpResponseHeader::HttpResponseHeader(const QHttpResponseHeader & /*header*/) - : QHttpResponseHeader() +inline HttpResponseHeader::HttpResponseHeader(const TQHttpResponseHeader & /*header*/) + : TQHttpResponseHeader() { } -inline HttpResponseHeader::HttpResponseHeader(QString const& str) - : QHttpResponseHeader() +inline HttpResponseHeader::HttpResponseHeader(TQString const& str) + : TQHttpResponseHeader() { parse(str); } @@ -71,7 +71,7 @@ inline HttpResponseHeader::~HttpResponseHeader() { } -inline QString const& HttpResponseHeader::location() const +inline TQString const& HttpResponseHeader::location() const { return location_; } diff --git a/klinkstatus/src/parser/mstring.cpp b/klinkstatus/src/parser/mstring.cpp index 114d6dc6..aa2cdec7 100644 --- a/klinkstatus/src/parser/mstring.cpp +++ b/klinkstatus/src/parser/mstring.cpp @@ -26,7 +26,7 @@ using namespace std; -int findWord(QString const& s, QString const& palavra, uint a_partir_do_indice) +int findWord(TQString const& s, TQString const& palavra, uint a_partir_do_indice) { int indice = s.find(palavra, a_partir_do_indice, false); @@ -36,7 +36,7 @@ int findWord(QString const& s, QString const& palavra, uint a_partir_do_indice) return (indice + palavra.length()); } -int findChar(QString const& s, QChar letra, uint a_partir_do_indice) +int findChar(TQString const& s, TQChar letra, uint a_partir_do_indice) { int index = s.find(letra, a_partir_do_indice, false); if(index == -1) @@ -48,10 +48,10 @@ int findChar(QString const& s, QChar letra, uint a_partir_do_indice) /** The string palavra, must not have any spaces. */ -int findSeparableWord(QString const& s_, QString const& palavra, uint a_partir_do_indice) +int findSeparableWord(TQString const& s_, TQString const& palavra, uint a_partir_do_indice) { bool encontrou = true; - QString s(s_); + TQString s(s_); uint indice_palavra = 0; int indice = a_partir_do_indice; @@ -88,7 +88,7 @@ int findSeparableWord(QString const& s_, QString const& palavra, uint a_partir_d return -1; } -int nextNonSpaceChar(QString const& s, uint i) +int nextNonSpaceChar(TQString const& s, uint i) { ++i; // while( (s[i] == ' ' || s[i] == '\t' || s[i] == '\r' || s[i] == '\n') @@ -107,7 +107,7 @@ int nextNonSpaceChar(QString const& s, uint i) e.g. nextSpaceChar("o biltre") => 1 */ -int nextSpaceChar(QString const& s, uint i) +int nextSpaceChar(TQString const& s, uint i) { //while( (s[i] != ' ' && s[i] != '\r' && s[i] != '\n' && s[i] != '\t') && //i < s.size() ) @@ -121,7 +121,7 @@ int nextSpaceChar(QString const& s, uint i) return -1; } -int nextCharDifferentThan(QChar c, QString const& s, uint i) +int nextCharDifferentThan(TQChar c, TQString const& s, uint i) { while(i < s.length() && s[i] == c) ++i; @@ -132,10 +132,10 @@ int nextCharDifferentThan(QChar c, QString const& s, uint i) return -1; } -vector tokenize(QString s) +vector tokenize(TQString s) { Q_ASSERT(!s.isEmpty()); - vector v; + vector v; while(true) { @@ -154,22 +154,22 @@ vector tokenize(QString s) } else { - QString palavra = s.mid(inicio, fim - inicio); + TQString palavra = s.mid(inicio, fim - inicio); v.push_back(palavra); s.remove(0, fim); } } } -vector tokenizeWordsSeparatedByDots(QString s) +vector tokenizeWordsSeparatedByDots(TQString s) { - vector v; + vector v; while(true) { int inicio = 0; if(s[0] == '.') - inicio = nextCharDifferentThan(QChar('.'), s, 0); + inicio = nextCharDifferentThan(TQChar('.'), s, 0); if(inicio == -1) return v; @@ -181,16 +181,16 @@ vector tokenizeWordsSeparatedByDots(QString s) } else { - QString palavra = s.mid(inicio, fim - inicio); + TQString palavra = s.mid(inicio, fim - inicio); v.push_back(palavra); s.remove(0, fim); } } } -vector tokenizeWordsSeparatedBy(QString s, QChar criteria) +vector tokenizeWordsSeparatedBy(TQString s, TQChar criteria) { - vector v; + vector v; while(true) { @@ -208,7 +208,7 @@ vector tokenizeWordsSeparatedBy(QString s, QChar criteria) } else { - QString palavra = s.mid(inicio, fim - inicio); + TQString palavra = s.mid(inicio, fim - inicio); v.push_back(palavra); s.remove(0, fim); } diff --git a/klinkstatus/src/parser/mstring.h b/klinkstatus/src/parser/mstring.h index cd359c7d..198850db 100644 --- a/klinkstatus/src/parser/mstring.h +++ b/klinkstatus/src/parser/mstring.h @@ -21,7 +21,7 @@ #ifndef STRING_H #define STRING_H -#include +#include #include #include @@ -37,14 +37,14 @@ typedef unsigned int uint; e.g. findWord("Biltre larvado", "biltre") => 6 */ -int findWord(QString const& s, QString const& palavra, uint a_partir_do_indice = 0); +int findWord(TQString const& s, TQString 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); +int findChar(TQString const& s, TQChar letra, uint a_partir_do_indice = 0); /** Same as findWord but non space chars are eliminated. @@ -55,70 +55,70 @@ int findChar(QString const& s, QChar letra, uint a_partir_do_indice = 0); findWord("<\na href="">", " -1 findSeparableWord("<\na href="">", " 3 */ -int findSeparableWord(QString const& s, QString const& palavra, uint a_partir_do_indice = 0); +int findSeparableWord(TQString const& s, TQString 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); +bool isSpace(TQChar 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 nextNonSpaceChar(TQString const& s, uint i); +int nextNonSpaceCharReverse(TQString const& s, uint i); +int nextSpaceChar(TQString const& s, uint i); -int nextCharDifferentThan(QChar c, QString const& s, uint i); +int nextCharDifferentThan(TQChar c, TQString const& s, uint i); /** Return a vector with the words */ -std::vector tokenize(QString s); -std::vector tokenizeWordsSeparatedByDots(QString s); -std::vector tokenizeWordsSeparatedBy(QString s, QChar criteria); +std::vector tokenize(TQString s); +std::vector tokenizeWordsSeparatedByDots(TQString s); +std::vector tokenizeWordsSeparatedBy(TQString s, TQChar 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); +TQString simplifyWhiteSpace(TQString const& s); /** If char 'caractere' is the last in the string 's' it is removed */ -void removeLastCharIfExists(QString& s, QChar caractere); +void removeLastCharIfExists(TQString& s, TQChar caractere); -QString upperCase(QString const& s); -QString lowerCase(QString const& s); +TQString upperCase(TQString const& s); +TQString lowerCase(TQString const& s); /** Remove whitespaces from the end of the string */ -void stripWhiteSpaceFromTheEnd(QString& s); +void stripWhiteSpaceFromTheEnd(TQString& s); /** Returns a string that has whitespace removed from the start and the end. */ -void stripWhiteSpace(QString& s); +void stripWhiteSpace(TQString& s); /** Case insensitive comparisons */ -bool equal(QString const& s1, QString const& s2); -bool notEqual(QString const& s1, QString const& s2); +bool equal(TQString const& s1, TQString const& s2); +bool notEqual(TQString const& s1, TQString const& s2); -bool equal(QChar c1, QChar c2); -bool notEqual(QChar c1, QChar c2); +bool equal(TQChar c1, TQChar c2); +bool notEqual(TQChar c1, TQChar c2); //_________________________________________________________________________ -inline bool isSpace(QChar c) +inline bool isSpace(TQChar c) { return c.isSpace(); } -inline bool equal(QString const& s1, QString const& s2) +inline bool equal(TQString const& s1, TQString const& s2) { if(s1 == s2) return true; @@ -126,44 +126,44 @@ inline bool equal(QString const& s1, QString const& s2) return s1.lower() == s2.lower(); } -inline bool notEqual(QString const& s1, QString const& s2) +inline bool notEqual(TQString const& s1, TQString const& s2) { return !(equal(s1, s2)); } -inline bool equal(QChar c1, QChar c2) +inline bool equal(TQChar c1, TQChar c2) { return c1.lower() == c2.lower(); } -inline bool notEqual(QChar c1, QChar c2) +inline bool notEqual(TQChar c1, TQChar c2) { return !(equal(c1, c2)); } -inline QString upperCase(QString const& s) +inline TQString upperCase(TQString const& s) { return s.upper(); } -inline QString lowerCase(QString const& s) +inline TQString lowerCase(TQString const& s) { return s.lower(); } -inline QString simplifyWhiteSpace(QString const& s) +inline TQString simplifyWhiteSpace(TQString const& s) { return s.simplifyWhiteSpace(); } -inline void removeLastCharIfExists(QString& s, QChar caractere) +inline void removeLastCharIfExists(TQString& s, TQChar caractere) { int index = s.length() - 1; if(s[index] == caractere) s.remove(index); } -inline void stripWhiteSpace(QString& s) +inline void stripWhiteSpace(TQString& s) { s = s.stripWhiteSpace(); } diff --git a/klinkstatus/src/parser/node.cpp b/klinkstatus/src/parser/node.cpp index 068184ae..cb5fdec4 100644 --- a/klinkstatus/src/parser/node.cpp +++ b/klinkstatus/src/parser/node.cpp @@ -28,9 +28,9 @@ Node________________________________________________________________________ */ -QString Node::getAttribute(QString const& atributo) +TQString Node::getAttribute(TQString const& atributo) { - QString attribute_; + TQString attribute_; int fim = - 1; bool tem_aspas_ou_plicas = false; @@ -140,7 +140,7 @@ void NodeLink::parseLinkLabel() fim_tag = content_.find(">", fim_tag); if(fim_tag != -1) - proximo_caractere = QChar(content_[++fim_tag]); + proximo_caractere = TQChar(content_[++fim_tag]); } while(fim_tag != -1 && proximo_caractere == '<'/*If the label starts by <*/); @@ -198,10 +198,10 @@ void NodeMETA::parseAttributeURL() } } -QString NodeMETA::charset() const +TQString NodeMETA::charset() const { - QString charset; - QString content(atributoCONTENT()); + TQString charset; + TQString content(atributoCONTENT()); if(content.isEmpty()) return charset; @@ -209,7 +209,7 @@ QString NodeMETA::charset() const int index = content.find("charset="); if(index != -1) { - index += QString("charset=").length(); + index += TQString("charset=").length(); charset = content.mid(index, content.length() - index); charset = charset.stripWhiteSpace(); } diff --git a/klinkstatus/src/parser/node.h b/klinkstatus/src/parser/node.h index 1d0b1fc3..0452c219 100644 --- a/klinkstatus/src/parser/node.h +++ b/klinkstatus/src/parser/node.h @@ -23,7 +23,7 @@ #include "mstring.h" -#include +#include #include #include @@ -55,18 +55,18 @@ public: }; Node(); - Node(QString const& content); + Node(TQString 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); + TQString getAttribute(TQString const& atributo); + virtual TQString const& url() const = 0; + virtual TQString const& linkLabel() const = 0; // URL label + virtual void setNode(TQString const& content); virtual void parse() = 0; void setMalformed(bool flag = true); virtual void setLinkType(LinkType const& lt); - QString const& content() const; + TQString const& content() const; bool malformed() const; LinkType linkType() const; Element element() const; @@ -78,8 +78,8 @@ protected: Element element_; LinkType linktype_; - QString link_label_; - QString content_; + TQString link_label_; + TQString content_; bool is_redirection_; bool malformed_; }; @@ -89,16 +89,16 @@ class NodeLink: public Node { public: NodeLink(); - NodeLink(QString const& content); + NodeLink(TQString const& content); ~NodeLink() {} ; virtual void parse(); - virtual QString const& url() const; - virtual QString const& linkLabel() const; // URL label - virtual QString mailto() const; + virtual TQString const& url() const; + virtual TQString const& linkLabel() const; // URL label + virtual TQString mailto() const; virtual bool isLink() const; private: @@ -106,17 +106,17 @@ private: void parseLinkLabel(); private: - QString attribute_href_; + TQString attribute_href_; }; class NodeA: public NodeLink { public: - NodeA(QString const& content); + NodeA(TQString const& content); ~NodeA() {} ; - QString const& attributeNAME() const; + TQString const& attributeNAME() const; virtual void parse(); @@ -124,16 +124,16 @@ private: void parseAttributeNAME(); private: - QString attribute_name_; + TQString attribute_name_; }; class NodeAREA: public NodeLink { public: - NodeAREA(QString const& content); + NodeAREA(TQString const& content); ~NodeAREA() {}; - QString const& attributeTITLE() const; + TQString const& attributeTITLE() const; virtual void parse(); @@ -141,14 +141,14 @@ private: void parseAttributeTITLE(); private: - QString attribute_title_; + TQString attribute_title_; }; class NodeLINK: public NodeLink { public: - NodeLINK(QString const& content); + NodeLINK(TQString const& content); ~NodeLINK() {} ; @@ -158,18 +158,18 @@ class NodeMETA: public Node { public: NodeMETA(); - NodeMETA(QString const& content); + NodeMETA(TQString const& content); ~NodeMETA() {} ; - virtual QString const& url() const; - virtual const QString& linkLabel() const; + virtual TQString const& url() const; + virtual const TQString& linkLabel() const; virtual bool isLink() const; - QString const& atributoHTTP_EQUIV() const; - QString const& atributoNAME() const; - QString const& atributoCONTENT() const; - QString charset() const; + TQString const& atributoHTTP_EQUIV() const; + TQString const& atributoNAME() const; + TQString const& atributoCONTENT() const; + TQString charset() const; bool isRedirection() const; virtual void parse(); @@ -187,24 +187,24 @@ private: void parseAttributeCONTENT(); private: - QString attribute_http_equiv_; - QString attribute_url_; - QString attribute_name_; - QString attribute_content_; + TQString attribute_http_equiv_; + TQString attribute_url_; + TQString attribute_name_; + TQString attribute_content_; }; class NodeIMG: public Node { public: - NodeIMG(QString const& content); + NodeIMG(TQString const& content); ~NodeIMG() {} ; virtual void parse(); - virtual QString const& url() const; - virtual QString const& linkLabel() const; // Image label + virtual TQString const& url() const; + virtual TQString const& linkLabel() const; // Image label virtual bool isLink() const; private: @@ -213,36 +213,36 @@ private: void parseAttributeALT(); private: - QString attribute_src_; - QString attribute_title_; - QString attribute_alt_; + TQString attribute_src_; + TQString attribute_title_; + TQString attribute_alt_; }; class NodeFRAME: public Node { public: - NodeFRAME(QString const& content); + NodeFRAME(TQString const& content); ~NodeFRAME() {} ; virtual void parse(); - virtual QString const& url() const; - virtual QString const& linkLabel() const; + virtual TQString const& url() const; + virtual TQString const& linkLabel() const; virtual bool isLink() const; private: void parseAttributeSRC(); private: - QString attribute_src_; + TQString attribute_src_; }; class NodeBASE: public NodeLink { public: NodeBASE(); - NodeBASE(QString const& content); + NodeBASE(TQString const& content); ~NodeBASE() {} ; @@ -254,23 +254,23 @@ class NodeTITLE: public Node { public: NodeTITLE(); - NodeTITLE(QString const& content); + NodeTITLE(TQString const& content); ~NodeTITLE() {} ; - virtual QString const& url() const; - virtual QString const& linkLabel() const; + virtual TQString const& url() const; + virtual TQString const& linkLabel() const; virtual void parse(); virtual bool isLink() const; - QString const& attributeTITLE() const; + TQString const& attributeTITLE() const; private: void parseAttributeTITLE(); private: - QString attribute_title_; + TQString attribute_title_; }; diff --git a/klinkstatus/src/parser/node_impl.h b/klinkstatus/src/parser/node_impl.h index 51249075..97224bd5 100644 --- a/klinkstatus/src/parser/node_impl.h +++ b/klinkstatus/src/parser/node_impl.h @@ -27,17 +27,17 @@ inline Node::~Node() //kdDebug(23100) << "/"; } -inline Node::Node(QString const& content) +inline Node::Node(TQString const& content) : content_(content), is_redirection_(false), malformed_(false) {} -inline void Node::setNode(QString const& content) +inline void Node::setNode(TQString const& content) { content_ = content; parse(); } -inline QString const& Node::content() const +inline TQString const& Node::content() const { return content_; } @@ -78,7 +78,7 @@ inline NodeLink::NodeLink() : Node() {} -inline NodeLink::NodeLink(QString const& content) +inline NodeLink::NodeLink(TQString const& content) : Node(content) { parse(); @@ -89,21 +89,21 @@ inline void NodeLink::parse() parseAttributeHREF(); } -inline QString const& NodeLink::url() const +inline TQString const& NodeLink::url() const { return attribute_href_; } -inline QString const& NodeLink::linkLabel() const +inline TQString const& NodeLink::linkLabel() const { return link_label_; } -inline QString NodeLink::mailto() const +inline TQString NodeLink::mailto() const { Q_ASSERT(linktype_ == Node::mailto); - QString href = KCharsets::resolveEntities(attribute_href_); + TQString href = KCharsets::resolveEntities(attribute_href_); int inicio = findWord(href, "MAILTO:"); Q_ASSERT(inicio != -1); @@ -121,14 +121,14 @@ inline bool NodeLink::isLink() const // class NodeA_______________________________________________________ -inline NodeA::NodeA(QString const& content) +inline NodeA::NodeA(TQString const& content) : NodeLink(content) { element_ = A; parse(); } -inline QString const& NodeA::attributeNAME() const +inline TQString const& NodeA::attributeNAME() const { return attribute_name_; } @@ -146,14 +146,14 @@ inline void NodeA::parseAttributeNAME() // class NodeAREA_______________________________________________________ -inline NodeAREA::NodeAREA(QString const& content) +inline NodeAREA::NodeAREA(TQString const& content) : NodeLink(content) { element_ = AREA; parse(); } -inline QString const& NodeAREA::attributeTITLE() const +inline TQString const& NodeAREA::attributeTITLE() const { return attribute_title_; } @@ -171,7 +171,7 @@ inline void NodeAREA::parseAttributeTITLE() // class NodeLINK________________________________________ -inline NodeLINK::NodeLINK(QString const& content) +inline NodeLINK::NodeLINK(TQString const& content) : NodeLink(content) { element_ = LINK; @@ -185,19 +185,19 @@ inline NodeMETA::NodeMETA() element_ = META; } -inline NodeMETA::NodeMETA(QString const& content) +inline NodeMETA::NodeMETA(TQString const& content) : Node(content) { element_ = META; parse(); } -inline QString const& NodeMETA::url() const +inline TQString const& NodeMETA::url() const { return attribute_url_; } -inline const QString& NodeMETA::linkLabel() const +inline const TQString& NodeMETA::linkLabel() const { return link_label_; } @@ -214,17 +214,17 @@ inline bool NodeMETA::isLink() const return false; } -inline QString const& NodeMETA::atributoHTTP_EQUIV() const +inline TQString const& NodeMETA::atributoHTTP_EQUIV() const { return attribute_http_equiv_; } -inline QString const& NodeMETA::atributoNAME() const +inline TQString const& NodeMETA::atributoNAME() const { return attribute_name_; } -inline QString const& NodeMETA::atributoCONTENT() const +inline TQString const& NodeMETA::atributoCONTENT() const { return attribute_content_; } @@ -263,7 +263,7 @@ inline void NodeMETA::parseAttributeCONTENT() // class NodeIMG________________________________________ -inline NodeIMG::NodeIMG(QString const& content) +inline NodeIMG::NodeIMG(TQString const& content) : Node(content) { element_ = IMG; @@ -277,12 +277,12 @@ inline void NodeIMG::parse() parseAttributeALT(); } -inline QString const& NodeIMG::url() const +inline TQString const& NodeIMG::url() const { return attribute_src_; } -inline QString const& NodeIMG::linkLabel() const +inline TQString const& NodeIMG::linkLabel() const { if(!attribute_title_.isEmpty()) return attribute_title_; @@ -311,7 +311,7 @@ inline void NodeIMG::parseAttributeALT() // class NodeFRAME________________________________________ -inline NodeFRAME::NodeFRAME(QString const& content) +inline NodeFRAME::NodeFRAME(TQString const& content) : Node(content) { element_ = FRAME; @@ -323,12 +323,12 @@ inline void NodeFRAME::parse() parseAttributeSRC(); } -inline QString const& NodeFRAME::url() const +inline TQString const& NodeFRAME::url() const { return attribute_src_; } -inline QString const& NodeFRAME::linkLabel() const +inline TQString const& NodeFRAME::linkLabel() const { return link_label_; } @@ -349,7 +349,7 @@ inline NodeBASE::NodeBASE() element_ = BASE; } -inline NodeBASE::NodeBASE(QString const& content) +inline NodeBASE::NodeBASE(TQString const& content) : NodeLink(content) { element_ = BASE; @@ -369,21 +369,21 @@ inline NodeTITLE::NodeTITLE() parse(); } -inline NodeTITLE::NodeTITLE(QString const& content) +inline NodeTITLE::NodeTITLE(TQString const& content) : Node(content) { element_ = TITLE; parse(); } -inline QString const& NodeTITLE::url() const +inline TQString const& NodeTITLE::url() const { - return QString::null; + return TQString::null; } -inline QString const& NodeTITLE::linkLabel() const +inline TQString const& NodeTITLE::linkLabel() const { - return QString::null; + return TQString::null; } inline void NodeTITLE::parse() @@ -396,7 +396,7 @@ inline bool NodeTITLE::isLink() const return false; } -inline QString const& NodeTITLE::attributeTITLE() const +inline TQString const& NodeTITLE::attributeTITLE() const { return attribute_title_; } diff --git a/klinkstatus/src/parser/url.cpp b/klinkstatus/src/parser/url.cpp index f7f1f6f8..966bd509 100644 --- a/klinkstatus/src/parser/url.cpp +++ b/klinkstatus/src/parser/url.cpp @@ -27,9 +27,9 @@ #include -Node::LinkType Url::resolveLinkType(QString const& url) +Node::LinkType Url::resolveLinkType(TQString const& url) { - QString aux(url); + TQString aux(url); aux = KURL::decode_string(aux); if(aux.isNull()) @@ -45,11 +45,11 @@ Node::LinkType Url::resolveLinkType(QString const& url) return Node::relative; } -KURL Url::normalizeUrl(QString const& string_url, LinkStatus const& link_parent, QString const& document_root) +KURL Url::normalizeUrl(TQString const& string_url, LinkStatus const& link_parent, TQString const& document_root) { - QString _string_url = string_url.stripWhiteSpace(); + TQString _string_url = string_url.stripWhiteSpace(); - QString s_url; + TQString s_url; KURL base_url; // resolve base url @@ -101,9 +101,9 @@ KURL Url::normalizeUrl(QString const& string_url, LinkStatus const& link_parent, } } -KURL Url::normalizeUrl(QString const& string_url) +KURL Url::normalizeUrl(TQString const& string_url) { - QString qs_url(KCharsets::resolveEntities(string_url.stripWhiteSpace())); + TQString qs_url(KCharsets::resolveEntities(string_url.stripWhiteSpace())); if(qs_url[0] == '/') { @@ -145,7 +145,7 @@ bool Url::existUrl(KURL const& url, vector const& v) alunos.iscte.pt, iscte.pt => false. */ // FIXME - Rename this function to sameDomain -bool Url::equalHost(QString const& host1, QString const& host2, bool restrict) +bool Url::equalHost(TQString const& host1, TQString const& host2, bool restrict) { //Q_ASSERT(!host1.isEmpty()); //Q_ASSERT(!host2.isEmpty()); // this fails if href="javascript:......." @@ -155,13 +155,13 @@ bool Url::equalHost(QString const& host1, QString const& host2, bool restrict) if(host1 == host2) return true; - QString host1_(KNetwork::KResolver::normalizeDomain(host1)); - QString host2_(KNetwork::KResolver::normalizeDomain(host2)); + TQString host1_(KNetwork::KResolver::normalizeDomain(host1)); + TQString host2_(KNetwork::KResolver::normalizeDomain(host2)); removeLastCharIfExists(host1_, '/'); removeLastCharIfExists(host2_, '/'); - vector v1 = tokenizeWordsSeparatedByDots(host1_); - vector v2 = tokenizeWordsSeparatedByDots(host2_); + vector v1 = tokenizeWordsSeparatedByDots(host1_); + vector v2 = tokenizeWordsSeparatedByDots(host2_); uint const size1 = v1.size(); uint const size2 = v2.size(); @@ -172,8 +172,8 @@ bool Url::equalHost(QString const& host1, QString const& host2, bool restrict) return false; } - vector::size_type aux = 0; - vector::size_type aux2 = 0; + vector::size_type aux = 0; + vector::size_type aux2 = 0; if(v1[0] == "www") aux = 1; if(v2[0] == "www") @@ -198,9 +198,9 @@ bool Url::equalHost(QString const& host1, QString const& host2, bool restrict) } /* This should be done by parsing but I wan't to know when some new scheme comes along :) */ -bool Url::hasProtocol(QString const& url) +bool Url::hasProtocol(TQString const& url) { - QString s_url(url); + TQString s_url(url); s_url.stripWhiteSpace(); if(s_url[0] == '/') @@ -248,7 +248,7 @@ bool Url::hasProtocol(QString const& url) /** http://linkstatus.paradigma.co.pt/en/index.html&bix=bix -> /en/index.html&bix=bix */ -QString Url::convertToLocal(LinkStatus const* ls) +TQString Url::convertToLocal(LinkStatus const* ls) { KURL url = ls->absoluteUrl(); KURL base_url = ls->rootUrl(); @@ -309,21 +309,21 @@ bool Url::parentDir(KURL const& url1, KURL const& url2) if(!equalHost(url1.host(), url2.host())) return false; - vector tokens_1 = tokenizeWordsSeparatedBy(url1.directory(true, false), QChar('/')); - vector tokens_2 = tokenizeWordsSeparatedBy(url2.directory(true, false), QChar('/')); + vector tokens_1 = tokenizeWordsSeparatedBy(url1.directory(true, false), TQChar('/')); + vector tokens_2 = tokenizeWordsSeparatedBy(url2.directory(true, false), TQChar('/')); if(tokens_1.size() == 0) return false; //if(tokens_2.size() > tokens_1.size() or tokens_2.size() == 0) //return true; - vector::size_type size = 0; + vector::size_type size = 0; if(tokens_1.size() < tokens_2.size()) size = tokens_1.size(); else size = tokens_2.size(); - for(vector::size_type i = 0; i != size; ++i) + for(vector::size_type i = 0; i != size; ++i) { if(tokens_2[i] != tokens_1[i]) return true; diff --git a/klinkstatus/src/parser/url.h b/klinkstatus/src/parser/url.h index 6f22743d..8e13d812 100644 --- a/klinkstatus/src/parser/url.h +++ b/klinkstatus/src/parser/url.h @@ -25,7 +25,7 @@ #include "node.h" #include -#include +#include #include @@ -36,14 +36,14 @@ 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); +Node::LinkType resolveLinkType(TQString const& url); +KURL normalizeUrl(TQString const& string_url, LinkStatus const& link_parent, TQString const& document_root); +KURL normalizeUrl(TQString const& string_url); bool validUrl(KURL const& url); bool existUrl(KURL const& url, vector const& v); -bool equalHost(QString const& host1, QString const& host2, bool restrict = false); -bool hasProtocol(QString const& url); -QString convertToLocal(LinkStatus const* ls); +bool equalHost(TQString const& host1, TQString const& host2, bool restrict = false); +bool hasProtocol(TQString const& url); +TQString 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); diff --git a/klinkstatus/src/ui/celltooltip.cpp b/klinkstatus/src/ui/celltooltip.cpp index b449cbce..b02b7f83 100644 --- a/klinkstatus/src/ui/celltooltip.cpp +++ b/klinkstatus/src/ui/celltooltip.cpp @@ -21,19 +21,19 @@ #include "celltooltip.h" #include "tablelinkstatus.h" -#include +#include #include using namespace std; -CellToolTip::CellToolTip ( TableLinkstatus * table, QToolTipGroup * group) - : QToolTip(table->viewport(), group), table_(table) +CellToolTip::CellToolTip ( TableLinkstatus * table, TQToolTipGroup * group) + : TQToolTip(table->viewport(), group), table_(table) {} -void CellToolTip::maybeTip ( const QPoint & p ) +void CellToolTip::maybeTip ( const TQPoint & p ) { - QPoint cp = table_->viewportToContents(p); + TQPoint cp = table_->viewportToContents(p); int row = table_->rowAt(cp.y()); int col = table_->columnAt(cp.x()); @@ -43,9 +43,9 @@ void CellToolTip::maybeTip ( const QPoint & p ) if(col == 0 || !table_->textFitsInCell(row, col)) { TableItem* item = table_->myItem(row, col); - QString tip_string = item->toolTip(); + TQString tip_string = item->toolTip(); - QRect cr = table_->cellGeometry( row, col ); + TQRect 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 index 33136ceb..24303adb 100644 --- a/klinkstatus/src/ui/celltooltip.h +++ b/klinkstatus/src/ui/celltooltip.h @@ -21,7 +21,7 @@ #ifndef CELLTOOLTIP_H #define CELLTOOLTIP_H -#include +#include class TableLinkstatus; @@ -30,11 +30,11 @@ class CellToolTip: public QToolTip { public: - CellToolTip ( TableLinkstatus * table, QToolTipGroup * group = 0 ); + CellToolTip ( TableLinkstatus * table, TQToolTipGroup * group = 0 ); protected: - virtual void maybeTip ( const QPoint & p ); + virtual void maybeTip ( const TQPoint & p ); private: diff --git a/klinkstatus/src/ui/documentrootdialog.cpp b/klinkstatus/src/ui/documentrootdialog.cpp index c2ed3e7d..8c55519e 100644 --- a/klinkstatus/src/ui/documentrootdialog.cpp +++ b/klinkstatus/src/ui/documentrootdialog.cpp @@ -23,21 +23,21 @@ #include #include -#include -#include -#include +#include +#include +#include -DocumentRootDialog::DocumentRootDialog(QWidget *parent, QString const& url) +DocumentRootDialog::DocumentRootDialog(TQWidget *parent, TQString const& url) : KDialogBase(parent, "DocumentRootDialog", true, "Choose a Document Root", KDialogBase::Ok, KDialogBase::Ok, true), m_url(url) { - QWidget* page = new QWidget(this); + TQWidget* page = new TQWidget(this); setMainWidget(page); - QVBoxLayout* topLayout = new QVBoxLayout(page, 0, spacingHint()); + TQVBoxLayout* topLayout = new TQVBoxLayout(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); + TQLabel* label = new TQLabel(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); @@ -53,12 +53,12 @@ DocumentRootDialog::DocumentRootDialog(QWidget *parent, QString const& url) 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 &))); + connect(m_urlRequester, TQT_SIGNAL(textChanged (const TQString &)), + this, TQT_SLOT(slotTextChanged (const TQString &))); + connect(m_urlRequester, TQT_SIGNAL(returnPressed (const TQString &)), + this, TQT_SLOT(slotReturnPressed (const TQString &))); + connect(m_urlRequester, TQT_SIGNAL(urlSelected (const TQString &)), + this, TQT_SLOT(slotTextChanged (const TQString &))); } DocumentRootDialog::~DocumentRootDialog() @@ -66,12 +66,12 @@ DocumentRootDialog::~DocumentRootDialog() saveDialogSize("klinkstatus", true); } -void DocumentRootDialog::slotReturnPressed( const QString & ) +void DocumentRootDialog::slotReturnPressed( const TQString & ) { slotOk(); } -void DocumentRootDialog::slotTextChanged( const QString & s) +void DocumentRootDialog::slotTextChanged( const TQString & s) { KURL url(s); enableButtonOK(!s.isEmpty() && url.isValid()); diff --git a/klinkstatus/src/ui/documentrootdialog.h b/klinkstatus/src/ui/documentrootdialog.h index 52696727..09657851 100644 --- a/klinkstatus/src/ui/documentrootdialog.h +++ b/klinkstatus/src/ui/documentrootdialog.h @@ -31,27 +31,27 @@ class DocumentRootDialog : public KDialogBase { Q_OBJECT public: - DocumentRootDialog(QWidget *parent, QString const& url); + DocumentRootDialog(TQWidget *parent, TQString const& url); ~DocumentRootDialog(); - void setUrl(const QString& theValue) { m_url = theValue; } - QString url() const { return m_url; } + void setUrl(const TQString& theValue) { m_url = theValue; } + TQString url() const { return m_url; } protected: - virtual void closeEvent (QCloseEvent*) {} + virtual void closeEvent (TQCloseEvent*) {} protected slots: virtual void reject() {} virtual void slotOk(); private slots: - void slotTextChanged(const QString &); - void slotReturnPressed(const QString &); + void slotTextChanged(const TQString &); + void slotReturnPressed(const TQString &); private: KURLRequester* m_urlRequester; - QString m_url; + TQString m_url; }; #endif diff --git a/klinkstatus/src/ui/klshistorycombo.cpp b/klinkstatus/src/ui/klshistorycombo.cpp index 36deb385..10fc7900 100644 --- a/klinkstatus/src/ui/klshistorycombo.cpp +++ b/klinkstatus/src/ui/klshistorycombo.cpp @@ -24,7 +24,7 @@ bool KLSHistoryCombo::items_saved_ = false; -KLSHistoryCombo::KLSHistoryCombo(QWidget *parent, const char *name) +KLSHistoryCombo::KLSHistoryCombo(TQWidget *parent, const char *name) : KHistoryCombo(parent, name) { setMaxCount(KLSConfig::maxCountComboUrl()); @@ -32,8 +32,8 @@ KLSHistoryCombo::KLSHistoryCombo(QWidget *parent, const char *name) setDuplicatesEnabled(false); setAutoCompletion(false); - connect(this, SIGNAL(activated(const QString& )), - this, SLOT(addToHistory(const QString& ))); + connect(this, TQT_SIGNAL(activated(const TQString& )), + this, TQT_SLOT(addToHistory(const TQString& ))); } KLSHistoryCombo::~KLSHistoryCombo() @@ -49,7 +49,7 @@ void KLSHistoryCombo::saveItems() if(items_saved_) return; - QStringList items = historyItems(); + TQStringList items = historyItems(); KLSConfig::setComboUrlHistory(items); KLSConfig::writeConfig(); @@ -61,7 +61,7 @@ void KLSHistoryCombo::loadItems() { clear(); - QStringList items = KLSConfig::comboUrlHistory(); + TQStringList items = KLSConfig::comboUrlHistory(); bool block = signalsBlocked(); blockSignals( true ); @@ -74,17 +74,17 @@ void KLSHistoryCombo::loadItems() setCompletionMode(KGlobalSettings::completionMode()); } -bool KLSHistoryCombo::eventFilter( QObject *o, QEvent *ev ) +bool KLSHistoryCombo::eventFilter( TQObject *o, TQEvent *ev ) { // Handle Ctrl+Del/Backspace etc better than the Qt widget, which always // jumps to the next whitespace. - QLineEdit *edit = lineEdit(); + TQLineEdit *edit = lineEdit(); if ( o == edit ) { int type = ev->type(); - if ( type == QEvent::KeyPress ) + if ( type == TQEvent::KeyPress ) { - QKeyEvent *e = static_cast( ev ); + TQKeyEvent *e = static_cast( ev ); if ( e->key() == Key_Return || e->key() == Key_Enter ) { @@ -106,7 +106,7 @@ bool KLSHistoryCombo::eventFilter( QObject *o, QEvent *ev ) } } - else if ( type == QEvent::MouseButtonDblClick ) + else if ( type == TQEvent::MouseButtonDblClick ) { edit->selectAll(); return true; @@ -121,17 +121,17 @@ bool KLSHistoryCombo::eventFilter( QObject *o, QEvent *ev ) the next [/#?:], which makes more sense for URLs. The list of chars that will stop the cursor are '/', '.', '?', '#', ':'. */ -void KLSHistoryCombo::selectWord(QKeyEvent *e) +void KLSHistoryCombo::selectWord(TQKeyEvent *e) { - QLineEdit* edit = lineEdit(); - QString text = edit->text(); + TQLineEdit* edit = lineEdit(); + TQString text = edit->text(); int pos = edit->cursorPosition(); int pos_old = pos; int count = 0; // TODO: make these a parameter when in kdelibs/kdeui... - QValueList chars; - chars << QChar('/') << QChar('.') << QChar('?') << QChar('#') << QChar(':'); + TQValueList chars; + chars << TQChar('/') << TQChar('.') << TQChar('?') << TQChar('#') << TQChar(':'); bool allow_space_break = true; if( e->key() == Key_Left || e->key() == Key_Backspace ) @@ -152,9 +152,9 @@ void KLSHistoryCombo::selectWord(QKeyEvent *e) else if( e->key() == Key_Backspace ) { edit->cursorForward(false, 1-count); - QString text = edit->text(); + TQString text = edit->text(); int pos_to_right = edit->text().length() - pos_old; - QString cut = text.left(edit->cursorPosition()) + text.right(pos_to_right); + TQString cut = text.left(edit->cursorPosition()) + text.right(pos_to_right); edit->setText(cut); edit->setCursorPosition(pos_old-count+1); } @@ -181,10 +181,10 @@ void KLSHistoryCombo::selectWord(QKeyEvent *e) else if( e->key() == Key_Delete ) { edit->cursorForward(false, -count-1); - QString text = edit->text(); + TQString 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() ); + TQString cut = text.left(pos_old) + + (pos_to_right > 0 ? text.right(pos_to_right) : TQString() ); edit->setText(cut); edit->setCursorPosition(pos_old); } diff --git a/klinkstatus/src/ui/klshistorycombo.h b/klinkstatus/src/ui/klshistorycombo.h index ab990a1e..1215c3d9 100644 --- a/klinkstatus/src/ui/klshistorycombo.h +++ b/klinkstatus/src/ui/klshistorycombo.h @@ -24,7 +24,7 @@ class KLSHistoryCombo : public KHistoryCombo Q_OBJECT public: - KLSHistoryCombo(QWidget* parent, const char* name); + KLSHistoryCombo(TQWidget* parent, const char* name); ~KLSHistoryCombo(); void init(); @@ -32,8 +32,8 @@ public: void saveItems(); protected: - virtual bool eventFilter(QObject* o, QEvent* ev); - void selectWord(QKeyEvent* e); + virtual bool eventFilter(TQObject* o, TQEvent* ev); + void selectWord(TQKeyEvent* e); private: static bool items_saved_; diff --git a/klinkstatus/src/ui/resultssearchbar.cpp b/klinkstatus/src/ui/resultssearchbar.cpp index 7f772b54..11ec6134 100644 --- a/klinkstatus/src/ui/resultssearchbar.cpp +++ b/klinkstatus/src/ui/resultssearchbar.cpp @@ -27,15 +27,15 @@ #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include class ResultsSearchBar::ResultsSearchBarPrivate @@ -45,50 +45,50 @@ public: : layout(0), searchLine(0), searchCombo(0), delay(400), m_lastComboIndex(0) {} - QString searchText; - QTimer timer; - QHBoxLayout* layout; + TQString searchText; + TQTimer timer; + TQHBoxLayout* layout; KLineEdit* searchLine; KComboBox* searchCombo; int delay; int m_lastComboIndex; }; -ResultsSearchBar::ResultsSearchBar(QWidget* parent, const char* name) - : QWidget(parent, name), d(new ResultsSearchBar::ResultsSearchBarPrivate) +ResultsSearchBar::ResultsSearchBar(TQWidget* parent, const char* name) + : TQWidget(parent, name), d(new ResultsSearchBar::ResultsSearchBarPrivate) { - setSizePolicy(QSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed)); + setSizePolicy(TQSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Fixed)); - d->layout = new QHBoxLayout(this); + d->layout = new TQHBoxLayout(this); d->layout->setMargin(2); d->layout->setSpacing(5); - QToolButton* clearButton = new QToolButton(this); - clearButton->setIconSet(SmallIconSet(QApplication::reverseLayout() ? "clear_left" : "locationbar_erase")); + TQToolButton* clearButton = new TQToolButton(this); + clearButton->setIconSet(SmallIconSet(TQApplication::reverseLayout() ? "clear_left" : "locationbar_erase")); clearButton->setAutoRaise(true); d->layout->addWidget(clearButton); - QLabel* searchLabel = new QLabel(this); + TQLabel* searchLabel = new TQLabel(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 &))); + connect(d->searchLine, TQT_SIGNAL(textChanged(const TQString &)), + this, TQT_SLOT(slotSearchStringChanged(const TQString &))); searchLabel->setBuddy(d->searchLine); d->layout->addWidget(d->searchLine); - QLabel* statusLabel = new QLabel(this); + TQLabel* statusLabel = new TQLabel(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); + TQPixmap iconAll = KGlobal::iconLoader()->loadIcon("exec", KIcon::Small); + TQPixmap iconGood = KGlobal::iconLoader()->loadIcon("ok", KIcon::Small); + TQPixmap iconBroken = KGlobal::iconLoader()->loadIcon("no", KIcon::Small); + TQPixmap iconMalformed = KGlobal::iconLoader()->loadIcon("bug", KIcon::Small); + TQPixmap iconUndetermined = KGlobal::iconLoader()->loadIcon("help", KIcon::Small); d->searchCombo->insertItem(iconAll, i18n("All Links")); d->searchCombo->insertItem(iconGood, i18n("Good Links")); @@ -97,17 +97,17 @@ ResultsSearchBar::ResultsSearchBar(QWidget* parent, const char* name) 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")); + TQToolTip::add(clearButton, i18n("Clear filter")); + TQToolTip::add( d->searchLine, i18n("Enter the terms to filter the result link list")); + TQToolTip::add( d->searchCombo, i18n("Choose what kind of link status to show in result list")); - connect(clearButton, SIGNAL( clicked() ), - this, SLOT(slotClearSearch()) ); + connect(clearButton, TQT_SIGNAL( clicked() ), + this, TQT_SLOT(slotClearSearch()) ); - connect(d->searchCombo, SIGNAL(activated(int)), - this, SLOT(slotSearchComboChanged(int))); + connect(d->searchCombo, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(slotSearchComboChanged(int))); - connect(&(d->timer), SIGNAL(timeout()), this, SLOT(slotActivateSearch())); + connect(&(d->timer), TQT_SIGNAL(timeout()), this, TQT_SLOT(slotActivateSearch())); } ResultsSearchBar::~ResultsSearchBar() @@ -116,7 +116,7 @@ ResultsSearchBar::~ResultsSearchBar() d = 0; } -QString const& ResultsSearchBar::text() const +TQString const& ResultsSearchBar::text() const { return d->searchText; } @@ -152,7 +152,7 @@ void ResultsSearchBar::slotSetStatus(int status) d->searchCombo->setCurrentItem(status); } -void ResultsSearchBar::slotSetText(const QString& text) +void ResultsSearchBar::slotSetText(const TQString& text) { d->searchLine->setText(text); } @@ -170,7 +170,7 @@ void ResultsSearchBar::slotSearchComboChanged(int index) d->timer.start(200, true); } -void ResultsSearchBar::slotSearchStringChanged(const QString& search) +void ResultsSearchBar::slotSearchStringChanged(const TQString& search) { if(d->timer.isActive()) d->timer.stop(); diff --git a/klinkstatus/src/ui/resultssearchbar.h b/klinkstatus/src/ui/resultssearchbar.h index 67d30a99..16d254c7 100644 --- a/klinkstatus/src/ui/resultssearchbar.h +++ b/klinkstatus/src/ui/resultssearchbar.h @@ -21,7 +21,7 @@ #ifndef RESULTSSEARCHBAR_H #define RESULTSSEARCHBAR_H -#include +#include #include "resultview.h" #include "../engine/linkfilter.h" @@ -34,10 +34,10 @@ class ResultsSearchBar : public QWidget { Q_OBJECT public: - ResultsSearchBar(QWidget *parent = 0, const char *name = 0); + ResultsSearchBar(TQWidget *parent = 0, const char *name = 0); ~ResultsSearchBar(); - QString const& text() const; + TQString const& text() const; int status() const; void setDelay(int ms); @@ -52,11 +52,11 @@ signals: public slots: void slotClearSearch(); void slotSetStatus(int status); - void slotSetText(const QString& text); + void slotSetText(const TQString& text); private slots: - void slotSearchStringChanged(const QString& search); + void slotSearchStringChanged(const TQString& search); void slotSearchComboChanged(int index); void slotActivateSearch(); diff --git a/klinkstatus/src/ui/resultview.cpp b/klinkstatus/src/ui/resultview.cpp index 4078bfca..737b901b 100644 --- a/klinkstatus/src/ui/resultview.cpp +++ b/klinkstatus/src/ui/resultview.cpp @@ -12,17 +12,17 @@ #include "resultview.h" #include "../engine/linkstatus.h" -#include -#include +#include +#include #include #include #include -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"; +const TQString ResultView::URL_LABEL = "URL"; +const TQString ResultView::STATUS_LABEL = "Status"; +const TQString ResultView::MARKUP_LABEL = "Markup"; +const TQString ResultView::LINK_LABEL_LABEL = "Label"; // ******************************* ResultView ******************************** @@ -40,7 +40,7 @@ ResultView::ResultView() ResultView::~ResultView() {} -void ResultView::setColumns(QStringList const& columns) +void ResultView::setColumns(TQStringList const& columns) { Q_ASSERT(columns.size() != 0); @@ -129,7 +129,7 @@ LinkStatus const* ResultViewItem::linkStatus() const return ls_; } -QColor const& ResultViewItem::textStatusColor() const +TQColor const& ResultViewItem::textStatusColor() const { if(linkStatus()->errorOccurred()) { @@ -148,7 +148,7 @@ QColor const& ResultViewItem::textStatusColor() const else { - QString status_code(QString::number(linkStatus()->httpHeader().statusCode())); + TQString status_code(TQString::number(linkStatus()->httpHeader().statusCode())); if(status_code[0] == '0') { diff --git a/klinkstatus/src/ui/resultview.h b/klinkstatus/src/ui/resultview.h index e6d3e789..43a52427 100644 --- a/klinkstatus/src/ui/resultview.h +++ b/klinkstatus/src/ui/resultview.h @@ -21,9 +21,9 @@ #ifndef RESULTVIEW_H #define RESULTVIEW_H -#include -#include -#include +#include +#include +#include class KURL; @@ -38,10 +38,10 @@ class ResultView { public: - static const QString URL_LABEL; - static const QString STATUS_LABEL; - static const QString MARKUP_LABEL; - static const QString LINK_LABEL_LABEL; + static const TQString URL_LABEL; + static const TQString STATUS_LABEL; + static const TQString MARKUP_LABEL; + static const TQString LINK_LABEL_LABEL; enum Status { none = 0, @@ -60,7 +60,7 @@ public: virtual void showAll() = 0; //virtual void ensureCellVisible(int row, int col) = 0; - virtual void setColumns(QStringList const& columns); + virtual void setColumns(TQStringList const& columns); static bool displayableWithStatus(LinkStatus const* ls, Status const& status); int numberOfColumns() const { return number_of_columns_; } @@ -73,11 +73,11 @@ public: protected: //virtual bool textFitsInCell(int row, int col) const = 0; virtual bool isEmpty() const = 0; - virtual void loadContextTableMenu(QValueVector const& referrers, bool is_root = false) = 0; + virtual void loadContextTableMenu(TQValueVector const& referrers, bool is_root = false) = 0; protected slots: - //virtual void slotPopupContextMenu(int row, int col, const QPoint& pos) = 0; + //virtual void slotPopupContextMenu(int row, int col, const TQPoint& pos) = 0; virtual void slotCopyUrlToClipboard() const = 0; virtual void slotCopyParentUrlToClipboard() const = 0; virtual void slotCopyCellTextToClipboard() const = 0; @@ -88,13 +88,13 @@ protected slots: virtual void slotViewParentUrlInBrowser() = 0; protected: - QStringList columns_; + TQStringList columns_; int col_status_; int col_label_; int col_url_; int col_markup_; // optional - QPopupMenu context_table_menu_; - QPopupMenu* sub_menu_; + TQPopupMenu context_table_menu_; + TQPopupMenu* sub_menu_; CellToolTip* cell_tip_; private: @@ -112,14 +112,14 @@ public: virtual void setColumnIndex(int i); virtual int columnIndex() const; - virtual QString toolTip() const = 0; + virtual TQString 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; + TQColor const& textStatusColor() const; + virtual void paint( TQPainter *p, const TQColorGroup &cg, + const TQRect &cr, bool selected ) = 0; virtual void setText() = 0; virtual void setPixmap() = 0; diff --git a/klinkstatus/src/ui/sessionwidget.cpp b/klinkstatus/src/ui/sessionwidget.cpp index da128070..f729ca3e 100644 --- a/klinkstatus/src/ui/sessionwidget.cpp +++ b/klinkstatus/src/ui/sessionwidget.cpp @@ -35,18 +35,18 @@ #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include "sessionwidget.h" #include "tablelinkstatus.h" @@ -66,7 +66,7 @@ SessionWidget::SessionWidget(int max_simultaneous_connections, int time_out, - QWidget* parent, const char* name, WFlags f) + TQWidget* 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), @@ -81,13 +81,13 @@ SessionWidget::SessionWidget(int max_simultaneous_connections, int time_out, init(); slotLoadSettings(); - connect(combobox_url, SIGNAL( textChanged ( const QString & ) ), - this, SLOT( slotEnableCheckButton( const QString & ) ) ); + connect(combobox_url, TQT_SIGNAL( textChanged ( const TQString & ) ), + this, TQT_SLOT( slotEnableCheckButton( const TQString & ) ) ); - connect(tree_view, SIGNAL( clicked ( QListViewItem * ) ), - this, SLOT( showBottomStatusLabel( QListViewItem * ) ) ); + connect(tree_view, TQT_SIGNAL( clicked ( TQListViewItem * ) ), + this, TQT_SLOT( showBottomStatusLabel( TQListViewItem * ) ) ); - connect(&bottom_status_timer_, SIGNAL(timeout()), this, SLOT(clearBottomStatusLabel()) ); + connect(&bottom_status_timer_, TQT_SIGNAL(timeout()), this, TQT_SLOT(clearBottomStatusLabel()) ); } SessionWidget::~SessionWidget() @@ -105,16 +105,16 @@ void SessionWidget::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); + TQPixmap pixMap = KGlobal::iconLoader()->loadIcon("fileopen", KIcon::Small); pushbutton_url->setFixedSize(pixMap.width() + 8, pixMap.height() + 8); - connect(pushbutton_url, SIGNAL(clicked()), this, SLOT(slotChooseUrlDialog())); + connect(pushbutton_url, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotChooseUrlDialog())); resultsSearchBar->hide(); start_search_action_ = static_cast (action_manager_->action("start_search")); - connect(resultsSearchBar, SIGNAL(signalSearch(LinkMatcher)), - this, SLOT(slotApplyFilter(LinkMatcher))); + connect(resultsSearchBar, TQT_SIGNAL(signalSearch(LinkMatcher)), + this, TQT_SLOT(slotApplyFilter(LinkMatcher))); } void SessionWidget::slotLoadSettings(bool modify_current_widget_settings) @@ -154,23 +154,23 @@ void SessionWidget::newSearchManager() 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))); + connect(search_manager_, TQT_SIGNAL(signalRootChecked(const LinkStatus *, LinkChecker *)), + this, TQT_SLOT(slotRootChecked(const LinkStatus *, LinkChecker *))); + connect(search_manager_, TQT_SIGNAL(signalLinkChecked(const LinkStatus *, LinkChecker *)), + this, TQT_SLOT(slotLinkChecked(const LinkStatus *, LinkChecker *))); + connect(search_manager_, TQT_SIGNAL(signalSearchFinished()), + this, TQT_SLOT(slotSearchFinished())); + connect(search_manager_, TQT_SIGNAL(signalSearchPaused()), + this, TQT_SLOT(slotSearchPaused())); + connect(search_manager_, TQT_SIGNAL(signalAddingLevelTotalSteps(uint)), + this, TQT_SLOT(slotAddingLevelTotalSteps(uint))); + connect(search_manager_, TQT_SIGNAL(signalAddingLevelProgress()), + this, TQT_SLOT(slotAddingLevelProgress())); + connect(search_manager_, TQT_SIGNAL(signalLinksToCheckTotalSteps(uint)), + this, TQT_SLOT(slotLinksToCheckTotalSteps(uint))); } -void SessionWidget::setColumns(QStringList const& colunas) +void SessionWidget::setColumns(TQStringList const& colunas) { tree_view->setColumns(colunas); } @@ -192,7 +192,7 @@ SearchManager const* SessionWidget::getSearchManager() const return search_manager_; } -void SessionWidget::slotEnableCheckButton(const QString & s) +void SessionWidget::slotEnableCheckButton(const TQString & s) { if(!(stopped_ && !pendingActions())) return; @@ -251,7 +251,7 @@ void SessionWidget::slotCheck() if(!url.protocol().startsWith("http")) { - QString documentRootHint = url.directory().isEmpty() ? "/" : url.directory(); + TQString documentRootHint = url.directory().isEmpty() ? "/" : url.directory(); DocumentRootDialog dialog(this, documentRootHint); dialog.exec(); search_manager_->setDocumentRoot(KURL::fromPathOrURL(dialog.url())); @@ -319,7 +319,7 @@ void SessionWidget::slotCheck() slotSetTimeElapsed(); } -void SessionWidget::keyPressEvent ( QKeyEvent* e ) +void SessionWidget::keyPressEvent ( TQKeyEvent* e ) { if( e->key() == Qt::Key_Return && ( combobox_url->hasFocus() || @@ -488,12 +488,12 @@ void SessionWidget::slotSearchPaused() emit signalSearchPaused(); } -void SessionWidget::insertUrlAtCombobox(QString const& url) +void SessionWidget::insertUrlAtCombobox(TQString const& url) { combobox_url->addToHistory(url); } -void SessionWidget::showBottomStatusLabel(QListViewItem* item) +void SessionWidget::showBottomStatusLabel(TQListViewItem* item) { kdDebug(23100) << "SessionWidget::showBottomStatusLabel" << endl; @@ -503,13 +503,13 @@ void SessionWidget::showBottomStatusLabel(QListViewItem* item) TreeViewItem* _item = tree_view->myItem(item); if(_item) { - QString status = _item->linkStatus()->statusText(); + TQString status = _item->linkStatus()->statusText(); textlabel_status->setText(status); if(textlabel_status->sizeHint().width() > textlabel_status->maximumWidth()) - QToolTip::add(textlabel_status, status); + TQToolTip::add(textlabel_status, status); else - QToolTip::remove(textlabel_status); + TQToolTip::remove(textlabel_status); bottom_status_timer_.stop(); bottom_status_timer_.start(5 * 1000, true); @@ -683,12 +683,12 @@ void SessionWidget::slotApplyFilter(LinkMatcher link_matcher) void SessionWidget::slotExportAsHTML( ) { - KURL url = KFileDialog::getSaveURL(QString::null,"text/html", 0, i18n("Export Results as HTML")); + KURL url = KFileDialog::getSaveURL(TQString::null,"text/html", 0, i18n("Export Results as HTML")); if(url.isEmpty()) return; - QString filename; + TQString filename; KTempFile tmp; // ### only used for network export if(url.isLocalFile()) @@ -699,13 +699,13 @@ void SessionWidget::slotExportAsHTML( ) KSaveFile *savefile = new KSaveFile(filename); if(savefile->status() == 0) // ok { - QTextStream *outputStream = savefile->textStream(); - outputStream->setEncoding(QTextStream::UnicodeUTF8); + TQTextStream *outputStream = savefile->textStream(); + outputStream->setEncoding(TQTextStream::UnicodeUTF8); - QString xslt_doc = FileManager::read(locate("appdata", "styles/results_stylesheet.xsl")); + TQString 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()); + TQString html_ouptut = xslt.transform(search_manager_->toXML()); (*outputStream) << html_ouptut << endl; savefile->close(); diff --git a/klinkstatus/src/ui/sessionwidget.h b/klinkstatus/src/ui/sessionwidget.h index af525a08..6b5e631d 100644 --- a/klinkstatus/src/ui/sessionwidget.h +++ b/klinkstatus/src/ui/sessionwidget.h @@ -29,8 +29,8 @@ class TableItem; class ActionManager; class LinkMatcher; -#include -#include +#include +#include class QStringList; class QListViewItem; @@ -49,11 +49,11 @@ class SessionWidget: public SessionWidgetBase public: SessionWidget(int max_simultaneous_connections = 3, int time_out = 50, - QWidget* parent = 0, const char* name = 0, WFlags f = 0); + TQWidget* parent = 0, const char* name = 0, WFlags f = 0); ~SessionWidget(); - void setColumns(QStringList const& colunas); + void setColumns(TQStringList const& colunas); void setUrl(KURL const& url); bool treeDisplay() const { return tree_display_; } @@ -95,13 +95,13 @@ private slots: virtual void slotCancel() {} // FIXME hack //virtual void slotSuggestDomain(bool toogle); - void slotEnableCheckButton(const QString &); + void slotEnableCheckButton(const TQString &); 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 showBottomStatusLabel(TQListViewItem* item); void clearBottomStatusLabel(); void slotSetTimeElapsed(); void newSearchManager(); @@ -116,9 +116,9 @@ private slots: private: - virtual void keyPressEvent ( QKeyEvent* e ); + virtual void keyPressEvent ( TQKeyEvent* e ); bool validFields(); - void insertUrlAtCombobox(QString const& url); + void insertUrlAtCombobox(TQString const& url); void init(); void saveCurrentCheckSettings(); bool pendingActions() const; @@ -136,7 +136,7 @@ private: bool paused_; bool stopped_; - QTimer bottom_status_timer_; + TQTimer bottom_status_timer_; int max_simultaneous_connections_; int time_out_; bool tree_display_; // tree/flat result display diff --git a/klinkstatus/src/ui/settings/configidentificationdialog.cpp b/klinkstatus/src/ui/settings/configidentificationdialog.cpp index 3dcd1239..f2675d81 100644 --- a/klinkstatus/src/ui/settings/configidentificationdialog.cpp +++ b/klinkstatus/src/ui/settings/configidentificationdialog.cpp @@ -24,12 +24,12 @@ #include #include -#include +#include #include "../cfg/klsconfig.h" -ConfigIdentificationDialog::ConfigIdentificationDialog(QWidget *parent, const char *name) +ConfigIdentificationDialog::ConfigIdentificationDialog(TQWidget *parent, const char *name) : ConfigIdentificationDialogUi(parent, name) { if(KLSConfig::userAgent().isEmpty()) @@ -37,7 +37,7 @@ ConfigIdentificationDialog::ConfigIdentificationDialog(QWidget *parent, const ch slotDefaultUA(); } - connect(buttonDefault, SIGNAL(clicked()), this, SLOT(slotDefaultUA())); + connect(buttonDefault, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotDefaultUA())); } diff --git a/klinkstatus/src/ui/settings/configidentificationdialog.h b/klinkstatus/src/ui/settings/configidentificationdialog.h index e75a65a6..8bc0fa64 100644 --- a/klinkstatus/src/ui/settings/configidentificationdialog.h +++ b/klinkstatus/src/ui/settings/configidentificationdialog.h @@ -30,7 +30,7 @@ class ConfigIdentificationDialog : public ConfigIdentificationDialogUi { Q_OBJECT public: - ConfigIdentificationDialog(QWidget *parent = 0, const char *name = 0); + ConfigIdentificationDialog(TQWidget *parent = 0, const char *name = 0); ~ConfigIdentificationDialog(); private slots: diff --git a/klinkstatus/src/ui/tablelinkstatus.cpp b/klinkstatus/src/ui/tablelinkstatus.cpp index 695365a9..66cd06be 100644 --- a/klinkstatus/src/ui/tablelinkstatus.cpp +++ b/klinkstatus/src/ui/tablelinkstatus.cpp @@ -23,12 +23,12 @@ #include "../parser/url.h" #include "../global.h" -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include @@ -46,18 +46,18 @@ */ -TableLinkstatus::TableLinkstatus(QWidget * parent, const char * name, +TableLinkstatus::TableLinkstatus(TQWidget * parent, const char * name, int column_index_status, int column_index_label, int column_index_URL) - : QTable(parent, name), + : TQTable(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); + setSelectionMode(TQTable::NoSelection); + setFocusStyle(TQTable::FollowStyle); setReadOnly(true); verticalHeader()->hide(); @@ -65,10 +65,10 @@ TableLinkstatus::TableLinkstatus(QWidget * parent, const char * name, cell_tip_ = new CellToolTip(this); - sub_menu_ = new QPopupMenu(this, "sub_menu_referrers"); + sub_menu_ = new TQPopupMenu(this, "sub_menu_referrers"); - connect(this, SIGNAL( contextMenuRequested ( int, int, const QPoint& )), - this, SLOT( slotPopupContextMenu( int, int, const QPoint&)) ); + connect(this, TQT_SIGNAL( contextMenuRequested ( int, int, const TQPoint& )), + this, TQT_SLOT( slotPopupContextMenu( int, int, const TQPoint&)) ); } TableLinkstatus::~TableLinkstatus() @@ -76,14 +76,14 @@ TableLinkstatus::~TableLinkstatus() delete cell_tip_; } -void TableLinkstatus::setColumns(QStringList const& columns) +void TableLinkstatus::setColumns(TQStringList const& columns) { ResultView::setColumns(columns); removeColunas(); setNumCols(columns.size()); - QHeader* horizontal_header = horizontalHeader(); + TQHeader* horizontal_header = horizontalHeader(); for(uint i = 0; i != columns.size(); ++i) { if(i == 0) @@ -116,11 +116,11 @@ vector TableLinkstatus::generateRowOfTableItems(LinkStatus const* li vector items; int column = 1; - TableItem* item1 = new TableItemStatus(this, QTableItem::Never, + TableItem* item1 = new TableItemStatus(this, TQTableItem::Never, linkstatus, column++); - TableItem* item2 = new TableItemNome(this, QTableItem::Never, + TableItem* item2 = new TableItemNome(this, TQTableItem::Never, linkstatus, column++); - TableItem* item3 = new TableItemURL(this, QTableItem::Never, + TableItem* item3 = new TableItemURL(this, TQTableItem::Never, linkstatus, column++); items.push_back(item1); items.push_back(item2); @@ -158,7 +158,7 @@ void TableLinkstatus::insereLinha(vector items) void TableLinkstatus::clear() { - QMemArray linhas(numRows()); + TQMemArray linhas(numRows()); for(uint i = 0; i != linhas.size(); ++i) linhas[i] = i + 1; @@ -169,7 +169,7 @@ void TableLinkstatus::clear() void TableLinkstatus::removeColunas() { - QMemArray columns(numCols()); + TQMemArray columns(numCols()); for(uint i = 0; i != columns.size(); ++i) columns[i] = i + 1; @@ -204,7 +204,7 @@ void TableLinkstatus::mostraPorStatusCode(int status_code) for(int i = 0; i != numRows(); ++i) { int row = i + 1; - QTableItem* _item = myItem(row, col_status_); + TQTableItem* _item = myItem(row, col_status_); if(status_code != _item->text().toInt()) hideRow(row); @@ -222,15 +222,15 @@ void TableLinkstatus::ensureCellVisible(int row, int col) { // table viewport is at the bottom if(rowPos(row - 1) <= (contentsY() + visibleHeight())) - QTable::ensureCellVisible(row, col); + TQTable::ensureCellVisible(row, col); } bool TableLinkstatus::textFitsInCell(int row, int col) const { - QTableItem* itm(myItem(row, col)); + TQTableItem* itm(myItem(row, col)); Q_ASSERT(itm); - QSize size_hint(itm->sizeHint()); + TQSize size_hint(itm->sizeHint()); int visible_width = 0; if(col == numCols() - 1) @@ -251,37 +251,37 @@ bool TableLinkstatus::isEmpty() const TableItem* TableLinkstatus::myItem(int row, int col) const { - TableItem* _item = dynamic_cast (QTable::item(row, col)); + TableItem* _item = dynamic_cast (TQTable::item(row, col)); Q_ASSERT(_item); return _item; } -void TableLinkstatus::slotPopupContextMenu(int r, int w, const QPoint& pos) +void TableLinkstatus::slotPopupContextMenu(int r, int w, const TQPoint& pos) { TableItem* table_item = myItem(r, w); if(table_item) { - QValueVector referrers = table_item->linkStatus()->referrers(); + TQValueVector referrers = table_item->linkStatus()->referrers(); loadContextTableMenu(referrers, table_item->linkStatus()->isRoot()); context_table_menu_.popup(pos); } } -void TableLinkstatus::loadContextTableMenu(QValueVector const& referrers, bool is_root) +void TableLinkstatus::loadContextTableMenu(TQValueVector 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_->insertItem(i18n("All"), this, TQT_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))); + connect(sub_menu_, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotEditReferrerWithQuanta(int))); context_table_menu_.insertItem(SmallIconSet("fileopen"), i18n("Edit Referrer with Quanta"), sub_menu_); @@ -293,27 +293,27 @@ void TableLinkstatus::loadContextTableMenu(QValueVector const& referrers, } context_table_menu_.insertItem(SmallIconSet("fileopen"), i18n("Open URL"), - this, SLOT(slotViewUrlInBrowser())); + this, TQT_SLOT(slotViewUrlInBrowser())); context_table_menu_.insertItem(SmallIconSet("fileopen"), i18n("Open Referrer URL"), - this, SLOT(slotViewParentUrlInBrowser())); + this, TQT_SLOT(slotViewParentUrlInBrowser())); context_table_menu_.insertSeparator(); context_table_menu_.insertItem(SmallIconSet("editcopy"), i18n("Copy URL"), - this, SLOT(slotCopyUrlToClipboard())); + this, TQT_SLOT(slotCopyUrlToClipboard())); context_table_menu_.insertItem(SmallIconSet("editcopy"), i18n("Copy Referrer URL"), - this, SLOT(slotCopyParentUrlToClipboard())); + this, TQT_SLOT(slotCopyParentUrlToClipboard())); context_table_menu_.insertItem(SmallIconSet("editcopy"), i18n("Copy Cell Text"), - this, SLOT(slotCopyCellTextToClipboard())); + this, TQT_SLOT(slotCopyCellTextToClipboard())); } void TableLinkstatus::slotCopyUrlToClipboard() const { TableItem* _item = myItem(currentRow(), currentColumn()); - QString content(_item->linkStatus()->absoluteUrl().prettyURL()); + TQString content(_item->linkStatus()->absoluteUrl().prettyURL()); QClipboard* cb = kapp->clipboard(); cb->setText(content); } @@ -321,14 +321,14 @@ void TableLinkstatus::slotCopyUrlToClipboard() const void TableLinkstatus::slotCopyParentUrlToClipboard() const { TableItem* _item = myItem(currentRow(), currentColumn()); - QString content(_item->linkStatus()->parent()->absoluteUrl().prettyURL()); + TQString content(_item->linkStatus()->parent()->absoluteUrl().prettyURL()); QClipboard* cb = kapp->clipboard(); cb->setText(content); } void TableLinkstatus::slotCopyCellTextToClipboard() const { - QString cell_text(text(currentRow(), currentColumn())); + TQString cell_text(text(currentRow(), currentColumn())); QClipboard* cb = kapp->clipboard(); cb->setText(cell_text); } @@ -336,7 +336,7 @@ void TableLinkstatus::slotCopyCellTextToClipboard() const void TableLinkstatus::slotEditReferrersWithQuanta() { TableItem* _item = myItem(currentRow(), currentColumn()); - QValueVector referrers = _item->linkStatus()->referrers(); + TQValueVector referrers = _item->linkStatus()->referrers(); if(Global::isQuantaAvailableViaDCOP()) { @@ -345,7 +345,7 @@ void TableLinkstatus::slotEditReferrersWithQuanta() } else { - QStringList list_urls; + TQStringList list_urls; for(uint i = 0; i != referrers.size(); ++i) list_urls.append(referrers[i].url()); @@ -369,7 +369,7 @@ void TableLinkstatus::slotEditReferrerWithQuanta(int id) index -= 2; // The list of referrers starts on index = 2 TableItem* _item = myItem(currentRow(), currentColumn()); - QValueVector referrers = _item->linkStatus()->referrers(); + TQValueVector referrers = _item->linkStatus()->referrers(); Q_ASSERT(index >= 0 && (uint)index < referrers.size()); slotEditReferrerWithQuanta(referrers[index]); @@ -377,7 +377,7 @@ void TableLinkstatus::slotEditReferrerWithQuanta(int id) void TableLinkstatus::slotEditReferrerWithQuanta(KURL const& url) { - QString filePath = url.url(); + TQString filePath = url.url(); if(Global::isQuantaAvailableViaDCOP()) { @@ -386,13 +386,13 @@ void TableLinkstatus::slotEditReferrerWithQuanta(KURL const& url) if(!success) { - QString message = i18n("File %1 cannot be opened. Might be a DCOP problem.").arg(filePath); + TQString message = i18n("File %1 cannot be opened. Might be a DCOP problem.").arg(filePath); KMessageBox::error(parentWidget(), message); } } else { - QStringList args(url.url()); + TQStringList args(url.url()); Global::openQuanta(args); } } @@ -438,10 +438,10 @@ void TableLinkstatus::slotViewParentUrlInBrowser() */ -TableItem::TableItem(QTable* table, EditType et, +TableItem::TableItem(TQTable* table, EditType et, LinkStatus const* linkstatus, int column_index, int alignment) - : QTableItem(table, et, ""), ResultViewItem(linkstatus, column_index), + : TQTableItem(table, et, ""), ResultViewItem(linkstatus, column_index), /*ls_((LinkStatus*)linkstatus), column_index_(column_index),*/ alignment_(alignment) { @@ -483,7 +483,7 @@ LinkStatus const* const TableItem::linkStatus() const return ls_; } -QColor const& TableItem::textStatusColor() const +TQColor const& TableItem::textStatusColor() const { if(linkStatus()->errorOccurred()) { @@ -503,7 +503,7 @@ QColor const& TableItem::textStatusColor() const else { - QString status_code(QString::number(linkStatus()->httpHeader().statusCode())); + TQString status_code(TQString::number(linkStatus()->httpHeader().statusCode())); if(status_code[0] == '0') { @@ -537,7 +537,7 @@ QColor const& TableItem::textStatusColor() const */ -TableItemURL::TableItemURL(QTable* table, EditType et, +TableItemURL::TableItemURL(TQTable* table, EditType et, LinkStatus const* linkstatus, int column_index) : TableItem(table, et, linkstatus, column_index) { @@ -549,41 +549,41 @@ void TableItemURL::setText() if(linkStatus()->node() && linkStatus()->malformed()) { if(linkStatus()->node()->url().isEmpty()) - QTableItem::setText( linkStatus()->node()->content().simplifyWhiteSpace() ); + TQTableItem::setText( linkStatus()->node()->content().simplifyWhiteSpace() ); else - QTableItem::setText( linkStatus()->node()->url() ); + TQTableItem::setText( linkStatus()->node()->url() ); } else { KURL url = linkStatus()->absoluteUrl(); - QTableItem::setText(::convertToLocal(linkStatus())); + TQTableItem::setText(::convertToLocal(linkStatus())); } } void TableItemURL::setPixmap() {} -QString TableItemURL::toolTip() const +TQString 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 ) +void TableItemURL::paint( TQPainter *p, const TQColorGroup &cg, + const TQRect &cr, bool selected ) { // Get a color to draw the text - QColorGroup m_cg(cg); - QColor color(textStatusColor()); - m_cg.setColor(QColorGroup::Text, color); + TQColorGroup m_cg(cg); + TQColor color(textStatusColor()); + m_cg.setColor(TQColorGroup::Text, color); - QTableItem::paint(p, m_cg, cr, selected); + TQTableItem::paint(p, m_cg, cr, selected); } -QColor const& TableItemURL::textStatusColor() const +TQColor const& TableItemURL::textStatusColor() const { // TODO clean this code - QString status_code(QString::number(linkStatus()->httpHeader().statusCode())); + TQString status_code(TQString::number(linkStatus()->httpHeader().statusCode())); if(linkStatus()->errorOccurred()) { @@ -614,7 +614,7 @@ QColor const& TableItemURL::textStatusColor() const */ -TableItemStatus::TableItemStatus(QTable* table, EditType et, +TableItemStatus::TableItemStatus(TQTable* table, EditType et, LinkStatus const* linkstatus, int column_index) : TableItem(table, et, linkstatus, column_index) { @@ -629,7 +629,7 @@ void TableItemStatus::setText() linkStatus()->status() == "OK" || linkStatus()->status() == "304") { - QTableItem::setText(""); + TQTableItem::setText(""); } else { @@ -642,8 +642,8 @@ void TableItemStatus::setText() } */ //Q_ASSERT(linkStatus()->httpHeader().statusCode() != 0); //<------------------------------------------------------------ - //QTableItem::setText( QString::number(linkStatus()->httpHeader().statusCode()) ); - QTableItem::setText( linkStatus()->status() ); + //TQTableItem::setText( TQString::number(linkStatus()->httpHeader().statusCode()) ); + TQTableItem::setText( linkStatus()->status() ); } } @@ -654,25 +654,25 @@ void TableItemStatus::setPixmap() if(linkStatus()->error().contains(i18n( "Timeout" ))) { - QTableItem::setPixmap(SmallIcon("kalarm")); + TQTableItem::setPixmap(SmallIcon("kalarm")); } else if(linkStatus()->error() == i18n( "Malformed" )) { - QTableItem::setPixmap(SmallIcon("bug")); + TQTableItem::setPixmap(SmallIcon("bug")); } else { - QTableItem::setPixmap(SmallIcon("no")); + TQTableItem::setPixmap(SmallIcon("no")); } } else if(linkStatus()->status() == "304") - QTableItem::setPixmap(UserIcon("304")); + TQTableItem::setPixmap(UserIcon("304")); else if(linkStatus()->status() == "OK") - QTableItem::setPixmap(SmallIcon("ok")); + TQTableItem::setPixmap(SmallIcon("ok")); } -QString TableItemStatus::toolTip() const +TQString TableItemStatus::toolTip() const { if(linkStatus()->errorOccurred() || linkStatus()->absoluteUrl().hasRef() || @@ -685,12 +685,12 @@ QString TableItemStatus::toolTip() const return i18n("%1").arg(linkStatus()->httpHeader().reasonPhrase()); } -void TableItemStatus::paint( QPainter *p, const QColorGroup &cg, - const QRect &cr, bool selected ) +void TableItemStatus::paint( TQPainter *p, const TQColorGroup &cg, + const TQRect &cr, bool selected ) { p->fillRect( 0, 0, cr.width(), cr.height(), - selected ? cg.brush( QColorGroup::Highlight ) - : cg.brush( QColorGroup::Base ) ); + selected ? cg.brush( TQColorGroup::Highlight ) + : cg.brush( TQColorGroup::Base ) ); int w = cr.width(); int h = cr.height(); @@ -705,11 +705,11 @@ void TableItemStatus::paint( QPainter *p, const QColorGroup &cg, } // Get a color to draw the text - QColorGroup m_cg(cg); - QColor color(textStatusColor()); - m_cg.setColor(QColorGroup::Text, color); + TQColorGroup m_cg(cg); + TQColor color(textStatusColor()); + m_cg.setColor(TQColorGroup::Text, color); - //QTableItem::paint(p, m_cg, cr, selected); + //TQTableItem::paint(p, m_cg, cr, selected); if ( selected ) p->setPen( m_cg.highlightedText() ); @@ -725,7 +725,7 @@ void TableItemStatus::paint( QPainter *p, const QColorGroup &cg, */ -TableItemNome::TableItemNome(QTable* table, EditType et, +TableItemNome::TableItemNome(TQTable* table, EditType et, LinkStatus const* linkstatus, int column_index) : TableItem(table, et, linkstatus, column_index) { @@ -734,15 +734,15 @@ TableItemNome::TableItemNome(QTable* table, EditType et, void TableItemNome::setText() { - QString label(linkStatus()->label()); + TQString label(linkStatus()->label()); if(!label.isNull()) - QTableItem::setText(label.simplifyWhiteSpace()); + TQTableItem::setText(label.simplifyWhiteSpace()); } void TableItemNome::setPixmap() {} -QString TableItemNome::toolTip() const +TQString TableItemNome::toolTip() const { return text(); // Pode parecer repeticao mas nao eh... Ver construtor } diff --git a/klinkstatus/src/ui/tablelinkstatus.h b/klinkstatus/src/ui/tablelinkstatus.h index 0b3f2cf2..cb003209 100644 --- a/klinkstatus/src/ui/tablelinkstatus.h +++ b/klinkstatus/src/ui/tablelinkstatus.h @@ -21,11 +21,11 @@ #ifndef TABLE_LINKSTATUS_H #define TABLE_LINKSTATUS_H -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include class QStringList; class KURL; @@ -43,18 +43,18 @@ int const STATUS_COLUMN_WIDTH = 50; class TableItem; -class TableLinkstatus: public QTable, public ResultView +class TableLinkstatus: public TQTable, public ResultView { Q_OBJECT public: - TableLinkstatus(QWidget * parent = 0, const char * name = 0, + TableLinkstatus(TQWidget * 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); + virtual void setColumns(TQStringList const& columns); /* Insere uma nova entrada no fim da tabela */ virtual void insertResult(LinkStatus const* linkstatus); @@ -66,7 +66,7 @@ public: virtual void showAll(); - /* Specialization of QTable::ensureCellVisible */ + /* Specialization of TQTable::ensureCellVisible */ virtual void ensureCellVisible(int row, int col); virtual bool textFitsInCell(int row, int col) const; @@ -76,7 +76,7 @@ public: private slots: - virtual void slotPopupContextMenu(int row, int col, const QPoint& pos); + virtual void slotPopupContextMenu(int row, int col, const TQPoint& pos); virtual void slotCopyUrlToClipboard() const; virtual void slotCopyParentUrlToClipboard() const; virtual void slotCopyCellTextToClipboard() const; @@ -85,7 +85,7 @@ private slots: virtual void slotEditReferrerWithQuanta(KURL const& url); virtual void slotViewUrlInBrowser(); virtual void slotViewParentUrlInBrowser(); - virtual void loadContextTableMenu(QValueVector const& referrers, bool is_root = false); + virtual void loadContextTableMenu(TQValueVector const& referrers, bool is_root = false); private: @@ -98,17 +98,17 @@ private: int col_label_; int col_url_; CellToolTip* cell_tip_; - QPopupMenu context_table_menu_; - QPopupMenu* sub_menu_; + TQPopupMenu context_table_menu_; + TQPopupMenu* sub_menu_; */ }; -class TableItem: public QTableItem, public ResultViewItem +class TableItem: public TQTableItem, public ResultViewItem { public: - TableItem(QTable* table, EditType et, + TableItem(TQTable* table, EditType et, LinkStatus const* linkstatus, int column_index, int alignment = Qt::AlignLeft); virtual ~TableItem(); @@ -119,14 +119,14 @@ public: void setAlignment(int aFlags); virtual int alignment() const; - virtual QString toolTip() const = 0; + virtual TQString 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 ); + //TQColor const& textStatusColor() const; + virtual void paint( TQPainter *p, const TQColorGroup &cg, + const TQRect &cr, bool selected ); virtual void setText() = 0; virtual void setPixmap() = 0; @@ -142,18 +142,18 @@ class TableItemURL: public TableItem { public: - TableItemURL(QTable* table, EditType et, + TableItemURL(TQTable* table, EditType et, LinkStatus const* linkstatus, int column_index = 3); //virtual ~TableItemURL(){}; - virtual QString toolTip() const; + virtual TQString 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; + virtual void paint( TQPainter *p, const TQColorGroup &cg, const TQRect &cr, bool selected ); + TQColor const& textStatusColor() const; }; @@ -161,17 +161,17 @@ class TableItemStatus: public TableItem { public: - TableItemStatus(QTable* table, EditType et, + TableItemStatus(TQTable* table, EditType et, LinkStatus const* linkstatus, int column_index = 1); //virtual ~TableItemStatus(){}; - virtual QString toolTip() const; + virtual TQString toolTip() const; protected: virtual void setText(); virtual void setPixmap(); - virtual void paint( QPainter *p, const QColorGroup &cg, const QRect &cr, bool selected ); + virtual void paint( TQPainter *p, const TQColorGroup &cg, const TQRect &cr, bool selected ); }; @@ -179,24 +179,24 @@ class TableItemNome: public TableItem { public: - TableItemNome(QTable* table, EditType et, + TableItemNome(TQTable* table, EditType et, LinkStatus const* linkstatus, int column_index = 2); //virtual ~TableItemNome(){}; - virtual QString toolTip() const; + virtual TQString toolTip() const; protected: virtual void setText(); virtual void setPixmap(); - //virtual void paint( QPainter *p, const QColorGroup &cg, const QRect &cr, bool selected ); + //virtual void paint( TQPainter *p, const TQColorGroup &cg, const TQRect &cr, bool selected ); }; -inline void TableItem::paint( QPainter *p, const QColorGroup &cg, - const QRect &cr, bool selected ) +inline void TableItem::paint( TQPainter *p, const TQColorGroup &cg, + const TQRect &cr, bool selected ) { - QTableItem::paint(p, cg, cr, selected); + TQTableItem::paint(p, cg, cr, selected); } #endif diff --git a/klinkstatus/src/ui/tabwidgetsession.cpp b/klinkstatus/src/ui/tabwidgetsession.cpp index 9d9033a7..d692486a 100644 --- a/klinkstatus/src/ui/tabwidgetsession.cpp +++ b/klinkstatus/src/ui/tabwidgetsession.cpp @@ -24,13 +24,13 @@ #include "../engine/searchmanager.h" #include "../actionmanager.h" -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -42,10 +42,10 @@ #include -TabWidgetSession::TabWidgetSession(QWidget* parent, const char* name, WFlags f) +TabWidgetSession::TabWidgetSession(TQWidget* parent, const char* name, WFlags f) : KTabWidget(parent, name, f) // tabs_ is initialized with size 17 { - setFocusPolicy(QTabWidget::NoFocus); + setFocusPolicy(TQTabWidget::NoFocus); setMargin(0); setTabReorderingEnabled(true); setHoverCloseButton(true); @@ -53,23 +53,23 @@ TabWidgetSession::TabWidgetSession(QWidget* parent, const char* name, WFlags f) tabs_.setAutoDelete(false); - QToolButton* tabs_new = new QToolButton(this); - tabs_new->setAccel(QKeySequence("Ctrl+N")); - connect(tabs_new, SIGNAL(clicked()), this, SLOT(slotNewSession())); + TQToolButton* tabs_new = new TQToolButton(this); + tabs_new->setAccel(TQKeySequence("Ctrl+N")); + connect(tabs_new, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotNewSession())); tabs_new->setIconSet(SmallIconSet("tab_new_raised")); tabs_new->adjustSize(); - QToolTip::add(tabs_new, i18n("Open new tab")); + TQToolTip::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_ = new TQToolButton(this); + tabs_close_->setAccel(TQKeySequence("Ctrl+W")); + connect(tabs_close_, TQT_SIGNAL(clicked()), this, TQT_SLOT(closeSession())); tabs_close_->setIconSet(SmallIconSet("tab_remove")); tabs_close_->adjustSize(); - QToolTip::add(tabs_close_, i18n("Close the current tab")); + TQToolTip::add(tabs_close_, i18n("Close the current tab")); setCornerWidget(tabs_close_, TopRight); - connect(this, SIGNAL(currentChanged(QWidget*)), this, SLOT(slotCurrentChanged(QWidget*))); + connect(this, TQT_SIGNAL(currentChanged(TQWidget*)), this, TQT_SLOT(slotCurrentChanged(TQWidget*))); } TabWidgetSession::~TabWidgetSession() @@ -108,7 +108,7 @@ SessionWidget* TabWidgetSession::getEmptySession() const } // Remember to use count() and not size() -QIntDict const& TabWidgetSession::sessions() const +TQIntDict const& TabWidgetSession::sessions() const { return tabs_; } @@ -117,10 +117,10 @@ 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*))); + connect(session_widget, TQT_SIGNAL(signalUpdateTabLabel(const LinkStatus *, SessionWidget*)), + this, TQT_SLOT(updateTabLabel(const LinkStatus *, SessionWidget*))); - insertTab(session_widget, i18n("Session") + i18n(QString::number(count() + 1).ascii())); + insertTab(session_widget, i18n("Session") + i18n(TQString::number(count() + 1).ascii())); tabs_.insert(count() - 1, session_widget); Q_ASSERT(tabs_[count() - 1]); @@ -149,9 +149,9 @@ void TabWidgetSession::closeSession() SessionWidget* TabWidgetSession::newSessionWidget() { SessionWidget* session_widget = new SessionWidget(KLSConfig::maxConnectionsNumber(), - KLSConfig::timeOut(), this, QString("session_widget-" + count())); + KLSConfig::timeOut(), this, TQString("session_widget-" + count())); - QStringList columns; + TQStringList columns; columns.push_back(TreeView::URL_LABEL); columns.push_back(TreeView::STATUS_LABEL); @@ -168,7 +168,7 @@ SessionWidget* TabWidgetSession::newSessionWidget() void TabWidgetSession::updateTabLabel(LinkStatus const* linkstatus, SessionWidget* page) { - QString label; + TQString label; KURL url = linkstatus->absoluteUrl(); if(linkstatus->hasHtmlDocTitle()) @@ -187,7 +187,7 @@ void TabWidgetSession::updateTabLabel(LinkStatus const* linkstatus, SessionWidge } changeTab(page, KCharsets::resolveEntities(label)); - setTabIconSet(page, QIconSet(KMimeType::pixmapForURL(url))); + setTabIconSet(page, TQIconSet(KMimeType::pixmapForURL(url))); } void TabWidgetSession::slotLoadSettings() @@ -210,7 +210,7 @@ void TabWidgetSession::setUrl(KURL const& url) currentSession()->setUrl(url); } -void TabWidgetSession::slotCurrentChanged(QWidget* /*page*/) +void TabWidgetSession::slotCurrentChanged(TQWidget* /*page*/) { tabs_close_->setEnabled(count() > 1); diff --git a/klinkstatus/src/ui/tabwidgetsession.h b/klinkstatus/src/ui/tabwidgetsession.h index 616c8173..90b755b6 100644 --- a/klinkstatus/src/ui/tabwidgetsession.h +++ b/klinkstatus/src/ui/tabwidgetsession.h @@ -23,7 +23,7 @@ #include #include -#include +#include class QToolButton; class SessionWidget; @@ -40,7 +40,7 @@ class TabWidgetSession : public KTabWidget Q_OBJECT public: - TabWidgetSession(QWidget * parent = 0, const char * name = 0, WFlags f = 0); + TabWidgetSession(TQWidget * parent = 0, const char * name = 0, WFlags f = 0); ~TabWidgetSession(); /** Set the URL in the current session widget */ @@ -50,7 +50,7 @@ public: bool emptySessionsExist() const; /** Returns the first empty session it finds */ SessionWidget* getEmptySession() const; - QIntDict const& sessions() const; + TQIntDict const& sessions() const; public slots: @@ -72,14 +72,14 @@ public slots: void slotExportAsHTML(); private slots: - void slotCurrentChanged(QWidget* page); + void slotCurrentChanged(TQWidget* page); private: SessionWidget* newSessionWidget(); private: - QIntDict tabs_; - QToolButton* tabs_close_; + TQIntDict tabs_; + TQToolButton* tabs_close_; }; #endif diff --git a/klinkstatus/src/ui/treeview.cpp b/klinkstatus/src/ui/treeview.cpp index 7ad92d8e..14e0e12a 100644 --- a/klinkstatus/src/ui/treeview.cpp +++ b/klinkstatus/src/ui/treeview.cpp @@ -28,9 +28,9 @@ #include #include -#include -#include -#include +#include +#include +#include #include "treeview.h" #include "../global.h" @@ -39,7 +39,7 @@ #include "../cfg/klsconfig.h" -TreeView::TreeView(QWidget *parent, const char *name) +TreeView::TreeView(TQWidget *parent, const char *name) : KListView(parent, name), ResultView(), current_column_(0) @@ -50,12 +50,12 @@ TreeView::TreeView(QWidget *parent, const char *name) setShowSortIndicator(true); //setFocusPolicy( WheelFocus ); setRootIsDecorated(KLSConfig::displayTreeView()); -// setResizeMode(QListView::LastColumn); +// setResizeMode(TQListView::LastColumn); - sub_menu_ = new QPopupMenu(this, "sub_menu_referrers"); + sub_menu_ = new TQPopupMenu(this, "sub_menu_referrers"); - connect(this, SIGNAL( rightButtonClicked ( QListViewItem *, const QPoint &, int )), - this, SLOT( slotPopupContextMenu( QListViewItem *, const QPoint &, int )) ); + connect(this, TQT_SIGNAL( rightButtonClicked ( TQListViewItem *, const TQPoint &, int )), + this, TQT_SLOT( slotPopupContextMenu( TQListViewItem *, const TQPoint &, int )) ); } @@ -64,7 +64,7 @@ TreeView::~TreeView() saveLayout(KLSConfig::self()->config(), "klinkstatus"); } -void TreeView::setColumns(QStringList const& columns) +void TreeView::setColumns(TQStringList const& columns) { ResultView::setColumns(columns); removeColunas(); @@ -73,7 +73,7 @@ void TreeView::setColumns(QStringList const& columns) for(uint i = 0; i != columns.size(); ++i) { addColumn(i18n(columns[i])); - setColumnWidthMode(i, QListView::Manual); + setColumnWidthMode(i, TQListView::Manual); } setColumnAlignment(col_status_ - 1, Qt::AlignCenter); @@ -85,10 +85,10 @@ void TreeView::resetColumns() { setColumnWidth(col_url_ - 1, (int)(0.45 * width())); - setResizeMode(QListView::LastColumn); // fit to the window + setResizeMode(TQListView::LastColumn); // fit to the window // resize again - setColumnWidthMode(col_label_ - 1, QListView::Manual); - setResizeMode(QListView::NoColumn); + setColumnWidthMode(col_label_ - 1, TQListView::Manual); + setResizeMode(TQListView::NoColumn); } double TreeView::columnsWidth() const @@ -116,7 +116,7 @@ void TreeView::removeColunas() void TreeView::show(ResultView::Status const& status) { - QListViewItemIterator it(static_cast (this)); + TQListViewItemIterator it(static_cast (this)); while(it.current()) { TreeViewItem* item = myItem(it.current()); @@ -155,7 +155,7 @@ void TreeView::show(ResultView::Status const& status) void TreeView::show(LinkMatcher link_matcher) { - QListViewItemIterator it(this); + TQListViewItemIterator it(this); while(it.current()) { TreeViewItem* item = myItem(it.current()); @@ -172,7 +172,7 @@ void TreeView::show(LinkMatcher link_matcher) void TreeView::showAll() { - QListViewItemIterator it(this); + TQListViewItemIterator it(this); while(it.current()) { it.current()->setVisible(true); @@ -181,9 +181,9 @@ void TreeView::showAll() } } -void TreeView::ensureRowVisible(const QListViewItem * i, bool tree_display) +void TreeView::ensureRowVisible(const TQListViewItem * i, bool tree_display) { - QScrollBar* vertical_scroll_bar = verticalScrollBar(); + TQScrollBar* vertical_scroll_bar = verticalScrollBar(); if(tree_display || vertical_scroll_bar->value() > (vertical_scroll_bar->maxValue() - vertical_scroll_bar->lineStep())) @@ -195,21 +195,21 @@ bool TreeView::isEmpty() const return !childCount(); } -void TreeView::resizeEvent(QResizeEvent *e) +void TreeView::resizeEvent(TQResizeEvent *e) { KListView::resizeEvent(e); resetColumns(); clipper()->repaint(); } -void TreeView::slotPopupContextMenu(QListViewItem* item, const QPoint& pos, int col) +void TreeView::slotPopupContextMenu(TQListViewItem* item, const TQPoint& pos, int col) { current_column_ = col; TreeViewItem* tree_item = myItem(item); if(tree_item) { - QValueVector referrers = tree_item->linkStatus()->referrers(); + TQValueVector referrers = tree_item->linkStatus()->referrers(); loadContextTableMenu(referrers, tree_item->linkStatus()->isRoot()); context_table_menu_.popup(pos); } @@ -218,7 +218,7 @@ void TreeView::slotPopupContextMenu(QListViewItem* item, const QPoint& pos, int void TreeView::slotCopyUrlToClipboard() const { TreeViewItem* _item = myItem(currentItem()); - QString content(_item->linkStatus()->absoluteUrl().prettyURL()); + TQString content(_item->linkStatus()->absoluteUrl().prettyURL()); QClipboard* cb = kapp->clipboard(); cb->setText(content); } @@ -226,7 +226,7 @@ void TreeView::slotCopyUrlToClipboard() const void TreeView::slotCopyParentUrlToClipboard() const { TreeViewItem* _item = myItem(currentItem()); - QString content(_item->linkStatus()->parent()->absoluteUrl().prettyURL()); + TQString content(_item->linkStatus()->parent()->absoluteUrl().prettyURL()); QClipboard* cb = kapp->clipboard(); cb->setText(content); } @@ -234,7 +234,7 @@ void TreeView::slotCopyParentUrlToClipboard() const void TreeView::slotCopyCellTextToClipboard() const { TreeViewItem* _item = myItem(currentItem()); - QString cell_text(_item->text(current_column_)); + TQString cell_text(_item->text(current_column_)); QClipboard* cb = kapp->clipboard(); cb->setText(cell_text); } @@ -242,7 +242,7 @@ void TreeView::slotCopyCellTextToClipboard() const void TreeView::slotEditReferrersWithQuanta() { TreeViewItem* _item = myItem(currentItem()); - QValueVector referrers = _item->linkStatus()->referrers(); + TQValueVector referrers = _item->linkStatus()->referrers(); if(Global::isQuantaAvailableViaDCOP()) { @@ -251,7 +251,7 @@ void TreeView::slotEditReferrersWithQuanta() } else { - QStringList list_urls; + TQStringList list_urls; for(uint i = 0; i != referrers.size(); ++i) list_urls.append(referrers[i].url()); @@ -275,7 +275,7 @@ void TreeView::slotEditReferrerWithQuanta(int id) index -= 2; // The list of referrers starts on index = 2 TreeViewItem* _item = myItem(currentItem()); - QValueVector referrers = _item->linkStatus()->referrers(); + TQValueVector referrers = _item->linkStatus()->referrers(); Q_ASSERT(index >= 0 && (uint)index < referrers.size()); slotEditReferrerWithQuanta(referrers[index]); @@ -283,7 +283,7 @@ void TreeView::slotEditReferrerWithQuanta(int id) void TreeView::slotEditReferrerWithQuanta(KURL const& url) { - QString filePath = url.url(); + TQString filePath = url.url(); if(Global::isQuantaAvailableViaDCOP()) { @@ -292,13 +292,13 @@ void TreeView::slotEditReferrerWithQuanta(KURL const& url) if(!success) { - QString message = i18n("File %1 cannot be opened. Might be a DCOP problem.").arg(filePath); + TQString message = i18n("File %1 cannot be opened. Might be a DCOP problem.").arg(filePath); KMessageBox::error(parentWidget(), message); } } else { - QStringList args(url.url()); + TQStringList args(url.url()); Global::openQuanta(args); } } @@ -338,21 +338,21 @@ void TreeView::slotViewParentUrlInBrowser() } } -void TreeView::loadContextTableMenu(QValueVector const& referrers, bool is_root) +void TreeView::loadContextTableMenu(TQValueVector 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_->insertItem(i18n("All"), this, TQT_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))); + connect(sub_menu_, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotEditReferrerWithQuanta(int))); context_table_menu_.insertItem(SmallIconSet("edit"), i18n("Edit Referrer with Quanta"), sub_menu_); @@ -365,24 +365,24 @@ void TreeView::loadContextTableMenu(QValueVector const& referrers, bool is } context_table_menu_.insertItem(SmallIconSet("fileopen"), i18n("Open URL"), - this, SLOT(slotViewUrlInBrowser())); + this, TQT_SLOT(slotViewUrlInBrowser())); context_table_menu_.insertItem(/*SmallIconSet("fileopen"), */i18n("Open Referrer URL"), - this, SLOT(slotViewParentUrlInBrowser())); + this, TQT_SLOT(slotViewParentUrlInBrowser())); context_table_menu_.insertSeparator(); context_table_menu_.insertItem(SmallIconSet("editcopy"), i18n("Copy URL"), - this, SLOT(slotCopyUrlToClipboard())); + this, TQT_SLOT(slotCopyUrlToClipboard())); context_table_menu_.insertItem(/*SmallIconSet("editcopy"), */i18n("Copy Referrer URL"), - this, SLOT(slotCopyParentUrlToClipboard())); + this, TQT_SLOT(slotCopyParentUrlToClipboard())); context_table_menu_.insertItem(/*SmallIconSet("editcopy"), */i18n("Copy Cell Text"), - this, SLOT(slotCopyCellTextToClipboard())); + this, TQT_SLOT(slotCopyCellTextToClipboard())); } -TreeViewItem* TreeView::myItem(QListViewItem* item) const +TreeViewItem* TreeView::myItem(TQListViewItem* item) const { TreeViewItem* _item = dynamic_cast (item); Q_ASSERT(_item); @@ -392,7 +392,7 @@ TreeViewItem* TreeView::myItem(QListViewItem* item) const /* ******************************* TreeViewItem ******************************* */ -TreeViewItem::TreeViewItem(TreeView* parent, QListViewItem* after, +TreeViewItem::TreeViewItem(TreeView* parent, TQListViewItem* after, LinkStatus const* linkstatus) : KListViewItem(parent, after), last_child_(0), root_(parent) @@ -400,7 +400,7 @@ TreeViewItem::TreeViewItem(TreeView* parent, QListViewItem* after, init(linkstatus); } -TreeViewItem::TreeViewItem(TreeView* root, QListViewItem* listview_item, QListViewItem* after, +TreeViewItem::TreeViewItem(TreeView* root, TQListViewItem* listview_item, TQListViewItem* after, LinkStatus const* linkstatus) : KListViewItem(listview_item, after), last_child_(0), root_(root) @@ -433,18 +433,18 @@ void TreeViewItem::init(LinkStatus const* linkstatus) } } -void TreeViewItem::setLastChild(QListViewItem* last_child) +void TreeViewItem::setLastChild(TQListViewItem* last_child) { Q_ASSERT(last_child); last_child_ = last_child; } -QListViewItem* TreeViewItem::lastChild() const +TQListViewItem* TreeViewItem::lastChild() const { return last_child_; } -QString TreeViewItem::key(int column, bool) const +TQString TreeViewItem::key(int column, bool) const { // FIXME magic numbers switch(column) @@ -461,14 +461,14 @@ LinkStatus const* TreeViewItem::linkStatus() const return column_items_[0].linkStatus(); } -void TreeViewItem::paintCell(QPainter * p, const QColorGroup & cg, int column, int width, int align) +void TreeViewItem::paintCell(TQPainter * p, const TQColorGroup & 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); + TQColorGroup m_cg(cg); + TQColor color(item.textStatusColor()); + m_cg.setColor(TQColorGroup::Text, color); KListViewItem::paintCell(p, m_cg, column, width, align); @@ -507,7 +507,7 @@ LinkStatus const* TreeColumnViewItem::linkStatus() const return ls_; } -QColor const& TreeColumnViewItem::textStatusColor() const +TQColor const& TreeColumnViewItem::textStatusColor() const { if(columnIndex() == root_->urlColumnIndex() || columnIndex() == root_->statusColumnIndex()) { @@ -537,7 +537,7 @@ QColor const& TreeColumnViewItem::textStatusColor() const } -QString TreeColumnViewItem::text(int column) const +TQString TreeColumnViewItem::text(int column) const { Q_ASSERT(column > 0); @@ -559,19 +559,19 @@ QString TreeColumnViewItem::text(int column) const } else if(column == root_->statusColumnIndex()) { - return QString(); + return TQString(); } else if(column == root_->labelColumnIndex()) { - QString label(linkStatus()->label()); + TQString label(linkStatus()->label()); if(!label.isNull()) return label.simplifyWhiteSpace(); } - return QString(); + return TQString(); } -QPixmap TreeColumnViewItem::pixmap(int column) const +TQPixmap TreeColumnViewItem::pixmap(int column) const { Q_ASSERT(column > 0); @@ -602,7 +602,7 @@ QPixmap TreeColumnViewItem::pixmap(int column) const return SmallIcon("help"); } - return QPixmap(); + return TQPixmap(); } diff --git a/klinkstatus/src/ui/treeview.h b/klinkstatus/src/ui/treeview.h index eef34ff8..4d67c4f4 100644 --- a/klinkstatus/src/ui/treeview.h +++ b/klinkstatus/src/ui/treeview.h @@ -23,18 +23,18 @@ 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. +a TQTable and a TQListView, but the APIs are a little diferent... then I realize +that a TQTable 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(TQWidget *parent = 0, const char *name = 0); ~TreeView(); - virtual void setColumns(QStringList const& columns); + virtual void setColumns(TQStringList const& columns); virtual void clear(); void removeColunas(); virtual void show(ResultView::Status const& status); @@ -48,17 +48,17 @@ public: 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); + void ensureRowVisible(const TQListViewItem * i, bool tree_display); virtual bool isEmpty() const; - TreeViewItem* myItem(QListViewItem* item) const; + TreeViewItem* myItem(TQListViewItem* item) const; protected: - virtual void resizeEvent(QResizeEvent *e); + virtual void resizeEvent(TQResizeEvent *e); private slots: - void slotPopupContextMenu(QListViewItem *, const QPoint &, int); + void slotPopupContextMenu(TQListViewItem *, const TQPoint &, int); virtual void slotCopyUrlToClipboard() const; virtual void slotCopyParentUrlToClipboard() const; virtual void slotCopyCellTextToClipboard() const; @@ -67,7 +67,7 @@ private slots: virtual void slotEditReferrerWithQuanta(KURL const& url); virtual void slotViewUrlInBrowser(); virtual void slotViewParentUrlInBrowser(); - virtual void loadContextTableMenu(QValueVector const& referrers, bool is_root = false); + virtual void loadContextTableMenu(TQValueVector const& referrers, bool is_root = false); private: void resetColumns(); @@ -90,27 +90,27 @@ class TreeViewItem: public KListViewItem { public: - TreeViewItem(TreeView* parent, QListViewItem* after, + TreeViewItem(TreeView* parent, TQListViewItem* after, LinkStatus const* linkstatus); - TreeViewItem(TreeView* root, QListViewItem* parent_item, QListViewItem* after, + TreeViewItem(TreeView* root, TQListViewItem* parent_item, TQListViewItem* after, LinkStatus const* linkstatus); virtual ~TreeViewItem(); - void setLastChild(QListViewItem* last_child); - QListViewItem* lastChild() const; + void setLastChild(TQListViewItem* last_child); + TQListViewItem* lastChild() const; - QString key(int column, bool) const; + TQString key(int column, bool) const; LinkStatus const* linkStatus() const; protected: - virtual void paintCell(QPainter * p, const QColorGroup & cg, int column, int width, int align); + virtual void paintCell(TQPainter * p, const TQColorGroup & cg, int column, int width, int align); private: void init(LinkStatus const* linkstatus); private: - QValueVector column_items_; - QListViewItem* last_child_; + TQValueVector column_items_; + TQListViewItem* last_child_; TreeView* root_; }; @@ -129,9 +129,9 @@ public: //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; + TQColor const& textStatusColor() const; + TQString text(int column) const; + TQPixmap pixmap(int column) const; private: TreeView* root_; diff --git a/klinkstatus/src/utils/utils.cpp b/klinkstatus/src/utils/utils.cpp index 6259f8d0..25384b4b 100644 --- a/klinkstatus/src/utils/utils.cpp +++ b/klinkstatus/src/utils/utils.cpp @@ -20,15 +20,15 @@ #include "utils.h" -#include -#include +#include +#include #include #include #include -QString htmlDocCharset[NUMBER_OF_HTML_CODES][2] = { +TQString htmlDocCharset[NUMBER_OF_HTML_CODES][2] = { { "€", "@" }, { " ", "\t" }, @@ -129,7 +129,7 @@ QString htmlDocCharset[NUMBER_OF_HTML_CODES][2] = { }; -void decode(QString& url) +void decode(TQString& url) { if( (int)url.find('&') != -1) { @@ -184,18 +184,18 @@ int smallerUnsigned(int a, int b) namespace FileManager { -QString read(QString const& path) +TQString read(TQString const& path) { - QFile file(path); + TQFile file(path); if(!file.open(IO_ReadOnly)) { kdDebug() << "File " << path << " not found." << endl; - return QString(); + return TQString(); } - QTextStream stream(&file); - QString fileString = stream.read(); + TQTextStream stream(&file); + TQString fileString = stream.read(); file.close(); diff --git a/klinkstatus/src/utils/utils.h b/klinkstatus/src/utils/utils.h index 97d81ea0..f44d94c4 100644 --- a/klinkstatus/src/utils/utils.h +++ b/klinkstatus/src/utils/utils.h @@ -22,7 +22,7 @@ #define UTILS_H #include -#include +#include //#include @@ -31,14 +31,14 @@ using namespace std; int const NUMBER_OF_HTML_CODES = 92; -extern QString htmlDocCharset[NUMBER_OF_HTML_CODES][2]; +extern TQString htmlDocCharset[NUMBER_OF_HTML_CODES][2]; /** Decode the html charset. e.g. decode("mail@server.org") => "mail@server.org" */ -void decode(QString& url); +void decode(TQString& url); //void decode(string& url); /** @@ -57,7 +57,7 @@ int smallerUnsigned(int a, int b); namespace FileManager { -QString read(QString const& path); +TQString read(TQString const& path); } diff --git a/klinkstatus/src/utils/xsl.cpp b/klinkstatus/src/utils/xsl.cpp index c3b13412..27f61cb8 100644 --- a/klinkstatus/src/utils/xsl.cpp +++ b/klinkstatus/src/utils/xsl.cpp @@ -33,12 +33,12 @@ // stdlib.h is required to build on Solaris #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include @@ -51,7 +51,7 @@ * The thread class that actually performs the XSL processing. * Using a thread allows async operation. */ -class KopeteXSLThread : public QObject, public QThread +class KopeteXSLThread : public TQObject, public QThread { public: /** @@ -62,36 +62,36 @@ public: * @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 ); + KopeteXSLThread( const TQString &xmlString, xsltStylesheetPtr xslDoc, TQObject *target = 0L, const char *slotCompleted = 0L ); /** - * Reimplemented from QThread. Does the processing. + * Reimplemented from TQThread. 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 ); + bool event( TQEvent *event ); - static QString xsltTransform( const QString &xmlString, xsltStylesheetPtr xslDoc ); + static TQString xsltTransform( const TQString &xmlString, xsltStylesheetPtr xslDoc ); /** * Returns the result string */ - const QString &result() + const TQString &result() { return m_resultString; }; private: - QString m_xml; + TQString m_xml; xsltStylesheetPtr m_xsl; - QString m_resultString; - QObject *m_target; + TQString m_resultString; + TQObject *m_target; const char *m_slotCompleted; - QMutex dataMutex; + TQMutex dataMutex; }; -KopeteXSLThread::KopeteXSLThread( const QString &xmlString, xsltStylesheetPtr xslDoc, QObject *target, const char *slotCompleted ) +KopeteXSLThread::KopeteXSLThread( const TQString &xmlString, xsltStylesheetPtr xslDoc, TQObject *target, const char *slotCompleted ) { m_xml = xmlString; m_xsl = xslDoc; @@ -106,17 +106,17 @@ void KopeteXSLThread::run() m_resultString = xsltTransform( m_xml, m_xsl ); dataMutex.unlock(); // get back to the main thread - qApp->postEvent( this, new QEvent( QEvent::User ) ); + qApp->postEvent( this, new TQEvent( TQEvent::User ) ); } -bool KopeteXSLThread::event( QEvent *event ) +bool KopeteXSLThread::event( TQEvent *event ) { - if ( event->type() == QEvent::User ) + if ( event->type() == TQEvent::User ) { dataMutex.lock(); if( m_target && m_slotCompleted ) { - QSignal completeSignal( m_target ); + TQSignal completeSignal( m_target ); completeSignal.connect( m_target, m_slotCompleted ); completeSignal.setValue( m_resultString ); completeSignal.activate(); @@ -125,23 +125,23 @@ bool KopeteXSLThread::event( QEvent *event ) delete this; return true; } - return QObject::event( event ); + return TQObject::event( event ); } -QString KopeteXSLThread::xsltTransform( const QString &xmlString, xsltStylesheetPtr styleSheet ) +TQString KopeteXSLThread::xsltTransform( const TQString &xmlString, xsltStylesheetPtr styleSheet ) { - // Convert QString into a C string - QCString xmlCString = xmlString.utf8(); + // Convert TQString into a C string + TQCString xmlCString = xmlString.utf8(); - QString resultString; - QString errorMsg; + TQString resultString; + TQString 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 TQCString appPath( TQString::fromLatin1("\"%1\"").arg( KApplication::kApplication()->dirs()->findDirs("appdata", TQString::fromLatin1("styles/data") ).front() ).utf8() ); static const char* params[3] = { "appdata", @@ -156,7 +156,7 @@ QString KopeteXSLThread::xsltTransform( const QString &xmlString, xsltStylesheet xmlChar *mem; int size; xmlDocDumpMemory( resultDoc, &mem, &size ); - resultString = QString::fromUtf8( QCString( ( char * )( mem ), size + 1 ) ); + resultString = TQString::fromUtf8( TQCString( ( char * )( mem ), size + 1 ) ); xmlFree( mem ); xmlFreeDoc( resultDoc ); } @@ -196,8 +196,8 @@ public: unsigned int flags; }; -XSLT::XSLT( const QString &document, QObject *parent ) - : QObject( parent ), d(new XSLTPrivate) +XSLT::XSLT( const TQString &document, TQObject *parent ) + : TQObject( parent ), d(new XSLTPrivate) { d->flags = 0; d->xslDoc = 0; @@ -217,12 +217,12 @@ XSLT::~XSLT() delete d; } -void XSLT::setXSLT( const QString &_document ) +void XSLT::setXSLT( const TQString &_document ) { // Search for '' 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, + // FIXME: Preprocessing the document using the TQString 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 @@ -235,47 +235,47 @@ void XSLT::setXSLT( const QString &_document ) // 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( "(.*)" ) ); + TQRegExp elementMatch( TQString::fromLatin1( "(.*)" ) ); elementMatch.setMinimal( true ); - QString document = _document; + TQString document = _document; int pos; while ( ( pos = elementMatch.search( document ) ) != -1 ) { - QString orig = elementMatch.cap( 1 ); + TQString 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( + TQStringList parts = TQStringList::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; + TQStringList::Iterator it = parts.begin(); + TQString trans = *it; bool prependPercent = true; it = parts.remove( it ); for ( it = parts.begin(); it != parts.end(); ++it ) { prependPercent = false; - if ( *it == QString::fromLatin1( "TIME" ) ) + if ( *it == TQString::fromLatin1( "TIME" ) ) { - trans += QString::fromLatin1( "" ); + trans += TQString::fromLatin1( "" ); } - else if ( *it == QString::fromLatin1( "TIMESTAMP" ) ) + else if ( *it == TQString::fromLatin1( "TIMESTAMP" ) ) { - trans += QString::fromLatin1( "" ); + trans += TQString::fromLatin1( "" ); } - else if ( *it == QString::fromLatin1( "FORMATTEDTIMESTAMP" ) ) + else if ( *it == TQString::fromLatin1( "FORMATTEDTIMESTAMP" ) ) { - trans += QString::fromLatin1( "" ); + trans += TQString::fromLatin1( "" ); } - else if ( *it == QString::fromLatin1( "FROM_CONTACT_DISPLAYNAME" ) ) + else if ( *it == TQString::fromLatin1( "FROM_CONTACT_DISPLAYNAME" ) ) { - trans += QString::fromLatin1( "" + trans += TQString::fromLatin1( "" "" "" "" @@ -290,9 +290,9 @@ void XSLT::setXSLT( const QString &_document ) "" "" ); } - else if ( *it == QString::fromLatin1( "TO_CONTACT_DISPLAYNAME" ) ) + else if ( *it == TQString::fromLatin1( "TO_CONTACT_DISPLAYNAME" ) ) { - trans += QString::fromLatin1( "" + trans += TQString::fromLatin1( "" "" "" "" @@ -307,37 +307,37 @@ void XSLT::setXSLT( const QString &_document ) "" "" ); } - else if ( *it == QString::fromLatin1( "FROM_METACONTACT_DISPLAYNAME" ) ) + else if ( *it == TQString::fromLatin1( "FROM_METACONTACT_DISPLAYNAME" ) ) { - trans += QString::fromLatin1( "" + trans += TQString::fromLatin1( "" "" "" "" "" ); } - else if ( *it == QString::fromLatin1( "TO_METACONTACT_DISPLAYNAME" ) ) + else if ( *it == TQString::fromLatin1( "TO_METACONTACT_DISPLAYNAME" ) ) { - trans += QString::fromLatin1( "" + trans += TQString::fromLatin1( "" "" "" "" "" ); } - else if ( *it == QString::fromLatin1( "FROM_CONTACT_ID" ) ) + else if ( *it == TQString::fromLatin1( "FROM_CONTACT_ID" ) ) { - trans += QString::fromLatin1( "" + trans += TQString::fromLatin1( "" "" "" ); } - else if ( *it == QString::fromLatin1( "TO_CONTACT_ID" ) ) + else if ( *it == TQString::fromLatin1( "TO_CONTACT_ID" ) ) { - trans += QString::fromLatin1( "" + trans += TQString::fromLatin1( "" "" "" ); } - else if ( *it == QString::fromLatin1( "BODY" ) ) + else if ( *it == TQString::fromLatin1( "BODY" ) ) { - trans += QString::fromLatin1( "" ); + trans += TQString::fromLatin1( "" ); } else { @@ -362,7 +362,7 @@ void XSLT::setXSLT( const QString &_document ) d->xslDoc = 0; d->flags = 0; - QCString rawDocument = document.utf8(); + TQCString rawDocument = document.utf8(); d->xslDoc = xmlParseMemory( rawDocument, rawDocument.length() ); if( d->xslDoc ) @@ -371,13 +371,13 @@ void XSLT::setXSLT( const QString &_document ) if( d->styleSheet ) { // Check for flags - QStringList flags; + TQStringList 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 ); + TQCString flagData( (const char*)child->content ); if( flagData.contains( "Flag:" ) ) { @@ -387,7 +387,7 @@ void XSLT::setXSLT( const QString &_document ) } if( !flags.isEmpty() ) - setProperty("flags", flags.join( QString::fromLatin1("|") ) ); + setProperty("flags", flags.join( TQString::fromLatin1("|") ) ); } else { @@ -406,12 +406,12 @@ void XSLT::setXSLT( const QString &_document ) } } -QString XSLT::transform( const QString &xmlString ) +TQString XSLT::transform( const TQString &xmlString ) { return KopeteXSLThread::xsltTransform( xmlString, d->styleSheet ); } -void XSLT::transformAsync( const QString &xmlString, QObject *target, const char *slotCompleted ) +void XSLT::transformAsync( const TQString &xmlString, TQObject *target, const char *slotCompleted ) { ( new KopeteXSLThread( xmlString, d->styleSheet, target, slotCompleted ) )->start(); } diff --git a/klinkstatus/src/utils/xsl.h b/klinkstatus/src/utils/xsl.h index 9d12c1c1..7fb6af70 100644 --- a/klinkstatus/src/utils/xsl.h +++ b/klinkstatus/src/utils/xsl.h @@ -20,7 +20,7 @@ #ifndef XSL_H #define XSL_H -#include +#include class XSLTPrivate; @@ -56,7 +56,7 @@ public: * * Constructs a new XSLT parser using the provided XSLT document */ - XSLT( const QString &xsltDocument, QObject *parent = 0L ); + XSLT( const TQString &xsltDocument, TQObject *parent = 0L ); virtual ~XSLT(); @@ -65,7 +65,7 @@ public: * * @return an ORed set of @ref Flags, or 0 if none */ - void setXSLT( const QString &document ); + void setXSLT( const TQString &document ); /** * Transforms the XML string using the XSLT document, synchronously @@ -73,17 +73,17 @@ public: * @param xmlString The source XML * @return The result of the transformation */ - QString transform( const QString &xmlString ); + TQString transform( const TQString &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 + * @param target The TQObject that contains the slot to be executed when processing is complete + * @param slotCompleted A slot that accepts a TQVariant & paramater, that is the result * of the transformation */ - void transformAsync( const QString &xmlString, QObject *target, const char *slotCompleted ); + void transformAsync( const TQString &xmlString, TQObject *target, const char *slotCompleted ); /** * Check whether the XSLT document is valid diff --git a/kommander/editor/actiondnd.cpp b/kommander/editor/actiondnd.cpp index 0da7c650..17d8af3f 100644 --- a/kommander/editor/actiondnd.cpp +++ b/kommander/editor/actiondnd.cpp @@ -18,19 +18,19 @@ ** **********************************************************************/ -#include -#include -#include -#include +#include +#include +#include +#include #include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include #include "actiondnd.h" #include "command.h" @@ -42,23 +42,23 @@ #include -bool QDesignerAction::addTo( QWidget *w ) +bool QDesignerAction::addTo( TQWidget *w ) { if ( !widgetToInsert ) - return QAction::addTo( w ); + return TQAction::addTo( w ); - if ( w->inherits( "QPopupMenu" ) ) + if ( w->inherits( "TQPopupMenu" ) ) return false; - widgetToInsert->reparent( w, QPoint( 0, 0 ), false ); + widgetToInsert->reparent( w, TQPoint( 0, 0 ), false ); addedTo( widgetToInsert, w ); return true; } -bool QDesignerAction::removeFrom( QWidget *w ) +bool QDesignerAction::removeFrom( TQWidget *w ) { if ( !widgetToInsert ) - return QAction::removeFrom( w ); + return TQAction::removeFrom( w ); remove(); return true; @@ -69,19 +69,19 @@ void QDesignerAction::remove() if ( !widgetToInsert ) return; MainWindow::self->formWindow()->selectWidget( widgetToInsert, false ); - widgetToInsert->reparent( 0, QPoint( 0, 0 ), false ); + widgetToInsert->reparent( 0, TQPoint( 0, 0 ), false ); } -QDesignerToolBarSeparator::QDesignerToolBarSeparator(Orientation o , QToolBar *parent, +QDesignerToolBarSeparator::QDesignerToolBarSeparator(Orientation o , TQToolBar *parent, const char* name ) - : QWidget( parent, name ) + : TQWidget( parent, name ) { - connect( parent, SIGNAL(orientationChanged(Orientation)), - this, SLOT(setOrientation(Orientation)) ); + connect( parent, TQT_SIGNAL(orientationChanged(Orientation)), + this, TQT_SLOT(setOrientation(Orientation)) ); setOrientation( o ); setBackgroundMode( parent->backgroundMode() ); setBackgroundOrigin( ParentOrigin ); - setSizePolicy( QSizePolicy( QSizePolicy::Minimum, QSizePolicy::Minimum ) ); + setSizePolicy( TQSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Minimum ) ); } void QDesignerToolBarSeparator::setOrientation( Orientation o ) @@ -89,67 +89,67 @@ void QDesignerToolBarSeparator::setOrientation( Orientation o ) orient = o; } -void QDesignerToolBarSeparator::styleChange( QStyle& ) +void QDesignerToolBarSeparator::styleChange( TQStyle& ) { setOrientation( orient ); } -QSize QDesignerToolBarSeparator::sizeHint() const +TQSize QDesignerToolBarSeparator::sizeHint() const { - int extent = style().pixelMetric( QStyle::PM_DockWindowSeparatorExtent, + int extent = style().pixelMetric( TQStyle::PM_DockWindowSeparatorExtent, this ); if ( orient == Horizontal ) - return QSize( extent, 0 ); + return TQSize( extent, 0 ); else - return QSize( 0, extent ); + return TQSize( 0, extent ); } -void QDesignerToolBarSeparator::paintEvent( QPaintEvent * ) +void QDesignerToolBarSeparator::paintEvent( TQPaintEvent * ) { - QPainter p( this ); - QStyle::SFlags flags = QStyle::Style_Default; + TQPainter p( this ); + TQStyle::SFlags flags = TQStyle::Style_Default; if ( orientation() == Horizontal ) - flags |= QStyle::Style_Horizontal; + flags |= TQStyle::Style_Horizontal; - style().drawPrimitive( QStyle::PE_DockWindowSeparator, &p, rect(), + style().drawPrimitive( TQStyle::PE_DockWindowSeparator, &p, rect(), colorGroup(), flags ); } -QSeparatorAction::QSeparatorAction( QObject *parent ) - : QAction( parent, "qt_designer_separator" ), wid( 0 ) +QSeparatorAction::QSeparatorAction( TQObject *parent ) + : TQAction( parent, "qt_designer_separator" ), wid( 0 ) { } -bool QSeparatorAction::addTo( QWidget *w ) +bool QSeparatorAction::addTo( TQWidget *w ) { - if ( w->inherits( "QToolBar" ) ) { - QToolBar *tb = (QToolBar*)w; + if ( w->inherits( "TQToolBar" ) ) { + TQToolBar *tb = (TQToolBar*)w; wid = new QDesignerToolBarSeparator( tb->orientation(), tb ); return true; - } else if ( w->inherits( "QPopupMenu" ) ) { - idx = ( (QPopupMenu*)w )->count(); - ( (QPopupMenu*)w )->insertSeparator( idx ); + } else if ( w->inherits( "TQPopupMenu" ) ) { + idx = ( (TQPopupMenu*)w )->count(); + ( (TQPopupMenu*)w )->insertSeparator( idx ); return true; } return false; } -bool QSeparatorAction::removeFrom( QWidget *w ) +bool QSeparatorAction::removeFrom( TQWidget *w ) { - if ( w->inherits( "QToolBar" ) ) { + if ( w->inherits( "TQToolBar" ) ) { delete wid; return true; - } else if ( w->inherits( "QPopupMenu" ) ) { - ( (QPopupMenu*)w )->removeItemAt( idx ); + } else if ( w->inherits( "TQPopupMenu" ) ) { + ( (TQPopupMenu*)w )->removeItemAt( idx ); return true; } return false; } -QWidget *QSeparatorAction::widget() const +TQWidget *QSeparatorAction::widget() const { return wid; } @@ -157,14 +157,14 @@ QWidget *QSeparatorAction::widget() const -QDesignerToolBar::QDesignerToolBar( QMainWindow *mw ) - : QToolBar( mw ), lastIndicatorPos( -1, -1 ) +QDesignerToolBar::QDesignerToolBar( TQMainWindow *mw ) + : TQToolBar( mw ), lastIndicatorPos( -1, -1 ) { insertAnchor = 0; afterAnchor = true; setAcceptDrops( true ); MetaDataBase::addEntry( this ); - lastIndicatorPos = QPoint( -1, -1 ); + lastIndicatorPos = TQPoint( -1, -1 ); indicator = new QDesignerIndicatorWidget( this ); indicator->hide(); installEventFilter( this ); @@ -173,8 +173,8 @@ QDesignerToolBar::QDesignerToolBar( QMainWindow *mw ) mw->setDockEnabled( DockTornOff, false ); } -QDesignerToolBar::QDesignerToolBar( QMainWindow *mw, Dock dock ) - : QToolBar( QString::null, mw, dock), lastIndicatorPos( -1, -1 ) +QDesignerToolBar::QDesignerToolBar( TQMainWindow *mw, Dock dock ) + : TQToolBar( TQString::null, mw, dock), lastIndicatorPos( -1, -1 ) { insertAnchor = 0; afterAnchor = true; @@ -190,7 +190,7 @@ QDesignerToolBar::QDesignerToolBar( QMainWindow *mw, Dock dock ) void QDesignerToolBar::findFormWindow() { - QWidget *w = this; + TQWidget *w = this; while ( w ) { if ( w->inherits( "FormWindow" ) ) formWindow = (FormWindow*)w; @@ -198,11 +198,11 @@ void QDesignerToolBar::findFormWindow() } } -void QDesignerToolBar::addAction( QAction *a ) +void QDesignerToolBar::addAction( TQAction *a ) { actionList.append( a ); - connect( a, SIGNAL( destroyed() ), this, SLOT( actionRemoved() ) ); - if ( a->inherits( "QActionGroup" ) ) { + connect( a, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( actionRemoved() ) ); + if ( a->inherits( "TQActionGroup" ) ) { ( (QDesignerActionGroup*)a )->widget()->installEventFilter( this ); actionMap.insert( ( (QDesignerActionGroup*)a )->widget(), a ); } else if ( a->inherits( "QSeparatorAction" ) ) { @@ -214,83 +214,83 @@ void QDesignerToolBar::addAction( QAction *a ) } } -static void fixObject( QObject *&o ) +static void fixObject( TQObject *&o ) { while ( o && o->parent() && !o->parent()->inherits( "QDesignerToolBar" ) ) o = o->parent(); } -bool QDesignerToolBar::eventFilter( QObject *o, QEvent *e ) +bool QDesignerToolBar::eventFilter( TQObject *o, TQEvent *e ) { if ( !o || !e || o->inherits( "QDockWindowHandle" ) || o->inherits( "QDockWindowTitleBar" ) ) - return QToolBar::eventFilter( o, e ); + return TQToolBar::eventFilter( o, e ); - if ( o == this && e->type() == QEvent::MouseButtonPress && - ( ( QMouseEvent*)e )->button() == LeftButton ) { - mousePressEvent( (QMouseEvent*)e ); + if ( o == this && e->type() == TQEvent::MouseButtonPress && + ( ( TQMouseEvent*)e )->button() == LeftButton ) { + mousePressEvent( (TQMouseEvent*)e ); return true; } if ( o == this ) - return QToolBar::eventFilter( o, e ); + return TQToolBar::eventFilter( o, e ); - if ( e->type() == QEvent::MouseButtonPress ) { - QMouseEvent *ke = (QMouseEvent*)e; + if ( e->type() == TQEvent::MouseButtonPress ) { + TQMouseEvent *ke = (TQMouseEvent*)e; fixObject( o ); if ( !o ) return false; buttonMousePressEvent( ke, o ); return true; - } else if(e->type() == QEvent::ContextMenu ) { - QContextMenuEvent *ce = (QContextMenuEvent*)e; + } else if(e->type() == TQEvent::ContextMenu ) { + TQContextMenuEvent *ce = (TQContextMenuEvent*)e; fixObject( o ); if( !o ) return false; buttonContextMenuEvent( ce, o ); return true; - } else if ( e->type() == QEvent::MouseMove ) { - QMouseEvent *ke = (QMouseEvent*)e; + } else if ( e->type() == TQEvent::MouseMove ) { + TQMouseEvent *ke = (TQMouseEvent*)e; fixObject( o ); if ( !o ) return false; buttonMouseMoveEvent( ke, o ); return true; - } else if ( e->type() == QEvent::MouseButtonRelease ) { - QMouseEvent *ke = (QMouseEvent*)e; + } else if ( e->type() == TQEvent::MouseButtonRelease ) { + TQMouseEvent *ke = (TQMouseEvent*)e; fixObject( o ); if ( !o ) return false; buttonMouseReleaseEvent( ke, o ); return true; - } else if ( e->type() == QEvent::DragEnter ) { - QDragEnterEvent *de = (QDragEnterEvent*)e; + } else if ( e->type() == TQEvent::DragEnter ) { + TQDragEnterEvent *de = (TQDragEnterEvent*)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; + } else if ( e->type() == TQEvent::DragMove ) { + TQDragMoveEvent *de = (TQDragMoveEvent*)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 ); + return TQToolBar::eventFilter( o, e ); } -void QDesignerToolBar::paintEvent( QPaintEvent *e ) +void QDesignerToolBar::paintEvent( TQPaintEvent *e ) { - QToolBar::paintEvent( e ); + TQToolBar::paintEvent( e ); if ( e->rect() != rect() ) return; - lastIndicatorPos = QPoint( -1, -1 ); + lastIndicatorPos = TQPoint( -1, -1 ); } -void QDesignerToolBar::contextMenuEvent( QContextMenuEvent *e ) +void QDesignerToolBar::contextMenuEvent( TQContextMenuEvent *e ) { e->accept(); - QPopupMenu menu( 0 ); + TQPopupMenu menu( 0 ); menu.insertItem( i18n("Delete Toolbar" ), 1 ); int res = menu.exec( e->globalPos() ); if ( res != -1 ) { @@ -301,7 +301,7 @@ void QDesignerToolBar::contextMenuEvent( QContextMenuEvent *e ) } } -void QDesignerToolBar::mousePressEvent( QMouseEvent *e ) +void QDesignerToolBar::mousePressEvent( TQMouseEvent *e ) { widgetInserting = false; if ( e->button() == LeftButton && @@ -318,14 +318,14 @@ void QDesignerToolBar::mousePressEvent( QMouseEvent *e ) } } -void QDesignerToolBar::mouseReleaseEvent( QMouseEvent *e ) +void QDesignerToolBar::mouseReleaseEvent( TQMouseEvent *e ) { if ( widgetInserting ) doInsertWidget( mapFromGlobal( e->globalPos() ) ); widgetInserting = false; } -void QDesignerToolBar::buttonMouseReleaseEvent( QMouseEvent *e, QObject *w ) +void QDesignerToolBar::buttonMouseReleaseEvent( TQMouseEvent *e, TQObject *w ) { if ( widgetInserting ) doInsertWidget( mapFromGlobal( e->globalPos() ) ); @@ -336,14 +336,14 @@ void QDesignerToolBar::buttonMouseReleaseEvent( QMouseEvent *e, QObject *w ) widgetInserting = false; } -void QDesignerToolBar::buttonContextMenuEvent( QContextMenuEvent *e, QObject *o ) +void QDesignerToolBar::buttonContextMenuEvent( TQContextMenuEvent *e, TQObject *o ) { e->accept(); - QPopupMenu menu( 0 ); + TQPopupMenu menu( 0 ); const int ID_DELETE = 1; const int ID_SEP = 2; const int ID_DELTOOLBAR = 3; - QMap::Iterator it = actionMap.find( (QWidget*)o ); + TQMap::Iterator it = actionMap.find( (TQWidget*)o ); if ( it != actionMap.end() && (*it)->inherits( "QSeparatorAction" ) ) menu.insertItem( i18n("Delete Separator" ), ID_DELETE ); else @@ -353,10 +353,10 @@ void QDesignerToolBar::buttonContextMenuEvent( QContextMenuEvent *e, QObject *o menu.insertItem( i18n("Delete Toolbar" ), ID_DELTOOLBAR ); int res = menu.exec( e->globalPos() ); if ( res == ID_DELETE ) { - QMap::Iterator it = actionMap.find( (QWidget*)o ); + TQMap::Iterator it = actionMap.find( (TQWidget*)o ); if ( it == actionMap.end() ) return; - QAction *a = *it; + TQAction *a = *it; int index = actionList.find( a ); RemoveActionFromToolBarCommand *cmd = new RemoveActionFromToolBarCommand( i18n("Delete Action '%1' From Toolbar '%2'" ). @@ -366,7 +366,7 @@ void QDesignerToolBar::buttonContextMenuEvent( QContextMenuEvent *e, QObject *o cmd->execute(); } else if ( res == ID_SEP ) { calcIndicatorPos( mapFromGlobal( e->globalPos() ) ); - QAction *a = new QSeparatorAction( 0 ); + TQAction *a = new QSeparatorAction( 0 ); int index = actionList.findRef( *actionMap.find( insertAnchor ) ); if ( index != -1 && afterAnchor ) ++index; @@ -387,7 +387,7 @@ void QDesignerToolBar::buttonContextMenuEvent( QContextMenuEvent *e, QObject *o } } -void QDesignerToolBar::buttonMousePressEvent( QMouseEvent *e, QObject * ) +void QDesignerToolBar::buttonMousePressEvent( TQMouseEvent *e, TQObject * ) { widgetInserting = false; @@ -411,12 +411,12 @@ void QDesignerToolBar::buttonMousePressEvent( QMouseEvent *e, QObject * ) dragStartPos = e->pos(); } -void QDesignerToolBar::removeWidget( QWidget *w ) +void QDesignerToolBar::removeWidget( TQWidget *w ) { - QMap::Iterator it = actionMap.find( w ); + TQMap::Iterator it = actionMap.find( w ); if ( it == actionMap.end() ) return; - QAction *a = *it; + TQAction *a = *it; int index = actionList.find( a ); RemoveActionFromToolBarCommand *cmd = new RemoveActionFromToolBarCommand( i18n("Delete Action '%1' From Toolbar '%2'" ). @@ -424,20 +424,20 @@ void QDesignerToolBar::removeWidget( QWidget *w ) formWindow, a, this, index ); formWindow->commandHistory()->addCommand( cmd ); cmd->execute(); - QApplication::sendPostedEvents(); + TQApplication::sendPostedEvents(); adjustSize(); } -void QDesignerToolBar::buttonMouseMoveEvent( QMouseEvent *e, QObject *o ) +void QDesignerToolBar::buttonMouseMoveEvent( TQMouseEvent *e, TQObject *o ) { if ( widgetInserting || ( e->state() & LeftButton ) == 0 ) return; - if ( QABS( QPoint( dragStartPos - e->pos() ).manhattanLength() ) < QApplication::startDragDistance() ) + if ( QABS( TQPoint( dragStartPos - e->pos() ).manhattanLength() ) < TQApplication::startDragDistance() ) return; - QMap::Iterator it = actionMap.find( (QWidget*)o ); + TQMap::Iterator it = actionMap.find( (TQWidget*)o ); if ( it == actionMap.end() ) return; - QAction *a = *it; + TQAction *a = *it; if ( !a ) return; int index = actionList.find( a ); @@ -447,14 +447,14 @@ void QDesignerToolBar::buttonMouseMoveEvent( QMouseEvent *e, QObject *o ) formWindow, a, this, index ); formWindow->commandHistory()->addCommand( cmd ); cmd->execute(); - QApplication::sendPostedEvents(); + TQApplication::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() ) ); + TQString type = a->inherits( "TQActionGroup" ) ? TQString( "application/x-designer-actiongroup" ) : + a->inherits( "QSeparatorAction" ) ? TQString( "application/x-designer-separator" ) : TQString( "application/x-designer-actions" ); + TQStoredDrag *drag = new TQStoredDrag( type, this ); + TQString s = TQString::number( (long)a ); // #### huha, that is evil + drag->setEncodedData( TQCString( s.latin1() ) ); drag->setPixmap( a->iconSet().pixmap() ); if ( a->inherits( "QDesignerAction" ) ) { if ( formWindow->widgets()->find( ( (QDesignerAction*)a )->widget() ) ) @@ -467,23 +467,23 @@ void QDesignerToolBar::buttonMouseMoveEvent( QMouseEvent *e, QObject *o ) formWindow->commandHistory()->addCommand( cmd ); cmd->execute(); } - lastIndicatorPos = QPoint( -1, -1 ); + lastIndicatorPos = TQPoint( -1, -1 ); indicator->hide(); } #ifndef QT_NO_DRAGANDDROP -void QDesignerToolBar::dragEnterEvent( QDragEnterEvent *e ) +void QDesignerToolBar::dragEnterEvent( TQDragEnterEvent *e ) { widgetInserting = false; - lastIndicatorPos = QPoint( -1, -1 ); + lastIndicatorPos = TQPoint( -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 ) +void QDesignerToolBar::dragMoveEvent( TQDragMoveEvent *e ) { if ( e->provides( "application/x-designer-actions" ) || e->provides( "application/x-designer-actiongroup" ) || @@ -494,14 +494,14 @@ void QDesignerToolBar::dragMoveEvent( QDragMoveEvent *e ) drawIndicator( calcIndicatorPos( e->pos() ) ); } -void QDesignerToolBar::dragLeaveEvent( QDragLeaveEvent * ) +void QDesignerToolBar::dragLeaveEvent( TQDragLeaveEvent * ) { indicator->hide(); insertAnchor = 0; afterAnchor = true; } -void QDesignerToolBar::dropEvent( QDropEvent *e ) +void QDesignerToolBar::dropEvent( TQDropEvent *e ) { if ( e->provides( "application/x-designer-actions" ) || e->provides( "application/x-designer-actiongroup" ) || @@ -509,16 +509,16 @@ void QDesignerToolBar::dropEvent( QDropEvent *e ) e->accept(); else return; - QString s; + TQString s; if ( e->provides( "application/x-designer-actiongroup" ) ) - s = QString( e->encodedData( "application/x-designer-actiongroup" ) ); + s = TQString( e->encodedData( "application/x-designer-actiongroup" ) ); else if ( e->provides( "application/x-designer-separator" ) ) - s = QString( e->encodedData( "application/x-designer-separator" ) ); + s = TQString( e->encodedData( "application/x-designer-separator" ) ); else - s = QString( e->encodedData( "application/x-designer-actions" ) ); + s = TQString( e->encodedData( "application/x-designer-actions" ) ); indicator->hide(); - QAction *a = 0; + TQAction *a = 0; int index = actionList.findRef( *actionMap.find( insertAnchor ) ); if ( index != -1 && afterAnchor ) ++index; @@ -535,7 +535,7 @@ void QDesignerToolBar::dropEvent( QDropEvent *e ) } if ( actionList.findRef( a ) != -1 ) { - QMessageBox::warning( MainWindow::self, i18n("Insert/Move Action" ), + TQMessageBox::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() ) ); @@ -548,19 +548,19 @@ void QDesignerToolBar::dropEvent( QDropEvent *e ) formWindow->commandHistory()->addCommand( cmd ); cmd->execute(); - lastIndicatorPos = QPoint( -1, -1 ); + lastIndicatorPos = TQPoint( -1, -1 ); } #endif void QDesignerToolBar::reInsert() { - QAction *a = 0; + TQAction *a = 0; actionMap.clear(); clear(); for ( a = actionList.first(); a; a = actionList.next() ) { a->addTo( this ); - if ( a->inherits( "QActionGroup" ) ) { + if ( a->inherits( "TQActionGroup" ) ) { actionMap.insert( ( (QDesignerActionGroup*)a )->widget(), a ); if ( ( (QDesignerActionGroup*)a )->widget() ) ( (QDesignerActionGroup*)a )->widget()->installEventFilter( this ); @@ -572,31 +572,31 @@ void QDesignerToolBar::reInsert() ( (QSeparatorAction*)a )->widget()->installEventFilter( this ); } } - QApplication::sendPostedEvents(); + TQApplication::sendPostedEvents(); adjustSize(); } void QDesignerToolBar::actionRemoved() { - actionList.removeRef( (QAction*)sender() ); + actionList.removeRef( (TQAction*)sender() ); } -QPoint QDesignerToolBar::calcIndicatorPos( const QPoint &pos ) +TQPoint QDesignerToolBar::calcIndicatorPos( const TQPoint &pos ) { if ( orientation() == Horizontal ) { - QPoint pnt( width() - 2, 0 ); + TQPoint pnt( width() - 2, 0 ); insertAnchor = 0; afterAnchor = true; if ( !children() ) return pnt; - pnt = QPoint( 13, 0 ); - QObjectListIt it( *children() ); - QObject * obj; + pnt = TQPoint( 13, 0 ); + TQObjectListIt it( *children() ); + TQObject * obj; while( (obj=it.current()) != 0 ) { ++it; if ( obj->isWidgetType() && qstrcmp( "qt_dockwidget_internal", obj->name() ) != 0 ) { - QWidget *w = (QWidget*)obj; + TQWidget *w = (TQWidget*)obj; if ( w->x() < pos.x() ) { pnt.setX( w->x() + w->width() + 1 ); insertAnchor = w; @@ -606,19 +606,19 @@ QPoint QDesignerToolBar::calcIndicatorPos( const QPoint &pos ) } return pnt; } else { - QPoint pnt( 0, height() - 2 ); + TQPoint pnt( 0, height() - 2 ); insertAnchor = 0; afterAnchor = true; if ( !children() ) return pnt; - pnt = QPoint( 0, 13 ); - QObjectListIt it( *children() ); - QObject * obj; + pnt = TQPoint( 0, 13 ); + TQObjectListIt it( *children() ); + TQObject * obj; while( (obj=it.current()) != 0 ) { ++it; if ( obj->isWidgetType() && qstrcmp( "qt_dockwidget_internal", obj->name() ) != 0 ) { - QWidget *w = (QWidget*)obj; + TQWidget *w = (TQWidget*)obj; if ( w->y() < pos.y() ) { pnt.setY( w->y() + w->height() + 1 ); insertAnchor = w; @@ -630,36 +630,36 @@ QPoint QDesignerToolBar::calcIndicatorPos( const QPoint &pos ) } } -void QDesignerToolBar::drawIndicator( const QPoint &pos ) +void QDesignerToolBar::drawIndicator( const TQPoint &pos ) { if ( lastIndicatorPos == pos ) return; bool wasVsisible = indicator->isVisible(); if ( orientation() == Horizontal ) { indicator->resize( 3, height() ); - if ( pos != QPoint( -1, -1 ) ) + if ( pos != TQPoint( -1, -1 ) ) indicator->move( pos.x() - 1, 0 ); indicator->show(); indicator->raise(); lastIndicatorPos = pos; } else { indicator->resize( width(), 3 ); - if ( pos != QPoint( -1, -1 ) ) + if ( pos != TQPoint( -1, -1 ) ) indicator->move( 0, pos.y() - 1 ); indicator->show(); indicator->raise(); lastIndicatorPos = pos; } if ( !wasVsisible ) - QApplication::sendPostedEvents(); + TQApplication::sendPostedEvents(); } -void QDesignerToolBar::doInsertWidget( const QPoint &p ) +void QDesignerToolBar::doInsertWidget( const TQPoint &p ) { if ( formWindow != MainWindow::self->formWindow() ) return; calcIndicatorPos( p ); - QWidget *w = WidgetFactory::create( MainWindow::self->currentTool(), this, 0, true ); + TQWidget *w = WidgetFactory::create( MainWindow::self->currentTool(), this, 0, true ); installEventFilters( w ); MainWindow::self->formWindow()->insertWidget( w, true ); QDesignerAction *a = new QDesignerAction( w, parent() ); @@ -678,34 +678,34 @@ void QDesignerToolBar::doInsertWidget( const QPoint &p ) void QDesignerToolBar::clear() { - for ( QAction *a = actionList.first(); a; a = actionList.next() ) { + for ( TQAction *a = actionList.first(); a; a = actionList.next() ) { if ( a->inherits( "QDesignerAction" ) ) ( (QDesignerAction*)a )->remove(); } - QToolBar::clear(); + TQToolBar::clear(); } -void QDesignerToolBar::installEventFilters( QWidget *w ) +void QDesignerToolBar::installEventFilters( TQWidget *w ) { if ( !w ) return; - QObjectList *l = w->queryList( "QWidget" ); - for ( QObject *o = l->first(); o; o = l->next() ) + TQObjectList *l = w->queryList( "TQWidget" ); + for ( TQObject *o = l->first(); o; o = l->next() ) o->installEventFilter( this ); delete l; } -QDesignerMenuBar::QDesignerMenuBar( QWidget *mw ) - : QMenuBar( mw, 0 ) +QDesignerMenuBar::QDesignerMenuBar( TQWidget *mw ) + : TQMenuBar( mw, 0 ) { show(); setAcceptDrops( true ); MetaDataBase::addEntry( this ); itemNum = 0; mousePressed = false; - lastIndicatorPos = QPoint( -1, -1 ); + lastIndicatorPos = TQPoint( -1, -1 ); insertAt = -1; indicator = new QDesignerIndicatorWidget( this ); indicator->hide(); @@ -714,7 +714,7 @@ QDesignerMenuBar::QDesignerMenuBar( QWidget *mw ) void QDesignerMenuBar::findFormWindow() { - QWidget *w = this; + TQWidget *w = this; while ( w ) { if ( w->inherits( "FormWindow" ) ) formWindow = (FormWindow*)w; @@ -722,7 +722,7 @@ void QDesignerMenuBar::findFormWindow() } } -void QDesignerMenuBar::contextMenuEvent( QContextMenuEvent *e ) +void QDesignerMenuBar::contextMenuEvent( TQContextMenuEvent *e ) { e->accept(); int itm = itemAtPos( e->pos() ); @@ -731,15 +731,15 @@ void QDesignerMenuBar::contextMenuEvent( QContextMenuEvent *e ) formWindow->mainWindow()->popupFormWindowMenu( e->globalPos(), formWindow ); return; } - QPopupMenu menu( this ); + TQPopupMenu 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 ) ); + TQMenuItem *item = findItem( idAt( itm ) ); RemoveMenuCommand *cmd = new RemoveMenuCommand( i18n("Delete Menu '%1'" ).arg( item->text() ), formWindow, - (QMainWindow*)parentWidget(), this, + (TQMainWindow*)parentWidget(), this, (QDesignerPopupMenu*)item->popup(), idAt( itm ), itm, item->text() ); formWindow->commandHistory()->addCommand( cmd ); @@ -749,8 +749,8 @@ void QDesignerMenuBar::contextMenuEvent( QContextMenuEvent *e ) 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:" ), + TQString old = text( idAt( itm ) ); + TQString txt = KInputDialog::getText( i18n("Rename Menu Item" ), i18n("Menu text:" ), text( idAt( itm ) ), &ok, 0 ); if ( ok ) { RenameMenuCommand *cmd = new RenameMenuCommand( @@ -762,43 +762,43 @@ void QDesignerMenuBar::contextMenuEvent( QContextMenuEvent *e ) } } -void QDesignerMenuBar::mousePressEvent( QMouseEvent *e ) +void QDesignerMenuBar::mousePressEvent( TQMouseEvent *e ) { - lastIndicatorPos = QPoint( -1, -1 ); + lastIndicatorPos = TQPoint( -1, -1 ); insertAt = -1; mousePressed = true; if ( e->button() == MidButton || e->button() == RightButton ) return; dragStartPos = e->pos(); - QMenuBar::mousePressEvent( e ); + TQMenuBar::mousePressEvent( e ); } -void QDesignerMenuBar::mouseMoveEvent( QMouseEvent *e ) +void QDesignerMenuBar::mouseMoveEvent( TQMouseEvent *e ) { if ( !mousePressed || e->state() == NoButton ) { - QMenuBar::mouseMoveEvent( e ); + TQMenuBar::mouseMoveEvent( e ); return; } - if ( QABS( QPoint( dragStartPos - e->pos() ).manhattanLength() ) < QApplication::startDragDistance() ) + if ( QABS( TQPoint( dragStartPos - e->pos() ).manhattanLength() ) < TQApplication::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(); + TQPopupMenu *popup = findItem( idAt( itm ) )->popup(); + TQString txt = findItem( idAt( itm ) )->text(); removeItemAt( itm ); - QStoredDrag *drag = new QStoredDrag( "application/x-designer-menuitem", this ); - QString s = QString::number( (long)popup ); + TQStoredDrag *drag = new TQStoredDrag( "application/x-designer-menuitem", this ); + TQString s = TQString::number( (long)popup ); s += "/" + txt; - drag->setEncodedData( QCString( s.latin1() ) ); - QSize sz( fontMetrics().boundingRect( txt ).size() ); - QPixmap pix( sz.width() + 20, sz.height() * 2 ); + drag->setEncodedData( TQCString( s.latin1() ) ); + TQSize sz( fontMetrics().boundingRect( txt ).size() ); + TQPixmap pix( sz.width() + 20, sz.height() * 2 ); pix.fill( white ); - QPainter p( &pix, this ); + TQPainter p( &pix, this ); p.drawText( 2, 0, pix.width(), pix.height(), 0, txt ); p.end(); pix.setMask( pix.createHeuristicMask() ); @@ -807,20 +807,20 @@ void QDesignerMenuBar::mouseMoveEvent( QMouseEvent *e ) if ( !drag->drag() ) { insertItem( txt, popup, -1, itm ); } - lastIndicatorPos = QPoint( -1, -1 ); + lastIndicatorPos = TQPoint( -1, -1 ); indicator->hide(); mousePressed = false; } -void QDesignerMenuBar::mouseReleaseEvent( QMouseEvent *e ) +void QDesignerMenuBar::mouseReleaseEvent( TQMouseEvent *e ) { - QMenuBar::mouseReleaseEvent( e ); + TQMenuBar::mouseReleaseEvent( e ); mousePressed = false; } #ifndef QT_NO_DRAGANDDROP -void QDesignerMenuBar::dragEnterEvent( QDragEnterEvent *e ) +void QDesignerMenuBar::dragEnterEvent( TQDragEnterEvent *e ) { if ( e->provides( "application/x-designer-actions" ) || e->provides( "application/x-designer-actiongroup" ) || @@ -828,11 +828,11 @@ void QDesignerMenuBar::dragEnterEvent( QDragEnterEvent *e ) e->accept(); if ( e->provides( "application/x-designer-menuitem" ) ) e->accept(); - lastIndicatorPos = QPoint( -1, -1 ); + lastIndicatorPos = TQPoint( -1, -1 ); insertAt = -1; } -void QDesignerMenuBar::dragMoveEvent( QDragMoveEvent *e ) +void QDesignerMenuBar::dragMoveEvent( TQDragMoveEvent *e ) { if ( e->provides( "application/x-designer-actions" ) || e->provides( "application/x-designer-menuitem" ) || @@ -845,12 +845,12 @@ void QDesignerMenuBar::dragMoveEvent( QDragMoveEvent *e ) 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 ); + bool uieffect = TQApplication::isEffectEnabled( UI_AnimateMenu ); + TQApplication::setEffectEnabled( UI_AnimateMenu, false ); if ( !qApp->activePopupWidget() ) actItem = -1; activateItemAt( item ); - QApplication::setEffectEnabled( UI_AnimateMenu, uieffect ); + TQApplication::setEffectEnabled( UI_AnimateMenu, uieffect ); if ( item == -1 ) hidePopups(); } else { @@ -858,24 +858,24 @@ void QDesignerMenuBar::dragMoveEvent( QDragMoveEvent *e ) } } -void QDesignerMenuBar::dragLeaveEvent( QDragLeaveEvent * ) +void QDesignerMenuBar::dragLeaveEvent( TQDragLeaveEvent * ) { mousePressed = false; - lastIndicatorPos = QPoint( -1, -1 ); + lastIndicatorPos = TQPoint( -1, -1 ); insertAt = -1; } -void QDesignerMenuBar::dropEvent( QDropEvent *e ) +void QDesignerMenuBar::dropEvent( TQDropEvent *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; + TQString s( e->encodedData( "application/x-designer-menuitem" ) ); + TQString s1 = s.left( s.find( "/" ) ); + TQString s2 = s.mid( s.find( "/" ) + 1 ); + TQPopupMenu *popup = (TQPopupMenu*)s1.toLong(); // #### huha, that is evil + TQString txt = s2; insertItem( txt, popup, -1, insertAt ); MoveMenuCommand *cmd = new MoveMenuCommand( i18n("Move Menu '%1'" ).arg( txt ), formWindow, @@ -888,12 +888,12 @@ void QDesignerMenuBar::dropEvent( QDropEvent *e ) #endif -QPoint QDesignerMenuBar::calcIndicatorPos( const QPoint &pos ) +TQPoint QDesignerMenuBar::calcIndicatorPos( const TQPoint &pos ) { int w = frameWidth(); insertAt = count(); for ( int i = 0; i < (int)count(); ++i ) { - QRect r = itemRect( i ); + TQRect r = itemRect( i ); if ( pos.x() < w + r.width() / 2 ) { insertAt = i; break; @@ -901,10 +901,10 @@ QPoint QDesignerMenuBar::calcIndicatorPos( const QPoint &pos ) w += r.width(); } - return QPoint( w, 0 ); + return TQPoint( w, 0 ); } -void QDesignerMenuBar::drawIndicator( const QPoint &pos ) +void QDesignerMenuBar::drawIndicator( const TQPoint &pos ) { if ( lastIndicatorPos == pos ) return; @@ -915,7 +915,7 @@ void QDesignerMenuBar::drawIndicator( const QPoint &pos ) indicator->raise(); lastIndicatorPos = pos; if ( !wasVsisible ) - QApplication::sendPostedEvents(); + TQApplication::sendPostedEvents(); } void QDesignerMenuBar::setItemNumber( int num ) @@ -928,28 +928,28 @@ int QDesignerMenuBar::itemNumber() const return itemNum; } -void QDesignerMenuBar::setItemText( const QString &s ) +void QDesignerMenuBar::setItemText( const TQString &s ) { if ( itemNum < 0 || itemNum >= (int)count() ) return; changeItem( idAt( itemNum ), s ); } -QString QDesignerMenuBar::itemText() const +TQString QDesignerMenuBar::itemText() const { if ( itemNum < 0 || (int)itemNum >= (int)count() ) - return QString::null; + return TQString::null; return text( idAt( itemNum ) ); } -void QDesignerMenuBar::setItemName( const QCString &s ) +void QDesignerMenuBar::setItemName( const TQCString &s ) { if ( itemNum < 0 || itemNum >= (int)count() ) return; findItem( idAt( itemNum ) )->popup()->setName( s ); } -QCString QDesignerMenuBar::itemName() const +TQCString QDesignerMenuBar::itemName() const { if ( itemNum < 0 || itemNum >= (int)count() ) return ""; @@ -958,31 +958,31 @@ QCString QDesignerMenuBar::itemName() const -QDesignerPopupMenu::QDesignerPopupMenu( QWidget *w ) - : QPopupMenu( w, 0 ), +QDesignerPopupMenu::QDesignerPopupMenu( TQWidget *w ) + : TQPopupMenu( w, 0 ), popupMenu( 0 ) { findFormWindow(); setAcceptDrops( true ); insertAt = -1; mousePressed = false; - lastIndicatorPos = QPoint( -1, -1 ); + lastIndicatorPos = TQPoint( -1, -1 ); indicator = new QDesignerIndicatorWidget( this ); indicator->hide(); } -void QDesignerPopupMenu::contextMenuEvent( QContextMenuEvent *e ) +void QDesignerPopupMenu::contextMenuEvent( TQContextMenuEvent *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 ); + TQMouseEvent me( TQEvent::MouseButtonPress, e->pos(), e->globalPos(), RightButton, RightButton ); mousePressEvent(&me); #else Q_UNUSED( e ); #endif } -void QDesignerPopupMenu::mousePressEvent( QMouseEvent *e ) +void QDesignerPopupMenu::mousePressEvent( TQMouseEvent *e ) { if ( e->button() == MidButton ) return; @@ -996,18 +996,18 @@ void QDesignerPopupMenu::mousePressEvent( QMouseEvent *e ) popupMenu->close(); } e->accept(); - QTimer::singleShot( 0, this, SLOT(createPopupMenu()) ); + TQTimer::singleShot( 0, this, TQT_SLOT(createPopupMenu()) ); return; } mousePressed = true; dragStartPos = e->pos(); - QPopupMenu::mousePressEvent( e ); + TQPopupMenu::mousePressEvent( e ); } void QDesignerPopupMenu::createPopupMenu() { // actually creates our popup for the popupmenu. - QPopupMenu menu( 0 ); + TQPopupMenu menu( 0 ); popupMenu = &menu; int itm; const int ID_DELETE = 1; @@ -1015,7 +1015,7 @@ void QDesignerPopupMenu::createPopupMenu() itm = itemAtPos( popupLocalPos, false ); if ( itm == -1 ) return; - QAction *a = actionList.at( itm ); + TQAction *a = actionList.at( itm ); if ( a && a->inherits( "QSeparatorAction" ) ) menu.insertItem( i18n("Delete Separator" ), ID_DELETE ); else @@ -1023,7 +1023,7 @@ void QDesignerPopupMenu::createPopupMenu() menu.insertItem( i18n("Insert Separator" ), ID_SEP ); int res = menu.exec( popupPos ); if ( res == ID_DELETE ) { - QAction *a = actionList.at( itm ); + TQAction *a = actionList.at( itm ); if ( !a ) return; RemoveActionFromPopupCommand *cmd = new RemoveActionFromPopupCommand( @@ -1033,37 +1033,37 @@ void QDesignerPopupMenu::createPopupMenu() formWindow->commandHistory()->addCommand( cmd ); cmd->execute(); } else if ( res == ID_SEP ) { - QPoint p( pos() ); + TQPoint p( pos() ); calcIndicatorPos( mapFromGlobal( popupPos ) ); - QAction *a = new QSeparatorAction( 0 ); + TQAction *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 ); + ( (QDesignerMenuBar*)( (TQMainWindow*)parentWidget() )->menuBar() )->hidePopups(); + ( (QDesignerMenuBar*)( (TQMainWindow*)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 ) +void QDesignerPopupMenu::mouseMoveEvent( TQMouseEvent *e ) { if ( !mousePressed || e->state() == NoButton ) { - QPopupMenu::mouseMoveEvent( e ); + TQPopupMenu::mouseMoveEvent( e ); return; } - if ( QABS( QPoint( dragStartPos - e->pos() ).manhattanLength() ) < QApplication::startDragDistance() ) { - QPopupMenu::mouseMoveEvent( e ); + if ( QABS( TQPoint( dragStartPos - e->pos() ).manhattanLength() ) < TQApplication::startDragDistance() ) { + TQPopupMenu::mouseMoveEvent( e ); return; } int itm = itemAtPos( dragStartPos, false ); if ( itm == -1 ) return; - QAction *a = actionList.at( itm ); + TQAction *a = actionList.at( itm ); if ( !a ) return; RemoveActionFromPopupCommand *cmd = new RemoveActionFromPopupCommand( i18n("Delete Action '%1' From Popup Menu '%2'" ). @@ -1072,11 +1072,11 @@ void QDesignerPopupMenu::mouseMoveEvent( QMouseEvent *e ) 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() ) ); + TQString type = a->inherits( "TQActionGroup" ) ? TQString( "application/x-designer-actiongroup" ) : + a->inherits( "QSeparatorAction" ) ? TQString( "application/x-designer-separator" ) : TQString( "application/x-designer-actions" ); + TQStoredDrag *drag = new TQStoredDrag( type, this ); + TQString s = TQString::number( (long)a ); // #### huha, that is evil + drag->setEncodedData( TQCString( s.latin1() ) ); drag->setPixmap( a->iconSet().pixmap() ); if ( !drag->drag() ) { AddActionToPopupCommand *cmd = new AddActionToPopupCommand( i18n("Add Action '%1' to Popup Menu '%2'" ). @@ -1086,29 +1086,29 @@ void QDesignerPopupMenu::mouseMoveEvent( QMouseEvent *e ) cmd->execute(); } indicator->hide(); - lastIndicatorPos = QPoint( -1, -1 ); + lastIndicatorPos = TQPoint( -1, -1 ); mousePressed = false; } -void QDesignerPopupMenu::mouseReleaseEvent( QMouseEvent *e ) +void QDesignerPopupMenu::mouseReleaseEvent( TQMouseEvent *e ) { mousePressed = false; - QPopupMenu::mouseReleaseEvent( e ); + TQPopupMenu::mouseReleaseEvent( e ); } #ifndef QT_NO_DRAGANDDROP -void QDesignerPopupMenu::dragEnterEvent( QDragEnterEvent *e ) +void QDesignerPopupMenu::dragEnterEvent( TQDragEnterEvent *e ) { mousePressed = false; - lastIndicatorPos = QPoint( -1, -1 ); + lastIndicatorPos = TQPoint( -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 ) +void QDesignerPopupMenu::dragMoveEvent( TQDragMoveEvent *e ) { mousePressed = false; if ( e->provides( "application/x-designer-actions" ) || @@ -1120,14 +1120,14 @@ void QDesignerPopupMenu::dragMoveEvent( QDragMoveEvent *e ) drawIndicator( calcIndicatorPos( e->pos() ) ); } -void QDesignerPopupMenu::dragLeaveEvent( QDragLeaveEvent * ) +void QDesignerPopupMenu::dragLeaveEvent( TQDragLeaveEvent * ) { mousePressed = false; indicator->hide(); insertAt = -1; } -void QDesignerPopupMenu::dropEvent( QDropEvent *e ) +void QDesignerPopupMenu::dropEvent( TQDropEvent *e ) { mousePressed = false; if ( e->provides( "application/x-designer-actions" ) || @@ -1137,24 +1137,24 @@ void QDesignerPopupMenu::dropEvent( QDropEvent *e ) else return; - QPoint p = pos(); - QAction *a = 0; + TQPoint p = pos(); + TQAction *a = 0; if ( e->provides( "application/x-designer-actiongroup" ) ) { - QString s( e->encodedData( "application/x-designer-actiongroup" ) ); + TQString s( e->encodedData( "application/x-designer-actiongroup" ) ); a = (QDesignerActionGroup*)s.toLong(); } else { - QString s; + TQString s; if ( e->provides( "application/x-designer-separator" ) ) { - s = QString( e->encodedData( "application/x-designer-separator" ) ); + s = TQString( e->encodedData( "application/x-designer-separator" ) ); a = (QSeparatorAction*)s.toLong(); } else { - s = QString( e->encodedData( "application/x-designer-actions" ) ); + s = TQString( e->encodedData( "application/x-designer-actions" ) ); a = (QDesignerAction*)s.toLong(); } } if ( actionList.findRef( a ) != -1 ) { - QMessageBox::warning( MainWindow::self, i18n("Insert/Move Action" ), + TQMessageBox::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() ) ); @@ -1167,8 +1167,8 @@ void QDesignerPopupMenu::dropEvent( QDropEvent *e ) formWindow->commandHistory()->addCommand( cmd ); cmd->execute(); - ( (QDesignerMenuBar*)( (QMainWindow*)parentWidget() )->menuBar() )->hidePopups(); - ( (QDesignerMenuBar*)( (QMainWindow*)parentWidget() )->menuBar() )->activateItemAt( -1 ); + ( (QDesignerMenuBar*)( (TQMainWindow*)parentWidget() )->menuBar() )->hidePopups(); + ( (QDesignerMenuBar*)( (TQMainWindow*)parentWidget() )->menuBar() )->activateItemAt( -1 ); indicator->hide(); popup( p ); } @@ -1178,11 +1178,11 @@ void QDesignerPopupMenu::dropEvent( QDropEvent *e ) void QDesignerPopupMenu::reInsert() { clear(); - for ( QAction *a = actionList.first(); a; a = actionList.next() ) + for ( TQAction *a = actionList.first(); a; a = actionList.next() ) a->addTo( this ); } -void QDesignerPopupMenu::drawIndicator( const QPoint &pos ) +void QDesignerPopupMenu::drawIndicator( const TQPoint &pos ) { if ( lastIndicatorPos == pos ) return; @@ -1193,15 +1193,15 @@ void QDesignerPopupMenu::drawIndicator( const QPoint &pos ) indicator->raise(); lastIndicatorPos = pos; if ( !wasVsisible ) - QApplication::sendPostedEvents(); + TQApplication::sendPostedEvents(); } -QPoint QDesignerPopupMenu::calcIndicatorPos( const QPoint &pos ) +TQPoint QDesignerPopupMenu::calcIndicatorPos( const TQPoint &pos ) { int h = frameWidth(); insertAt = count(); for ( int i = 0; i < (int)count(); ++i ) { - QRect r = itemGeometry( i ); + TQRect r = itemGeometry( i ); if ( pos.y() < h + r.height() / 2 ) { insertAt = i; break; @@ -1209,31 +1209,31 @@ QPoint QDesignerPopupMenu::calcIndicatorPos( const QPoint &pos ) h += r.height(); } - return QPoint( 0, h ); + return TQPoint( 0, h ); } -void QDesignerPopupMenu::addAction( QAction *a ) +void QDesignerPopupMenu::addAction( TQAction *a ) { actionList.append( a ); - connect( a, SIGNAL( destroyed() ), this, SLOT( actionRemoved() ) ); + connect( a, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( actionRemoved() ) ); } void QDesignerPopupMenu::actionRemoved() { - actionList.removeRef( (QAction*)sender() ); + actionList.removeRef( (TQAction*)sender() ); } -void QDesignerPopupMenu::paintEvent( QPaintEvent *e ) +void QDesignerPopupMenu::paintEvent( TQPaintEvent *e ) { - QPopupMenu::paintEvent( e ); + TQPopupMenu::paintEvent( e ); if ( e->rect() != rect() ) return; - lastIndicatorPos = QPoint( -1, -1 ); + lastIndicatorPos = TQPoint( -1, -1 ); } void QDesignerPopupMenu::findFormWindow() { - QWidget *w = this; + TQWidget *w = this; while ( w ) { if ( w->inherits( "FormWindow" ) ) formWindow = (FormWindow*)w; diff --git a/kommander/editor/actiondnd.h b/kommander/editor/actiondnd.h index d99cc54c..f821807e 100644 --- a/kommander/editor/actiondnd.h +++ b/kommander/editor/actiondnd.h @@ -21,14 +21,14 @@ #ifndef ACTIONDND_H #define ACTIONDND_H -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include class QDesignerPopupMenu; class QDesignerIndicatorWidget; @@ -39,27 +39,27 @@ class QDesignerActionGroup : public QActionGroup Q_OBJECT public: - QDesignerActionGroup( QObject *parent ) - : QActionGroup( !parent || parent->inherits( "QActionGroup" ) ? parent : 0 ), wid( 0 ), idx( -1 ) {} + QDesignerActionGroup( TQObject *parent ) + : TQActionGroup( !parent || parent->inherits( "TQActionGroup" ) ? parent : 0 ), wid( 0 ), idx( -1 ) {} - QWidget *widget() const { return wid; } - QWidget *widget( QAction *a ) const { return *widgets.find( a ); } + TQWidget *widget() const { return wid; } + TQWidget *widget( TQAction *a ) const { return *widgets.find( a ); } int index() const { return idx; } protected: - void addedTo( QWidget *w, QWidget * ) { + void addedTo( TQWidget *w, TQWidget * ) { wid = w; } - void addedTo( QWidget *w, QWidget *, QAction *a ) { + void addedTo( TQWidget *w, TQWidget *, TQAction *a ) { widgets.insert( a, w ); } - void addedTo( int index, QPopupMenu * ) { + void addedTo( int index, TQPopupMenu * ) { idx = index; } private: - QWidget *wid; - QMap widgets; + TQWidget *wid; + TQMap widgets; int idx; }; @@ -69,32 +69,32 @@ 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 ) {} + QDesignerAction( TQObject *parent ) + : TQAction( !parent || parent->inherits( "TQActionGroup" ) ? parent : 0 ), wid( 0 ), idx( -1 ), widgetToInsert( 0 ) {} + QDesignerAction( TQWidget *w, TQObject *parent ) + : TQAction( !parent || parent->inherits( "TQActionGroup" ) ? parent : 0 ), wid( 0 ), idx( -1 ), widgetToInsert( w ) {} - QWidget *widget() const { return wid; } + TQWidget *widget() const { return wid; } int index() const { return idx; } - bool addTo( QWidget *w ); - bool removeFrom( QWidget *w ); + bool addTo( TQWidget *w ); + bool removeFrom( TQWidget *w ); void remove(); bool supportsMenu() const { return !widgetToInsert; } protected: - void addedTo( QWidget *w, QWidget * ) { + void addedTo( TQWidget *w, TQWidget * ) { wid = w; } - void addedTo( int index, QPopupMenu * ) { + void addedTo( int index, TQPopupMenu * ) { idx = index; } private: - QWidget *wid; + TQWidget *wid; int idx; - QWidget *widgetToInsert; + TQWidget *widgetToInsert; }; @@ -103,15 +103,15 @@ class QDesignerToolBarSeparator : public QWidget Q_OBJECT public: - QDesignerToolBarSeparator( Orientation, QToolBar *parent, const char* name=0 ); + QDesignerToolBarSeparator( Orientation, TQToolBar *parent, const char* name=0 ); - QSize sizeHint() const; + TQSize sizeHint() const; Orientation orientation() const { return orient; } public slots: void setOrientation( Orientation ); protected: - void styleChange( QStyle& ); - void paintEvent( QPaintEvent * ); + void styleChange( TQStyle& ); + void paintEvent( TQPaintEvent * ); private: Orientation orient; }; @@ -122,15 +122,15 @@ class QSeparatorAction : public QAction Q_OBJECT public: - QSeparatorAction( QObject *parent ); + QSeparatorAction( TQObject *parent ); - bool addTo( QWidget *w ); - bool removeFrom( QWidget *w ); - QWidget *widget() const; + bool addTo( TQWidget *w ); + bool removeFrom( TQWidget *w ); + TQWidget *widget() const; int index() const; private: - QWidget *wid; + TQWidget *wid; int idx; }; @@ -140,53 +140,53 @@ class QDesignerToolBar : public QToolBar Q_OBJECT public: - QDesignerToolBar( QMainWindow *mw ); - QDesignerToolBar( QMainWindow *mw, Dock dock ); - QPtrList insertedActions() const { return actionList; } - void addAction( QAction *a ); + QDesignerToolBar( TQMainWindow *mw ); + QDesignerToolBar( TQMainWindow *mw, Dock dock ); + TQPtrList insertedActions() const { return actionList; } + void addAction( TQAction *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 installEventFilters( TQWidget *w ); + void insertAction( TQWidget *w, TQAction *a ) { actionMap.insert( w, a ); } + void insertAction( int index, TQAction *a ) { actionList.insert( index, a ); } + void appendAction( TQAction *a ) { actionList.append( a ); } + void removeAction( TQAction *a ) { actionList.remove( a ); } void reInsert(); - void removeWidget( QWidget *w ); + void removeWidget( TQWidget *w ); protected: - bool eventFilter( QObject *, QEvent * ); - void paintEvent( QPaintEvent * ); + bool eventFilter( TQObject *, TQEvent * ); + void paintEvent( TQPaintEvent * ); #ifndef QT_NO_DRAGANDDROP - void dragEnterEvent( QDragEnterEvent * ); - void dragMoveEvent( QDragMoveEvent * ); - void dragLeaveEvent( QDragLeaveEvent * ); - void dropEvent( QDropEvent * ); + void dragEnterEvent( TQDragEnterEvent * ); + void dragMoveEvent( TQDragMoveEvent * ); + void dragLeaveEvent( TQDragLeaveEvent * ); + void dropEvent( TQDropEvent * ); #endif - void contextMenuEvent( QContextMenuEvent *e ); - void mousePressEvent( QMouseEvent *e ); - void mouseReleaseEvent( QMouseEvent *e ); + void contextMenuEvent( TQContextMenuEvent *e ); + void mousePressEvent( TQMouseEvent *e ); + void mouseReleaseEvent( TQMouseEvent *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 drawIndicator( const TQPoint &pos ); + TQPoint calcIndicatorPos( const TQPoint &pos ); + void buttonContextMenuEvent( TQContextMenuEvent *e, TQObject *o ); + void buttonMousePressEvent( TQMouseEvent *e, TQObject *o ); + void buttonMouseMoveEvent( TQMouseEvent *e, TQObject *o ); + void buttonMouseReleaseEvent( TQMouseEvent *e, TQObject *o ); + void doInsertWidget( const TQPoint &p ); void findFormWindow(); private: - QPoint lastIndicatorPos; - QWidget *insertAnchor; + TQPoint lastIndicatorPos; + TQWidget *insertAnchor; bool afterAnchor; - QPtrList actionList; - QMap actionMap; - QPoint dragStartPos; + TQPtrList actionList; + TQMap actionMap; + TQPoint dragStartPos; QDesignerIndicatorWidget *indicator; bool widgetInserting; FormWindow *formWindow; @@ -199,41 +199,41 @@ class QDesignerMenuBar : public QMenuBar 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 ) + Q_PROPERTY( TQString itemText WRITE setItemText READ itemText ) + Q_PROPERTY( TQCString itemName WRITE setItemName READ itemName ) public: - QDesignerMenuBar( QWidget *mw ); + QDesignerMenuBar( TQWidget *mw ); void setItemNumber( int num ); int itemNumber() const; - void setItemText( const QString &s ); - QString itemText() const; - void setItemName( const QCString &s ); - QCString itemName() const; + void setItemText( const TQString &s ); + TQString itemText() const; + void setItemName( const TQCString &s ); + TQCString itemName() const; protected: - void mousePressEvent( QMouseEvent *e ); - void mouseMoveEvent( QMouseEvent *e ); - void mouseReleaseEvent( QMouseEvent *e ); - void contextMenuEvent( QContextMenuEvent *e ); + void mousePressEvent( TQMouseEvent *e ); + void mouseMoveEvent( TQMouseEvent *e ); + void mouseReleaseEvent( TQMouseEvent *e ); + void contextMenuEvent( TQContextMenuEvent *e ); #ifndef QT_NO_DRAGANDDROP - void dragEnterEvent( QDragEnterEvent * ); - void dragMoveEvent( QDragMoveEvent * ); - void dragLeaveEvent( QDragLeaveEvent * ); - void dropEvent( QDropEvent * ); + void dragEnterEvent( TQDragEnterEvent * ); + void dragMoveEvent( TQDragMoveEvent * ); + void dragLeaveEvent( TQDragLeaveEvent * ); + void dropEvent( TQDropEvent * ); #endif private: - void drawIndicator( const QPoint &pos ); - QPoint calcIndicatorPos( const QPoint &pos ); + void drawIndicator( const TQPoint &pos ); + TQPoint calcIndicatorPos( const TQPoint &pos ); void findFormWindow(); private: int itemNum; - QPoint dragStartPos; + TQPoint dragStartPos; bool mousePressed; - QPoint lastIndicatorPos; + TQPoint lastIndicatorPos; int insertAt; QDesignerIndicatorWidget *indicator; FormWindow *formWindow; @@ -246,24 +246,24 @@ class QDesignerPopupMenu : public QPopupMenu Q_OBJECT public: - QDesignerPopupMenu( QWidget *w ); - QPtrList insertedActions() const { return actionList; } - void addAction( QAction *a ); + QDesignerPopupMenu( TQWidget *w ); + TQPtrList insertedActions() const { return actionList; } + void addAction( TQAction *a ); void reInsert(); - void insertAction( int index, QAction *a ) { actionList.insert( index, a ); } - void removeAction( QAction *a ) { actionList.remove( a ); } + void insertAction( int index, TQAction *a ) { actionList.insert( index, a ); } + void removeAction( TQAction *a ) { actionList.remove( a ); } protected: - void mousePressEvent( QMouseEvent *e ); - void mouseMoveEvent( QMouseEvent *e ); - void mouseReleaseEvent( QMouseEvent *e ); - void contextMenuEvent( QContextMenuEvent *e ); - void paintEvent( QPaintEvent * ); + void mousePressEvent( TQMouseEvent *e ); + void mouseMoveEvent( TQMouseEvent *e ); + void mouseReleaseEvent( TQMouseEvent *e ); + void contextMenuEvent( TQContextMenuEvent *e ); + void paintEvent( TQPaintEvent * ); #ifndef QT_NO_DRAGANDDROP - void dragEnterEvent( QDragEnterEvent * ); - void dragMoveEvent( QDragMoveEvent * ); - void dragLeaveEvent( QDragLeaveEvent * ); - void dropEvent( QDropEvent * ); + void dragEnterEvent( TQDragEnterEvent * ); + void dragMoveEvent( TQDragMoveEvent * ); + void dragLeaveEvent( TQDragLeaveEvent * ); + void dropEvent( TQDropEvent * ); #endif private slots: @@ -271,21 +271,21 @@ private slots: void createPopupMenu(); private: - void drawIndicator( const QPoint &pos ); - QPoint calcIndicatorPos( const QPoint &pos ); + void drawIndicator( const TQPoint &pos ); + TQPoint calcIndicatorPos( const TQPoint &pos ); void findFormWindow(); private: - QPoint lastIndicatorPos; + TQPoint lastIndicatorPos; int insertAt; - QPtrList actionList; - QPoint dragStartPos; + TQPtrList actionList; + TQPoint dragStartPos; bool mousePressed; QDesignerIndicatorWidget *indicator; FormWindow *formWindow; - QGuardedPtr popupMenu; - QPoint popupPos; - QPoint popupLocalPos; + TQGuardedPtr popupMenu; + TQPoint popupPos; + TQPoint popupLocalPos; }; @@ -294,8 +294,8 @@ class QDesignerIndicatorWidget : public QWidget Q_OBJECT public: - QDesignerIndicatorWidget( QWidget *p ) - : QWidget( p, "qt_dockwidget_internal" ) { + QDesignerIndicatorWidget( TQWidget *p ) + : TQWidget( p, "qt_dockwidget_internal" ) { setBackgroundColor( red ); } diff --git a/kommander/editor/actioneditorimpl.cpp b/kommander/editor/actioneditorimpl.cpp index 0d694250..9c1ae76d 100644 --- a/kommander/editor/actioneditorimpl.cpp +++ b/kommander/editor/actioneditorimpl.cpp @@ -25,46 +25,46 @@ #include "connectioneditorimpl.h" #include "mainwindow.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include -ActionEditor::ActionEditor( QWidget* parent, const char* name, WFlags fl ) +ActionEditor::ActionEditor( TQWidget* 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() ) ); + TQPopupMenu *popup = new TQPopupMenu( this ); + popup->insertItem( i18n("New &Action" ), this, TQT_SLOT( newAction() ) ); + popup->insertItem( i18n("New Action &Group" ), this, TQT_SLOT( newActionGroup() ) ); + popup->insertItem( i18n("New &Dropdown Action Group" ), this, TQT_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() ) ); + connect( listActions, TQT_SIGNAL( insertAction() ), this, TQT_SLOT( newAction() ) ); + connect( listActions, TQT_SIGNAL( insertActionGroup() ), this, TQT_SLOT( newActionGroup() ) ); + connect( listActions, TQT_SIGNAL( insertDropDownActionGroup() ), this, TQT_SLOT( newDropDownActionGroup() ) ); + connect( listActions, TQT_SIGNAL( deleteAction() ), this, TQT_SLOT( deleteAction() ) ); + connect( listActions, TQT_SIGNAL( connectAction() ), this, TQT_SLOT( connectionsClicked() ) ); } -void ActionEditor::closeEvent( QCloseEvent *e ) +void ActionEditor::closeEvent( TQCloseEvent *e ) { emit hidden(); e->accept(); } -void ActionEditor::currentActionChanged( QListViewItem *i ) +void ActionEditor::currentActionChanged( TQListViewItem *i ) { buttonConnect->setEnabled( i != 0 ); if ( !i ) @@ -81,14 +81,14 @@ void ActionEditor::deleteAction() if ( !currentAction ) return; - QListViewItemIterator it( listActions ); + TQListViewItemIterator it( listActions ); while ( it.current() ) { if ( ( (ActionItem*)it.current() )->action() == currentAction ) { formWindow->actionList().removeRef( currentAction ); delete currentAction; - QValueList conns = + TQValueList conns = MetaDataBase::connections( formWindow, currentAction ); - for ( QValueList::Iterator it2 = conns.begin(); + for ( TQValueList::Iterator it2 = conns.begin(); it2 != conns.end(); ++it2 ) MetaDataBase::removeConnection( formWindow, (*it2).sender, (*it2).signal, (*it2).receiver, (*it2).slot ); @@ -97,9 +97,9 @@ void ActionEditor::deleteAction() } else if ( ( (ActionItem*)it.current() )->actionGroup() == currentAction ) { formWindow->actionList().removeRef( currentAction ); delete currentAction; - QValueList conns = + TQValueList conns = MetaDataBase::connections( formWindow, currentAction ); - for ( QValueList::Iterator it2 = conns.begin(); + for ( TQValueList::Iterator it2 = conns.begin(); it2 != conns.end(); ++it2 ) MetaDataBase::removeConnection( formWindow, (*it2).sender, (*it2).signal, (*it2).receiver, (*it2).slot ); @@ -118,7 +118,7 @@ void ActionEditor::newAction() ActionItem *actionParent = (ActionItem*)listActions->selectedItem(); if ( actionParent ) { if ( !actionParent->actionGroup() || - !actionParent->actionGroup()->inherits( "QActionGroup" ) ) + !actionParent->actionGroup()->inherits( "TQActionGroup" ) ) actionParent = (ActionItem*)actionParent->parent(); } @@ -128,7 +128,7 @@ void ActionEditor::newAction() else i = new ActionItem( listActions, (bool)false ); MetaDataBase::addEntry( i->action() ); - QString n = "Action"; + TQString n = "Action"; formWindow->unify( i->action(), n, true ); i->setText( 0, n ); i->action()->setName( n ); @@ -150,7 +150,7 @@ void ActionEditor::newActionGroup() ActionItem *actionParent = (ActionItem*)listActions->selectedItem(); if ( actionParent ) { if ( !actionParent->actionGroup() || - !actionParent->actionGroup()->inherits( "QActionGroup" ) ) + !actionParent->actionGroup()->inherits( "TQActionGroup" ) ) actionParent = (ActionItem*)actionParent->parent(); } @@ -162,7 +162,7 @@ void ActionEditor::newActionGroup() MetaDataBase::addEntry( i->actionGroup() ); MetaDataBase::setPropertyChanged( i->actionGroup(), "usesDropDown", true ); - QString n = "ActionGroup"; + TQString n = "ActionGroup"; formWindow->unify( i->action(), n, true ); i->setText( 0, n ); i->actionGroup()->setName( n ); @@ -187,18 +187,18 @@ void ActionEditor::setFormWindow( FormWindow *fw ) formWindow = fw; if ( !formWindow || !formWindow->mainContainer() || - !formWindow->mainContainer()->inherits( "QMainWindow" ) ) { + !formWindow->mainContainer()->inherits( "TQMainWindow" ) ) { setEnabled( false ); } else { setEnabled( true ); - for ( QAction *a = formWindow->actionList().first(); a; a = formWindow->actionList().next() ) { + for ( TQAction *a = formWindow->actionList().first(); a; a = formWindow->actionList().next() ) { ActionItem *i = 0; - if ( a->parent() && a->parent()->inherits( "QAction" ) ) + if ( a->parent() && a->parent()->inherits( "TQAction" ) ) continue; i = new ActionItem( listActions, a ); i->setText( 0, a->name() ); i->setPixmap( 0, a->iconSet().pixmap() ); - if ( a->inherits( "QActionGroup" ) ) { + if ( a->inherits( "TQActionGroup" ) ) { insertChildActions( i ); } } @@ -213,25 +213,25 @@ void ActionEditor::insertChildActions( ActionItem *i ) { if ( !i->actionGroup() || !i->actionGroup()->children() ) return; - QObjectListIt it( *i->actionGroup()->children() ); + TQObjectListIt it( *i->actionGroup()->children() ); while ( it.current() ) { - QObject *o = it.current(); + TQObject *o = it.current(); ++it; - if ( !o->inherits( "QAction" ) ) + if ( !o->inherits( "TQAction" ) ) continue; - QAction *a = (QAction*)o; - ActionItem *i2 = new ActionItem( (QListViewItem*)i, a ); + TQAction *a = (TQAction*)o; + ActionItem *i2 = new ActionItem( (TQListViewItem*)i, a ); i->setOpen( true ); i2->setText( 0, a->name() ); i2->setPixmap( 0, a->iconSet().pixmap() ); - if ( a->inherits( "QActionGroup" ) ) + if ( a->inherits( "TQActionGroup" ) ) insertChildActions( i2 ); } } -void ActionEditor::updateActionName( QAction *a ) +void ActionEditor::updateActionName( TQAction *a ) { - QListViewItemIterator it( listActions ); + TQListViewItemIterator it( listActions ); while ( it.current() ) { if ( ( (ActionItem*)it.current() )->action() == a ) ( (ActionItem*)it.current() )->setText( 0, a->name() ); @@ -241,9 +241,9 @@ void ActionEditor::updateActionName( QAction *a ) } } -void ActionEditor::updateActionIcon( QAction *a ) +void ActionEditor::updateActionIcon( TQAction *a ) { - QListViewItemIterator it( listActions ); + TQListViewItemIterator it( listActions ); while ( it.current() ) { if ( ( (ActionItem*)it.current() )->action() == a ) ( (ActionItem*)it.current() )->setPixmap( 0, a->iconSet().pixmap() ); diff --git a/kommander/editor/actioneditorimpl.h b/kommander/editor/actioneditorimpl.h index 9ecfaaa5..d6ad72fb 100644 --- a/kommander/editor/actioneditorimpl.h +++ b/kommander/editor/actioneditorimpl.h @@ -32,17 +32,17 @@ class ActionEditor : public ActionEditorBase Q_OBJECT public: - ActionEditor( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); + ActionEditor( TQWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); void setFormWindow( FormWindow *fw ); - void updateActionName( QAction *a ); - void updateActionIcon( QAction *a ); + void updateActionName( TQAction *a ); + void updateActionIcon( TQAction *a ); FormWindow *form() const { return formWindow; } protected: - void closeEvent( QCloseEvent *e ); + void closeEvent( TQCloseEvent *e ); protected slots: - void currentActionChanged( QListViewItem * ); + void currentActionChanged( TQListViewItem * ); void deleteAction(); void newAction(); void newActionGroup(); @@ -56,7 +56,7 @@ private: void insertChildActions( ActionItem *i ); private: - QAction *currentAction; + TQAction *currentAction; FormWindow *formWindow; }; diff --git a/kommander/editor/actionlistview.cpp b/kommander/editor/actionlistview.cpp index 0db57f76..6513daf0 100644 --- a/kommander/editor/actionlistview.cpp +++ b/kommander/editor/actionlistview.cpp @@ -19,35 +19,35 @@ **********************************************************************/ #include "actionlistview.h" -#include -#include +#include +#include #include -ActionListView::ActionListView( QWidget *parent, const char *name ) - : QListView( parent, name ) +ActionListView::ActionListView( TQWidget *parent, const char *name ) + : TQListView( parent, name ) { header()->setStretchEnabled( true ); setRootIsDecorated( true ); setSorting( -1 ); - connect( this, SIGNAL( contextMenuRequested( QListViewItem *, const QPoint &, int ) ), - this, SLOT( rmbMenu( QListViewItem *, const QPoint & ) ) ); + connect( this, TQT_SIGNAL( contextMenuRequested( TQListViewItem *, const TQPoint &, int ) ), + this, TQT_SLOT( rmbMenu( TQListViewItem *, const TQPoint & ) ) ); } -ActionItem::ActionItem( QListView *lv, QAction *ac ) - : QListViewItem( lv ), a( 0 ), g( 0 ) +ActionItem::ActionItem( TQListView *lv, TQAction *ac ) + : TQListViewItem( lv ), a( 0 ), g( 0 ) { - if ( ac->inherits( "QActionGroup" ) ) + if ( ac->inherits( "TQActionGroup" ) ) g = (QDesignerActionGroup*)ac; else a = (QDesignerAction*)ac; setDragEnabled( true ); } -ActionItem::ActionItem( QListViewItem *i, QAction *ac ) - : QListViewItem( i ), a( 0 ), g( 0 ) +ActionItem::ActionItem( TQListViewItem *i, TQAction *ac ) + : TQListViewItem( i ), a( 0 ), g( 0 ) { - if ( ac->inherits( "QActionGroup" ) ) + if ( ac->inherits( "TQActionGroup" ) ) g = (QDesignerActionGroup*)ac; else a = (QDesignerAction*)ac; @@ -57,36 +57,36 @@ ActionItem::ActionItem( QListViewItem *i, QAction *ac ) void ActionItem::moveToEnd() { - QListViewItem *i = this; + TQListViewItem *i = this; while ( i->nextSibling() ) i = i->nextSibling(); if ( i != this ) moveItem( i ); } -QDragObject *ActionListView::dragObject() +TQDragObject *ActionListView::dragObject() { ActionItem *i = (ActionItem*)currentItem(); if ( !i ) return 0; - QStoredDrag *drag = 0; + TQStoredDrag *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 = new TQStoredDrag( "application/x-designer-actions", viewport() ); + TQString s = TQString::number( (long)i->action() ); // #### huha, that is evil + drag->setEncodedData( TQCString( 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 = new TQStoredDrag( "application/x-designer-actiongroup", viewport() ); + TQString s = TQString::number( (long)i->actionGroup() ); // #### huha, that is evil + drag->setEncodedData( TQCString( s.latin1() ) ); drag->setPixmap( i->actionGroup()->iconSet().pixmap() ); } return drag; } -void ActionListView::rmbMenu( QListViewItem *i, const QPoint &p ) +void ActionListView::rmbMenu( TQListViewItem *i, const TQPoint &p ) { - QPopupMenu *popup = new QPopupMenu( this ); + TQPopupMenu *popup = new TQPopupMenu( this ); popup->insertItem( i18n("New &Action" ), 0 ); popup->insertItem( i18n("New Action &Group" ), 1 ); popup->insertItem( i18n("New &Dropdown Action Group" ), 2 ); diff --git a/kommander/editor/actionlistview.h b/kommander/editor/actionlistview.h index 33709068..160d2abb 100644 --- a/kommander/editor/actionlistview.h +++ b/kommander/editor/actionlistview.h @@ -21,20 +21,20 @@ #ifndef ACTIONLISTVIEW_H #define ACTIONLISTVIEW_H -#include +#include #include "actiondnd.h" class ActionItem : public QListViewItem { public: - ActionItem( QListView *lv, bool group ) - : QListViewItem( lv ), + ActionItem( TQListView *lv, bool group ) + : TQListViewItem( 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( TQListView *lv, TQAction *ac ); + ActionItem( TQListViewItem *i, TQAction *ac ); ActionItem( ActionItem *parent, bool group = FALSE ) - : QListViewItem( parent ), + : TQListViewItem( parent ), a( group ? 0 : new QDesignerAction( parent->actionGroup() ) ), g( group ? new QDesignerActionGroup( parent->actionGroup() ) : 0 ) { setDragEnabled( TRUE ); moveToEnd(); } @@ -55,13 +55,13 @@ class ActionListView : public QListView Q_OBJECT public: - ActionListView( QWidget *parent = 0, const char *name = 0 ); + ActionListView( TQWidget *parent = 0, const char *name = 0 ); protected: - QDragObject *dragObject(); + TQDragObject *dragObject(); private slots: - void rmbMenu( QListViewItem *i, const QPoint &p ); + void rmbMenu( TQListViewItem *i, const TQPoint &p ); signals: void insertAction(); diff --git a/kommander/editor/asciivalidator.cpp b/kommander/editor/asciivalidator.cpp index 776e6e9f..6f63e626 100644 --- a/kommander/editor/asciivalidator.cpp +++ b/kommander/editor/asciivalidator.cpp @@ -20,20 +20,20 @@ #include "asciivalidator.h" -#include +#include -AsciiValidator::AsciiValidator( QObject * parent, const char *name ) - : QValidator( parent, name ), functionName( false ) +AsciiValidator::AsciiValidator( TQObject * parent, const char *name ) + : TQValidator( parent, name ), functionName( false ) { } -AsciiValidator::AsciiValidator( bool funcName, QObject * parent, const char *name ) - : QValidator( parent, name ), functionName( funcName ) +AsciiValidator::AsciiValidator( bool funcName, TQObject * parent, const char *name ) + : TQValidator( parent, name ), functionName( funcName ) { } -AsciiValidator::AsciiValidator( const QString &allow, QObject * parent, const char *name ) - : QValidator( parent, name ), functionName( false ), allowedChars( allow ) +AsciiValidator::AsciiValidator( const TQString &allow, TQObject * parent, const char *name ) + : TQValidator( parent, name ), functionName( false ), allowedChars( allow ) { } @@ -41,7 +41,7 @@ AsciiValidator::~AsciiValidator() { } -QValidator::State AsciiValidator::validate( QString &s, int & ) const +TQValidator::State AsciiValidator::validate( TQString &s, int & ) const { bool inParen = false; if ( !s.isEmpty() && s[0].row() == 0 && s[0].cell() >= '0' && s[0].cell() <= '9' ) { @@ -54,7 +54,7 @@ QValidator::State AsciiValidator::validate( QString &s, int & ) const if ( c != ')' ) continue; s.truncate( i + 1 ); - return QValidator::Acceptable; + return TQValidator::Acceptable; } if ( r == 0 && ( ( c >= '0' && c <= '9' ) || ( c >= 'a' && c <= 'z' ) || @@ -72,6 +72,6 @@ QValidator::State AsciiValidator::validate( QString &s, int & ) const s[i] = '_'; } - return QValidator::Acceptable; + return TQValidator::Acceptable; } #include "asciivalidator.moc" diff --git a/kommander/editor/asciivalidator.h b/kommander/editor/asciivalidator.h index 50d273c2..20131f01 100644 --- a/kommander/editor/asciivalidator.h +++ b/kommander/editor/asciivalidator.h @@ -22,23 +22,23 @@ #define ASCIIVALIDATOR_H -#include +#include 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( TQObject * parent, const char *name = 0 ); + AsciiValidator( bool funcName, TQObject * parent, const char *name = 0 ); + AsciiValidator( const TQString &allow, TQObject * parent, const char *name = 0 ); ~AsciiValidator(); - QValidator::State validate( QString &, int & ) const; + TQValidator::State validate( TQString &, int & ) const; private: bool functionName; - QString allowedChars; + TQString allowedChars; }; diff --git a/kommander/editor/assistproc.cpp b/kommander/editor/assistproc.cpp index 58ac4f78..f5f765d8 100644 --- a/kommander/editor/assistproc.cpp +++ b/kommander/editor/assistproc.cpp @@ -19,21 +19,21 @@ **********************************************************************/ #include "assistproc.h" -AssistProc::AssistProc( QObject *parent, const char *name, const QString &path ) - : QProcess( parent, name ) +AssistProc::AssistProc( TQObject *parent, const char *name, const TQString &path ) + : TQProcess( parent, name ) { assistantPath = path; - connect( this, SIGNAL(readyReadStdout()), this, SLOT(processOutput()) ); - connect( this, SIGNAL(readyReadStderr()), this, SLOT(processErrOutput()) ); + connect( this, TQT_SIGNAL(readyReadStdout()), this, TQT_SLOT(processOutput()) ); + connect( this, TQT_SIGNAL(readyReadStderr()), this, TQT_SLOT(processErrOutput()) ); } AssistProc::~AssistProc() { tryTerminate(); - QTimer::singleShot( 5000, this, SLOT(kill())); // If busy, kill in 5 sec... + TQTimer::singleShot( 5000, this, TQT_SLOT(kill())); // If busy, kill in 5 sec... } -bool AssistProc::run( const QString &path ) +bool AssistProc::run( const TQString &path ) { if ( !path.isEmpty() ) assistantPath = path; @@ -49,7 +49,7 @@ bool AssistProc::run( const QString &path ) return true; } -bool AssistProc::sendRequest( const QString &data ) +bool AssistProc::sendRequest( const TQString &data ) { if ( isRunning() ) { writeToStdin( data ); diff --git a/kommander/editor/assistproc.h b/kommander/editor/assistproc.h index 1f584daf..f457a8e8 100644 --- a/kommander/editor/assistproc.h +++ b/kommander/editor/assistproc.h @@ -20,28 +20,28 @@ #ifndef ASSISTPROC_H #define ASSISTPROC_H -#include -#include -#include -#include +#include +#include +#include +#include class AssistProc : public QProcess { Q_OBJECT public: - AssistProc( QObject *parent=0, const char * name = 0, const QString &path = QString::null ); + AssistProc( TQObject *parent=0, const char * name = 0, const TQString &path = TQString::null ); ~AssistProc(); - bool run( const QString &path = QString::null ); + bool run( const TQString &path = TQString::null ); public slots: - bool sendRequest( const QString &data ); + bool sendRequest( const TQString &data ); private slots: void processOutput(); void processErrOutput(); private: - QString assistantPath; + TQString assistantPath; }; #endif // ASSISTPROC_H diff --git a/kommander/editor/assoctexteditorimpl.cpp b/kommander/editor/assoctexteditorimpl.cpp index 25ac7f30..cb5502a2 100644 --- a/kommander/editor/assoctexteditorimpl.cpp +++ b/kommander/editor/assoctexteditorimpl.cpp @@ -39,16 +39,16 @@ #include /* QT INCLUDES */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include /* OTHER INCLUDES */ #include @@ -61,10 +61,10 @@ #include "choosewidgetimpl.h" #include "functionsimpl.h" -QValueList openedWidgets; +TQValueList 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) +AssocTextEditor::AssocTextEditor(TQWidget *a_widget, FormWindow* a_form, + PropertyEditor* a_property, KParts::PartManager *partManager, TQWidget *a_parent, const char *a_name, bool a_modal) : AssocTextEditorBase(a_parent, a_name, a_modal) { // text editor @@ -90,7 +90,7 @@ AssocTextEditor::AssocTextEditor(QWidget *a_widget, FormWindow* a_form, } doc = KTextEditor::createDocument ("libkatepart", a_parent, "KTextEditor::Document"); - QGridLayout *layout = new QGridLayout(editorFrame, 1, 1); + TQGridLayout *layout = new TQGridLayout(editorFrame, 1, 1); view = doc->createView(editorFrame); layout->addWidget(view, 1,1); partManager->addPart(doc, true); @@ -138,7 +138,7 @@ AssocTextEditor::AssocTextEditor(QWidget *a_widget, FormWindow* a_form, readOnlyAction = view->actionCollection()->action("tools_toggle_write_lock"); popup->insertSeparator(); highlightPopup = new KPopupMenu(popup); - connect(highlightPopup, SIGNAL(activated(int)), SLOT(slotHighlightingChanged(int))); + connect(highlightPopup, TQT_SIGNAL(activated(int)), TQT_SLOT(slotHighlightingChanged(int))); popup->insertItem(i18n("&Highlighting"), highlightPopup); @@ -151,13 +151,13 @@ AssocTextEditor::AssocTextEditor(QWidget *a_widget, FormWindow* a_form, 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())); + connect(doc, TQT_SIGNAL(textChanged()), TQT_SLOT(textEditChanged())); + connect(widgetsComboBox, TQT_SIGNAL(activated(int)), TQT_SLOT(widgetChanged(int))); + connect(stateComboBox, TQT_SIGNAL(activated(int)), TQT_SLOT(stateChanged(int))); + connect(filePushButton, TQT_SIGNAL(clicked()), TQT_SLOT(insertFile())); + connect(functionButton, TQT_SIGNAL(clicked()), TQT_SLOT(insertFunction())); + connect(widgetComboBox, TQT_SIGNAL(activated(int)), TQT_SLOT(insertWidgetName(int))); + connect(treeWidgetButton, TQT_SIGNAL(clicked()), TQT_SLOT(selectWidget())); view->setFocus(); } @@ -170,7 +170,7 @@ AssocTextEditor::~AssocTextEditor() openedWidgets.remove(m_widget); } -void AssocTextEditor::setWidget(QWidget *a_widget) +void AssocTextEditor::setWidget(TQWidget *a_widget) { KommanderWidget *a_atw = dynamic_cast(a_widget); if (!a_widget || !a_atw) @@ -197,10 +197,10 @@ void AssocTextEditor::setWidget(QWidget *a_widget) stateComboBox->insertItem("population"); // set states and population scripts - QStringList at = a_atw->associatedText(); + TQStringList 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) + TQStringList::iterator at_it = at.begin(); + for(TQStringList::ConstIterator s_it = m_states.begin(); s_it != m_states.end(); ++s_it) { if(at_it != at.end()) { @@ -208,7 +208,7 @@ void AssocTextEditor::setWidget(QWidget *a_widget) ++at_it; } else - m_atdict[(*s_it)] = QString::null; + m_atdict[(*s_it)] = TQString::null; } m_populationText = a_atw->populationText(); @@ -268,20 +268,20 @@ void AssocTextEditor::save() const if (atw->associatedText() != associatedText()) { - QString text = i18n("Set the \'text association\' of \'%1\'").arg(m_widget->name()); + TQString 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); + associatedText(), TQString::null, TQString::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()); + TQString 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); + populationText(), TQString::null, TQString::null, false); cmd->execute(); m_formWindow->commandHistory()->addCommand(cmd); MetaDataBase::setPropertyChanged(m_widget, "populationText", true); @@ -289,46 +289,46 @@ void AssocTextEditor::save() const } -QStringList AssocTextEditor::associatedText() const +TQStringList AssocTextEditor::associatedText() const { - QStringList at; - for(QStringList::ConstIterator it = m_states.begin(); it != m_states.end(); ++it) + TQStringList at; + for(TQStringList::ConstIterator it = m_states.begin(); it != m_states.end(); ++it) at.append(m_atdict[(*it)]); return at; } -QString AssocTextEditor::populationText() const +TQString AssocTextEditor::populationText() const { return m_populationText; } -QStringList AssocTextEditor::buildWidgetList() +TQStringList AssocTextEditor::buildWidgetList() { - QStringList widgetList; - QObject* thisObject = m_formWindow->mainContainer(); - QObjectList *objectList = thisObject->queryList(); + TQStringList widgetList; + TQObject* thisObject = m_formWindow->mainContainer(); + TQObjectList *objectList = thisObject->queryList(); objectList->prepend(thisObject); - for (QObjectListIt it(*objectList); it.current(); ++it) + for (TQObjectListIt 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(); + TQMetaObject *metaObj = it.current()->metaObject(); if(metaObj) { int id = metaObj->findProperty("KommanderWidget", true); - const QMetaProperty *metaProp = metaObj->property(id, true); + const TQMetaProperty *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_"))) + TQVariant flag = (it.current())->property("KommanderWidget"); + if(flag.isValid() && !(TQString(it.current()->name()).startsWith("qt_"))) { - widgetList.append( widgetToString( (QWidget*)it.current()) ); - m_widgetList.insert(it.current()->name(), (QWidget*)it.current()); + widgetList.append( widgetToString( (TQWidget*)it.current()) ); + m_widgetList.insert(it.current()->name(), (TQWidget*)it.current()); } } } @@ -352,7 +352,7 @@ void AssocTextEditor::stateChanged(int a_index) KTextEditor::ViewCursorInterface *viewCursorIf = dynamic_cast(view); viewCursorIf->setCursorPositionReal(0, 0); highlightPopup->clear(); - QString hlType = "Kommander (old parser)"; + TQString hlType = "Kommander (old parser)"; if (useInternalParser()) hlType = "Kommander (new parser)"; KTextEditor::HighlightingInterface *hlIf = dynamic_cast(doc); @@ -381,7 +381,7 @@ void AssocTextEditor::textEditChanged() m_atdict[m_currentState] = associatedTextEdit->text(); int index = stateComboBox->currentItem(); if (associatedTextEdit->text().isEmpty()) - stateComboBox->changeItem(QPixmap(), stateComboBox->currentText(), index); + stateComboBox->changeItem(TQPixmap(), stateComboBox->currentText(), index); else if (!stateComboBox->pixmap(index) || stateComboBox->pixmap(index)->isNull()) stateComboBox->changeItem(scriptPixmap, stateComboBox->currentText(), index); } @@ -397,7 +397,7 @@ void AssocTextEditor::selectWidget() ChooseWidget cDialog(this); cDialog.setWidget(m_formWindow->mainContainer()); if (cDialog.exec()) { - QString newWidget = cDialog.selection(); + TQString newWidget = cDialog.selection(); for (int i = 0; icount(); i++) if (widgetsComboBox->text(i) == newWidget) { widgetsComboBox->setCurrentItem(i); @@ -409,7 +409,7 @@ void AssocTextEditor::selectWidget() -void AssocTextEditor::insertAssociatedText(const QString& a_text) +void AssocTextEditor::insertAssociatedText(const TQString& a_text) { uint line, col; KTextEditor::ViewCursorInterface *viewCursorIf = dynamic_cast(view); @@ -419,28 +419,28 @@ void AssocTextEditor::insertAssociatedText(const QString& a_text) void AssocTextEditor::insertFile() { - QString fileName = KFileDialog::getOpenFileName(); + TQString fileName = KFileDialog::getOpenFileName(); if(fileName.isEmpty()) return; - QFile insertFile(fileName); + TQFile insertFile(fileName); if(!insertFile.open(IO_ReadOnly)) { KMessageBox::error( this, i18n("Cannot open file
%1text(index)), false)); } @@ -451,19 +451,19 @@ void AssocTextEditor::insertFunction() insertAssociatedText(pDialog.functionText()); } -QString AssocTextEditor::widgetToString(QWidget* widget, bool formatted) +TQString AssocTextEditor::widgetToString(TQWidget* widget, bool formatted) { if (!widget) - return QString::null; + return TQString::null; else if (formatted) - return QString("%1 (%2)").arg(widget->name()).arg(widget->className()); + return TQString("%1 (%2)").arg(widget->name()).arg(widget->className()); else return widget->name(); } -QWidget* AssocTextEditor::widgetFromString(const QString& name) +TQWidget* AssocTextEditor::widgetFromString(const TQString& name) { - QString realname = name; + TQString realname = name; int i = realname.find(' '); if (i != -1) realname.truncate(i); @@ -482,7 +482,7 @@ void AssocTextEditor::slotHighlightingChanged(int mode) bool AssocTextEditor::useInternalParser() { - QString s = ""; + TQString s = ""; int line = -1; while (s.isEmpty() && line < (int)associatedTextEdit->numLines()) { @@ -497,7 +497,7 @@ bool AssocTextEditor::useInternalParser() return false; } -void AssocTextEditor::closeEvent ( QCloseEvent * e ) +void AssocTextEditor::closeEvent ( TQCloseEvent * e ) { deleteLater(); e->accept(); diff --git a/kommander/editor/assoctexteditorimpl.h b/kommander/editor/assoctexteditorimpl.h index 65879cef..37c582ab 100644 --- a/kommander/editor/assoctexteditorimpl.h +++ b/kommander/editor/assoctexteditorimpl.h @@ -17,14 +17,14 @@ #ifndef _HAVE_ASSOCTEXTEDITORIMPL_H_ #define _HAVE_ASSOCTEXTEDITORIMPL_H_ -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include #include "assoctexteditor.h" @@ -50,16 +50,16 @@ class AssocTextEditor : public AssocTextEditorBase { Q_OBJECT public: - AssocTextEditor(QWidget*, FormWindow*, PropertyEditor*, KParts::PartManager *partManager, QWidget*, const char* = 0, bool = true); + AssocTextEditor(TQWidget*, FormWindow*, PropertyEditor*, KParts::PartManager *partManager, TQWidget*, const char* = 0, bool = true); ~AssocTextEditor(); // Set interface for given widget. - void setWidget(QWidget *); + void setWidget(TQWidget *); // Save changes for current widget void save() const; // Return population text for current widget - QString populationText() const; + TQString populationText() const; // Return associated text for current widget - QStringList associatedText() const; + TQStringList associatedText() const; public slots: // Current script text has changed - save it in m_atdict @@ -74,7 +74,7 @@ public slots: // Functions for script editing: // Insert given text at cursor position for current widget and state - void insertAssociatedText(const QString&); + void insertAssociatedText(const TQString&); // Select file and insert its content at cursor position void insertFile(); // Open function browser and insert chosen function at cursor position @@ -83,7 +83,7 @@ public slots: void insertWidgetName(int); protected: - virtual void closeEvent(QCloseEvent * e); + virtual void closeEvent(TQCloseEvent * e); protected slots: @@ -93,33 +93,33 @@ private: bool useInternalParser(); // Current widget - QWidget *m_widget; + TQWidget *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; + TQString m_currentState; // List of states for current widget - QStringList m_states; + TQStringList m_states; // Current widget list - QDict m_widgetList; + TQDict m_widgetList; // Dictionary for current widget; contains pairs (state, script associated with current state) - QMap m_atdict; + TQMap m_atdict; // Current population text - QString m_populationText; + TQString m_populationText; // Non-enmpty script pixmap - QPixmap scriptPixmap; + TQPixmap scriptPixmap; // Create list of all widgets on the same dialog as current widget // Set store to true, to update m_widgetList; - QStringList buildWidgetList(); + TQStringList 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); + TQString widgetToString(TQWidget* widget, bool formatted = true); // Conver combo string to widget - QWidget* widgetFromString(const QString& name); + TQWidget* widgetFromString(const TQString& name); KTextEditor::EditInterface *associatedTextEdit; KTextEditor::Document *doc; diff --git a/kommander/editor/choosewidgetimpl.cpp b/kommander/editor/choosewidgetimpl.cpp index 53580a6e..527137b4 100644 --- a/kommander/editor/choosewidgetimpl.cpp +++ b/kommander/editor/choosewidgetimpl.cpp @@ -19,21 +19,21 @@ #include /** QT INCLUDES */ -#include -#include -#include -#include -#include "qmetaobject.h" +#include +#include +#include +#include +#include "tqmetaobject.h" /** OTHER INCLUDES */ #include "choosewidgetimpl.h" #include "choosewidgetimpl.moc" -ChooseWidget::ChooseWidget(QWidget* a_parent, const char* a_name, bool a_modal) +ChooseWidget::ChooseWidget(TQWidget* 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*))); + connect( nameEdit, TQT_SIGNAL(textChanged(const TQString&)), TQT_SLOT(textChanged(const TQString&)) ); + connect( widgetView, TQT_SIGNAL(executed(TQListViewItem*)), TQT_SLOT(selectedItem(TQListViewItem*))); widgetView->setFullWidth(true); widgetView->addColumn(i18n("Widgets")); widgetView->setRootIsDecorated(true); @@ -45,17 +45,17 @@ ChooseWidget::~ChooseWidget() } -void ChooseWidget::setWidget(QWidget* w) +void ChooseWidget::setWidget(TQWidget* w) { widgetView->clear(); if (!w) return; - QListViewItem* item; - QPtrStack p_widgets; - QPtrStack p_items; + TQListViewItem* item; + TQPtrStack p_widgets; + TQPtrStack p_items; - item = new QListViewItem(widgetView, QString("%1 (%2)").arg(w->name()).arg(w->className())); + item = new TQListViewItem(widgetView, TQString("%1 (%2)").arg(w->name()).arg(w->className())); item->setOpen(true); p_widgets.push(w); @@ -64,13 +64,13 @@ void ChooseWidget::setWidget(QWidget* w) 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; + TQObjectList *objectList = w->queryList(0, 0, true, false); + for (TQObjectListIt it(*objectList); it.current(); ++it) { + TQListViewItem* newItem = item; if (isKommanderWidget(*it)) - newItem = new QListViewItem(item, QString("%1 (%2)").arg((*it)->name()).arg((*it)->className())); + newItem = new TQListViewItem(item, TQString("%1 (%2)").arg((*it)->name()).arg((*it)->className())); if ((*it)->children()) { - p_widgets.push((QWidget*)(*it)); + p_widgets.push((TQWidget*)(*it)); p_items.push(newItem); } } @@ -83,44 +83,44 @@ void ChooseWidget::setWidget(QWidget* w) } -QString ChooseWidget::selection() +TQString ChooseWidget::selection() { if (widgetView->currentItem()) return widgetView->currentItem()->text(0); else - return QString::null; + return TQString::null; } -void ChooseWidget::textChanged(const QString& text) +void ChooseWidget::textChanged(const TQString& text) { - QListViewItem* item = widgetView->findItem(text, 0, Qt::BeginsWith); + TQListViewItem* item = widgetView->findItem(text, 0, Qt::BeginsWith); if (item) { widgetView->setCurrentItem(item); widgetView->ensureItemVisible(item); } } -bool ChooseWidget::isKommanderWidget(QObject* w) +bool ChooseWidget::isKommanderWidget(TQObject* w) { bool pExists = false; - QMetaObject *metaObj = w->metaObject(); + TQMetaObject *metaObj = w->metaObject(); if (metaObj) { int id = metaObj->findProperty("KommanderWidget", true); - const QMetaProperty *metaProp = metaObj->property(id, true); + const TQMetaProperty *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_"))) + TQVariant flag = (w)->property("KommanderWidget"); + if(flag.isValid() && !(TQString(w->name()).startsWith("qt_"))) return true; } return false; } -void ChooseWidget::selectedItem(QListViewItem* item) +void ChooseWidget::selectedItem(TQListViewItem* item) { if (item) accept(); diff --git a/kommander/editor/choosewidgetimpl.h b/kommander/editor/choosewidgetimpl.h index 877bcd07..4dea4c77 100644 --- a/kommander/editor/choosewidgetimpl.h +++ b/kommander/editor/choosewidgetimpl.h @@ -23,21 +23,21 @@ class ChooseWidget : public ChooseWidgetBase { Q_OBJECT public: - ChooseWidget(QWidget*, const char* = 0, bool=true); + ChooseWidget(TQWidget*, const char* = 0, bool=true); ~ChooseWidget(); // Put current widget and all of its children in a tree - void setWidget(QWidget *); + void setWidget(TQWidget *); // Return current widget - QString selection(); + TQString selection(); public slots: // Filter text changed - find matching widget - void textChanged(const QString&); + void textChanged(const TQString&); // Double clicked on listviwew - void selectedItem(QListViewItem *); + void selectedItem(TQListViewItem *); private: // Check if given widget is a Kommander widget - bool isKommanderWidget(QObject* w); + bool isKommanderWidget(TQObject* w); }; diff --git a/kommander/editor/command.cpp b/kommander/editor/command.cpp index b6bbe82c..4d8e369d 100644 --- a/kommander/editor/command.cpp +++ b/kommander/editor/command.cpp @@ -31,22 +31,22 @@ #include "actiondnd.h" #include "formfile.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #ifndef QT_NO_TABLE -#include +#include #endif -#include +#include #include @@ -84,7 +84,7 @@ void CommandHistory::addCommand( Command *cmd, bool tryCompress ) if ( current < savedAt ) savedAt = -2; - QPtrList commands; + TQPtrList commands; commands.setAutoDelete( false ); for( int i = 0; i <= current; ++i ) { @@ -156,11 +156,11 @@ void CommandHistory::emitUndoRedo() redoCmd = history.at( current + 1 ); bool ua = (undoCmd != 0); - QString uc; + TQString uc; if ( ua ) uc = undoCmd->name(); bool ra = (redoCmd != 0); - QString rc; + TQString rc; if ( ra ) rc = redoCmd->name(); emit undoRedoChanged( ua, ra, uc, rc ); @@ -194,7 +194,7 @@ void CommandHistory::checkCompressedCommand() // ------------------------------------------------------------ -Command::Command( const QString &n, FormWindow *fw ) +Command::Command( const TQString &n, FormWindow *fw ) : cmdName( n ), formWin( fw ) { } @@ -203,7 +203,7 @@ Command::~Command() { } -QString Command::name() const +TQString Command::name() const { return cmdName; } @@ -225,8 +225,8 @@ bool Command::canMerge( Command * ) // ------------------------------------------------------------ -ResizeCommand::ResizeCommand( const QString &n, FormWindow *fw, - QWidget *w, const QRect &oldr, const QRect &nr ) +ResizeCommand::ResizeCommand( const TQString &n, FormWindow *fw, + TQWidget *w, const TQRect &oldr, const TQRect &nr ) : Command( n, fw ), widget( w ), oldRect( oldr ), newRect( nr ) { } @@ -251,21 +251,21 @@ void ResizeCommand::unexecute() // ------------------------------------------------------------ -InsertCommand::InsertCommand( const QString &n, FormWindow *fw, - QWidget *w, const QRect &g ) +InsertCommand::InsertCommand( const TQString &n, FormWindow *fw, + TQWidget *w, const TQRect &g ) : Command( n, fw ), widget( w ), geometry( g ) { } void InsertCommand::execute() { - if ( geometry.size() == QSize( 0, 0 ) ) { + if ( geometry.size() == TQSize( 0, 0 ) ) { widget->move( geometry.topLeft() ); widget->adjustSize(); } else { - QSize s = geometry.size().expandedTo( widget->minimumSize() ); + TQSize s = geometry.size().expandedTo( widget->minimumSize() ); s = s.expandedTo( widget->minimumSizeHint() ); - QRect r( geometry.topLeft(), s ); + TQRect r( geometry.topLeft(), s ); widget->setGeometry( r ); } widget->show(); @@ -285,11 +285,11 @@ void InsertCommand::unexecute() // ------------------------------------------------------------ -MoveCommand::MoveCommand( const QString &n, FormWindow *fw, - const QWidgetList &w, - const QValueList op, - const QValueList np, - QWidget *opr, QWidget *npr ) +MoveCommand::MoveCommand( const TQString &n, FormWindow *fw, + const TQWidgetList &w, + const TQValueList op, + const TQValueList np, + TQWidget *opr, TQWidget *npr ) : Command( n, fw ), widgets( w ), oldPos( op ), newPos( np ), oldParent( opr ), newParent( npr ) { @@ -311,10 +311,10 @@ bool MoveCommand::canMerge( Command *c ) void MoveCommand::execute() { - for ( QWidget *w = widgets.first(); w; w = widgets.next() ) { + for ( TQWidget *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 ) ) ); + TQPoint pos = newParent->mapFromGlobal( w->mapToGlobal( TQPoint( 0,0 ) ) ); w->reparent( newParent, pos, true ); formWindow()->raiseSelection( w ); formWindow()->raiseChildSelections( w ); @@ -332,10 +332,10 @@ void MoveCommand::execute() void MoveCommand::unexecute() { - for ( QWidget *w = widgets.first(); w; w = widgets.next() ) { + for ( TQWidget *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 ) ) ); + TQPoint pos = oldParent->mapFromGlobal( w->mapToGlobal( TQPoint( 0,0 ) ) ); w->reparent( oldParent, pos, true ); formWindow()->raiseSelection( w ); formWindow()->raiseChildSelections( w ); @@ -353,8 +353,8 @@ void MoveCommand::unexecute() // ------------------------------------------------------------ -DeleteCommand::DeleteCommand( const QString &n, FormWindow *fw, - const QWidgetList &w ) +DeleteCommand::DeleteCommand( const TQString &n, FormWindow *fw, + const TQWidgetList &w ) : Command( n, fw ), widgets( w ) { widgets.setAutoDelete( false ); @@ -364,16 +364,16 @@ void DeleteCommand::execute() { formWindow()->setPropertyShowingBlocked( true ); connections.clear(); - for ( QWidget *w = widgets.first(); w; w = widgets.next() ) { + for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) { w->hide(); - QString s = w->name(); + TQString s = w->name(); s.prepend( "qt_dead_widget_" ); w->setName( s ); formWindow()->selectWidget( w, false ); formWindow()->widgets()->remove( w ); - QValueList conns = MetaDataBase::connections( formWindow(), w ); + TQValueList conns = MetaDataBase::connections( formWindow(), w ); connections.insert( w, conns ); - QValueList::Iterator it = conns.begin(); + TQValueList::Iterator it = conns.begin(); for ( ; it != conns.end(); ++it ) { MetaDataBase::removeConnection( formWindow(), (*it).sender, (*it).signal, (*it).receiver, (*it).slot ); @@ -389,15 +389,15 @@ void DeleteCommand::unexecute() { formWindow()->setPropertyShowingBlocked( true ); formWindow()->clearSelection( false ); - for ( QWidget *w = widgets.first(); w; w = widgets.next() ) { + for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) { w->show(); - QString s = w->name(); - s.remove( 0, QString( "qt_dead_widget_" ).length() ); + TQString s = w->name(); + s.remove( 0, TQString( "qt_dead_widget_" ).length() ); w->setName( s ); formWindow()->widgets()->insert( w, w ); formWindow()->selectWidget( w ); - QValueList conns = *connections.find( w ); - QValueList::Iterator it = conns.begin(); + TQValueList conns = *connections.find( w ); + TQValueList::Iterator it = conns.begin(); for ( ; it != conns.end(); ++it ) { MetaDataBase::addConnection( formWindow(), (*it).sender, (*it).signal, (*it).receiver, (*it).slot ); @@ -410,11 +410,11 @@ void DeleteCommand::unexecute() // ------------------------------------------------------------ -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 ) +SetPropertyCommand::SetPropertyCommand( const TQString &n, FormWindow *fw, + TQObject *w, PropertyEditor *e, + const TQString &pn, const TQVariant &ov, + const TQVariant &nv, const TQString &ncut, + const TQString &ocut, bool reset ) : Command( n, fw ), widget( w ), editor( e ), propName( pn ), oldValue( ov ), newValue( nv ), oldCurrentItemText( ocut ), newCurrentItemText( ncut ), wasChanged( true ), isResetCommand( reset ) @@ -460,7 +460,7 @@ void SetPropertyCommand::unexecute() bool SetPropertyCommand::canMerge( Command *c ) { SetPropertyCommand *cmd = (SetPropertyCommand*)c; - const QMetaProperty *p = + const TQMetaProperty *p = widget->metaObject()->property( widget->metaObject()->findProperty( propName, true ), true ); if ( !p ) { if ( propName == "toolTip" || propName == "whatsThis" ) @@ -469,8 +469,8 @@ bool SetPropertyCommand::canMerge( Command *c ) MetaDataBase::CustomWidget *cw = ( (CustomWidget*)widget )->customWidget(); if ( !cw ) return false; - for ( QValueList::Iterator it = cw->lstProperties.begin(); it != cw->lstProperties.end(); ++it ) { - if ( QString( (*it ).property ) == propName ) { + for ( TQValueList::Iterator it = cw->lstProperties.begin(); it != cw->lstProperties.end(); ++it ) { + if ( TQString( (*it ).property ) == propName ) { if ( (*it).type == "String" || (*it).type == "CString" || (*it).type == "Int" || (*it).type == "UInt" ) return true; } @@ -478,9 +478,9 @@ bool SetPropertyCommand::canMerge( Command *c ) } return false; } - QVariant::Type t = QVariant::nameToType( p->type() ); + TQVariant::Type t = TQVariant::nameToType( p->type() ); return ( cmd->propName == propName && - t == QVariant::String || t == QVariant::CString || t == QVariant::Int || t == QVariant::UInt ); + t == TQVariant::String || t == TQVariant::CString || t == TQVariant::Int || t == TQVariant::UInt ); } void SetPropertyCommand::merge( Command *c ) @@ -493,9 +493,9 @@ void SetPropertyCommand::merge( Command *c ) bool SetPropertyCommand::checkProperty() { if ( propName == "name" /*|| propName == "itemName"*/ ) { // ### fix that - QString s = newValue.toString(); + TQString s = newValue.toString(); if ( !formWindow()->unify( widget, s, false ) ) { - QMessageBox::information( formWindow()->mainWindow(), + TQMessageBox::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" @@ -507,7 +507,7 @@ bool SetPropertyCommand::checkProperty() return false; } if ( s.isEmpty() ) { - QMessageBox::information( formWindow()->mainWindow(), + TQMessageBox::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'." ). @@ -517,12 +517,12 @@ bool SetPropertyCommand::checkProperty() } if ( widget->parent() && widget->parent()->inherits( "FormWindow" ) ) - formWindow()->mainWindow()->formNameChanged( (FormWindow*)( (QWidget*)widget )->parentWidget() ); + formWindow()->mainWindow()->formNameChanged( (FormWindow*)( (TQWidget*)widget )->parentWidget() ); } return true; } -void SetPropertyCommand::setProperty( const QVariant &v, const QString ¤tItemText, bool select ) +void SetPropertyCommand::setProperty( const TQVariant &v, const TQString ¤tItemText, bool select ) { if ( !formWindow()->isWidgetSelected( widget ) && !formWindow()->isMainContainer( widget ) && select ) formWindow()->selectWidget( widget ); @@ -531,7 +531,7 @@ void SetPropertyCommand::setProperty( const QVariant &v, const QString ¤tI if ( select ) editor->propertyList()->setCurrentProperty( propName ); - const QMetaProperty *p = + const TQMetaProperty *p = widget->metaObject()->property( widget->metaObject()->findProperty( propName, true ), true ); if ( !p ) { if ( propName == "hAlign" ) { @@ -539,23 +539,23 @@ void SetPropertyCommand::setProperty( const QVariant &v, const QString ¤tI int align = widget->property( "alignment" ).toInt(); align &= ~( AlignHorizontal_Mask ); align |= p->keyToValue( currentItemText ); - widget->setProperty( "alignment", QVariant( align ) ); + widget->setProperty( "alignment", TQVariant( 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 ) ); + widget->setProperty( "alignment", TQVariant( align ) ); } else if ( propName == "wordwrap" ) { int align = widget->property( "alignment" ).toInt(); align &= ~WordBreak; if ( v.toBool() ) align |= WordBreak; - widget->setProperty( "alignment", QVariant( align ) ); + widget->setProperty( "alignment", TQVariant( align ) ); } else if ( propName == "layoutSpacing" ) { - MetaDataBase::setSpacing( WidgetFactory::containerOfWidget( (QWidget*)editor->widget() ), v.toInt() ); + MetaDataBase::setSpacing( WidgetFactory::containerOfWidget( (TQWidget*)editor->widget() ), v.toInt() ); } else if ( propName == "layoutMargin" ) { - MetaDataBase::setMargin( WidgetFactory::containerOfWidget( (QWidget*)editor->widget() ), v.toInt() ); + MetaDataBase::setMargin( WidgetFactory::containerOfWidget( (TQWidget*)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" ) ) { @@ -569,7 +569,7 @@ void SetPropertyCommand::setProperty( const QVariant &v, const QString ¤tI ( ( 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() ); + formWindow()->mainWindow()->objectHierarchy()->databasePropertyChanged( (TQWidget*)widget, MetaDataBase::fakeProperty( widget, "database" ).toStringList() ); #endif return; } @@ -579,11 +579,11 @@ void SetPropertyCommand::setProperty( const QVariant &v, const QString ¤tI } else if ( p->isEnumType() ) { widget->setProperty( propName, p->keyToValue( currentItemText ) ); } else { - QVariant ov; + TQVariant ov; if ( propName == "name" || propName == "itemName" ) ov = widget->property( propName ); int oldSerNum = -1; - if ( v.type() == QVariant::Pixmap ) + if ( v.type() == TQVariant::Pixmap ) oldSerNum = v.toPixmap().serialNumber(); widget->setProperty( propName, v ); if ( oldSerNum != -1 && oldSerNum != widget->property( propName ).toPixmap().serialNumber() ) @@ -591,21 +591,21 @@ void SetPropertyCommand::setProperty( const QVariant &v, const QString ¤tI widget->property( propName ).toPixmap().serialNumber(), MetaDataBase::pixmapKey( formWindow(), oldSerNum ) ); if ( propName == "cursor" ) - MetaDataBase::setCursor( (QWidget*)widget, v.toCursor() ); + MetaDataBase::setCursor( (TQWidget*)widget, v.toCursor() ); if ( propName == "name" && widget->isWidgetType() ) { - formWindow()->mainWindow()->objectHierarchy()->namePropertyChanged( (QWidget*)widget, ov ); + formWindow()->mainWindow()->objectHierarchy()->namePropertyChanged( (TQWidget*)widget, ov ); if ( formWindow()->isMainContainer( widget ) ) formWindow()->setName( v.toCString() ); } - if ( propName == "name" && widget->inherits( "QAction" ) && + if ( propName == "name" && widget->inherits( "TQAction" ) && formWindow()->mainContainer() && - formWindow()->mainContainer()->inherits( "QMainWindow" ) ) { - formWindow()->mainWindow()->actioneditor()->updateActionName( (QAction*)widget ); + formWindow()->mainContainer()->inherits( "TQMainWindow" ) ) { + formWindow()->mainWindow()->actioneditor()->updateActionName( (TQAction*)widget ); } - if ( propName == "iconSet" && widget->inherits( "QAction" ) && + if ( propName == "iconSet" && widget->inherits( "TQAction" ) && formWindow()->mainContainer() && - formWindow()->mainContainer()->inherits( "QMainWindow" ) ) { - formWindow()->mainWindow()->actioneditor()->updateActionIcon( (QAction*)widget ); + formWindow()->mainContainer()->inherits( "TQMainWindow" ) ) { + formWindow()->mainWindow()->actioneditor()->updateActionIcon( (TQAction*)widget ); } if ( propName == "caption" ) { if ( formWindow()->isMainContainer( widget ) ) @@ -627,9 +627,9 @@ void SetPropertyCommand::setProperty( const QVariant &v, const QString ¤tI // ------------------------------------------------------------ -LayoutHorizontalCommand::LayoutHorizontalCommand( const QString &n, FormWindow *fw, - QWidget *parent, QWidget *layoutBase, - const QWidgetList &wl ) +LayoutHorizontalCommand::LayoutHorizontalCommand( const TQString &n, FormWindow *fw, + TQWidget *parent, TQWidget *layoutBase, + const TQWidgetList &wl ) : Command( n, fw ), layout( wl, parent, fw, layoutBase ) { } @@ -650,9 +650,9 @@ void LayoutHorizontalCommand::unexecute() // ------------------------------------------------------------ -LayoutHorizontalSplitCommand::LayoutHorizontalSplitCommand( const QString &n, FormWindow *fw, - QWidget *parent, QWidget *layoutBase, - const QWidgetList &wl ) +LayoutHorizontalSplitCommand::LayoutHorizontalSplitCommand( const TQString &n, FormWindow *fw, + TQWidget *parent, TQWidget *layoutBase, + const TQWidgetList &wl ) : Command( n, fw ), layout( wl, parent, fw, layoutBase, true, true ) { } @@ -673,9 +673,9 @@ void LayoutHorizontalSplitCommand::unexecute() // ------------------------------------------------------------ -LayoutVerticalCommand::LayoutVerticalCommand( const QString &n, FormWindow *fw, - QWidget *parent, QWidget *layoutBase, - const QWidgetList &wl ) +LayoutVerticalCommand::LayoutVerticalCommand( const TQString &n, FormWindow *fw, + TQWidget *parent, TQWidget *layoutBase, + const TQWidgetList &wl ) : Command( n, fw ), layout( wl, parent, fw, layoutBase ) { } @@ -696,9 +696,9 @@ void LayoutVerticalCommand::unexecute() // ------------------------------------------------------------ -LayoutVerticalSplitCommand::LayoutVerticalSplitCommand( const QString &n, FormWindow *fw, - QWidget *parent, QWidget *layoutBase, - const QWidgetList &wl ) +LayoutVerticalSplitCommand::LayoutVerticalSplitCommand( const TQString &n, FormWindow *fw, + TQWidget *parent, TQWidget *layoutBase, + const TQWidgetList &wl ) : Command( n, fw ), layout( wl, parent, fw, layoutBase, true, true ) { } @@ -719,10 +719,10 @@ void LayoutVerticalSplitCommand::unexecute() // ------------------------------------------------------------ -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) ) ) +LayoutGridCommand::LayoutGridCommand( const TQString &n, FormWindow *fw, + TQWidget *parent, TQWidget *layoutBase, + const TQWidgetList &wl, int xres, int yres ) + : Command( n, fw ), layout( wl, parent, fw, layoutBase, TQSize( QMAX(5,xres), QMAX(5,yres) ) ) { } @@ -742,8 +742,8 @@ void LayoutGridCommand::unexecute() // ------------------------------------------------------------ -BreakLayoutCommand::BreakLayoutCommand( const QString &n, FormWindow *fw, - QWidget *layoutBase, const QWidgetList &wl ) +BreakLayoutCommand::BreakLayoutCommand( const TQString &n, FormWindow *fw, + TQWidget *layoutBase, const TQWidgetList &wl ) : Command( n, fw ), lb( layoutBase ), widgets( wl ) { WidgetFactory::LayoutType lay = WidgetFactory::layoutType( layoutBase ); @@ -751,11 +751,11 @@ BreakLayoutCommand::BreakLayoutCommand( const QString &n, FormWindow *fw, margin = MetaDataBase::margin( layoutBase ); layout = 0; if ( lay == WidgetFactory::HBox ) - layout = new HorizontalLayout( wl, layoutBase, fw, layoutBase, false, layoutBase->inherits( "QSplitter" ) ); + layout = new HorizontalLayout( wl, layoutBase, fw, layoutBase, false, layoutBase->inherits( "TQSplitter" ) ); else if ( lay == WidgetFactory::VBox ) - layout = new VerticalLayout( wl, layoutBase, fw, layoutBase, false, layoutBase->inherits( "QSplitter" ) ); + layout = new VerticalLayout( wl, layoutBase, fw, layoutBase, false, layoutBase->inherits( "TQSplitter" ) ); else if ( lay == WidgetFactory::Grid ) - layout = new GridLayout( wl, layoutBase, fw, layoutBase, QSize( QMAX( 5, fw->grid().x()), QMAX( 5, fw->grid().y()) ), false ); + layout = new GridLayout( wl, layoutBase, fw, layoutBase, TQSize( QMAX( 5, fw->grid().x()), QMAX( 5, fw->grid().y()) ), false ); } void BreakLayoutCommand::execute() @@ -765,7 +765,7 @@ void BreakLayoutCommand::execute() formWindow()->clearSelection( false ); layout->breakLayout(); formWindow()->mainWindow()->objectHierarchy()->rebuild(); - for ( QWidget *w = widgets.first(); w; w = widgets.next() ) + for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) w->resize( QMAX( 16, w->width() ), QMAX( 16, w->height() ) ); } @@ -782,8 +782,8 @@ void BreakLayoutCommand::unexecute() // ------------------------------------------------------------ -MacroCommand::MacroCommand( const QString &n, FormWindow *fw, - const QPtrList &cmds ) +MacroCommand::MacroCommand( const TQString &n, FormWindow *fw, + const TQPtrList &cmds ) : Command( n, fw ), commands( cmds ) { } @@ -802,8 +802,8 @@ void MacroCommand::unexecute() // ------------------------------------------------------------ -AddTabPageCommand::AddTabPageCommand( const QString &n, FormWindow *fw, - QTabWidget *tw, const QString &label ) +AddTabPageCommand::AddTabPageCommand( const TQString &n, FormWindow *fw, + TQTabWidget *tw, const TQString &label ) : Command( n, fw ), tabWidget( tw ), tabLabel( label ) { tabPage = new QDesignerWidget( formWindow(), tabWidget, "tab" ); @@ -833,8 +833,8 @@ void AddTabPageCommand::unexecute() // ------------------------------------------------------------ // ------------------------------------------------------------ -AddToolBoxPageCommand::AddToolBoxPageCommand( const QString &n, FormWindow *fw, - QToolBox *tw, const QString &_label ) +AddToolBoxPageCommand::AddToolBoxPageCommand( const TQString &n, FormWindow *fw, + TQToolBox *tw, const TQString &_label ) : Command( n, fw ), toolBox( tw ), label( _label ) { page = new QDesignerWidget( formWindow(), toolBox, "tab" ); @@ -863,8 +863,8 @@ void AddToolBoxPageCommand::unexecute() // ------------------------------------------------------------ -MoveTabPageCommand::MoveTabPageCommand( const QString &n, FormWindow *fw, - QTabWidget *tw, QWidget* page, const QString& label, int nIndex, int oIndex ) +MoveTabPageCommand::MoveTabPageCommand( const TQString &n, FormWindow *fw, + TQTabWidget *tw, TQWidget* page, const TQString& label, int nIndex, int oIndex ) : Command( n, fw ), tabWidget( tw ), tabPage( page ), tabLabel( label ) { newIndex = nIndex; @@ -891,8 +891,8 @@ void MoveTabPageCommand::unexecute() // ------------------------------------------------------------ -DeleteTabPageCommand::DeleteTabPageCommand( const QString &n, FormWindow *fw, - QTabWidget *tw, QWidget *page ) +DeleteTabPageCommand::DeleteTabPageCommand( const TQString &n, FormWindow *fw, + TQTabWidget *tw, TQWidget *page ) : Command( n, fw ), tabWidget( tw ), tabPage( page ) { tabLabel = ( (QDesignerTabWidget*)tabWidget )->pageTitle(); @@ -917,8 +917,8 @@ void DeleteTabPageCommand::unexecute() // ------------------------------------------------------------ -DeleteToolBoxPageCommand::DeleteToolBoxPageCommand( const QString &n, FormWindow *fw, - QToolBox *tw, QWidget *_page ) +DeleteToolBoxPageCommand::DeleteToolBoxPageCommand( const TQString &n, FormWindow *fw, + TQToolBox *tw, TQWidget *_page ) : Command( n, fw ), toolBox( tw ), page( _page ) { label = ( (EditorToolBox*)toolBox )->pageTitle(); @@ -943,8 +943,8 @@ void DeleteToolBoxPageCommand::unexecute() // ------------------------------------------------------------ -AddWizardPageCommand::AddWizardPageCommand( const QString &n, FormWindow *fw, - QWizard *w, const QString &label, int i, bool s ) +AddWizardPageCommand::AddWizardPageCommand( const TQString &n, FormWindow *fw, + TQWizard *w, const TQString &label, int i, bool s ) : Command( n, fw ), wizard( w ), pageLabel( label ) { page = new QDesignerWidget( formWindow(), wizard, "page" ); @@ -975,8 +975,8 @@ void AddWizardPageCommand::unexecute() // ------------------------------------------------------------ -DeleteWizardPageCommand::DeleteWizardPageCommand( const QString &n, FormWindow *fw, - QWizard *w, int i, bool s ) +DeleteWizardPageCommand::DeleteWizardPageCommand( const TQString &n, FormWindow *fw, + TQWizard *w, int i, bool s ) : Command( n, fw ), wizard( w ), index( i ) { show = s; @@ -1003,8 +1003,8 @@ void DeleteWizardPageCommand::unexecute() // ------------------------------------------------------------ -RenameWizardPageCommand::RenameWizardPageCommand( const QString &n, FormWindow *fw, - QWizard *w, int i, const QString& name ) +RenameWizardPageCommand::RenameWizardPageCommand( const TQString &n, FormWindow *fw, + TQWizard *w, int i, const TQString& name ) : Command( n, fw ), wizard( w ), index( i ), label( name ) { @@ -1013,7 +1013,7 @@ RenameWizardPageCommand::RenameWizardPageCommand( const QString &n, FormWindow * void RenameWizardPageCommand::execute() { page = wizard->page( index ); - QString oldLabel = wizard->title( page ); + TQString oldLabel = wizard->title( page ); wizard->setTitle( page, label ); label = oldLabel; @@ -1027,17 +1027,17 @@ void RenameWizardPageCommand::unexecute() // ------------------------------------------------------------ -SwapWizardPagesCommand::SwapWizardPagesCommand( const QString &n, FormWindow *fw, QWizard *w, int i1, int i2 ) +SwapWizardPagesCommand::SwapWizardPagesCommand( const TQString &n, FormWindow *fw, TQWizard *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 ); + TQWidget *page1 = wizard->page( index1 ); + TQWidget *page2 = wizard->page( index2 ); + TQString page1Label = wizard->title( page1 ); + TQString page2Label = wizard->title( page2 ); wizard->removePage( page1 ); wizard->removePage( page2 ); wizard->insertPage( page1, page1Label, index2 ); @@ -1053,7 +1053,7 @@ void SwapWizardPagesCommand::unexecute() // ------------------------------------------------------------ -AddConnectionCommand::AddConnectionCommand( const QString &name, FormWindow *fw, +AddConnectionCommand::AddConnectionCommand( const TQString &name, FormWindow *fw, MetaDataBase::Connection c ) : Command( name, fw ), connection( c ) { @@ -1087,7 +1087,7 @@ void AddConnectionCommand::unexecute() // ------------------------------------------------------------ -RemoveConnectionCommand::RemoveConnectionCommand( const QString &name, FormWindow *fw, +RemoveConnectionCommand::RemoveConnectionCommand( const TQString &name, FormWindow *fw, MetaDataBase::Connection c ) : Command( name, fw ), connection( c ) { @@ -1122,8 +1122,8 @@ void RemoveConnectionCommand::unexecute() // ------------------------------------------------------------ /* 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 ) +AddSlotCommand::AddSlotCommand( const TQString &name, FormWindow *fw, const TQCString &s, + const TQString& spec, const TQString &a, const TQString &l, const TQString &rt ) : Command( name, fw ), slot( s ), specifier( spec ), access( a ), language( l ), returnType( rt ) { // qDebug("AddSlotCommand::AddSlotCommand()"); @@ -1151,8 +1151,8 @@ void AddSlotCommand::unexecute() // ------------------------------------------------------------ -RemoveSlotCommand::RemoveSlotCommand( const QString &name, FormWindow *fw, const QCString &s, - const QString& spec, const QString &a, const QString &l, const QString &rt ) +RemoveSlotCommand::RemoveSlotCommand( const TQString &name, FormWindow *fw, const TQCString &s, + const TQString& spec, const TQString &a, const TQString &l, const TQString &rt ) : Command( name, fw ), slot( s ), specifier( spec ), access( a ), language( l ), returnType( rt ) { // qDebug("RemoveSlotCommand::RemoveSlotCommand()"); @@ -1180,14 +1180,14 @@ void RemoveSlotCommand::unexecute() // ------------------------------------------------------------ -LowerCommand::LowerCommand( const QString &name, FormWindow *fw, const QWidgetList &w ) +LowerCommand::LowerCommand( const TQString &name, FormWindow *fw, const TQWidgetList &w ) : Command( name, fw ), widgets( w ) { } void LowerCommand::execute() { - for ( QWidget *w = widgets.first(); w; w = widgets.next() ) { + for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) { w->lower(); formWindow()->raiseSelection( w ); } @@ -1196,7 +1196,7 @@ void LowerCommand::execute() void LowerCommand::unexecute() { - for ( QWidget *w = widgets.first(); w; w = widgets.next() ) { + for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) { w->raise(); formWindow()->raiseSelection( w ); } @@ -1204,14 +1204,14 @@ void LowerCommand::unexecute() // ------------------------------------------------------------ -RaiseCommand::RaiseCommand( const QString &name, FormWindow *fw, const QWidgetList &w ) +RaiseCommand::RaiseCommand( const TQString &name, FormWindow *fw, const TQWidgetList &w ) : Command( name, fw ), widgets( w ) { } void RaiseCommand::execute() { - for ( QWidget *w = widgets.first(); w; w = widgets.next() ) { + for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) { w->raise(); formWindow()->raiseSelection( w ); } @@ -1220,7 +1220,7 @@ void RaiseCommand::execute() void RaiseCommand::unexecute() { - for ( QWidget *w = widgets.first(); w; w = widgets.next() ) { + for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) { w->lower(); formWindow()->raiseSelection( w ); } @@ -1228,15 +1228,15 @@ void RaiseCommand::unexecute() // ------------------------------------------------------------ -PasteCommand::PasteCommand( const QString &n, FormWindow *fw, - const QWidgetList &w ) +PasteCommand::PasteCommand( const TQString &n, FormWindow *fw, + const TQWidgetList &w ) : Command( n, fw ), widgets( w ) { } void PasteCommand::execute() { - for ( QWidget *w = widgets.first(); w; w = widgets.next() ) { + for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) { w->show(); formWindow()->selectWidget( w ); formWindow()->widgets()->insert( w, w ); @@ -1246,7 +1246,7 @@ void PasteCommand::execute() void PasteCommand::unexecute() { - for ( QWidget *w = widgets.first(); w; w = widgets.next() ) { + for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) { w->hide(); formWindow()->selectWidget( w, false ); formWindow()->widgets()->remove( w ); @@ -1256,8 +1256,8 @@ void PasteCommand::unexecute() // ------------------------------------------------------------ -TabOrderCommand::TabOrderCommand( const QString &n, FormWindow *fw, - const QWidgetList &ol, const QWidgetList &nl ) +TabOrderCommand::TabOrderCommand( const TQString &n, FormWindow *fw, + const TQWidgetList &ol, const TQWidgetList &nl ) : Command( n, fw ), oldOrder( ol ), newOrder( nl ) { } @@ -1285,11 +1285,11 @@ void TabOrderCommand::unexecute() // ------------------------------------------------------------ -PopulateListBoxCommand::PopulateListBoxCommand( const QString &n, FormWindow *fw, - QListBox *lb, const QValueList &items ) +PopulateListBoxCommand::PopulateListBoxCommand( const TQString &n, FormWindow *fw, + TQListBox *lb, const TQValueList &items ) : Command( n, fw ), newItems( items ), listbox( lb ) { - QListBoxItem *i = 0; + TQListBoxItem *i = 0; for ( i = listbox->firstItem(); i; i = i->next() ) { Item item; if ( i->pixmap() ) @@ -1302,12 +1302,12 @@ PopulateListBoxCommand::PopulateListBoxCommand( const QString &n, FormWindow *fw void PopulateListBoxCommand::execute() { listbox->clear(); - for ( QValueList::Iterator it = newItems.begin(); it != newItems.end(); ++it ) { + for ( TQValueList::Iterator it = newItems.begin(); it != newItems.end(); ++it ) { Item i = *it; if ( !i.pix.isNull() ) - (void)new QListBoxPixmap( listbox, i.pix, i.text ); + (void)new TQListBoxPixmap( listbox, i.pix, i.text ); else - (void)new QListBoxText( listbox, i.text ); + (void)new TQListBoxText( listbox, i.text ); } formWindow()->mainWindow()->propertyeditor()->refetchData(); } @@ -1315,24 +1315,24 @@ void PopulateListBoxCommand::execute() void PopulateListBoxCommand::unexecute() { listbox->clear(); - for ( QValueList::Iterator it = oldItems.begin(); it != oldItems.end(); ++it ) { + for ( TQValueList::Iterator it = oldItems.begin(); it != oldItems.end(); ++it ) { Item i = *it; if ( !i.pix.isNull() ) - (void)new QListBoxPixmap( listbox, i.pix, i.text ); + (void)new TQListBoxPixmap( listbox, i.pix, i.text ); else - (void)new QListBoxText( listbox, i.text ); + (void)new TQListBoxText( listbox, i.text ); } formWindow()->mainWindow()->propertyeditor()->refetchData(); } // ------------------------------------------------------------ -PopulateIconViewCommand::PopulateIconViewCommand( const QString &n, FormWindow *fw, - QIconView *iv, const QValueList &items ) +PopulateIconViewCommand::PopulateIconViewCommand( const TQString &n, FormWindow *fw, + TQIconView *iv, const TQValueList &items ) : Command( n, fw ), newItems( items ), iconview( iv ) { #ifndef QT_NO_ICONVIEW - QIconViewItem *i = 0; + TQIconViewItem *i = 0; for ( i = iconview->firstItem(); i; i = i->nextItem() ) { Item item; if ( i->pixmap() ) @@ -1347,9 +1347,9 @@ void PopulateIconViewCommand::execute() { #ifndef QT_NO_ICONVIEW iconview->clear(); - for ( QValueList::Iterator it = newItems.begin(); it != newItems.end(); ++it ) { + for ( TQValueList::Iterator it = newItems.begin(); it != newItems.end(); ++it ) { Item i = *it; - (void)new QIconViewItem( iconview, i.text, i.pix ); + (void)new TQIconViewItem( iconview, i.text, i.pix ); } #endif } @@ -1358,23 +1358,23 @@ void PopulateIconViewCommand::unexecute() { #ifndef QT_NO_ICONVIEW iconview->clear(); - for ( QValueList::Iterator it = oldItems.begin(); it != oldItems.end(); ++it ) { + for ( TQValueList::Iterator it = oldItems.begin(); it != oldItems.end(); ++it ) { Item i = *it; - (void)new QIconViewItem( iconview, i.text, i.pix ); + (void)new TQIconViewItem( iconview, i.text, i.pix ); } #endif } // ------------------------------------------------------------ -PopulateListViewCommand::PopulateListViewCommand( const QString &n, FormWindow *fw, - QListView *lv, QListView *from ) +PopulateListViewCommand::PopulateListViewCommand( const TQString &n, FormWindow *fw, + TQListView *lv, TQListView *from ) : Command( n, fw ), listview( lv ) { - newItems = new QListView(); + newItems = new TQListView(); newItems->hide(); transferItems( from, newItems ); - oldItems = new QListView(); + oldItems = new TQListView(); oldItems->hide(); transferItems( listview, oldItems ); } @@ -1391,12 +1391,12 @@ void PopulateListViewCommand::unexecute() transferItems( oldItems, listview ); } -void PopulateListViewCommand::transferItems( QListView *from, QListView *to ) +void PopulateListViewCommand::transferItems( TQListView *from, TQListView *to ) { - QHeader *header = to->header(); + TQHeader *header = to->header(); while ( header->count() ) to->removeColumn( 0 ); - QHeader *h2 = from->header(); + TQHeader *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() ) @@ -1405,25 +1405,25 @@ void PopulateListViewCommand::transferItems( QListView *from, QListView *to ) header->setClickEnabled( h2->isClickEnabled( i ), i ); } - QListViewItemIterator it( from ); - QPtrStack fromParents, toParents; + TQListViewItemIterator it( from ); + TQPtrStack fromParents, toParents; fromParents.push( 0 ); toParents.push( 0 ); - QPtrStack toLasts; - QListViewItem *fromLast = 0; + TQPtrStack toLasts; + TQListViewItem *fromLast = 0; toLasts.push( 0 ); int cols = from->columns(); to->setSorting( -1 ); from->setSorting( -1 ); for ( ; it.current(); ++it ) { - QListViewItem *i = it.current(); + TQListViewItem *i = it.current(); if ( i->parent() == fromParents.top() ) { - QListViewItem *pi = toParents.top(); - QListViewItem *ni = 0; + TQListViewItem *pi = toParents.top(); + TQListViewItem *ni = 0; if ( pi ) - ni = new QListViewItem( pi, toLasts.top() ); + ni = new TQListViewItem( pi, toLasts.top() ); else - ni = new QListViewItem( to, toLasts.top() ); + ni = new TQListViewItem( to, toLasts.top() ); for ( int c = 0; c < cols; ++c ) { ni->setText( c, i->text( c ) ); if ( i->pixmap( c ) ) @@ -1438,12 +1438,12 @@ void PopulateListViewCommand::transferItems( QListView *from, QListView *to ) fromParents.push( fromLast ); toParents.push( toLasts.top() ); toLasts.push( 0 ); - QListViewItem *pi = toParents.top(); - QListViewItem *ni = 0; + TQListViewItem *pi = toParents.top(); + TQListViewItem *ni = 0; if ( pi ) - ni = new QListViewItem( pi ); + ni = new TQListViewItem( pi ); else - ni = new QListViewItem( to ); + ni = new TQListViewItem( to ); for ( int c = 0; c < cols; ++c ) { ni->setText( c, i->text( c ) ); if ( i->pixmap( c ) ) @@ -1460,12 +1460,12 @@ void PopulateListViewCommand::transferItems( QListView *from, QListView *to ) toLasts.pop(); } - QListViewItem *pi = toParents.top(); - QListViewItem *ni = 0; + TQListViewItem *pi = toParents.top(); + TQListViewItem *ni = 0; if ( pi ) - ni = new QListViewItem( pi, toLasts.top() ); + ni = new TQListViewItem( pi, toLasts.top() ); else - ni = new QListViewItem( to, toLasts.top() ); + ni = new TQListViewItem( to, toLasts.top() ); for ( int c = 0; c < cols; ++c ) { ni->setText( c, i->text( c ) ); if ( i->pixmap( c ) ) @@ -1485,8 +1485,8 @@ void PopulateListViewCommand::transferItems( QListView *from, QListView *to ) // ------------------------------------------------------------ -PopulateMultiLineEditCommand::PopulateMultiLineEditCommand( const QString &n, FormWindow *fw, - QMultiLineEdit *mle, const QString &txt ) +PopulateMultiLineEditCommand::PopulateMultiLineEditCommand( const TQString &n, FormWindow *fw, + TQMultiLineEdit *mle, const TQString &txt ) : Command( n, fw ), newText( txt ), mlined( mle ) { oldText = mlined->text(); @@ -1509,14 +1509,14 @@ void PopulateMultiLineEditCommand::unexecute() // ------------------------------------------------------------ -PopulateTableCommand::PopulateTableCommand( const QString &n, FormWindow *fw, QTable *t, - const QValueList &rows, - const QValueList &columns ) +PopulateTableCommand::PopulateTableCommand( const TQString &n, FormWindow *fw, TQTable *t, + const TQValueList &rows, + const TQValueList &columns ) : Command( n, fw ), newRows( rows ), newColumns( columns ), table( t ) { #ifndef QT_NO_TABLE int i = 0; - QMap columnFields = MetaDataBase::columnFields( table ); + TQMap columnFields = MetaDataBase::columnFields( table ); for ( i = 0; i < table->horizontalHeader()->count(); ++i ) { PopulateTableCommand::Column col; col.text = table->horizontalHeader()->label( i ); @@ -1538,10 +1538,10 @@ PopulateTableCommand::PopulateTableCommand( const QString &n, FormWindow *fw, QT void PopulateTableCommand::execute() { #ifndef QT_NO_TABLE - QMap columnFields; + TQMap columnFields; table->setNumCols( newColumns.count() ); int i = 0; - for ( QValueList::Iterator cit = newColumns.begin(); cit != newColumns.end(); ++cit, ++i ) { + for ( TQValueList::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 ); @@ -1549,7 +1549,7 @@ void PopulateTableCommand::execute() MetaDataBase::setColumnFields( table, columnFields ); table->setNumRows( newRows.count() ); i = 0; - for ( QValueList::Iterator rit = newRows.begin(); rit != newRows.end(); ++rit, ++i ) + for ( TQValueList::Iterator rit = newRows.begin(); rit != newRows.end(); ++rit, ++i ) table->verticalHeader()->setLabel( i, (*rit).pix, (*rit).text ); #endif } @@ -1557,10 +1557,10 @@ void PopulateTableCommand::execute() void PopulateTableCommand::unexecute() { #ifndef QT_NO_TABLE - QMap columnFields; + TQMap columnFields; table->setNumCols( oldColumns.count() ); int i = 0; - for ( QValueList::Iterator cit = oldColumns.begin(); cit != oldColumns.end(); ++cit, ++i ) { + for ( TQValueList::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 ); @@ -1568,15 +1568,15 @@ void PopulateTableCommand::unexecute() MetaDataBase::setColumnFields( table, columnFields ); table->setNumRows( oldRows.count() ); i = 0; - for ( QValueList::Iterator rit = oldRows.begin(); rit != oldRows.end(); ++rit, ++i ) + for ( TQValueList::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 ) +AddActionToToolBarCommand::AddActionToToolBarCommand( const TQString &n, FormWindow *fw, + TQAction *a, QDesignerToolBar *tb, int idx ) : Command( n, fw ), action( a ), toolBar( tb ), index( idx ) { } @@ -1586,9 +1586,9 @@ void AddActionToToolBarCommand::execute() action->addTo( toolBar ); if ( action->inherits( "QDesignerAction" ) ) { - QString s = ( (QDesignerAction*)action )->widget()->name(); + TQString s = ( (QDesignerAction*)action )->widget()->name(); if ( s.startsWith( "qt_dead_widget_" ) ) { - s.remove( 0, QString( "qt_dead_widget_" ).length() ); + s.remove( 0, TQString( "qt_dead_widget_" ).length() ); ( (QDesignerAction*)action )->widget()->setName( s ); } } @@ -1605,21 +1605,21 @@ void AddActionToToolBarCommand::execute() toolBar->insertAction( ( (QSeparatorAction*)action )->widget(), action ); ( (QSeparatorAction*)action )->widget()->installEventFilter( toolBar ); } - if ( !action->inherits( "QActionGroup" ) || ( (QActionGroup*)action )->usesDropDown()) { + if ( !action->inherits( "TQActionGroup" ) || ( (TQActionGroup*)action )->usesDropDown()) { if ( index == -1 ) toolBar->appendAction( action ); else toolBar->insertAction( index, action ); toolBar->reInsert(); - QObject::connect( action, SIGNAL( destroyed() ), toolBar, SLOT( actionRemoved() ) ); + TQObject::connect( action, TQT_SIGNAL( destroyed() ), toolBar, TQT_SLOT( actionRemoved() ) ); } else { - QObjectListIt it( *action->children() ); + TQObjectListIt it( *action->children() ); if ( action->children() ) { int i = 0; while ( it.current() ) { - QObject *o = it.current(); + TQObject *o = it.current(); ++it; - if ( !o->inherits( "QAction" ) ) + if ( !o->inherits( "TQAction" ) ) continue; // ### fix it for nested actiongroups if ( o->inherits( "QDesignerAction" ) ) { @@ -1634,34 +1634,34 @@ void AddActionToToolBarCommand::execute() } } toolBar->reInsert(); - QObject::connect( action, SIGNAL( destroyed() ), toolBar, SLOT( actionRemoved() ) ); + TQObject::connect( action, TQT_SIGNAL( destroyed() ), toolBar, TQT_SLOT( actionRemoved() ) ); } } void AddActionToToolBarCommand::unexecute() { if ( action->inherits( "QDesignerAction" ) ) { - QString s = ( (QDesignerAction*)action )->widget()->name(); + TQString 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()) { + TQObject::disconnect( action, TQT_SIGNAL( destroyed() ), toolBar, TQT_SLOT( actionRemoved() ) ); + if ( !action->inherits( "TQActionGroup" ) || ( (TQActionGroup*)action )->usesDropDown()) { action->removeEventFilter( toolBar ); } else { if ( action->children() ) { - QObjectListIt it( *action->children() ); + TQObjectListIt it( *action->children() ); while ( it.current() ) { - QObject *o = it.current(); + TQObject *o = it.current(); ++it; - if ( !o->inherits( "QAction" ) ) + if ( !o->inherits( "TQAction" ) ) continue; if ( o->inherits( "QDesignerAction" ) ) { o->removeEventFilter( toolBar ); - toolBar->removeAction( (QAction*)o ); + toolBar->removeAction( (TQAction*)o ); } } } @@ -1670,27 +1670,27 @@ void AddActionToToolBarCommand::unexecute() // ------------------------------------------------------------ -AddActionToPopupCommand::AddActionToPopupCommand( const QString &n, FormWindow *fw, - QAction *a, QDesignerPopupMenu *p, int idx ) +AddActionToPopupCommand::AddActionToPopupCommand( const TQString &n, FormWindow *fw, + TQAction *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() ) { + if ( action->inherits( "TQActionGroup" ) ) { + if ( ( (TQActionGroup*)action )->usesDropDown() ) { action->addTo( popup ); popup->insertAction( index, action ); } else { action->addTo( popup ); if ( action->children() ) { - QObjectListIt it( *action->children() ); + TQObjectListIt it( *action->children() ); int i = 0; while ( it.current() ) { - QObject *o = it.current(); + TQObject *o = it.current(); ++it; - if ( !o->inherits( "QAction" ) ) + if ( !o->inherits( "TQAction" ) ) continue; QDesignerAction *ac = (QDesignerAction*)o; popup->insertAction( index + (i++), ac ); @@ -1698,13 +1698,13 @@ void AddActionToPopupCommand::execute() } } popup->reInsert(); - QObject::connect( action, SIGNAL( destroyed() ), popup, SLOT( actionRemoved() ) ); + TQObject::connect( action, TQT_SIGNAL( destroyed() ), popup, TQT_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() ) ); + TQObject::connect( action, TQT_SIGNAL( destroyed() ), popup, TQT_SLOT( actionRemoved() ) ); } } } @@ -1713,20 +1713,20 @@ void AddActionToPopupCommand::unexecute() { action->removeFrom( popup ); popup->removeAction( action ); - QObject::disconnect( action, SIGNAL( destroyed() ), popup, SLOT( actionRemoved() ) ); - if ( !action->inherits( "QActionGroup" ) || ( (QActionGroup*)action )->usesDropDown()) { + TQObject::disconnect( action, TQT_SIGNAL( destroyed() ), popup, TQT_SLOT( actionRemoved() ) ); + if ( !action->inherits( "TQActionGroup" ) || ( (TQActionGroup*)action )->usesDropDown()) { action->removeEventFilter( popup ); } else { if ( action->children() ) { - QObjectListIt it( *action->children() ); + TQObjectListIt it( *action->children() ); while ( it.current() ) { - QObject *o = it.current(); + TQObject *o = it.current(); ++it; - if ( !o->inherits( "QAction" ) ) + if ( !o->inherits( "TQAction" ) ) continue; if ( o->inherits( "QDesignerAction" ) ) { o->removeEventFilter( popup ); - popup->removeAction( (QAction*)o ); + popup->removeAction( (TQAction*)o ); } } } @@ -1735,7 +1735,7 @@ void AddActionToPopupCommand::unexecute() // ------------------------------------------------------------ -AddMenuCommand::AddMenuCommand( const QString &n, FormWindow *fw, QMainWindow *mw ) +AddMenuCommand::AddMenuCommand( const TQString &n, FormWindow *fw, TQMainWindow *mw ) : Command( n, fw ), menuBar( 0 ), popup( 0 ), mainWindow( mw ), id( -1 ), name( "Menu" ) { } @@ -1743,13 +1743,13 @@ AddMenuCommand::AddMenuCommand( const QString &n, FormWindow *fw, QMainWindow *m void AddMenuCommand::execute() { if ( !popup ) { - QString n = "PopupMenu"; + TQString n = "PopupMenu"; popup = new QDesignerPopupMenu( mainWindow ); formWindow()->unify( popup, n, true ); popup->setName( n ); } - if ( !mainWindow->child( 0, "QMenuBar" ) ) { - menuBar = new QDesignerMenuBar( (QWidget*)mainWindow ); + if ( !mainWindow->child( 0, "TQMenuBar" ) ) { + menuBar = new QDesignerMenuBar( (TQWidget*)mainWindow ); menuBar->setName( "menubar" ); } else { menuBar = (QDesignerMenuBar*)mainWindow->menuBar(); @@ -1771,8 +1771,8 @@ void AddMenuCommand::unexecute() // ------------------------------------------------------------ -RenameMenuCommand::RenameMenuCommand( const QString &n, FormWindow *fw, QDesignerMenuBar *mb, - int i, const QString &on, const QString &nn ) +RenameMenuCommand::RenameMenuCommand( const TQString &n, FormWindow *fw, QDesignerMenuBar *mb, + int i, const TQString &on, const TQString &nn ) : Command( n, fw ), menuBar( mb ), id( i ), oldName( on ), newName( nn ) { } @@ -1791,8 +1791,8 @@ void RenameMenuCommand::unexecute() // ------------------------------------------------------------ -MoveMenuCommand::MoveMenuCommand( const QString &n, FormWindow *fw, QDesignerMenuBar *mb, - QDesignerPopupMenu *p, int fidx, int tidx, const QString &txt ) +MoveMenuCommand::MoveMenuCommand( const TQString &n, FormWindow *fw, QDesignerMenuBar *mb, + QDesignerPopupMenu *p, int fidx, int tidx, const TQString &txt ) : Command( n, fw ), menuBar( mb ), popup( p ), fromIdx( fidx ), toIdx( tidx ), text( txt ) { } @@ -1813,7 +1813,7 @@ void MoveMenuCommand::unexecute() // ------------------------------------------------------------ -AddToolBarCommand::AddToolBarCommand( const QString &n, FormWindow *fw, QMainWindow *mw ) +AddToolBarCommand::AddToolBarCommand( const TQString &n, FormWindow *fw, TQMainWindow *mw ) : Command( n, fw ), toolBar( 0 ), mainWindow( mw ) { } @@ -1822,7 +1822,7 @@ void AddToolBarCommand::execute() { if ( !toolBar ) { toolBar = new QDesignerToolBar( mainWindow ); - QString n = "Toolbar"; + TQString n = "Toolbar"; formWindow()->unify( toolBar, n, true ); toolBar->setName( n ); mainWindow->addToolBar( toolBar, n ); diff --git a/kommander/editor/command.h b/kommander/editor/command.h index 80a3e569..0c86fc63 100644 --- a/kommander/editor/command.h +++ b/kommander/editor/command.h @@ -24,14 +24,14 @@ #include "metadatabase.h" #include "layout.h" -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include class QWizard; class QTabWidget; @@ -53,7 +53,7 @@ class QToolBox; class Command : public Qt { public: - Command( const QString &n, FormWindow *fw ); + Command( const TQString &n, FormWindow *fw ); virtual ~Command(); enum Type { @@ -103,7 +103,7 @@ public: DeleteToolBoxPage }; - QString name() const; + TQString name() const; virtual void execute() = 0; virtual void unexecute() = 0; @@ -114,7 +114,7 @@ public: FormWindow *formWindow() const; private: - QString cmdName; + TQString cmdName; FormWindow *formWin; }; @@ -141,11 +141,11 @@ public slots: signals: void undoRedoChanged( bool undoAvailable, bool redoAvailable, - const QString &undoCmd, const QString &redoCmd ); + const TQString &undoCmd, const TQString &redoCmd ); void modificationChanged( bool m ); private: - QPtrList history; + TQPtrList history; int current, steps; bool modified; int savedAt; @@ -156,42 +156,42 @@ private: class ResizeCommand : public Command { public: - ResizeCommand( const QString &n, FormWindow *fw, - QWidget *w, const QRect &oldr, const QRect &nr ); + ResizeCommand( const TQString &n, FormWindow *fw, + TQWidget *w, const TQRect &oldr, const TQRect &nr ); void execute(); void unexecute(); Type type() const { return Resize; } private: - QWidget *widget; - QRect oldRect, newRect; + TQWidget *widget; + TQRect oldRect, newRect; }; class InsertCommand : public Command { public: - InsertCommand( const QString &n, FormWindow *fw, QWidget *w, const QRect &g ); + InsertCommand( const TQString &n, FormWindow *fw, TQWidget *w, const TQRect &g ); void execute(); void unexecute(); Type type() const { return Insert; } private: - QWidget *widget; - QRect geometry; + TQWidget *widget; + TQRect geometry; }; class MoveCommand : public Command { public: - MoveCommand( const QString &n, FormWindow *fw, - const QWidgetList &w, - const QValueList op, - const QValueList np, - QWidget *opr, QWidget *npr ); + MoveCommand( const TQString &n, FormWindow *fw, + const TQWidgetList &w, + const TQValueList op, + const TQValueList np, + TQWidget *opr, TQWidget *npr ); void execute(); void unexecute(); Type type() const { return Move; } @@ -199,35 +199,35 @@ public: bool canMerge( Command *c ); private: - QWidgetList widgets; - QValueList oldPos, newPos; - QWidget *oldParent, *newParent; + TQWidgetList widgets; + TQValueList oldPos, newPos; + TQWidget *oldParent, *newParent; }; class DeleteCommand : public Command { public: - DeleteCommand( const QString &n, FormWindow *fw, - const QWidgetList &w ); + DeleteCommand( const TQString &n, FormWindow *fw, + const TQWidgetList &w ); void execute(); void unexecute(); Type type() const { return Delete; } private: - QWidgetList widgets; - QMap< QWidget*, QValueList > connections; + TQWidgetList widgets; + TQMap< TQWidget*, TQValueList > 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, + SetPropertyCommand( const TQString &n, FormWindow *fw, + TQObject *w, PropertyEditor *e, + const TQString &pn, const TQVariant &ov, + const TQVariant &nv, const TQString &ncut, + const TQString &ocut, bool reset = FALSE ); void execute(); @@ -238,13 +238,13 @@ public: bool checkProperty(); private: - void setProperty( const QVariant &v, const QString ¤tItemText, bool select = TRUE ); + void setProperty( const TQVariant &v, const TQString ¤tItemText, bool select = TRUE ); - QObject *widget; + TQObject *widget; PropertyEditor *editor; - QString propName; - QVariant oldValue, newValue; - QString oldCurrentItemText, newCurrentItemText; + TQString propName; + TQVariant oldValue, newValue; + TQString oldCurrentItemText, newCurrentItemText; bool wasChanged; bool isResetCommand; @@ -253,9 +253,9 @@ private: class LayoutHorizontalCommand : public Command { public: - LayoutHorizontalCommand( const QString &n, FormWindow *fw, - QWidget *parent, QWidget *layoutBase, - const QWidgetList &wl ); + LayoutHorizontalCommand( const TQString &n, FormWindow *fw, + TQWidget *parent, TQWidget *layoutBase, + const TQWidgetList &wl ); void execute(); void unexecute(); @@ -269,9 +269,9 @@ private: class LayoutHorizontalSplitCommand : public Command { public: - LayoutHorizontalSplitCommand( const QString &n, FormWindow *fw, - QWidget *parent, QWidget *layoutBase, - const QWidgetList &wl ); + LayoutHorizontalSplitCommand( const TQString &n, FormWindow *fw, + TQWidget *parent, TQWidget *layoutBase, + const TQWidgetList &wl ); void execute(); void unexecute(); @@ -285,9 +285,9 @@ private: class LayoutVerticalCommand : public Command { public: - LayoutVerticalCommand( const QString &n, FormWindow *fw, - QWidget *parent, QWidget *layoutBase, - const QWidgetList &wl ); + LayoutVerticalCommand( const TQString &n, FormWindow *fw, + TQWidget *parent, TQWidget *layoutBase, + const TQWidgetList &wl ); void execute(); void unexecute(); @@ -301,9 +301,9 @@ private: class LayoutVerticalSplitCommand : public Command { public: - LayoutVerticalSplitCommand( const QString &n, FormWindow *fw, - QWidget *parent, QWidget *layoutBase, - const QWidgetList &wl ); + LayoutVerticalSplitCommand( const TQString &n, FormWindow *fw, + TQWidget *parent, TQWidget *layoutBase, + const TQWidgetList &wl ); void execute(); void unexecute(); @@ -317,9 +317,9 @@ private: class LayoutGridCommand : public Command { public: - LayoutGridCommand( const QString &n, FormWindow *fw, - QWidget *parent, QWidget *layoutBase, - const QWidgetList &wl, int xres, int yres ); + LayoutGridCommand( const TQString &n, FormWindow *fw, + TQWidget *parent, TQWidget *layoutBase, + const TQWidgetList &wl, int xres, int yres ); void execute(); void unexecute(); @@ -333,8 +333,8 @@ private: class BreakLayoutCommand : public Command { public: - BreakLayoutCommand( const QString &n, FormWindow *fw, - QWidget *layoutBase, const QWidgetList &wl ); + BreakLayoutCommand( const TQString &n, FormWindow *fw, + TQWidget *layoutBase, const TQWidgetList &wl ); void execute(); void unexecute(); @@ -344,183 +344,183 @@ private: Layout *layout; int spacing; int margin; - QWidget *lb; - QWidgetList widgets; + TQWidget *lb; + TQWidgetList widgets; }; class MacroCommand : public Command { public: - MacroCommand( const QString &n, FormWindow *fw, - const QPtrList &cmds ); + MacroCommand( const TQString &n, FormWindow *fw, + const TQPtrList &cmds ); void execute(); void unexecute(); Type type() const { return Macro; } private: - QPtrList commands; + TQPtrList commands; }; class AddTabPageCommand : public Command { public: - AddTabPageCommand( const QString &n, FormWindow *fw, - QTabWidget *tw, const QString &label ); + AddTabPageCommand( const TQString &n, FormWindow *fw, + TQTabWidget *tw, const TQString &label ); void execute(); void unexecute(); Type type() const { return AddTabPage; } private: - QTabWidget *tabWidget; + TQTabWidget *tabWidget; int index; - QWidget *tabPage; - QString tabLabel; + TQWidget *tabPage; + TQString tabLabel; }; class DeleteTabPageCommand : public Command { public: - DeleteTabPageCommand( const QString &n, FormWindow *fw, - QTabWidget *tw, QWidget *page ); + DeleteTabPageCommand( const TQString &n, FormWindow *fw, + TQTabWidget *tw, TQWidget *page ); void execute(); void unexecute(); Type type() const { return DeleteTabPage; } private: - QTabWidget *tabWidget; + TQTabWidget *tabWidget; int index; - QWidget *tabPage; - QString tabLabel; + TQWidget *tabPage; + TQString tabLabel; }; class AddToolBoxPageCommand : public Command { public: - AddToolBoxPageCommand( const QString &n, FormWindow *fw, - QToolBox *tw, const QString &label ); + AddToolBoxPageCommand( const TQString &n, FormWindow *fw, + TQToolBox *tw, const TQString &label ); void execute(); void unexecute(); Type type() const { return AddToolBoxPage; } private: - QToolBox *toolBox; + TQToolBox *toolBox; int index; - QWidget *page; - QString label; + TQWidget *page; + TQString label; }; class DeleteToolBoxPageCommand : public Command { public: - DeleteToolBoxPageCommand( const QString &n, FormWindow *fw, - QToolBox *tw, QWidget *page ); + DeleteToolBoxPageCommand( const TQString &n, FormWindow *fw, + TQToolBox *tw, TQWidget *page ); void execute(); void unexecute(); Type type() const { return DeleteToolBoxPage; } private: - QToolBox *toolBox; + TQToolBox *toolBox; int index; - QWidget *page; - QString label; + TQWidget *page; + TQString label; }; class MoveTabPageCommand : public Command { public: - MoveTabPageCommand(const QString &n, FormWindow *fw, - QTabWidget *tw, QWidget *page, const QString& label, int nIndex, int oIndex ); + MoveTabPageCommand(const TQString &n, FormWindow *fw, + TQTabWidget *tw, TQWidget *page, const TQString& label, int nIndex, int oIndex ); void execute(); void unexecute(); Type type() const { return MoveTabPage; } private: - QTabWidget *tabWidget; + TQTabWidget *tabWidget; int newIndex, oldIndex; - QWidget *tabPage; - QString tabLabel; + TQWidget *tabPage; + TQString tabLabel; }; class AddWizardPageCommand : public Command { public: - AddWizardPageCommand( const QString &n, FormWindow *fw, - QWizard *w, const QString &label, int index = -1, bool show = TRUE ); + AddWizardPageCommand( const TQString &n, FormWindow *fw, + TQWizard *w, const TQString &label, int index = -1, bool show = TRUE ); void execute(); void unexecute(); Type type() const { return AddWizardPage; } private: - QWizard *wizard; + TQWizard *wizard; int index; bool show; - QWidget *page; - QString pageLabel; + TQWidget *page; + TQString pageLabel; }; class DeleteWizardPageCommand : public Command { public: - DeleteWizardPageCommand( const QString &n, FormWindow *fw, - QWizard *w, int index, bool show = TRUE ); + DeleteWizardPageCommand( const TQString &n, FormWindow *fw, + TQWizard *w, int index, bool show = TRUE ); void execute(); void unexecute(); Type type() const { return DeleteWizardPage; } private: - QWizard *wizard; + TQWizard *wizard; int index; bool show; - QWidget *page; - QString pageLabel; + TQWidget *page; + TQString pageLabel; }; class RenameWizardPageCommand : public Command { public: - RenameWizardPageCommand( const QString &n, FormWindow *fw, - QWizard *w, int index, const QString& name ); + RenameWizardPageCommand( const TQString &n, FormWindow *fw, + TQWizard *w, int index, const TQString& name ); void execute(); void unexecute(); Type type() const { return RenameWizardPage; } private: - QWizard *wizard; + TQWizard *wizard; int index; - QWidget *page; - QString label; + TQWidget *page; + TQString label; }; class SwapWizardPagesCommand : public Command { public: - SwapWizardPagesCommand( const QString &n, FormWindow *fw, - QWizard *w, int index1, int index2 ); + SwapWizardPagesCommand( const TQString &n, FormWindow *fw, + TQWizard *w, int index1, int index2 ); void execute(); void unexecute(); Type type() const { return SwapWizardPages; } private: - QWizard *wizard; + TQWizard *wizard; int index1, index2; }; @@ -528,7 +528,7 @@ private: class AddConnectionCommand : public Command { public: - AddConnectionCommand( const QString &name, FormWindow *fw, + AddConnectionCommand( const TQString &name, FormWindow *fw, MetaDataBase::Connection c ); void execute(); @@ -543,7 +543,7 @@ private: class RemoveConnectionCommand : public Command { public: - RemoveConnectionCommand( const QString &name, FormWindow *fw, + RemoveConnectionCommand( const TQString &name, FormWindow *fw, MetaDataBase::Connection c ); void execute(); @@ -558,87 +558,87 @@ private: 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 ); + AddSlotCommand( const TQString &name, FormWindow *fw, const TQCString &s, const TQString& spec, + const TQString &a, const TQString &l, const TQString &rt ); void execute(); void unexecute(); Type type() const { return AddSlot; } private: - QCString slot; - QString specifier; - QString access; - QString language; - QString returnType; + TQCString slot; + TQString specifier; + TQString access; + TQString language; + TQString 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 ); + RemoveSlotCommand( const TQString &name, FormWindow *fw, const TQCString &s, const TQString& spec, + const TQString &a, const TQString &l, const TQString &rt ); void execute(); void unexecute(); Type type() const { return RemoveSlot; } private: - QCString slot; - QString specifier; - QString access; - QString language; - QString returnType; + TQCString slot; + TQString specifier; + TQString access; + TQString language; + TQString returnType; }; class LowerCommand : public Command { public: - LowerCommand( const QString &name, FormWindow *fw, const QWidgetList &w ); + LowerCommand( const TQString &name, FormWindow *fw, const TQWidgetList &w ); void execute(); void unexecute(); Type type() const { return Lower; } private: - QWidgetList widgets; + TQWidgetList widgets; }; class RaiseCommand : public Command { public: - RaiseCommand( const QString &name, FormWindow *fw, const QWidgetList &w ); + RaiseCommand( const TQString &name, FormWindow *fw, const TQWidgetList &w ); void execute(); void unexecute(); Type type() const { return Raise; } private: - QWidgetList widgets; + TQWidgetList widgets; }; class PasteCommand : public Command { public: - PasteCommand( const QString &n, FormWindow *fw, const QWidgetList &w ); + PasteCommand( const TQString &n, FormWindow *fw, const TQWidgetList &w ); void execute(); void unexecute(); Type type() const { return Paste; } private: - QWidgetList widgets; + TQWidgetList widgets; }; class TabOrderCommand : public Command { public: - TabOrderCommand( const QString &n, FormWindow *fw, const QWidgetList &ol, const QWidgetList &nl ); + TabOrderCommand( const TQString &n, FormWindow *fw, const TQWidgetList &ol, const TQWidgetList &nl ); void execute(); void unexecute(); @@ -647,7 +647,7 @@ public: bool canMerge( Command *c ); private: - QWidgetList oldOrder, newOrder; + TQWidgetList oldOrder, newOrder; }; @@ -656,15 +656,15 @@ class PopulateListBoxCommand : public Command public: struct Item { - QString text; - QPixmap pix; + TQString text; + TQPixmap 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 &items ); + PopulateListBoxCommand( const TQString &n, FormWindow *fw, + TQListBox *lb, const TQValueList &items ); void execute(); void unexecute(); Type type() const { return PopulateListBox; } @@ -672,8 +672,8 @@ public: bool operator==( const PopulateListBoxCommand & ) const; private: - QValueList oldItems, newItems; - QListBox *listbox; + TQValueList oldItems, newItems; + TQListBox *listbox; }; @@ -682,15 +682,15 @@ class PopulateIconViewCommand : public Command public: struct Item { - QString text; - QPixmap pix; + TQString text; + TQPixmap 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 &items ); + PopulateIconViewCommand( const TQString &n, FormWindow *fw, + TQIconView *iv, const TQValueList &items ); void execute(); void unexecute(); Type type() const { return PopulateIconView; } @@ -698,41 +698,41 @@ public: bool operator==( const PopulateIconViewCommand & ) const; private: - QValueList oldItems, newItems; - QIconView *iconview; + TQValueList oldItems, newItems; + TQIconView *iconview; }; class PopulateListViewCommand : public Command { public: - PopulateListViewCommand( const QString &n, FormWindow *fw, - QListView *lv, QListView *from ); + PopulateListViewCommand( const TQString &n, FormWindow *fw, + TQListView *lv, TQListView *from ); void execute(); void unexecute(); Type type() const { return PopulateListView; } - static void transferItems( QListView *from, QListView *to ); + static void transferItems( TQListView *from, TQListView *to ); bool operator==( const PopulateListViewCommand & ) const; private: - QListView *oldItems, *newItems; - QListView *listview; + TQListView *oldItems, *newItems; + TQListView *listview; }; class PopulateMultiLineEditCommand : public Command { public: - PopulateMultiLineEditCommand( const QString &n, FormWindow *fw, - QMultiLineEdit *mle, const QString &txt ); + PopulateMultiLineEditCommand( const TQString &n, FormWindow *fw, + TQMultiLineEdit *mle, const TQString &txt ); void execute(); void unexecute(); Type type() const { return PopulateMultiLineEdit; } private: - QString newText, oldText; - QMultiLineEdit *mlined; + TQString newText, oldText; + TQMultiLineEdit *mlined; bool wasChanged; }; @@ -742,8 +742,8 @@ class PopulateTableCommand : public Command public: struct Row { - QString text; - QPixmap pix; + TQString text; + TQPixmap pix; #if defined(Q_FULL_TEMPLATE_INSTANTIATION) bool operator==( const Row& ) const { return FALSE; } #endif @@ -751,41 +751,41 @@ public: struct Column { - QString text; - QPixmap pix; - QString field; + TQString text; + TQPixmap pix; + TQString 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 &rows, - const QValueList &columns ); + PopulateTableCommand( const TQString &n, FormWindow *fw, TQTable *t, + const TQValueList &rows, + const TQValueList &columns ); void execute(); void unexecute(); Type type() const { return PopulateTable; } private: - QValueList oldRows, newRows; - QValueList oldColumns, newColumns; - QTable *table; + TQValueList oldRows, newRows; + TQValueList oldColumns, newColumns; + TQTable *table; }; class AddActionToToolBarCommand : public Command { public: - AddActionToToolBarCommand( const QString &n, FormWindow *fw, - QAction *a, QDesignerToolBar *tb, int idx ); + AddActionToToolBarCommand( const TQString &n, FormWindow *fw, + TQAction *a, QDesignerToolBar *tb, int idx ); void execute(); void unexecute(); Type type() const { return AddActionToToolBar; } private: - QAction *action; + TQAction *action; QDesignerToolBar *toolBar; int index; @@ -794,8 +794,8 @@ private: class RemoveActionFromToolBarCommand : public AddActionToToolBarCommand { public: - RemoveActionFromToolBarCommand( const QString &n, FormWindow *fw, - QAction *a, QDesignerToolBar *tb, int idx ) + RemoveActionFromToolBarCommand( const TQString &n, FormWindow *fw, + TQAction *a, QDesignerToolBar *tb, int idx ) : AddActionToToolBarCommand( n, fw, a, tb, idx ) {} void execute() { AddActionToToolBarCommand::unexecute(); } @@ -807,15 +807,15 @@ public: class AddActionToPopupCommand : public Command { public: - AddActionToPopupCommand( const QString &n, FormWindow *fw, - QAction *a, QDesignerPopupMenu *p, int idx ); + AddActionToPopupCommand( const TQString &n, FormWindow *fw, + TQAction *a, QDesignerPopupMenu *p, int idx ); void execute(); void unexecute(); Type type() const { return AddActionToPopup; } private: - QAction *action; + TQAction *action; QDesignerPopupMenu *popup; int index; @@ -824,8 +824,8 @@ private: class RemoveActionFromPopupCommand : public AddActionToPopupCommand { public: - RemoveActionFromPopupCommand( const QString &n, FormWindow *fw, - QAction *a, QDesignerPopupMenu *p, int idx ) + RemoveActionFromPopupCommand( const TQString &n, FormWindow *fw, + TQAction *a, QDesignerPopupMenu *p, int idx ) : AddActionToPopupCommand( n, fw, a, p, idx ) {} void execute() { AddActionToPopupCommand::unexecute(); } @@ -837,7 +837,7 @@ public: class AddMenuCommand : public Command { public: - AddMenuCommand( const QString &n, FormWindow *fw, QMainWindow *mw ); + AddMenuCommand( const TQString &n, FormWindow *fw, TQMainWindow *mw ); void execute(); void unexecute(); @@ -846,18 +846,18 @@ public: protected: QDesignerMenuBar *menuBar; QDesignerPopupMenu *popup; - QMainWindow *mainWindow; + TQMainWindow *mainWindow; int id; int index; - QString name; + TQString 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 ) + RemoveMenuCommand( const TQString &n, FormWindow *fw, TQMainWindow *mw, + QDesignerMenuBar *mb, QDesignerPopupMenu *p, int i, int idx, const TQString &mn ) : AddMenuCommand( n, fw, mw ) { menuBar = mb; popup = p; id = i; index = idx, name = mn; } void execute() { AddMenuCommand::unexecute(); } @@ -869,8 +869,8 @@ public: class RenameMenuCommand : public Command { public: - RenameMenuCommand( const QString &n, FormWindow *fw, QDesignerMenuBar *mb, - int i, const QString &on, const QString &nn ); + RenameMenuCommand( const TQString &n, FormWindow *fw, QDesignerMenuBar *mb, + int i, const TQString &on, const TQString &nn ); void execute(); void unexecute(); @@ -879,15 +879,15 @@ public: private: QDesignerMenuBar *menuBar; int id; - QString oldName, newName; + TQString oldName, newName; }; class MoveMenuCommand : public Command { public: - MoveMenuCommand( const QString &n, FormWindow *fw, QDesignerMenuBar *mb, - QDesignerPopupMenu *p, int fidx, int tidx, const QString &txt ); + MoveMenuCommand( const TQString &n, FormWindow *fw, QDesignerMenuBar *mb, + QDesignerPopupMenu *p, int fidx, int tidx, const TQString &txt ); void execute(); void unexecute(); @@ -897,14 +897,14 @@ private: QDesignerMenuBar *menuBar; QDesignerPopupMenu *popup; int fromIdx, toIdx; - QString text; + TQString text; }; class AddToolBarCommand : public Command { public: - AddToolBarCommand( const QString &n, FormWindow *fw, QMainWindow *mw ); + AddToolBarCommand( const TQString &n, FormWindow *fw, TQMainWindow *mw ); void execute(); void unexecute(); @@ -912,14 +912,14 @@ public: protected: QDesignerToolBar *toolBar; - QMainWindow *mainWindow; + TQMainWindow *mainWindow; }; class RemoveToolBarCommand : public AddToolBarCommand { public: - RemoveToolBarCommand( const QString &n, FormWindow *fw, QMainWindow *mw, QDesignerToolBar *tb ) + RemoveToolBarCommand( const TQString &n, FormWindow *fw, TQMainWindow *mw, QDesignerToolBar *tb ) : AddToolBarCommand( n, fw, mw ) { toolBar = tb; } void execute() { AddToolBarCommand::unexecute(); } diff --git a/kommander/editor/connectioneditorimpl.cpp b/kommander/editor/connectioneditorimpl.cpp index dafae5a7..a430290e 100644 --- a/kommander/editor/connectioneditorimpl.cpp +++ b/kommander/editor/connectioneditorimpl.cpp @@ -23,9 +23,9 @@ #include "command.h" #include "widgetfactory.h" #include "pixmapchooser.h" -#include -#include -#include +#include +#include +#include #include #include @@ -35,23 +35,23 @@ static const char *const ignore_slots[] = { "destroyed()", - //"setCaption(const QString&)", - "setIcon(const QPixmap&)", - //"setIconText(const QString&)", + //"setCaption(const TQString&)", + "setIcon(const TQPixmap&)", + //"setIconText(const TQString&)", "setMouseTracking(bool)", "clearFocus()", "setUpdatesEnabled(bool)", "update()", "update(int,int,int,int)", - "update(const QRect&)", + "update(const TQRect&)", "repaint()", "repaint(bool)", "repaint(int,int,int,int,bool)", - "repaint(const QRect&,bool)", - "repaint(const QRegion&,bool)", + "repaint(const TQRect&,bool)", + "repaint(const TQRegion&,bool)", "repaint(int,int,int,int)", - "repaint(const QRect&)", - "repaint(const QRegion&)", + "repaint(const TQRect&)", + "repaint(const TQRegion&)", //"show()", //"hide()", "iconify()", @@ -63,17 +63,17 @@ static const char *const ignore_slots[] = { "constPolish()", //"raise()", //"lower()", - "stackUnder(QWidget*)", + "stackUnder(TQWidget*)", //"move(int,int)", - "move(const QPoint&)", + "move(const TQPoint&)", //"resize(int,int)", - "resize(const QSize&)", + "resize(const TQSize&)", //"setGeometry(int,int,int,int)", - "setGeometry(const QRect&)", + "setGeometry(const TQRect&)", "focusProxyDestroyed()", "showExtension(bool)", "setUpLayout()", - //"showDockMenu(const QPoint&)", + //"showDockMenu(const TQPoint&)", "init()", "destroy()", "deleteLater()", @@ -82,14 +82,14 @@ static const char *const ignore_slots[] = { static const char *const ignore_signals[] = { "destroyed()", - "destroyed(QObject*)", + "destroyed(TQObject*)", "accessibilityChanged(int)", "accessibilityChanged(int,int)", 0 }; -ConnectionEditor::ConnectionEditor(QWidget* parent, QObject* sndr, QObject* rcvr, FormWindow* fw) +ConnectionEditor::ConnectionEditor(TQWidget* parent, TQObject* sndr, TQObject* rcvr, FormWindow* fw) : ConnectionEditorBase(parent, 0, true), m_formWindow(fw) { if (!rcvr || rcvr == m_formWindow) @@ -100,9 +100,9 @@ ConnectionEditor::ConnectionEditor(QWidget* parent, QObject* sndr, QObject* rcvr m_receiver = rcvr; /* Create widget list */ - QStringList lst; + TQStringList lst; lst << m_formWindow->name(); - for (QPtrDictIterator it(*m_formWindow->widgets()); it.current(); ++it) + for (TQPtrDictIterator it(*m_formWindow->widgets()); it.current(); ++it) { if (it.current()->isVisibleTo(this) && !it.current()->inherits("QLayoutWidget") && @@ -117,7 +117,7 @@ ConnectionEditor::ConnectionEditor(QWidget* parent, QObject* sndr, QObject* rcvr // fillWidgetList(comboReceiver, lst, m_receiver->name()); // Fill receiver combos with widget and action list - for (QPtrListIterator it(m_formWindow->actionList()); it.current(); ++it) + for (TQPtrListIterator it(m_formWindow->actionList()); it.current(); ++it) lst << it.current()->name(); lst.sort(); fillWidgetList(comboReceiver, lst, m_receiver->name()); @@ -128,16 +128,16 @@ ConnectionEditor::ConnectionEditor(QWidget* parent, QObject* sndr, QObject* rcvr 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())); + connect(comboSender, TQT_SIGNAL(activated(const TQString&)), TQT_SLOT(senderChanged(const TQString&))); + connect(comboReceiver, TQT_SIGNAL(activated(const TQString&)), TQT_SLOT(receiverChanged(const TQString&))); + connect(signalBox, TQT_SIGNAL(selectionChanged()), TQT_SLOT(updateConnectButton())); + connect(slotBox, TQT_SIGNAL(selectionChanged()), TQT_SLOT(updateConnectButton())); + connect(connectButton, TQT_SIGNAL(clicked()), TQT_SLOT(connectClicked())); + connect(disconnectButton, TQT_SIGNAL(clicked()), TQT_SLOT(disconnectClicked())); + connect(okButton, TQT_SIGNAL(clicked()), TQT_SLOT(okClicked())); + connect(cancelButton, TQT_SIGNAL(clicked()), TQT_SLOT(cancelClicked())); + connect(signalBox, TQT_SIGNAL(doubleClicked(TQListBoxItem*)), TQT_SLOT(connectClicked())); + connect(slotBox, TQT_SIGNAL(doubleClicked(TQListBoxItem*)), TQT_SLOT(connectClicked())); } ConnectionEditor::~ConnectionEditor() @@ -155,15 +155,15 @@ bool ConnectionEditor::isSignalIgnored(const char *signal) const bool ConnectionEditor::isSlotIgnored(const QMetaData* md) { if (md->access != QMetaData::Public && (md->access != QMetaData::Protected || - !m_formWindow->isMainContainer((QWidget*)m_receiver))) + !m_formWindow->isMainContainer((TQWidget*)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()")) + if (!m_formWindow->isMainContainer((TQWidget *)m_receiver) && !qstrcmp(md->name, "close()")) return true; if (!qstrcmp(md->name, "setFocus()") && m_receiver->isWidgetType() && - ((QWidget*)m_receiver)->focusPolicy() == QWidget::NoFocus) + ((TQWidget*)m_receiver)->focusPolicy() == TQWidget::NoFocus) return true; for (int i = 0; icount(); i++) if (checkConnectArgs(MetaDataBase::normalizeSlot(signalBox->text(i)).latin1(), m_receiver, md->name)) @@ -171,14 +171,14 @@ bool ConnectionEditor::isSlotIgnored(const QMetaData* md) return true; } -QObject* ConnectionEditor::objectByName(const QString& s) const +TQObject* ConnectionEditor::objectByName(const TQString& s) const { - for (QPtrDictIterator it(*m_formWindow->widgets()); it.current(); ++it) - if (QString(it.current()->name()) == s) + for (TQPtrDictIterator it(*m_formWindow->widgets()); it.current(); ++it) + if (TQString(it.current()->name()) == s) return it.current(); - for (QPtrListIterator it(m_formWindow->actionList()); it.current(); ++it) - if (QString(it.current()->name()) == s) + for (TQPtrListIterator it(m_formWindow->actionList()); it.current(); ++it) + if (TQString(it.current()->name()) == s) return it.current(); return 0; @@ -209,11 +209,11 @@ void ConnectionEditor::connectClicked() void ConnectionEditor::disconnectClicked() { - QListViewItem *p_item = connectionView->currentItem(); + TQListViewItem *p_item = connectionView->currentItem(); if (!p_item) return; - QMap ::Iterator it = m_connections.find(p_item); + TQMap ::Iterator it = m_connections.find(p_item); if (it != m_connections.end()) m_connections.remove(it); delete p_item; @@ -226,20 +226,20 @@ void ConnectionEditor::disconnectClicked() 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()). + TQString n = i18n("Connect/Disconnect the signals and slots of '%1' and '%2'").arg(m_sender->name()). arg(m_receiver->name()); - QValueList ::Iterator cit; + TQValueList ::Iterator cit; if (!m_oldConnections.isEmpty()) { - QPtrList commands; + TQPtrList 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::Iterator it = m_connections.begin(); - QPtrList commands; + TQMap::Iterator it = m_connections.begin(); + TQPtrList commands; for (; it != m_connections.end(); ++it) { MetaDataBase::Connection conn = *it; @@ -250,7 +250,7 @@ void ConnectionEditor::okClicked() if (rmConn || addConn) { - QPtrList < Command > commands; + TQPtrList < Command > commands; if (rmConn) commands.append(rmConn); if (addConn) @@ -268,15 +268,15 @@ void ConnectionEditor::cancelClicked() reject(); } -void ConnectionEditor::senderChanged(const QString& s) +void ConnectionEditor::senderChanged(const TQString& s) { - QObject* p_object = objectByName(s); + TQObject* p_object = objectByName(s); if (!p_object) return; m_sender = p_object; - QStrList p_sigs = m_sender->metaObject()->signalNames(true); + TQStrList p_sigs = m_sender->metaObject()->signalNames(true); signalBox->clear(); - for (QStrListIterator it(p_sigs); it.current(); ++it) + for (TQStrListIterator 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()) @@ -287,9 +287,9 @@ void ConnectionEditor::senderChanged(const QString& s) receiverChanged(m_receiver->name()); } -void ConnectionEditor::receiverChanged(const QString& s) +void ConnectionEditor::receiverChanged(const TQString& s) { - QObject* p_object = objectByName(s); + TQObject* p_object = objectByName(s); if (!p_object) return; m_receiver = p_object; @@ -321,10 +321,10 @@ void ConnectionEditor::updateDisconnectButton() disconnectButton->setEnabled((connectionView->currentItem())); } -bool ConnectionEditor::hasConnection(const QString& snder, const QString& signal, - const QString& rcvr, const QString& slot) const +bool ConnectionEditor::hasConnection(const TQString& snder, const TQString& signal, + const TQString& rcvr, const TQString& slot) const { - for (QListViewItemIterator it(connectionView); it.current(); ++it) + for (TQListViewItemIterator 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) @@ -339,10 +339,10 @@ void ConnectionEditor::fillConnectionsList() m_oldConnections = MetaDataBase::connections(m_formWindow); if (!m_oldConnections.isEmpty()) { - QValueList ::Iterator it = m_oldConnections.begin(); + TQValueList ::Iterator it = m_oldConnections.begin(); for (; it != m_oldConnections.end(); ++it) { - if (m_formWindow->isMainContainer((QWidget*)(*it).receiver) && + if (m_formWindow->isMainContainer((TQWidget*)(*it).receiver) && !MetaDataBase::hasSlot(m_formWindow, MetaDataBase::normalizeSlot((*it).slot).latin1())) continue; MetaDataBase::Connection conn = *it; @@ -357,7 +357,7 @@ void ConnectionEditor::fillConnectionsList() connectionView->setSelected(connectionView->currentItem(), true); } -void ConnectionEditor::fillWidgetList(KComboBox* a_combo, const QStringList& items, const QString& defaultWidget) +void ConnectionEditor::fillWidgetList(KComboBox* a_combo, const TQStringList& items, const TQString& defaultWidget) { a_combo->insertStringList(items); for (int i = 0; i < a_combo->count(); ++i) diff --git a/kommander/editor/connectioneditorimpl.h b/kommander/editor/connectioneditorimpl.h index 95c6887b..116e4b42 100644 --- a/kommander/editor/connectioneditorimpl.h +++ b/kommander/editor/connectioneditorimpl.h @@ -24,7 +24,7 @@ #include "connectioneditor.h" #include "metadatabase.h" -#include +#include class QListViewItem; class FormWindow; @@ -32,7 +32,7 @@ class FormWindow; class ConnectionEditor : public ConnectionEditorBase { Q_OBJECT public: - ConnectionEditor(QWidget* parent, QObject* sender, QObject* receiver, FormWindow* fw); + ConnectionEditor(TQWidget* parent, TQObject* sender, TQObject* receiver, FormWindow* fw); ~ConnectionEditor(); protected slots: @@ -43,11 +43,11 @@ protected slots: // 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); + void fillWidgetList(KComboBox* a_combo, const TQStringList& items, const TQString& defaultWidget); // Sender widget was changed - update signal list - void senderChanged(const QString & s); + void senderChanged(const TQString & s); // Receiver widget was changed - update slot list - void receiverChanged(const QString & s); + void receiverChanged(const TQString & s); // Enable/disable 'Connect' button when pair changes void updateConnectButton(); // Enable/disable 'Disconnect' button when selection changes @@ -63,13 +63,13 @@ private: // 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 m_connections; - QValueList m_oldConnections; - QObject* m_sender; - QObject* m_receiver; + TQObject* objectByName(const TQString& s) const; + bool hasConnection(const TQString & snder, const TQString & signal, + const TQString & rcvr, const TQString & slot) const; + TQMap m_connections; + TQValueList m_oldConnections; + TQObject* m_sender; + TQObject* m_receiver; FormWindow* m_formWindow; }; diff --git a/kommander/editor/defs.cpp b/kommander/editor/defs.cpp index fdf06ce9..9f158b6d 100644 --- a/kommander/editor/defs.cpp +++ b/kommander/editor/defs.cpp @@ -20,59 +20,59 @@ #include "defs.h" -int size_type_to_int( QSizePolicy::SizeType t ) +int size_type_to_int( TQSizePolicy::SizeType t ) { - if ( t == QSizePolicy::Fixed ) + if ( t == TQSizePolicy::Fixed ) return 0; - if ( t == QSizePolicy::Minimum ) + if ( t == TQSizePolicy::Minimum ) return 1; - if ( t == QSizePolicy::Maximum ) + if ( t == TQSizePolicy::Maximum ) return 2; - if ( t == QSizePolicy::Preferred ) + if ( t == TQSizePolicy::Preferred ) return 3; - if ( t == QSizePolicy::MinimumExpanding ) + if ( t == TQSizePolicy::MinimumExpanding ) return 4; - if ( t == QSizePolicy::Expanding ) + if ( t == TQSizePolicy::Expanding ) return 5; - if ( t == QSizePolicy::Ignored ) + if ( t == TQSizePolicy::Ignored ) return 6; return 0; } -QString size_type_to_string( QSizePolicy::SizeType t ) +TQString size_type_to_string( TQSizePolicy::SizeType t ) { - if ( t == QSizePolicy::Fixed ) + if ( t == TQSizePolicy::Fixed ) return "Fixed"; - if ( t == QSizePolicy::Minimum ) + if ( t == TQSizePolicy::Minimum ) return "Minimum"; - if ( t == QSizePolicy::Maximum ) + if ( t == TQSizePolicy::Maximum ) return "Maximum"; - if ( t == QSizePolicy::Preferred ) + if ( t == TQSizePolicy::Preferred ) return "Preferred"; - if ( t == QSizePolicy::MinimumExpanding ) + if ( t == TQSizePolicy::MinimumExpanding ) return "MinimumExpanding"; - if ( t == QSizePolicy::Expanding ) + if ( t == TQSizePolicy::Expanding ) return "Expanding"; - if ( t == QSizePolicy::Ignored ) + if ( t == TQSizePolicy::Ignored ) return "Ignored"; return 0; } -QSizePolicy::SizeType int_to_size_type( int i ) +TQSizePolicy::SizeType int_to_size_type( int i ) { if ( i == 0 ) - return QSizePolicy::Fixed; + return TQSizePolicy::Fixed; if ( i == 1 ) - return QSizePolicy::Minimum; + return TQSizePolicy::Minimum; if ( i == 2 ) - return QSizePolicy::Maximum; + return TQSizePolicy::Maximum; if ( i == 3 ) - return QSizePolicy::Preferred; + return TQSizePolicy::Preferred; if ( i == 4 ) - return QSizePolicy::MinimumExpanding; + return TQSizePolicy::MinimumExpanding; if ( i == 5 ) - return QSizePolicy::Expanding; + return TQSizePolicy::Expanding; if ( i == 6 ) - return QSizePolicy::Ignored; - return QSizePolicy::Preferred; + return TQSizePolicy::Ignored; + return TQSizePolicy::Preferred; } diff --git a/kommander/editor/defs.h b/kommander/editor/defs.h index ade3fa4b..03cffd98 100644 --- a/kommander/editor/defs.h +++ b/kommander/editor/defs.h @@ -21,15 +21,15 @@ #ifndef DEFS_H #define DEFS_H -#include -#include +#include +#include #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 ); +int size_type_to_int( TQSizePolicy::SizeType t ); +TQString size_type_to_string( TQSizePolicy::SizeType t ); +TQSizePolicy::SizeType int_to_size_type( int i ); #endif diff --git a/kommander/editor/filechooser.cpp b/kommander/editor/filechooser.cpp index 14bedb95..dfb8575b 100644 --- a/kommander/editor/filechooser.cpp +++ b/kommander/editor/filechooser.cpp @@ -1,27 +1,27 @@ #include "filechooser.h" -#include -#include +#include +#include #include -#include +#include -FileChooser::FileChooser( QWidget *parent, const char *name ) - : QWidget( parent, name ), md( File ) +FileChooser::FileChooser( TQWidget *parent, const char *name ) + : TQWidget( parent, name ), md( File ) { - QHBoxLayout *layout = new QHBoxLayout( this ); + TQHBoxLayout *layout = new TQHBoxLayout( this ); layout->setMargin( 0 ); - lineEdit = new QLineEdit( this, "filechooser_lineedit" ); + lineEdit = new TQLineEdit( this, "filechooser_lineedit" ); layout->addWidget( lineEdit ); - connect( lineEdit, SIGNAL( textChanged( const QString & ) ), - this, SIGNAL( fileNameChanged( const QString & ) ) ); + connect( lineEdit, TQT_SIGNAL( textChanged( const TQString & ) ), + this, TQT_SIGNAL( fileNameChanged( const TQString & ) ) ); - button = new QPushButton( "...", this, "filechooser_button" ); + button = new TQPushButton( "...", this, "filechooser_button" ); button->setFixedWidth( button->fontMetrics().width( " ... " ) ); layout->addWidget( button ); - connect( button, SIGNAL( clicked() ), - this, SLOT( chooseFile() ) ); + connect( button, TQT_SIGNAL( clicked() ), + this, TQT_SLOT( chooseFile() ) ); setFocusProxy( lineEdit ); } @@ -36,21 +36,21 @@ FileChooser::Mode FileChooser::mode() const return md; } -void FileChooser::setFileName( const QString &fn ) +void FileChooser::setFileName( const TQString &fn ) { lineEdit->setText( fn ); } -QString FileChooser::fileName() const +TQString FileChooser::fileName() const { return lineEdit->text(); } void FileChooser::chooseFile() { - QString fn; + TQString fn; if ( mode() == File ) - fn = KFileDialog::getOpenFileName( lineEdit->text(), QString::null, this ); + fn = KFileDialog::getOpenFileName( lineEdit->text(), TQString::null, this ); else fn = KFileDialog::getExistingDirectory( lineEdit->text(),this ); diff --git a/kommander/editor/filechooser.h b/kommander/editor/filechooser.h index e6bc98e3..f051eea4 100644 --- a/kommander/editor/filechooser.h +++ b/kommander/editor/filechooser.h @@ -1,7 +1,7 @@ #ifndef FILECHOOSER_H #define FILECHOOSER_H -#include +#include class QLineEdit; class QPushButton; @@ -12,29 +12,29 @@ class FileChooser : public QWidget Q_ENUMS( Mode ) Q_PROPERTY( Mode mode READ mode WRITE setMode ) - Q_PROPERTY( QString fileName READ fileName WRITE setFileName ) + Q_PROPERTY( TQString fileName READ fileName WRITE setFileName ) public: - FileChooser( QWidget *parent = 0, const char *name = 0); + FileChooser( TQWidget *parent = 0, const char *name = 0); enum Mode { File, Directory }; - QString fileName() const; + TQString fileName() const; Mode mode() const; public slots: - void setFileName( const QString &fn ); + void setFileName( const TQString &fn ); void setMode( Mode m ); signals: - void fileNameChanged( const QString & ); + void fileNameChanged( const TQString & ); private slots: void chooseFile(); private: - QLineEdit *lineEdit; - QPushButton *button; + TQLineEdit *lineEdit; + TQPushButton *button; Mode md; }; diff --git a/kommander/editor/formfile.cpp b/kommander/editor/formfile.cpp index 645b04ef..0f5ab63c 100644 --- a/kommander/editor/formfile.cpp +++ b/kommander/editor/formfile.cpp @@ -27,10 +27,10 @@ #include "workspace.h" // Qt includes -#include -#include -#include -#include +#include +#include +#include +#include // KDE includes #include @@ -42,18 +42,18 @@ #include -FormFile::FormFile(const QString &fn, bool temp) +FormFile::FormFile(const TQString &fn, bool temp) : filename(fn), fileNameTemp(temp), fw(0) { - QTimer::singleShot(0, this, SLOT(init())); + TQTimer::singleShot(0, this, TQT_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*))); + connect(this, TQT_SIGNAL(addedFormFile(FormFile *)), MainWindow::self->workspace(), + TQT_SLOT(formFileAdded(FormFile*))); + connect(this, TQT_SIGNAL(removedFormFile(FormFile *)), MainWindow::self->workspace(), + TQT_SLOT(formFileRemoved(FormFile*))); emit addedFormFile(this); } @@ -74,7 +74,7 @@ void FormFile::setFormWindow(FormWindow *f) fw->setFormFile(this); } -void FormFile::setFileName(const QString &fn) +void FormFile::setFileName(const TQString &fn) { if (fn == filename) return; @@ -92,12 +92,12 @@ FormWindow *FormFile::formWindow() const return fw; } -QString FormFile::fileName() const +TQString FormFile::fileName() const { return filename; } -QString FormFile::absFileName() const +TQString FormFile::absFileName() const { return filename; } @@ -119,7 +119,7 @@ bool FormFile::save(bool withMsgBox) 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) + "Do you want to use another file name?").arg(filename), TQString::null, i18n("Try Another"), i18n("Do Not Try")) == KMessageBox::Yes) return saveAs(); else return false; @@ -132,23 +132,23 @@ bool FormFile::save(bool withMsgBox) bool FormFile::saveAs() { - QString f = fileName(); + TQString f = fileName(); if(fileNameTemp) - f = QString(formWindow()->name()).lower() + ".kmdr"; + f = TQString(formWindow()->name()).lower() + ".kmdr"; bool saved = false; while (!saved) { - QString fn = KFileDialog::getSaveFileName(QString::null, + TQString fn = KFileDialog::getSaveFileName(TQString::null, i18n("*.kmdr|Kommander Files"), MainWindow::self, i18n("Save Form '%1' As").arg(formWindow()->name())); if (fn.isEmpty()) return false; - QFileInfo fi(fn); + TQFileInfo fi(fn); if (fi.extension() != "kmdr") fn += ".kmdr"; fileNameTemp = false; filename = fn; - QFileInfo relfi(filename); + TQFileInfo relfi(filename); if (relfi.exists()) { if (KMessageBox::warningContinueCancel(MainWindow::self, i18n("The file already exists. Do you wish to overwrite it?"), @@ -176,7 +176,7 @@ bool FormFile::closeEvent() if (!isModified()) { emit removedFormFile(this); - QFile f(filename + ".backup"); + TQFile f(filename + ".backup"); f.remove(); return true; } @@ -197,7 +197,7 @@ bool FormFile::closeEvent() emit removedFormFile(this); setModified(false); - QFile f(filename + ".backup"); + TQFile f(filename + ".backup"); f.remove(); return true; } @@ -239,12 +239,12 @@ void FormFile::showFormWindow() static int ui_counter = 0; -QString FormFile::createUnnamedFileName() +TQString FormFile::createUnnamedFileName() { - return i18n("unnamed") + QString::number(++ui_counter) + QString(".kmdr"); + return i18n("unnamed") + TQString::number(++ui_counter) + TQString(".kmdr"); } -QString FormFile::formName() const +TQString FormFile::formName() const { FormFile* that = (FormFile*) this; if (formWindow()) { @@ -253,12 +253,12 @@ QString FormFile::formName() const } if (!cachedFormName.isNull()) return cachedFormName; - QFile f(filename); + TQFile f(filename); if (f.open(IO_ReadOnly)) { - QTextStream ts(&f); - QString line; - QString className; + TQTextStream ts(&f); + TQString line; + TQString className; while (!ts.eof()) { line = ts.readLine(); diff --git a/kommander/editor/formfile.h b/kommander/editor/formfile.h index 39fecc67..89ba2f1d 100644 --- a/kommander/editor/formfile.h +++ b/kommander/editor/formfile.h @@ -20,7 +20,7 @@ #ifndef FORMFILE_H #define FORMFILE_H -#include +#include #include "timestamp.h" #include "metadatabase.h" @@ -31,23 +31,23 @@ class FormFile : public QObject Q_OBJECT public: - FormFile(const QString &fn, bool temp); + FormFile(const TQString &fn, bool temp); ~FormFile(); void setFormWindow( FormWindow *f ); - void setFileName( const QString &fn ); + void setFileName( const TQString &fn ); void setModified(bool m); FormWindow *formWindow() const; - QString fileName() const; - QString absFileName() const; + TQString fileName() const; + TQString absFileName() const; bool save( bool withMsgBox = TRUE ); bool saveAs(); bool close(); bool closeEvent(); bool isModified(); void showFormWindow(); - static QString createUnnamedFileName(); - QString formName() const; + static TQString createUnnamedFileName(); + TQString formName() const; bool hasTempFileName() const {return fileNameTemp;} signals: @@ -64,10 +64,10 @@ private: void setFormWindowModified( bool m ); private: - QString filename; + TQString filename; bool fileNameTemp; FormWindow *fw; - QString cachedFormName; + TQString cachedFormName; }; diff --git a/kommander/editor/formsettingsimpl.cpp b/kommander/editor/formsettingsimpl.cpp index 4daec8ba..f3f7c3c2 100644 --- a/kommander/editor/formsettingsimpl.cpp +++ b/kommander/editor/formsettingsimpl.cpp @@ -23,11 +23,11 @@ #include "asciivalidator.h" #include "mainwindow.h" -#include +#include #include -#include +#include -FormSettings::FormSettings( QWidget *parent, FormWindow *fw ) +FormSettings::FormSettings( TQWidget *parent, FormWindow *fw ) : FormSettingsBase( parent, 0, true ), formwindow( fw ) { MetaDataBase::MetaInfo info = MetaDataBase::metaInfo(fw); diff --git a/kommander/editor/formsettingsimpl.h b/kommander/editor/formsettingsimpl.h index f33c2194..194f168a 100644 --- a/kommander/editor/formsettingsimpl.h +++ b/kommander/editor/formsettingsimpl.h @@ -30,7 +30,7 @@ class FormSettings : public FormSettingsBase Q_OBJECT public: - FormSettings( QWidget *parent, FormWindow *fw ); + FormSettings( TQWidget *parent, FormWindow *fw ); protected slots: void okClicked(); diff --git a/kommander/editor/formwindow.cpp b/kommander/editor/formwindow.cpp index 0aa9b122..631def85 100644 --- a/kommander/editor/formwindow.cpp +++ b/kommander/editor/formwindow.cpp @@ -18,28 +18,28 @@ **********************************************************************/ // Qt includes -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include // KDE includes #include @@ -67,30 +67,30 @@ #include -static void setCursorToAll(const QCursor &c, QWidget *start) +static void setCursorToAll(const TQCursor &c, TQWidget *start) { start->setCursor(c); - QObjectList *l = (QObjectList*)start->children(); + TQObjectList *l = (TQObjectList*)start->children(); if (l) - for (QObject *o = l->first(); o; o = l->next()) + for (TQObject *o = l->first(); o; o = l->next()) { if (o->isWidgetType() && !o->inherits("SizeHandle")) - setCursorToAll(c, ((QWidget*)o)); + setCursorToAll(c, ((TQWidget*)o)); } } -static void restoreCursors(QWidget *start, FormWindow *fw) +static void restoreCursors(TQWidget *start, FormWindow *fw) { if (fw->widgets()->find(start)) start->setCursor(MetaDataBase::cursor(start)); else start->setCursor(Qt::ArrowCursor); - QObjectList *l = (QObjectList*)start->children(); + TQObjectList *l = (TQObjectList*)start->children(); if (l) - for (QObject *o = l->first(); o; o = l->next()) + for (TQObject *o = l->first(); o; o = l->next()) { if (o->isWidgetType() && !o->inherits("SizeHandle")) - restoreCursors(((QWidget*)o), fw); + restoreCursors(((TQWidget*)o), fw); } } @@ -110,8 +110,8 @@ static void restoreCursors(QWidget *start, FormWindow *fw) 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), +FormWindow::FormWindow(FormFile *f, MainWindow *mw, TQWidget *parent, const char *name) + : TQWidget(parent, name, WDestructiveClose), mainwindow(mw), commands(100), pixInline(true) { ff = f; @@ -119,8 +119,8 @@ FormWindow::FormWindow(FormFile *f, MainWindow *mw, QWidget *parent, const char initSlots(); } -FormWindow::FormWindow(FormFile *f, QWidget *parent, const char *name) - : QWidget(parent, name, WDestructiveClose), mainwindow(0), +FormWindow::FormWindow(FormFile *f, TQWidget *parent, const char *name) + : TQWidget(parent, name, WDestructiveClose), mainwindow(0), commands(100), pixInline(true) { ff = f; @@ -142,30 +142,30 @@ void FormWindow::init() 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())); + checkSelectionsTimer = new TQTimer(this, "checkSelectionsTimer"); + connect(checkSelectionsTimer, TQT_SIGNAL(timeout()), + this, TQT_SLOT(invalidCheckedSelections())); + updatePropertiesTimer = new TQTimer(this); + connect(updatePropertiesTimer, TQT_SIGNAL(timeout()), + this, TQT_SLOT(updatePropertiesTimerDone())); + showPropertiesTimer = new TQTimer(this); + connect(showPropertiesTimer, TQT_SIGNAL(timeout()), + this, TQT_SLOT(showPropertiesTimerDone())); + selectionChangedTimer = new TQTimer(this); + connect(selectionChangedTimer, TQT_SIGNAL(timeout()), + this, TQT_SLOT(selectionChangedTimerDone())); insertParent = 0; - connect(&commands, SIGNAL(undoRedoChanged(bool, bool, const QString &, const QString &)), - this, SIGNAL(undoRedoChanged(bool, bool, const QString &, const QString &))); + connect(&commands, TQT_SIGNAL(undoRedoChanged(bool, bool, const TQString &, const TQString &)), + this, TQT_SIGNAL(undoRedoChanged(bool, bool, const TQString &, const TQString &))); propShowBlocked = false; setIcon(PixmapChooser::loadPixmap("form.xpm", PixmapChooser::Mini)); - connect(&commands, SIGNAL(modificationChanged(bool)), - this, SLOT(modificationChanged(bool))); + connect(&commands, TQT_SIGNAL(modificationChanged(bool)), + this, TQT_SLOT(modificationChanged(bool))); buffer = 0; - QWidget *w = WidgetFactory::create(WidgetDatabase::idFromClassName("QFrame"), this); + TQWidget *w = WidgetFactory::create(WidgetDatabase::idFromClassName("TQFrame"), this); setMainContainer(w); propertyWidget = w; targetContainer = 0; @@ -195,7 +195,7 @@ FormWindow::~FormWindow() ff->setFormWindow(0); } -void FormWindow::closeEvent(QCloseEvent *e) +void FormWindow::closeEvent(TQCloseEvent *e) { if (ff->closeEvent() && mainwindow->unregisterClient(this)) e->accept(); @@ -203,29 +203,29 @@ void FormWindow::closeEvent(QCloseEvent *e) e->ignore(); } -void FormWindow::paintGrid(QWidget *w, QPaintEvent *e) +void FormWindow::paintGrid(TQWidget *w, TQPaintEvent *e) { if (!mainWindow()->showGrid()) return; - QPixmap grid; - QString grid_name; + TQPixmap grid; + TQString 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()); + if(!TQPixmapCache::find(grid_name, grid)) { + grid = TQPixmap(350 + (350 % mainWindow()->grid().x()), 350 + (350 % mainWindow()->grid().y())); + grid.fill(colorGroup().color(TQColorGroup::Foreground)); + TQBitmap mask(grid.width(), grid.height()); mask.fill(color0); - QPainter p(&mask); + TQPainter 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); + TQPixmapCache::insert(grid_name, grid); } - QPainter p(w); + TQPainter p(w); p.setClipRegion(e->rect()); - p.drawTiledPixmap(QRect(0, 0, width(), height()), grid); + p.drawTiledPixmap(TQRect(0, 0, width(), height()), grid); } @@ -245,7 +245,7 @@ void FormWindow::beginUnclippedPainter(bool doNot) clearWFlags(WPaintUnclipped); if (doNot) { - unclippedPainter->setPen(QPen(color0, 2)); + unclippedPainter->setPen(TQPen(color0, 2)); unclippedPainter->setRasterOp(NotROP); } } @@ -258,32 +258,32 @@ void FormWindow::endUnclippedPainter() unclippedPainter = 0; } -QPoint FormWindow::gridPoint(const QPoint &p) +TQPoint FormWindow::gridPoint(const TQPoint &p) { - return QPoint((p.x() / grid().x()) * grid().x(), + return TQPoint((p.x() / grid().x()) * grid().x(), (p.y() / grid().y()) * grid().y()); } -void FormWindow::drawSizePreview(const QPoint &pos, const QString& text) +void FormWindow::drawSizePreview(const TQPoint &pos, const TQString& text) { unclippedPainter->save(); - unclippedPainter->setPen(QPen(colorGroup().foreground(), 1 )); + unclippedPainter->setPen(TQPen(colorGroup().foreground(), 1 )); unclippedPainter->setRasterOp(CopyROP); if (!sizePreviewPixmap.isNull()) unclippedPainter->drawPixmap(sizePreviewPos, sizePreviewPixmap); if (text.isNull()) { - sizePreviewPixmap = QPixmap(); // set null again + sizePreviewPixmap = TQPixmap(); // 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)); + TQRect r = fontMetrics().boundingRect(0, 0, 0, 0, AlignCenter, text); + r = TQRect(pos + TQPoint(10, 10), r.size() + TQSize(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)); + sizePreviewPixmap = TQPixmap::grabWindow(winId(), r.x(), r.y(), r.width(), r.height()); + unclippedPainter->setBrush(TQColor(255, 255, 128)); unclippedPainter->drawRect(r); unclippedPainter->drawText(r, AlignCenter, text); unclippedPainter->restore(); @@ -296,53 +296,53 @@ void FormWindow::insertWidget() 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()); + TQString n = WidgetDatabase::className(currTool); + if (useSizeHint && (n == "Spacer" || n == "TQSlider" || n == "Line" || n == "TQScrollBar")) { + TQPopupMenu m(mainWindow()); m.insertItem(i18n("&Horizontal")); int ver = m.insertItem(i18n("&Vertical")); - int r = m.exec(QCursor::pos()); + int r = m.exec(TQCursor::pos()); if (r == ver) orient = Vertical; } - QWidget *w = WidgetFactory::create(currTool, insertParent, 0, true, &currRect, orient); + TQWidget *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")); + ((TQLabel*)w)->setPixmap(PixmapChooser::loadPixmap("image.xpm")); int id = WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(w)); if (WidgetDatabase::isCustomWidget(id)) { - QWhatsThis::add(w, i18n("A %1 (custom widget) " + TQWhatsThis::add(w, i18n("A %1 (custom widget) " "

Click Edit Custom Widgets... in the Tools|Custom " "menu to add and change custom widgets. You can add " "properties as well as signals and slots to integrate custom widgets into " "Qt Designer, and provide a pixmap which will be used to represent " "the widget on the form.

") .arg(WidgetDatabase::toolTip(id))); - QToolTip::add(w, i18n("A %1 (custom widget)").arg(WidgetDatabase::toolTip(id))); + TQToolTip::add(w, i18n("A %1 (custom widget)").arg(WidgetDatabase::toolTip(id))); } else { - QString tt = WidgetDatabase::toolTip(id); - QString wt = WidgetDatabase::whatsThis(id); + TQString tt = WidgetDatabase::toolTip(id); + TQString wt = WidgetDatabase::whatsThis(id); if (!wt.isEmpty() && !tt.isEmpty()) - QWhatsThis::add(w, i18n("A %1

%2

").arg(tt).arg(wt)); + TQWhatsThis::add(w, i18n("A %1

%2

").arg(tt).arg(wt)); } - QString s = w->name(); + TQString s = w->name(); unify(w, s, true); w->setName(s); insertWidget(w); - QRect r(currRect); + TQRect r(currRect); if (!oldRectValid || (currRect.width() < 2 && currRect.height() < 2)) - r = QRect(rectAnchor, QSize(0, 0)); + r = TQRect(rectAnchor, TQSize(0, 0)); - QPoint p = r.topLeft(); + TQPoint p = r.topLeft(); p = mapToGlobal(p); p = insertParent->mapFromGlobal(p); - r = QRect(p, r.size()); + r = TQRect(p, r.size()); if (useSizeHint) { r.setWidth(w->sizeHint().width()); @@ -354,30 +354,30 @@ void FormWindow::insertWidget() if (r.height() < 2 * grid().y()) r.setHeight(2 * grid().y()); - const QObjectList *l = insertParent->children(); - QObjectListIt it(*l); - QWidgetList lst; + const TQObjectList *l = insertParent->children(); + TQObjectListIt it(*l); + TQWidgetList lst; if (WidgetDatabase::isContainer(WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(w)))) for (; it.current();) { - QObject *o = it.current(); + TQObject *o = it.current(); ++it; - if (o->isWidgetType() && ((QWidget*)o)->isVisibleTo(this) && - insertedWidgets.find((QWidget*)o) && o != w) + if (o->isWidgetType() && ((TQWidget*)o)->isVisibleTo(this) && + insertedWidgets.find((TQWidget*)o) && o != w) { - QRect r2(((QWidget*)o)->pos(), ((QWidget*)o)->size()); + TQRect r2(((TQWidget*)o)->pos(), ((TQWidget*)o)->size()); if (r.contains(r2)) - lst.append((QWidget*)o); + lst.append((TQWidget*)o); } } if (!lst.isEmpty()) { - QWidget *pw = WidgetFactory::containerOfWidget(w); - QValueList op, np; - for (QWidget *i = lst.first(); i; i = lst.next()) + TQWidget *pw = WidgetFactory::containerOfWidget(w); + TQValueList op, np; + for (TQWidget *i = lst.first(); i; i = lst.next()) { op.append(i->pos()); - QPoint pos = pw->mapFromGlobal(i->mapToGlobal(QPoint(0, 0))); + TQPoint pos = pw->mapFromGlobal(i->mapToGlobal(TQPoint(0, 0))); pos -= r.topLeft(); np.append(pos); } @@ -389,7 +389,7 @@ void FormWindow::insertWidget() InsertCommand *cmd = new InsertCommand(i18n("Insert %1").arg(w->name()), this, w, r); - QPtrList commands; + TQPtrList commands; commands.append(mv); commands.append(cmd); @@ -410,10 +410,10 @@ void FormWindow::insertWidget() } } -void FormWindow::insertWidget(QWidget *w, bool checkName) +void FormWindow::insertWidget(TQWidget *w, bool checkName) { if (checkName) { - QString s = w->name(); + TQString s = w->name(); unify(w, s, true); w->setName(s); } @@ -422,21 +422,21 @@ void FormWindow::insertWidget(QWidget *w, bool checkName) int id = WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(w)); if (WidgetDatabase::isCustomWidget(id)) { - QWhatsThis::add(w, i18n("A %1 (custom widget) " + TQWhatsThis::add(w, i18n("A %1 (custom widget) " "

Click Edit Custom Widgets... in the Tools|Custom " "menu to add and change custom widgets. You can add " "properties as well as signals and slots to integrate custom widgets into " "Qt Designer, and provide a pixmap which will be used to represent " "the widget on the form.

") .arg(WidgetDatabase::toolTip(id))); - QToolTip::add(w, i18n("A %1 (custom widget)").arg(WidgetDatabase::toolTip(id))); + TQToolTip::add(w, i18n("A %1 (custom widget)").arg(WidgetDatabase::toolTip(id))); } else { - QString tt = WidgetDatabase::toolTip(id); - QString wt = WidgetDatabase::whatsThis(id); + TQString tt = WidgetDatabase::toolTip(id); + TQString wt = WidgetDatabase::whatsThis(id); if (!wt.isEmpty() && !tt.isEmpty()) - QWhatsThis::add(w, i18n("A %1

%2

").arg(tt).arg(wt)); + TQWhatsThis::add(w, i18n("A %1

%2

").arg(tt).arg(wt)); } restoreCursors(w, this); @@ -444,13 +444,13 @@ void FormWindow::insertWidget(QWidget *w, bool checkName) w->show(); } -void FormWindow::removeWidget(QWidget *w) +void FormWindow::removeWidget(TQWidget *w) { MetaDataBase::removeEntry(w); widgets()->take(w); } -void FormWindow::handleContextMenu(QContextMenuEvent *e, QWidget *w) +void FormWindow::handleContextMenu(TQContextMenuEvent *e, TQWidget *w) { switch (currTool) { case POINTER_TOOL: @@ -459,12 +459,12 @@ void FormWindow::handleContextMenu(QContextMenuEvent *e, QWidget *w) 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 + TQWidget *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) + if (mainContainer()->inherits("TQMainWindow") && + ((TQMainWindow*)mainContainer())->centralWidget() == realWidget) { e->accept(); mainwindow->popupFormWindowMenu(e->globalPos(), this); @@ -487,15 +487,15 @@ void FormWindow::handleContextMenu(QContextMenuEvent *e, QWidget *w) } } -void FormWindow::handleMousePress(QMouseEvent *e, QWidget *w) +void FormWindow::handleMousePress(TQMouseEvent *e, TQWidget *w) { checkedSelectionsForMove = false; checkSelectionsTimer->stop(); if (!sizePreviewLabel) { - sizePreviewLabel = new QLabel(this); + sizePreviewLabel = new TQLabel(this); sizePreviewLabel->hide(); - sizePreviewLabel->setBackgroundColor(QColor(255, 255, 128)); - sizePreviewLabel->setFrameStyle(QFrame::Plain | QFrame::Box); + sizePreviewLabel->setBackgroundColor(TQColor(255, 255, 128)); + sizePreviewLabel->setFrameStyle(TQFrame::Plain | TQFrame::Box); } switch (currTool) { @@ -508,7 +508,7 @@ void FormWindow::handleMousePress(QMouseEvent *e, QWidget *w) if ((e->state() & ControlButton)) { // with control pressed, always start rubber band selection drawRubber = true; - currRect = QRect(0, 0, -1, -1); + currRect = TQRect(0, 0, -1, -1); startRectDraw(mapFromGlobal(e->globalPos()), e->globalPos(), this, Rubber); break; } @@ -524,14 +524,14 @@ void FormWindow::handleMousePress(QMouseEvent *e, QWidget *w) // unselect its childs if (WidgetFactory::layoutType(w) != WidgetFactory::NoLayout) { - QObjectList *l = w->queryList("QWidget"); + TQObjectList *l = w->queryList("TQWidget"); setPropertyShowingBlocked(true); - for (QObject *o = l->first(); o; o = l->next()) + for (TQObject *o = l->first(); o; o = l->next()) { if (!o->isWidgetType()) continue; - if (insertedWidgets.find((QWidget*)o)) - selectWidget((QWidget*)o, false); + if (insertedWidgets.find((TQWidget*)o)) + selectWidget((TQWidget*)o, false); } setPropertyShowingBlocked(false); delete l; @@ -558,7 +558,7 @@ void FormWindow::handleMousePress(QMouseEvent *e, QWidget *w) 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()); + widgetGeom = TQRect(w->pos(), w->size()); oldPressPos = w->mapFromGlobal(e->globalPos()); origPressPos = oldPressPos; checkedSelectionsForMove = false; @@ -580,12 +580,12 @@ void FormWindow::handleMousePress(QMouseEvent *e, QWidget *w) if (!((e->state() & ControlButton) || (e->state() & ShiftButton))) { clearSelection(false); - QObject *opw = propertyWidget; + TQObject *opw = propertyWidget; propertyWidget = mainContainer(); if (opw->isWidgetType()) - repaintSelection((QWidget*)opw); + repaintSelection((TQWidget*)opw); } - currRect = QRect(0, 0, -1, -1); + currRect = TQRect(0, 0, -1, -1); startRectDraw(mapFromGlobal(e->globalPos()), e->globalPos(), this, Rubber); } } @@ -607,7 +607,7 @@ void FormWindow::handleMousePress(QMouseEvent *e, QWidget *w) { // press on a child widget orderedWidgets.removeRef(w); orderedWidgets.append(w); - for (QWidget *wid = orderedWidgets.last(); wid; wid = orderedWidgets.prev()) + for (TQWidget *wid = orderedWidgets.last(); wid; wid = orderedWidgets.prev()) { int i = stackedWidgets.findRef(wid); if (i != -1) @@ -616,7 +616,7 @@ void FormWindow::handleMousePress(QMouseEvent *e, QWidget *w) stackedWidgets.insert(0, wid); } } - QWidgetList oldl = MetaDataBase::tabOrder(this); + TQWidgetList oldl = MetaDataBase::tabOrder(this); TabOrderCommand *cmd = new TabOrderCommand(i18n("Change Tab Order"), this, oldl, stackedWidgets); cmd->execute(); @@ -631,12 +631,12 @@ void FormWindow::handleMousePress(QMouseEvent *e, QWidget *w) // 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; + TQWidget *wid = w; for (;;) { int id = WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(wid)); if ((WidgetDatabase::isContainer(id) || wid == mainContainer()) && - !wid->inherits("QLayoutWidget") && !wid->inherits("QSplitter")) + !wid->inherits("QLayoutWidget") && !wid->inherits("TQSplitter")) { insertParent = WidgetFactory::containerOfWidget(wid); // found another parent, store it break; @@ -655,7 +655,7 @@ void FormWindow::handleMousePress(QMouseEvent *e, QWidget *w) } } -void FormWindow::handleMouseDblClick(QMouseEvent *, QWidget *w) +void FormWindow::handleMouseDblClick(TQMouseEvent *, TQWidget *w) { switch (currTool) { case ORDER_TOOL: @@ -663,7 +663,7 @@ void FormWindow::handleMouseDblClick(QMouseEvent *, QWidget *w) { // press on a child widget orderedWidgets.clear(); orderedWidgets.append(w); - for (QWidget *wid = orderedWidgets.last(); wid; wid = orderedWidgets.prev()) + for (TQWidget *wid = orderedWidgets.last(); wid; wid = orderedWidgets.prev()) { int i = stackedWidgets.findRef(wid); if (i != -1) @@ -672,7 +672,7 @@ void FormWindow::handleMouseDblClick(QMouseEvent *, QWidget *w) stackedWidgets.insert(0, wid); } } - QWidgetList oldl = MetaDataBase::tabOrder(this); + TQWidgetList oldl = MetaDataBase::tabOrder(this); TabOrderCommand *cmd = new TabOrderCommand(i18n("Change Tab Order"), this, oldl, stackedWidgets); cmd->execute(); commandHistory()->addCommand(cmd, true); @@ -683,12 +683,12 @@ void FormWindow::handleMouseDblClick(QMouseEvent *, QWidget *w) } } -void FormWindow::handleMouseMove(QMouseEvent *e, QWidget *w) +void FormWindow::handleMouseMove(TQMouseEvent *e, TQWidget *w) { if ((e->state() & LeftButton) != LeftButton) return; - QWidget *newReceiver = (QWidget*)connectReceiver, *oldReceiver = (QWidget*)connectReceiver, *wid; + TQWidget *newReceiver = (TQWidget*)connectReceiver, *oldReceiver = (TQWidget*)connectReceiver, *wid; bool drawRecRect; switch (currTool) { case POINTER_TOOL: @@ -699,9 +699,9 @@ void FormWindow::handleMouseMove(QMouseEvent *e, QWidget *w) WidgetFactory::NoLayout || !insertedWidgets.find(w))) w = w->parentWidget(); // calc correct position - QPoint pos = w->mapFromGlobal(e->globalPos()); + TQPoint pos = w->mapFromGlobal(e->globalPos()); // calc move distance and store it - QPoint d = oldPressPos - pos; + TQPoint d = oldPressPos - pos; if (QABS(d.x()) < grid().x()) d.setX(0); if (QABS(d.y()) < grid().y()) @@ -718,7 +718,7 @@ void FormWindow::handleMouseMove(QMouseEvent *e, QWidget *w) int y = widgetGeom.y() - d.y(); widgetGeom.setY(y); y = (y / grid().y()) * grid().y(); - QPoint p = w->pos(); + TQPoint p = w->pos(); if (x - p.x() || y - p.y()) { // if we actually have to move @@ -734,8 +734,8 @@ void FormWindow::handleMouseMove(QMouseEvent *e, QWidget *w) } // check whether we would have to reparent the selection and // highlight the possible new parent container - QMapConstIterator it = moving.begin(); - QWidget* wa = containerAt(e->globalPos(), ((QWidget*)it.key())); + TQMapConstIterator it = moving.begin(); + TQWidget* wa = containerAt(e->globalPos(), ((TQWidget*)it.key())); if (wa && !isMainContainer(wa) && !isCentralWidget(wa)) { wa = WidgetFactory::containerOfWidget(wa); @@ -767,9 +767,9 @@ void FormWindow::handleMouseMove(QMouseEvent *e, QWidget *w) // 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->setText(TQString("%1/%2").arg(w->pos().x()).arg(w->pos().y())); sizePreviewLabel->adjustSize(); - QRect lg(mapFromGlobal(e->globalPos()) + QPoint(16, 16), sizePreviewLabel->size()); + TQRect lg(mapFromGlobal(e->globalPos()) + TQPoint(16, 16), sizePreviewLabel->size()); checkPreviewGeometry(lg); sizePreviewLabel->setGeometry(lg); sizePreviewLabel->raise(); @@ -777,7 +777,7 @@ void FormWindow::handleMouseMove(QMouseEvent *e, QWidget *w) } else { // if we don't need to move, do some indication - QRect lg(mapFromGlobal(e->globalPos()) + QPoint(16, 16), sizePreviewLabel->size()); + TQRect lg(mapFromGlobal(e->globalPos()) + TQPoint(16, 16), sizePreviewLabel->size()); checkPreviewGeometry(lg); sizePreviewLabel->move(lg.x(), lg.y()); } @@ -797,7 +797,7 @@ void FormWindow::handleMouseMove(QMouseEvent *e, QWidget *w) newReceiver = wid; if (newReceiver && (newReceiver->inherits("QLayoutWidget") || newReceiver->inherits("Spacer"))) - newReceiver = (QWidget*)connectReceiver; + newReceiver = (TQWidget*)connectReceiver; drawRecRect = newReceiver != connectReceiver; currentConnectPos = mapFromGlobal(e->globalPos()); if (newReceiver && (isMainContainer(newReceiver) @@ -807,8 +807,8 @@ void FormWindow::handleMouseMove(QMouseEvent *e, QWidget *w) arg(connectReceiver->name())); qApp->processEvents(); if (drawRecRect) - restoreRect(QRect(mapToForm(((QWidget*)oldReceiver)->parentWidget(), - ((QWidget*)oldReceiver)->pos()), ((QWidget*)oldReceiver)->size())); + restoreRect(TQRect(mapToForm(((TQWidget*)oldReceiver)->parentWidget(), + ((TQWidget*)oldReceiver)->pos()), ((TQWidget*)oldReceiver)->size())); drawConnectLine(); break; case ORDER_TOOL: @@ -820,7 +820,7 @@ void FormWindow::handleMouseMove(QMouseEvent *e, QWidget *w) } } -void FormWindow::handleMouseRelease(QMouseEvent * e, QWidget * w) +void FormWindow::handleMouseRelease(TQMouseEvent * e, TQWidget * w) { if (e->button() != LeftButton) return; @@ -847,18 +847,18 @@ void FormWindow::handleMouseRelease(QMouseEvent * e, QWidget * w) if (propertyWidget && propertyWidget->isWidgetType() && !isMainContainer(propertyWidget)) emitUpdateProperties(propertyWidget); - QMapConstIterator < ulong, QPoint > it = moving.begin(); - QWidget *oldParent = ((QWidget *) it.key())->parentWidget(); - QWidget *newParent = oldParent; + TQMapConstIterator < ulong, TQPoint > it = moving.begin(); + TQWidget *oldParent = ((TQWidget *) it.key())->parentWidget(); + TQWidget *newParent = oldParent; // check whether we have to reparent the selection - QWidget *wa = containerAt(e->globalPos(), ((QWidget *) it.key())); + TQWidget *wa = containerAt(e->globalPos(), ((TQWidget *) 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()) + if (wa == ((TQWidget *) it.key())->parentWidget()) goto make_move_command; // break layout if necessary @@ -878,22 +878,22 @@ void FormWindow::handleMouseRelease(QMouseEvent * e, QWidget * w) } // 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) + for (TQMap < ulong, TQPoint >::Iterator it = moving.begin(); it != moving.end(); ++it) { - QWidget *i = (QWidget *) it.key(); - if (!emitSelChanged && i->inherits("QButton")) + TQWidget *i = (TQWidget *) it.key(); + if (!emitSelChanged && i->inherits("TQButton")) { - if (i->parentWidget() && i->parentWidget()->inherits("QButtonGroup") || - wa->inherits("QButtonGroup")) + if (i->parentWidget() && i->parentWidget()->inherits("TQButtonGroup") || + wa->inherits("TQButtonGroup")) emitSelChanged = true; - if (!wa->inherits("QButtonGroup")) + if (!wa->inherits("TQButtonGroup")) { MetaDataBase::setPropertyChanged(i, "buttonGroupId", false); - if (i->parentWidget() && i->parentWidget()->inherits("QButtonGroup")) - ((QButtonGroup *) i->parentWidget())->remove((QButton *) i); + if (i->parentWidget() && i->parentWidget()->inherits("TQButtonGroup")) + ((TQButtonGroup *) i->parentWidget())->remove((TQButton *) i); } } - QPoint pos = wa->mapFromGlobal(i->mapToGlobal(QPoint(0, 0))); + TQPoint pos = wa->mapFromGlobal(i->mapToGlobal(TQPoint(0, 0))); i->reparent(wa, pos, true); raiseSelection(i); raiseChildSelections(i); @@ -910,13 +910,13 @@ void FormWindow::handleMouseRelease(QMouseEvent * e, QWidget * w) } make_move_command: - QWidgetList widgets; // collect the widgets and its old and new positions which have been moved - QValueList < QPoint > oldPos, newPos; + TQWidgetList widgets; // collect the widgets and its old and new positions which have been moved + TQValueList < TQPoint > oldPos, newPos; for (it = moving.begin(); it != moving.end(); ++it) { - widgets.append((QWidget *) it.key()); + widgets.append((TQWidget *) it.key()); oldPos.append(*it); - newPos.append(((QWidget *) it.key())->pos()); + newPos.append(((TQWidget *) 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"), @@ -935,11 +935,11 @@ void FormWindow::handleMouseRelease(QMouseEvent * e, QWidget * w) case CONNECT_TOOL: restoreConnectionLine(); if (connectSender) - restoreRect(QRect(mapToForm(((QWidget *) connectSender)->parentWidget(), - ((QWidget *) connectSender)->pos()), ((QWidget *) connectSender)->size())); + restoreRect(TQRect(mapToForm(((TQWidget *) connectSender)->parentWidget(), + ((TQWidget *) connectSender)->pos()), ((TQWidget *) connectSender)->size())); if (connectReceiver) - restoreRect(QRect(mapToForm(((QWidget *) connectReceiver)->parentWidget(), - ((QWidget *) connectReceiver)->pos()), ((QWidget *) connectReceiver)->size())); + restoreRect(TQRect(mapToForm(((TQWidget *) connectReceiver)->parentWidget(), + ((TQWidget *) connectReceiver)->pos()), ((TQWidget *) connectReceiver)->size())); endUnclippedPainter(); qApp->processEvents(); if (connectSender && connectReceiver) @@ -983,7 +983,7 @@ void FormWindow::handleMouseRelease(QMouseEvent * e, QWidget * w) buffer = 0; } -void FormWindow::handleKeyPress(QKeyEvent * e, QWidget * w) +void FormWindow::handleKeyPress(TQKeyEvent * e, TQWidget * w) { e->ignore(); checkSelectionsTimer->stop(); @@ -991,12 +991,12 @@ void FormWindow::handleKeyPress(QKeyEvent * e, QWidget * w) (e->key() == Key_Left || e->key() == Key_Right || e->key() == Key_Up || e->key() == Key_Down) && propertyWidget->isWidgetType()) - checkSelectionsForMove((QWidget *) propertyWidget); + checkSelectionsForMove((TQWidget *) 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; + TQWidgetList widgets; + TQValueList < TQPoint > oldPos, newPos; for (WidgetSelection * s = selections.first(); s; s = selections.next()) { if (s->isUsed()) @@ -1048,7 +1048,7 @@ void FormWindow::handleKeyPress(QKeyEvent * e, QWidget * w) widgets.append(s->widget()); oldPos.append(s->widget()->pos()); - newPos.append(s->widget()->pos() + QPoint(dx, dy)); + newPos.append(s->widget()->pos() + TQPoint(dx, dy)); } } if (!widgets.isEmpty()) @@ -1061,7 +1061,7 @@ void FormWindow::handleKeyPress(QKeyEvent * e, QWidget * w) } if (!e->isAccepted()) { - QObjectList *l = queryList("QWidget"); + TQObjectList *l = queryList("TQWidget"); if (!l) return; if (l->find(w) != -1) @@ -1071,38 +1071,38 @@ void FormWindow::handleKeyPress(QKeyEvent * e, QWidget * w) } -void FormWindow::handleKeyRelease(QKeyEvent * e, QWidget *) +void FormWindow::handleKeyRelease(TQKeyEvent * e, TQWidget *) { e->ignore(); } -void FormWindow::selectWidget(QObject * o, bool select) +void FormWindow::selectWidget(TQObject * o, bool select) { if (!o->isWidgetType()) { - // ########### do QObject stuff + // ########### do TQObject stuff return; } - QWidget *w = (QWidget *) o; + TQWidget *w = (TQWidget *) o; if (isMainContainer(w)) { - QObject *opw = propertyWidget; + TQObject *opw = propertyWidget; propertyWidget = mainContainer(); if (opw->isWidgetType()) - repaintSelection((QWidget *) opw); + repaintSelection((TQWidget *) opw); emitShowProperties(propertyWidget); return; } - if (mainContainer()->inherits("QMainWindow") && - w == ((QMainWindow *) mainContainer())->centralWidget()) + if (mainContainer()->inherits("TQMainWindow") && + w == ((TQMainWindow *) mainContainer())->centralWidget()) { - QObject *opw = propertyWidget; + TQObject *opw = propertyWidget; propertyWidget = mainContainer(); if (opw->isWidgetType()) - repaintSelection((QWidget *) opw); + repaintSelection((TQWidget *) opw); emitShowProperties(propertyWidget); return; } @@ -1112,10 +1112,10 @@ void FormWindow::selectWidget(QObject * o, bool select) if (select) { - QObject *opw = propertyWidget; + TQObject *opw = propertyWidget; propertyWidget = w; if (opw->isWidgetType()) - repaintSelection((QWidget *) opw); + repaintSelection((TQWidget *) opw); if (!isPropertyShowingBlocked()) emitShowProperties(propertyWidget); WidgetSelection *s = usedSelections.find(w); @@ -1146,27 +1146,27 @@ void FormWindow::selectWidget(QObject * o, bool select) WidgetSelection *s = usedSelections.find(w); if (s) s->setWidget(0); - QObject *opw = propertyWidget; + TQObject *opw = propertyWidget; if (!usedSelections.isEmpty()) - propertyWidget = QPtrDictIterator < WidgetSelection > (usedSelections).current()->widget(); + propertyWidget = TQPtrDictIterator < WidgetSelection > (usedSelections).current()->widget(); else propertyWidget = mainContainer(); if (opw->isWidgetType()) - repaintSelection((QWidget *) opw); + repaintSelection((TQWidget *) opw); if (!isPropertyShowingBlocked()) emitShowProperties(propertyWidget); emitSelectionChanged(); } } -QPoint FormWindow::grid() const +TQPoint FormWindow::grid() const { if (!mainWindow()->snapGrid()) - return QPoint(1, 1); + return TQPoint(1, 1); return mainWindow()->grid(); } -void FormWindow::updateSelection(QWidget * w) +void FormWindow::updateSelection(TQWidget * w) { WidgetSelection *s = usedSelections.find(w); if (!w->isVisibleTo(this)) @@ -1175,14 +1175,14 @@ void FormWindow::updateSelection(QWidget * w) s->updateGeometry(); } -void FormWindow::raiseSelection(QWidget * w) +void FormWindow::raiseSelection(TQWidget * w) { WidgetSelection *s = usedSelections.find(w); if (s) s->show(); } -void FormWindow::repaintSelection(QWidget * w) +void FormWindow::repaintSelection(TQWidget * w) { WidgetSelection *s = usedSelections.find(w); if (s) @@ -1191,54 +1191,54 @@ void FormWindow::repaintSelection(QWidget * w) void FormWindow::clearSelection(bool changePropertyDisplay) { - QPtrDictIterator < WidgetSelection > it(usedSelections); + TQPtrDictIterator < WidgetSelection > it(usedSelections); for (; it.current(); ++it) it.current()->setWidget(0, false); usedSelections.clear(); if (changePropertyDisplay) { - QObject *opw = propertyWidget; + TQObject *opw = propertyWidget; propertyWidget = mainContainer(); if (opw->isWidgetType()) - repaintSelection((QWidget *) opw); + repaintSelection((TQWidget *) opw); emitShowProperties(propertyWidget); } emitSelectionChanged(); } -void FormWindow::startRectDraw(const QPoint & p, const QPoint & global, QWidget *, RectType t) +void FormWindow::startRectDraw(const TQPoint & p, const TQPoint & global, TQWidget *, RectType t) { - QPoint pos(p); + TQPoint pos(p); pos = mapFromGlobal(global); oldRectValid = false; beginUnclippedPainter(true); if (t == Rubber) - unclippedPainter->setPen(QPen(color0, 1)); + unclippedPainter->setPen(TQPen(color0, 1)); if (t == Insert) rectAnchor = gridPoint(pos); else if (t == Rubber) rectAnchor = pos; - currRect = QRect(rectAnchor, QPoint(0, 0)); + currRect = TQRect(rectAnchor, TQPoint(0, 0)); if (t == Insert) drawSizePreview(pos, i18n("Use Size Hint")); } -void FormWindow::continueRectDraw(const QPoint & p, const QPoint & global, QWidget *, RectType t) +void FormWindow::continueRectDraw(const TQPoint & p, const TQPoint & global, TQWidget *, RectType t) { - QPoint pos = p; + TQPoint pos = p; pos = mapFromGlobal(global); - QPoint p2; + TQPoint p2; if (t == Insert) p2 = gridPoint(pos); else if (t == Rubber) p2 = pos; - QRect r(rectAnchor, p2); + TQRect r(rectAnchor, p2); r = r.normalize(); if (currRect == r) { - QString t("%1/%2"); + TQString t("%1/%2"); t = t.arg(r.width() - 1).arg(r.height() - 1); drawSizePreview(pos, t); return; @@ -1252,11 +1252,11 @@ void FormWindow::continueRectDraw(const QPoint & p, const QPoint & global, QWidg currRect = r; if (t == Insert) { - QString t("%1/%2"); + TQString t("%1/%2"); t = t.arg(r.width() - 1).arg(r.height() - 1); drawSizePreview(pos, t); } - unclippedPainter->setClipRegion(QRegion(rect()).subtract(QRect(sizePreviewPos, + unclippedPainter->setClipRegion(TQRegion(rect()).subtract(TQRect(sizePreviewPos, sizePreviewPixmap.size()))); unclippedPainter->drawRect(currRect); unclippedPainter->setClipping(false); @@ -1275,24 +1275,24 @@ void FormWindow::endRectDraw() if (oldRectValid) unclippedPainter->drawRect(currRect); - drawSizePreview(QPoint(-1, -1), QString::null); + drawSizePreview(TQPoint(-1, -1), TQString::null); endUnclippedPainter(); } void FormWindow::selectWidgets() { - QObjectList *l = mainContainer()->queryList("QWidget"); + TQObjectList *l = mainContainer()->queryList("TQWidget"); if (l) { - for (QObject * o = l->first(); o; o = l->next()) + for (TQObject * o = l->first(); o; o = l->next()) { - if (((QWidget *) o)->isVisibleTo(this) && insertedWidgets[(void *) o]) + if (((TQWidget *) o)->isVisibleTo(this) && insertedWidgets[(void *) o]) { - QPoint p = ((QWidget *) o)->mapToGlobal(QPoint(0, 0)); + TQPoint p = ((TQWidget *) o)->mapToGlobal(TQPoint(0, 0)); p = mapFromGlobal(p); - QRect r(p, ((QWidget *) o)->size()); + TQRect r(p, ((TQWidget *) o)->size()); if (r.intersects(currRect) && !r.contains(currRect)) - selectWidget((QWidget *) o); + selectWidget((TQWidget *) o); } } delete l; @@ -1300,20 +1300,20 @@ void FormWindow::selectWidgets() emitSelectionChanged(); } -bool FormWindow::isWidgetSelected(QObject * w) +bool FormWindow::isWidgetSelected(TQObject * w) { if (w->isWidgetType()) - return usedSelections.find((QWidget *) w) != 0; + return usedSelections.find((TQWidget *) w) != 0; return false; // #### do stuff for QObjects } void FormWindow::moveSelectedWidgets(int dx, int dy) { - QPtrDictIterator < WidgetSelection > it(usedSelections); + TQPtrDictIterator < WidgetSelection > it(usedSelections); for (; it.current(); ++it) { WidgetSelection *s = it.current(); - QWidget *w = s->widget(); + TQWidget *w = s->widget(); if (w->parentWidget() && WidgetFactory::layoutType(w->parentWidget()) != WidgetFactory::NoLayout) continue; @@ -1338,16 +1338,16 @@ void FormWindow::redo() commandHistory()->redo(); } -void FormWindow::raiseChildSelections(QWidget * w) +void FormWindow::raiseChildSelections(TQWidget * w) { - QObjectList *l = w->queryList("QWidget"); + TQObjectList *l = w->queryList("TQWidget"); if (!l || !l->first()) { delete l; return; } - QPtrDictIterator < WidgetSelection > it(usedSelections); + TQPtrDictIterator < WidgetSelection > it(usedSelections); for (; it.current(); ++it) { if (l->findRef(it.current()->widget()) != -1) @@ -1356,29 +1356,29 @@ void FormWindow::raiseChildSelections(QWidget * w) delete l; } -void FormWindow::updateChildSelections(QWidget * w) +void FormWindow::updateChildSelections(TQWidget * w) { - QObjectList *l = w->queryList("QWidget"); + TQObjectList *l = w->queryList("TQWidget"); if (l) { - for (QObject * o = l->first(); o; o = l->next()) + for (TQObject * o = l->first(); o; o = l->next()) { - if (o->isWidgetType() && insertedWidgets.find((QWidget *) o)) - updateSelection((QWidget *) o); + if (o->isWidgetType() && insertedWidgets.find((TQWidget *) o)) + updateSelection((TQWidget *) o); } delete l; } } -void FormWindow::checkSelectionsForMove(QWidget * w) +void FormWindow::checkSelectionsForMove(TQWidget * w) { checkedSelectionsForMove = true; - QObjectList *l = w->parentWidget()->queryList("QWidget", 0, false, false); + TQObjectList *l = w->parentWidget()->queryList("TQWidget", 0, false, false); moving.clear(); if (l) { - QPtrDictIterator < WidgetSelection > it(usedSelections); + TQPtrDictIterator < WidgetSelection > it(usedSelections); WidgetSelection *sel; while ((sel = it.current()) != 0) { @@ -1406,11 +1406,11 @@ void FormWindow::checkSelectionsForMove(QWidget * w) void FormWindow::deleteWidgets() { - QWidgetList widgets; - QPtrDictIterator < WidgetSelection > it(usedSelections); + TQWidgetList widgets; + TQPtrDictIterator < WidgetSelection > it(usedSelections); for (; it.current(); ++it) { - QWidget *tb = 0; + TQWidget *tb = 0; if (!(tb = mainWindow()->isAToolBarChild(it.current()->widget()))) widgets.append(it.current()->widget()); else @@ -1427,17 +1427,17 @@ void FormWindow::deleteWidgets() void FormWindow::editAdjustSize() { - QPtrList < Command > commands; - QWidgetList widgets = selectedWidgets(); + TQPtrList < Command > commands; + TQWidgetList widgets = selectedWidgets(); if (widgets.isEmpty()) { - QRect oldr = geometry(); + TQRect 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(); + TQRect nr = geometry(); if (oldr != nr) { ResizeCommand *cmd = new ResizeCommand(i18n("Adjust Size"), this, this, oldr, nr); @@ -1445,14 +1445,14 @@ void FormWindow::editAdjustSize() } return; } - for (QWidget * w = widgets.first(); w; w = widgets.next()) + for (TQWidget * w = widgets.first(); w; w = widgets.next()) { if (w->parentWidget() && WidgetFactory::layoutType(w->parentWidget()) != WidgetFactory::NoLayout) continue; - QRect oldr = w->geometry(); + TQRect oldr = w->geometry(); w->adjustSize(); - QRect nr = w->geometry(); + TQRect nr = w->geometry(); if (oldr != nr) commands.append(new ResizeCommand(i18n("Adjust Size"), this, w, oldr, nr)); } @@ -1467,28 +1467,28 @@ void FormWindow::editAdjustSize() } -QWidgetList FormWindow::selectedWidgets() const +TQWidgetList FormWindow::selectedWidgets() const { - QWidgetList widgets; - for (QPtrDictIterator it(usedSelections); it.current(); ++it) + TQWidgetList widgets; + for (TQPtrDictIterator it(usedSelections); it.current(); ++it) widgets.append(it.current()->widget()); return widgets; } -void FormWindow::widgetChanged(QObject *w) +void FormWindow::widgetChanged(TQObject *w) { if (w->isWidgetType()) - updateSelection((QWidget*)w); + updateSelection((TQWidget*)w); } -QLabel *FormWindow::sizePreview() const +TQLabel *FormWindow::sizePreview() const { if (!sizePreviewLabel) { - ((FormWindow*)this)->sizePreviewLabel = new QLabel((FormWindow*)this); + ((FormWindow*)this)->sizePreviewLabel = new TQLabel((FormWindow*)this); ((FormWindow*)this)->sizePreviewLabel->hide(); - ((FormWindow*)this)->sizePreviewLabel->setBackgroundColor(QColor(255, 255, 128)); - ((FormWindow*)this)->sizePreviewLabel->setFrameStyle(QFrame::Plain | QFrame::Box); + ((FormWindow*)this)->sizePreviewLabel->setBackgroundColor(TQColor(255, 255, 128)); + ((FormWindow*)this)->sizePreviewLabel->setFrameStyle(TQFrame::Plain | TQFrame::Box); } return sizePreviewLabel; } @@ -1498,79 +1498,79 @@ void FormWindow::invalidCheckedSelections() checkedSelectionsForMove = false; } -void FormWindow::checkPreviewGeometry(QRect & r) +void FormWindow::checkPreviewGeometry(TQRect & r) { if (rect().contains(r)) return; if (r.left() < rect().left()) - r.moveTopLeft(QPoint(0, r.top())); + r.moveTopLeft(TQPoint(0, r.top())); if (r.right() > rect().right()) - r.moveBottomRight(QPoint(rect().right(), r.bottom())); + r.moveBottomRight(TQPoint(rect().right(), r.bottom())); if (r.top() < rect().top()) - r.moveTopLeft(QPoint(r.left(), rect().top())); + r.moveTopLeft(TQPoint(r.left(), rect().top())); if (r.bottom() > rect().bottom()) - r.moveBottomRight(QPoint(r.right(), rect().bottom())); + r.moveBottomRight(TQPoint(r.right(), rect().bottom())); } -void FormWindow::focusInEvent(QFocusEvent *) +void FormWindow::focusInEvent(TQFocusEvent *) { if (mContainer) { - QVariant prop = mContainer->property("useInternalParser"); + TQVariant prop = mContainer->property("useInternalParser"); KommanderWidget::useInternalParser = prop.toBool(); } } -void FormWindow::focusOutEvent(QFocusEvent *) +void FormWindow::focusOutEvent(TQFocusEvent *) { if (propertyWidget && !isMainContainer(propertyWidget) && !isWidgetSelected(propertyWidget)) { - QObject *opw = propertyWidget; + TQObject *opw = propertyWidget; propertyWidget = mainContainer(); if (opw->isWidgetType()) - repaintSelection((QWidget *) opw); + repaintSelection((TQWidget *) opw); } } -void FormWindow::resizeEvent(QResizeEvent * e) +void FormWindow::resizeEvent(TQResizeEvent * e) { - QWidget::resizeEvent(e); + TQWidget::resizeEvent(e); if (currTool == ORDER_TOOL) repositionOrderIndicators(); if (isVisible()) formFile()->setModified(true); } -QPtrDict < QWidget > *FormWindow::widgets() +TQPtrDict < TQWidget > *FormWindow::widgets() { return &insertedWidgets; } -QWidget *FormWindow::designerWidget(QObject * o) const +TQWidget *FormWindow::designerWidget(TQObject * o) const { if (!o || !o->isWidgetType()) return 0; - QWidget *w = (QWidget *) o; + TQWidget *w = (TQWidget *) o; while (w && !isMainContainer(w) && !insertedWidgets[(void *) w] || isCentralWidget(w)) - w = (QWidget *) w->parent(); + w = (TQWidget *) w->parent(); return w; } -void FormWindow::emitShowProperties(QObject * w) +void FormWindow::emitShowProperties(TQObject * w) { if (w) { - QObject *opw = propertyWidget; + TQObject *opw = propertyWidget; propertyWidget = w; if (opw->isWidgetType()) - repaintSelection((QWidget *) opw); + repaintSelection((TQWidget *) opw); } showPropertiesTimer->stop(); showPropertiesTimer->start(0, true); } -void FormWindow::emitUpdateProperties(QObject * w) +void FormWindow::emitUpdateProperties(TQObject * w) { if (w == propertyWidget) { @@ -1618,11 +1618,11 @@ void FormWindow::currentToolChanged() case CONNECT_TOOL: restoreConnectionLine(); if (connectSender) - restoreRect(QRect(mapToForm(((QWidget *) connectSender)->parentWidget(), - ((QWidget *) connectSender)->pos()), ((QWidget *) connectSender)->size())); + restoreRect(TQRect(mapToForm(((TQWidget *) connectSender)->parentWidget(), + ((TQWidget *) connectSender)->pos()), ((TQWidget *) connectSender)->size())); if (connectReceiver) - restoreRect(QRect(mapToForm(((QWidget *) connectReceiver)->parentWidget(), - ((QWidget *) connectReceiver)->pos()), ((QWidget *) connectReceiver)->size())); + restoreRect(TQRect(mapToForm(((TQWidget *) connectReceiver)->parentWidget(), + ((TQWidget *) connectReceiver)->pos()), ((TQWidget *) connectReceiver)->size())); endUnclippedPainter(); break; case POINTER_TOOL: @@ -1686,14 +1686,14 @@ void FormWindow::showOrderIndicators() { hideOrderIndicators(); orderIndicators.setAutoDelete(true); - QObjectList *l = mainContainer()->queryList("QWidget"); + TQObjectList *l = mainContainer()->queryList("TQWidget"); stackedWidgets = MetaDataBase::tabOrder(this); if (l) { int order = 1; - for (QObject * o = l->first(); o; o = l->next()) + for (TQObject * o = l->first(); o; o = l->next()) { - QWidget *w = (QWidget *) o; + TQWidget *w = (TQWidget *) o; if (w->isVisibleTo(w->parentWidget()) && insertedWidgets[(void *) w] && w->focusPolicy() != NoFocus) { @@ -1716,7 +1716,7 @@ void FormWindow::hideOrderIndicators() void FormWindow::updateOrderIndicators() { int order = 1; - for (QWidget * w = stackedWidgets.first(); w; w = stackedWidgets.next()) + for (TQWidget * w = stackedWidgets.first(); w; w = stackedWidgets.next()) { for (OrderIndicator * i = orderIndicators.first(); i; i = orderIndicators.next()) i->setOrder(order, w); @@ -1737,13 +1737,13 @@ void FormWindow::updateUndoInfo() bool FormWindow::checkCustomWidgets() { - QStringList missingCustomWidgets; - QPtrDictIterator < QWidget > it(insertedWidgets); + TQStringList missingCustomWidgets; + TQPtrDictIterator < TQWidget > it(insertedWidgets); for (; it.current(); ++it) { if (it.current()->isA("CustomWidget")) { - QString className = WidgetFactory::classNameOf(it.current()); + TQString className = WidgetFactory::classNameOf(it.current()); if (!MetaDataBase::hasCustomWidget(className)) missingCustomWidgets << className; } @@ -1767,7 +1767,7 @@ int FormWindow::numSelectedWidgets() const return usedSelections.count(); } -QString FormWindow::copy() +TQString FormWindow::copy() { Resource resource(mainWindow()); resource.setWidget(this); @@ -1776,8 +1776,8 @@ QString FormWindow::copy() void FormWindow::lowerWidgets() { - QWidgetList widgets; - QPtrDictIterator < WidgetSelection > it(usedSelections); + TQWidgetList widgets; + TQPtrDictIterator < WidgetSelection > it(usedSelections); for (; it.current(); ++it) widgets.append(it.current()->widget()); @@ -1786,44 +1786,44 @@ void FormWindow::lowerWidgets() commandHistory()->addCommand(cmd); } -static void find_accel(const QString & txt, QMap < QChar, QWidgetList > &accels, QWidget * w) +static void find_accel(const TQString & txt, TQMap < TQChar, TQWidgetList > &accels, TQWidget * w) { int i = txt.find("&"); if (i == -1) return; - QChar c = txt[i + 1]; + TQChar c = txt[i + 1]; if (c.isNull() || c == '&') return; c = c.lower(); - QMap < QChar, QWidgetList >::Iterator it = accels.find(c); + TQMap < TQChar, TQWidgetList >::Iterator it = accels.find(c); if (it == accels.end()) { - QWidgetList wl; + TQWidgetList wl; wl.append(w); accels.insert(c, wl); } else { - QWidgetList *wl = &*it; + TQWidgetList *wl = &*it; wl->append(w); } } void FormWindow::checkAccels() { - QMap < QChar, QWidgetList > accels; - QObjectList *l = mainContainer()->queryList("QWidget"); + TQMap < TQChar, TQWidgetList > accels; + TQObjectList *l = mainContainer()->queryList("TQWidget"); if (l) { - for (QObject * o = l->first(); o; o = l->next()) + for (TQObject * o = l->first(); o; o = l->next()) { - if (((QWidget *) o)->isVisibleTo(this) && insertedWidgets[(void *) o]) + if (((TQWidget *) o)->isVisibleTo(this) && insertedWidgets[(void *) o]) { - QWidget *w = (QWidget *) o; - const QMetaProperty *text = + TQWidget *w = (TQWidget *) o; + const TQMetaProperty *text = w->metaObject()->property(w->metaObject()->findProperty("text", true), true); - const QMetaProperty *title = + const TQMetaProperty *title = w->metaObject()->property(w->metaObject()->findProperty("title", true), true); - const QMetaProperty *pageTitle = + const TQMetaProperty *pageTitle = w->metaObject()->property(w->metaObject()->findProperty("pageTitle", true), true); if (text) find_accel(w->property("text").toString(), accels, w); @@ -1837,8 +1837,8 @@ void FormWindow::checkAccels() } bool ok = true; - QWidget *wid; - for (QMap < QChar, QWidgetList >::Iterator it = accels.begin(); it != accels.end(); ++it) + TQWidget *wid; + for (TQMap < TQChar, TQWidgetList >::Iterator it = accels.begin(); it != accels.end(); ++it) { if ((*it).count() > 1) { @@ -1862,8 +1862,8 @@ void FormWindow::checkAccels() void FormWindow::raiseWidgets() { - QWidgetList widgets; - QPtrDictIterator < WidgetSelection > it(usedSelections); + TQWidgetList widgets; + TQPtrDictIterator < WidgetSelection > it(usedSelections); for (; it.current(); ++it) widgets.append(it.current()->widget()); @@ -1872,7 +1872,7 @@ void FormWindow::raiseWidgets() commandHistory()->addCommand(cmd); } -void FormWindow::paste(const QString & cb, QWidget * parent) +void FormWindow::paste(const TQString & cb, TQWidget * parent) { Resource resource(mainWindow()); resource.setWidget(this); @@ -1883,14 +1883,14 @@ void FormWindow::selectAll() { checkedSelectionsForMove = false; blockSignals(true); - QObjectList *l = mainContainer()->queryList("QWidget"); + TQObjectList *l = mainContainer()->queryList("TQWidget"); if (l) { - for (QObject * o = l->first(); o; o = l->next()) + for (TQObject * o = l->first(); o; o = l->next()) { - if (((QWidget *) o)->isVisibleTo(this) && insertedWidgets[(void *) o]) + if (((TQWidget *) o)->isVisibleTo(this) && insertedWidgets[(void *) o]) { - selectWidget((QWidget *) o); + selectWidget((TQWidget *) o); } } delete l; @@ -1905,7 +1905,7 @@ void FormWindow::selectAll() void FormWindow::layoutHorizontal() { - QWidgetList widgets(selectedWidgets()); + TQWidgetList widgets(selectedWidgets()); LayoutHorizontalCommand *cmd = new LayoutHorizontalCommand(i18n("Lay Out Horizontally"), this, mainContainer(), 0, widgets); clearSelection(false); @@ -1915,7 +1915,7 @@ void FormWindow::layoutHorizontal() void FormWindow::layoutVertical() { - QWidgetList widgets(selectedWidgets()); + TQWidgetList widgets(selectedWidgets()); LayoutVerticalCommand *cmd = new LayoutVerticalCommand(i18n("Lay Out Vertically"), this, mainContainer(), 0, widgets); clearSelection(false); @@ -1925,7 +1925,7 @@ void FormWindow::layoutVertical() void FormWindow::layoutHorizontalSplit() { - QWidgetList widgets(selectedWidgets()); + TQWidgetList widgets(selectedWidgets()); LayoutHorizontalSplitCommand *cmd = new LayoutHorizontalSplitCommand(i18n("Lay Out Horizontally (in splitter)"), this, mainContainer(), 0, widgets); @@ -1936,7 +1936,7 @@ void FormWindow::layoutHorizontalSplit() void FormWindow::layoutVerticalSplit() { - QWidgetList widgets(selectedWidgets()); + TQWidgetList widgets(selectedWidgets()); LayoutVerticalSplitCommand *cmd = new LayoutVerticalSplitCommand(i18n("Lay Out Vertically (in splitter)"), this, mainContainer(), 0, widgets); @@ -1950,7 +1950,7 @@ void FormWindow::layoutGrid() int xres = grid().x(); int yres = grid().y(); - QWidgetList widgets(selectedWidgets()); + TQWidgetList widgets(selectedWidgets()); LayoutGridCommand *cmd = new LayoutGridCommand(i18n("Lay Out in a Grid"), this, mainContainer(), 0, widgets, xres, yres); clearSelection(false); @@ -1958,19 +1958,19 @@ void FormWindow::layoutGrid() cmd->execute(); } -void FormWindow::layoutHorizontalContainer(QWidget * w) +void FormWindow::layoutHorizontalContainer(TQWidget * w) { if (w == this) w = mainContainer(); - QObjectList *l = (QObjectList *) WidgetFactory::containerOfWidget(w)->children(); + TQObjectList *l = (TQObjectList *) WidgetFactory::containerOfWidget(w)->children(); if (!l) return; - QWidgetList widgets; - for (QObject * o = l->first(); o; o = l->next()) + TQWidgetList widgets; + for (TQObject * o = l->first(); o; o = l->next()) { if (o->isWidgetType() && - ((QWidget *) o)->isVisibleTo(this) && insertedWidgets.find((QWidget *) o)) - widgets.append((QWidget *) o); + ((TQWidget *) o)->isVisibleTo(this) && insertedWidgets.find((TQWidget *) o)) + widgets.append((TQWidget *) o); } LayoutHorizontalCommand *cmd = new LayoutHorizontalCommand(i18n("Lay Out Children Horizontally"), this, mainContainer(), w, widgets); @@ -1979,19 +1979,19 @@ void FormWindow::layoutHorizontalContainer(QWidget * w) cmd->execute(); } -void FormWindow::layoutVerticalContainer(QWidget * w) +void FormWindow::layoutVerticalContainer(TQWidget * w) { if (w == this) w = mainContainer(); - QObjectList *l = (QObjectList *) WidgetFactory::containerOfWidget(w)->children(); + TQObjectList *l = (TQObjectList *) WidgetFactory::containerOfWidget(w)->children(); if (!l) return; - QWidgetList widgets; - for (QObject * o = l->first(); o; o = l->next()) + TQWidgetList widgets; + for (TQObject * o = l->first(); o; o = l->next()) { if (o->isWidgetType() && - ((QWidget *) o)->isVisibleTo(this) && insertedWidgets.find((QWidget *) o)) - widgets.append((QWidget *) o); + ((TQWidget *) o)->isVisibleTo(this) && insertedWidgets.find((TQWidget *) o)) + widgets.append((TQWidget *) o); } LayoutVerticalCommand *cmd = new LayoutVerticalCommand(i18n("Lay Out Children Vertically"), this, mainContainer(), w, widgets); @@ -2000,22 +2000,22 @@ void FormWindow::layoutVerticalContainer(QWidget * w) cmd->execute(); } -void FormWindow::layoutGridContainer(QWidget * w) +void FormWindow::layoutGridContainer(TQWidget * w) { if (w == this) w = mainContainer(); int xres = grid().x(); int yres = grid().y(); - QObjectList *l = (QObjectList *) WidgetFactory::containerOfWidget(w)->children(); + TQObjectList *l = (TQObjectList *) WidgetFactory::containerOfWidget(w)->children(); if (!l) return; - QWidgetList widgets; - for (QObject * o = l->first(); o; o = l->next()) + TQWidgetList widgets; + for (TQObject * o = l->first(); o; o = l->next()) { if (o->isWidgetType() && - ((QWidget *) o)->isVisibleTo(this) && insertedWidgets.find((QWidget *) o)) - widgets.append((QWidget *) o); + ((TQWidget *) o)->isVisibleTo(this) && insertedWidgets.find((TQWidget *) o)) + widgets.append((TQWidget *) o); } LayoutGridCommand *cmd = new LayoutGridCommand(i18n("Lay Out Children in a Grid"), this, mainContainer(), w, widgets, xres, yres); @@ -2024,12 +2024,12 @@ void FormWindow::layoutGridContainer(QWidget * w) cmd->execute(); } -void FormWindow::breakLayout(QWidget * w) +void FormWindow::breakLayout(TQWidget * w) { if (w == this) w = mainContainer(); w = WidgetFactory::containerOfWidget(w); - QPtrList < Command > commands; + TQPtrList < Command > commands; for (;;) { @@ -2041,7 +2041,7 @@ void FormWindow::breakLayout(QWidget * w) Command *cmd = breakLayoutCommand(w); if (cmd) commands.insert(0, cmd); - if (!w->inherits("QLayoutWidget") && !w->inherits("QSplitter")) + if (!w->inherits("QLayoutWidget") && !w->inherits("TQSplitter")) break; } w = w->parentWidget(); @@ -2056,19 +2056,19 @@ void FormWindow::breakLayout(QWidget * w) cmd->execute(); } -BreakLayoutCommand *FormWindow::breakLayoutCommand(QWidget * w) +BreakLayoutCommand *FormWindow::breakLayoutCommand(TQWidget * w) { - QObjectList *l = (QObjectList *) w->children(); + TQObjectList *l = (TQObjectList *) w->children(); if (!l) return 0; - QWidgetList widgets; - for (QObject * o = l->first(); o; o = l->next()) + TQWidgetList widgets; + for (TQObject * 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); + !mainWindow()->isAToolBarChild((TQWidget *) o) && + ((TQWidget *) o)->isVisibleTo(this) && insertedWidgets.find((TQWidget *) o)) + widgets.append((TQWidget *) o); } return new BreakLayoutCommand(i18n("Break Layout"), this, WidgetFactory::widgetOfContainer(w), widgets); @@ -2076,7 +2076,7 @@ BreakLayoutCommand *FormWindow::breakLayoutCommand(QWidget * w) int FormWindow::numVisibleWidgets() const { - QPtrDictIterator < QWidget > it(insertedWidgets); + TQPtrDictIterator < TQWidget > it(insertedWidgets); int visible = 0; for (; it.current(); ++it) { @@ -2086,23 +2086,23 @@ int FormWindow::numVisibleWidgets() const return visible; } -bool FormWindow::hasInsertedChildren(QWidget *w) const +bool FormWindow::hasInsertedChildren(TQWidget *w) const { if (!w) return false; w = WidgetFactory::containerOfWidget(w); if (!w) return false; - QObjectList *l = w->queryList("QWidget"); + TQObjectList *l = w->queryList("TQWidget"); 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)) + for (TQObject *o = l->first(); o; o = l->next()) + if (o->isWidgetType() && ((TQWidget*)o)->isVisibleTo((FormWindow*)this) && + insertedWidgets.find((TQWidget*)o)) { delete l; return true; @@ -2111,7 +2111,7 @@ bool FormWindow::hasInsertedChildren(QWidget *w) const return false; } -bool FormWindow::allowMove(QWidget *w) +bool FormWindow::allowMove(TQWidget *w) { w = w->parentWidget(); while (w) @@ -2143,8 +2143,8 @@ void FormWindow::editConnections() void FormWindow::saveBackground() { delete buffer; - buffer = new QPixmap(width(), height()); - *buffer = QPixmap::grabWindow(winId()); + buffer = new TQPixmap(width(), height()); + *buffer = TQPixmap::grabWindow(winId()); } void FormWindow::restoreConnectionLine() @@ -2154,7 +2154,7 @@ void FormWindow::restoreConnectionLine() int a =QABS(connectStartPos.x() - currentConnectPos.x()); int b = QABS(connectStartPos.y() - currentConnectPos.y()); - QRect r(connectStartPos, currentConnectPos); + TQRect r(connectStartPos, currentConnectPos); if (a < 32 || b < 32) { // special case: vertical or horizontal line @@ -2181,7 +2181,7 @@ void FormWindow::restoreConnectionLine() } int dx = 2 * w / 3; int dy = 2 * h / 3; - QPoint p(connectStartPos); + TQPoint p(connectStartPos); if (r.x() > r.right()) { @@ -2199,7 +2199,7 @@ void FormWindow::restoreConnectionLine() r = r.normalize(); while (r.contains(p)) { - unclippedPainter->drawPixmap(p, *buffer, QRect(p, QSize(w, h))); + unclippedPainter->drawPixmap(p, *buffer, TQRect(p, TQSize(w, h))); unclippedPainter->setPen(red); p.setX(p.x() + dx); p.setY(p.y() + dy); @@ -2209,13 +2209,13 @@ void FormWindow::restoreConnectionLine() connectStartPos.x() - 10, connectStartPos.y() - 10, 20, 20); } -void FormWindow::restoreRect(const QRect &rect) +void FormWindow::restoreRect(const TQRect &rect) { if (!unclippedPainter) return; - QRect r(rect); + TQRect r(rect); r = r.normalize(); - r = QRect(r.x() + 2, r.y() + 2, r.width() - 4, r.height() - 4); + r = TQRect(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, @@ -2228,32 +2228,32 @@ void FormWindow::drawConnectLine() { if (!unclippedPainter) return; - unclippedPainter->setPen(QPen(white, 2)); + unclippedPainter->setPen(TQPen(white, 2)); unclippedPainter->drawLine(connectStartPos, currentConnectPos); - unclippedPainter->setPen(QPen(darkCyan, 1)); + unclippedPainter->setPen(TQPen(darkCyan, 1)); unclippedPainter->drawLine(connectStartPos, currentConnectPos); - unclippedPainter->setPen(QPen(magenta, 1)); + unclippedPainter->setPen(TQPen(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))); + TQWidget *w = (TQWidget*)connectSender; + TQPoint p = mapToForm(w, TQPoint(0,0)); + unclippedPainter->drawRect(TQRect(p + TQPoint(2, 2), w->size() - TQSize(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))); + TQWidget *w = (TQWidget*)connectReceiver; + TQPoint p = mapToForm(w, TQPoint(0,0)); + unclippedPainter->drawRect(TQRect(p + TQPoint(2, 2), w->size() - TQSize(4, 4))); } } -QString FormWindow::fileName() const +TQString FormWindow::fileName() const { return ff->absFileName(); } -void FormWindow::setFileName(const QString &fn) +void FormWindow::setFileName(const TQString &fn) { ff->setFileName(fn); emit fileNameChanged(ff->fileName(), this); @@ -2265,21 +2265,21 @@ void FormWindow::modificationChanged(bool m) emit modificationChanged(m, ff->fileName()); } -bool FormWindow::unify(QObject *w, QString &s, bool changeIt) +bool FormWindow::unify(TQObject *w, TQString &s, bool changeIt) { bool found = !isMainContainer(w) && !qstrcmp(name(), s.latin1()); if (!found) { - QString orig = s; + TQString orig = s; int num = 1; - QPtrDictIterator it(insertedWidgets); + TQPtrDictIterator 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); + s = orig + "_" + TQString::number(++num); it.toFirst(); } else @@ -2287,14 +2287,14 @@ bool FormWindow::unify(QObject *w, QString &s, bool changeIt) if (!found) { - QPtrList al; - QAction *a = 0; + TQPtrList al; + TQAction *a = 0; for (a = actions.first(); a; a = actions.next()) { - QObjectList *l = a->queryList("QAction"); + TQObjectList *l = a->queryList("TQAction"); al.append(a); - for (QObject *ao = l->first(); ao; ao = l->next()) - al.append((QAction*)ao); + for (TQObject *ao = l->first(); ao; ao = l->next()) + al.append((TQAction*)ao); delete l; } for (a = al.first(); a; a = al.next()) @@ -2304,38 +2304,38 @@ bool FormWindow::unify(QObject *w, QString &s, bool changeIt) found = true; if (!changeIt) break; - s = orig + "_" + QString::number(++num); + s = orig + "_" + TQString::number(++num); a = actions.first(); } } } - if (mainContainer()->inherits("QMainWindow")) + if (mainContainer()->inherits("TQMainWindow")) { if (!found) { - QObjectList *l = mainContainer()->queryList("QDockWindow", 0, true); - for (QObject *o = l->first(); o; o = l->next()) + TQObjectList *l = mainContainer()->queryList("TQDockWindow", 0, true); + for (TQObject *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); + s = orig + "_" + TQString::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()) + TQObjectList *l = mainContainer()->queryList("QDesignerPopupMenu", 0, true); + for (TQObject *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); + s = orig + "_" + TQString::number(++num); o = l->first(); } delete l; @@ -2349,7 +2349,7 @@ bool FormWindow::unify(QObject *w, QString &s, bool changeIt) bool FormWindow::isCustomWidgetUsed(MetaDataBase::CustomWidget *w) { - QPtrDictIterator it(insertedWidgets); + TQPtrDictIterator it(insertedWidgets); for (; it.current(); ++it) if (it.current()->isA("CustomWidget") && !qstrcmp(WidgetFactory::classNameOf(it.current()), w->className.utf8())) @@ -2360,12 +2360,12 @@ bool FormWindow::isCustomWidgetUsed(MetaDataBase::CustomWidget *w) bool FormWindow::isDatabaseWidgetUsed() const { #ifndef QT_NO_SQL - QStringList dbClasses; - dbClasses << "QDataTable"; // add more here - QPtrDictIterator it(insertedWidgets); + TQStringList dbClasses; + dbClasses << "TQDataTable"; // add more here + TQPtrDictIterator it(insertedWidgets); for (; it.current(); ++it) { - QString c(it.current()->className()); + TQString c(it.current()->className()); if (dbClasses.contains(c) > 0) return true; } @@ -2376,8 +2376,8 @@ bool FormWindow::isDatabaseWidgetUsed() const bool FormWindow::isDatabaseAware() const { #ifndef QT_NO_SQL - if (QString(mContainer->className()) == "QDesignerDataBrowser" || - QString(mContainer->className()) == "QDesignerDataView") + if (TQString(mContainer->className()) == "QDesignerDataBrowser" || + TQString(mContainer->className()) == "QDesignerDataView") return true; return isDatabaseWidgetUsed(); #else @@ -2403,11 +2403,11 @@ void FormWindow::visibilityChanged() 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 +TQPoint FormWindow::mapToForm(const TQWidget* w, const TQPoint& pos) const { - QPoint p = pos; - const QWidget* i = w; - while (i && !i->isTopLevel() && !isMainContainer((QWidget*)i)) + TQPoint p = pos; + const TQWidget* i = w; + while (i && !i->isTopLevel() && !isMainContainer((TQWidget*)i)) { p = i->mapToParent(p); i = i->parentWidget(); @@ -2415,7 +2415,7 @@ QPoint FormWindow::mapToForm(const QWidget* w, const QPoint& pos) const return mapFromGlobal(w->mapToGlobal(pos)); } -static int widgetDepth(QWidget *w) +static int widgetDepth(TQWidget *w) { int d = -1; while (w && !w->isTopLevel()) @@ -2427,7 +2427,7 @@ static int widgetDepth(QWidget *w) return d; } -static bool isChildOf(QWidget *c, QWidget *p) +static bool isChildOf(TQWidget *c, TQWidget *p) { while (c && !c->isTopLevel()) { @@ -2438,12 +2438,12 @@ static bool isChildOf(QWidget *c, QWidget *p) return false; } -QWidget *FormWindow::containerAt(const QPoint &pos, QWidget *notParentOf) +TQWidget *FormWindow::containerAt(const TQPoint &pos, TQWidget *notParentOf) { - QPtrDictIterator it(insertedWidgets); - QWidget *container = 0; + TQPtrDictIterator it(insertedWidgets); + TQWidget *container = 0; int depth = -1; - QWidgetList selected = selectedWidgets(); + TQWidgetList selected = selectedWidgets(); if (rect().contains(mapFromGlobal(pos))) { container = mainContainer(); @@ -2453,7 +2453,7 @@ QWidget *FormWindow::containerAt(const QPoint &pos, QWidget *notParentOf) for (; it.current(); ++it) { if (it.current()->inherits("QLayoutWidget")) continue; - if (it.current()->inherits("QSplitter")) + if (it.current()->inherits("TQSplitter")) continue; if (!it.current()->isVisibleTo(this)) continue; @@ -2464,7 +2464,7 @@ QWidget *FormWindow::containerAt(const QPoint &pos, QWidget *notParentOf) continue; // the rectangles of all ancestors of the container must contain the insert position - QWidget *w = it.current(); + TQWidget *w = it.current(); while (w && !w->isTopLevel()) { if (!w->rect().contains((w->mapFromGlobal(pos)))) @@ -2474,9 +2474,9 @@ QWidget *FormWindow::containerAt(const QPoint &pos, QWidget *notParentOf) 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()-> + if (wd == depth && container && ((TQObjectList*)it.current()->parentWidget()-> children())->find(it.current()) > - ((QObjectList*)container->parentWidget()->children())->find(container)) + ((TQObjectList*)container->parentWidget()->children())->find(container)) wd++; if (wd > depth && !isChildOf(it.current(), notParentOf)) { depth = wd; @@ -2487,12 +2487,12 @@ QWidget *FormWindow::containerAt(const QPoint &pos, QWidget *notParentOf) return container; } -bool FormWindow::isMainContainer(QObject *w) const +bool FormWindow::isMainContainer(TQObject *w) const { - return w && w->isWidgetType() && (w == (QWidget*)this || w == mainContainer()); + return w && w->isWidgetType() && (w == (TQWidget*)this || w == mainContainer()); } -void FormWindow::setMainContainer(QWidget *w) +void FormWindow::setMainContainer(TQWidget *w) { bool resetPropertyWidget = isMainContainer(propertyWidget); if (mContainer) @@ -2503,14 +2503,14 @@ void FormWindow::setMainContainer(QWidget *w) mContainer = w; insertedWidgets.insert(mContainer, mContainer); delete layout(); - QHBoxLayout *l = new QHBoxLayout(this); + TQHBoxLayout *l = new TQHBoxLayout(this); l->addWidget(w); if (resetPropertyWidget) { - QObject *opw = propertyWidget; + TQObject *opw = propertyWidget; propertyWidget = mContainer; if (opw && opw->isWidgetType()) - repaintSelection((QWidget*)opw); + repaintSelection((TQWidget*)opw); } } @@ -2519,7 +2519,7 @@ bool FormWindow::savePixmapInline() const return pixInline; } -QString FormWindow::pixmapLoaderFunction() const +TQString FormWindow::pixmapLoaderFunction() const { return pixLoader; } @@ -2529,48 +2529,48 @@ void FormWindow::setSavePixmapInline(bool b) pixInline = b; } -void FormWindow::setPixmapLoaderFunction(const QString &func) +void FormWindow::setPixmapLoaderFunction(const TQString &func) { pixLoader = func; } -void FormWindow::setActiveObject(QObject *o) +void FormWindow::setActiveObject(TQObject *o) { emitShowProperties(o); propertyWidget = o; } -QAction *FormWindow::findAction(const QString &name) +TQAction *FormWindow::findAction(const TQString &name) { - for (QAction *a = actionList().first(); a; a = actionList().next()) + for (TQAction *a = actionList().first(); a; a = actionList().next()) { - if (QString(a->name()) == name) + if (TQString(a->name()) == name) return a; - QAction *ac = (QAction*)a->child(name.latin1(), "QAction"); + TQAction *ac = (TQAction*)a->child(name.latin1(), "TQAction"); if (ac) return ac; } return 0; } -void FormWindow::killAccels(QObject *top) +void FormWindow::killAccels(TQObject *top) { - QObjectList *l = top->queryList("QAccel"); + TQObjectList *l = top->queryList("TQAccel"); if (!l) return; - for (QObject *o = l->first(); o; o = l->next()) - ((QAccel*)o)->setEnabled(false); + for (TQObject *o = l->first(); o; o = l->next()) + ((TQAccel*)o)->setEnabled(false); delete l; } -bool FormWindow::isCentralWidget(QObject *w) const +bool FormWindow::isCentralWidget(TQObject *w) const { - if (!mainContainer()->inherits("QMainWindow")) + if (!mainContainer()->inherits("TQMainWindow")) return false; - return w == ((QMainWindow*)mainContainer())->centralWidget(); + return w == ((TQMainWindow*)mainContainer())->centralWidget(); } -QObject *FormWindow::connectableObject(QObject *w, QObject *) +TQObject *FormWindow::connectableObject(TQObject *w, TQObject *) { return w; } @@ -2604,6 +2604,6 @@ void FormWindow::setFormFile(FormFile *f) { ff = f; if (ff) - connect(this, SIGNAL(modificationChanged(bool, const QString&)), ff, SLOT(formWindowChangedSomehow())); + connect(this, TQT_SIGNAL(modificationChanged(bool, const TQString&)), ff, TQT_SLOT(formWindowChangedSomehow())); } #include "formwindow.moc" diff --git a/kommander/editor/formwindow.h b/kommander/editor/formwindow.h index c6d871b0..611e543d 100644 --- a/kommander/editor/formwindow.h +++ b/kommander/editor/formwindow.h @@ -26,12 +26,12 @@ #include "actiondnd.h" -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include class QPaintEvent; class QMouseEvent; @@ -58,28 +58,28 @@ class OrderIndicator; class FormWindow : public QWidget { Q_OBJECT - Q_PROPERTY( QString fileName READ fileName WRITE setFileName ) + Q_PROPERTY( TQString 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( FormFile *f, MainWindow *mw, TQWidget *parent, const char *name = 0 ); + FormWindow( FormFile *f, TQWidget *parent, const char *name = 0 ); ~FormWindow(); void init(); virtual void setMainWindow( MainWindow *w ); - virtual QString fileName() const; - virtual void setFileName( const QString &fn ); + virtual TQString fileName() const; + virtual void setFileName( const TQString &fn ); - virtual QPoint grid() const; - virtual QPoint gridPoint( const QPoint &p ); + virtual TQPoint grid() const; + virtual TQPoint gridPoint( const TQPoint &p ); virtual CommandHistory *commandHistory(); virtual void undo(); virtual void redo(); - virtual QString copy(); - virtual void paste( const QString &cb, QWidget *parent ); + virtual TQString copy(); + virtual void paste( const TQString &cb, TQWidget *parent ); virtual void lowerWidgets(); virtual void raiseWidgets(); virtual void checkAccels(); @@ -90,53 +90,53 @@ public: virtual void layoutVerticalSplit(); virtual void layoutGrid(); - virtual void layoutHorizontalContainer( QWidget *w ); - virtual void layoutVerticalContainer( QWidget *w ); - virtual void layoutGridContainer( QWidget *w ); + virtual void layoutHorizontalContainer( TQWidget *w ); + virtual void layoutVerticalContainer( TQWidget *w ); + virtual void layoutGridContainer( TQWidget *w ); - virtual void breakLayout( QWidget *w ); + virtual void breakLayout( TQWidget *w ); - virtual void selectWidget( QObject *w, bool select = TRUE ); + virtual void selectWidget( TQObject *w, bool select = TRUE ); virtual void selectAll(); - virtual void updateSelection( QWidget *w ); - virtual void raiseSelection( QWidget *w ); - virtual void repaintSelection( QWidget *w ); + virtual void updateSelection( TQWidget *w ); + virtual void raiseSelection( TQWidget *w ); + virtual void repaintSelection( TQWidget *w ); virtual void clearSelection( bool changePropertyDisplay = TRUE ); virtual void selectWidgets(); - bool isWidgetSelected( QObject *w ); - virtual void updateChildSelections( QWidget *w ); - virtual void raiseChildSelections( QWidget *w ); + bool isWidgetSelected( TQObject *w ); + virtual void updateChildSelections( TQWidget *w ); + virtual void raiseChildSelections( TQWidget *w ); - virtual void emitUpdateProperties( QObject *w ); - virtual void emitShowProperties( QObject *w = 0 ); + virtual void emitUpdateProperties( TQObject *w ); + virtual void emitShowProperties( TQObject *w = 0 ); virtual void emitSelectionChanged(); virtual void setPropertyShowingBlocked( bool b ); bool isPropertyShowingBlocked() const; - virtual QLabel *sizePreview() const; - virtual void checkPreviewGeometry( QRect &r ); + virtual TQLabel *sizePreview() const; + virtual void checkPreviewGeometry( TQRect &r ); - virtual QPtrDict *widgets(); - virtual QWidgetList selectedWidgets() const; + virtual TQPtrDict *widgets(); + virtual TQWidgetList selectedWidgets() const; - virtual QWidget *designerWidget( QObject *o ) const; + virtual TQWidget *designerWidget( TQObject *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 handleContextMenu( TQContextMenuEvent *e, TQWidget *w ); + virtual void handleMousePress( TQMouseEvent *e, TQWidget *w ); + virtual void handleMouseRelease( TQMouseEvent *e, TQWidget *w ); + virtual void handleMouseDblClick( TQMouseEvent *e, TQWidget *w ); + virtual void handleMouseMove( TQMouseEvent *e, TQWidget *w ); + virtual void handleKeyPress( TQKeyEvent *e, TQWidget *w ); + virtual void handleKeyRelease( TQKeyEvent *e, TQWidget *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 insertWidget( TQWidget *w, bool checkName = FALSE ); + virtual void removeWidget( TQWidget *w ); virtual void deleteWidgets(); virtual void editAdjustSize(); virtual void editConnections(); @@ -144,38 +144,38 @@ public: virtual int numSelectedWidgets() const; virtual int numVisibleWidgets() const; - virtual bool hasInsertedChildren( QWidget *w ) const; + virtual bool hasInsertedChildren( TQWidget *w ) const; - virtual QWidget *currentWidget() const - { return propertyWidget && propertyWidget->isWidgetType() ? (QWidget*)propertyWidget : 0; } - virtual bool unify( QObject *w, QString &s, bool changeIt ); + virtual TQWidget *currentWidget() const + { return propertyWidget && propertyWidget->isWidgetType() ? (TQWidget*)propertyWidget : 0; } + virtual bool unify( TQObject *w, TQString &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; + virtual TQPoint mapToForm( const TQWidget* w, const TQPoint& ) const; - bool isMainContainer( QObject *w ) const; - bool isCentralWidget( QObject *w ) const; - QWidget *mainContainer() const { return mContainer; } - void setMainContainer( QWidget *w ); + bool isMainContainer( TQObject *w ) const; + bool isCentralWidget( TQObject *w ) const; + TQWidget *mainContainer() const { return mContainer; } + void setMainContainer( TQWidget *w ); - void paintGrid( QWidget *w, QPaintEvent *e ); + void paintGrid( TQWidget *w, TQPaintEvent *e ); bool savePixmapInline() const; - QString pixmapLoaderFunction() const; + TQString pixmapLoaderFunction() const; void setSavePixmapInline( bool b ); - void setPixmapLoaderFunction( const QString &func ); + void setPixmapLoaderFunction( const TQString &func ); void setToolFixed() { toolFixed = TRUE; } - void setActiveObject( QObject *o ); + void setActiveObject( TQObject *o ); - QPtrList &actionList() { return actions; } - QAction *findAction( const QString &name ); + TQPtrList &actionList() { return actions; } + TQAction *findAction( const TQString &name ); - void killAccels( QObject *top ); + void killAccels( TQObject *top ); int layoutDefaultSpacing() const; int layoutDefaultMargin() const; @@ -187,27 +187,27 @@ public: void setFormFile( FormFile *f ); public slots: - virtual void widgetChanged( QObject *w ); + virtual void widgetChanged( TQObject *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 showProperties( TQObject *w ); + void updateProperties( TQObject *w ); + void undoRedoChanged( bool undoAvailable, bool redoAvailable, const TQString &undoCmd, + const TQString &redoCmd ); void selectionChanged(); void modificationChanged( bool m, FormWindow *fw ); - void modificationChanged( bool m, const QString &s ); - void fileNameChanged( const QString &s, FormWindow *fw ); + void modificationChanged( bool m, const TQString &s ); + void fileNameChanged( const TQString &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 ) + virtual void closeEvent( TQCloseEvent *e ); + virtual void focusInEvent( TQFocusEvent *e ); + virtual void focusOutEvent( TQFocusEvent *e ); + virtual void resizeEvent( TQResizeEvent *e ); + void mouseDoubleClickEvent( TQMouseEvent *e ) { handleMouseDblClick( e, mainContainer() ); } private: @@ -216,32 +216,32 @@ private: virtual void beginUnclippedPainter( bool doNot ); virtual void endUnclippedPainter(); virtual void drawConnectLine(); - virtual void drawSizePreview( const QPoint &pos, const QString& text ); + virtual void drawSizePreview( const TQPoint &pos, const TQString& 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 startRectDraw( const TQPoint &p, const TQPoint &global, TQWidget *w, RectType t ); + virtual void continueRectDraw( const TQPoint &p, const TQPoint &global, TQWidget *w, RectType t ); virtual void endRectDraw(); - virtual void checkSelectionsForMove( QWidget *w ); - virtual BreakLayoutCommand *breakLayoutCommand( QWidget *w ); + virtual void checkSelectionsForMove( TQWidget *w ); + virtual BreakLayoutCommand *breakLayoutCommand( TQWidget *w ); - virtual bool allowMove( QWidget *w ); + virtual bool allowMove( TQWidget *w ); virtual void saveBackground(); virtual void restoreConnectionLine(); - virtual void restoreRect( const QRect &rect ) ; + virtual void restoreRect( const TQRect &rect ) ; virtual void showOrderIndicators(); virtual void updateOrderIndicators(); virtual void repositionOrderIndicators(); virtual void hideOrderIndicators(); - virtual QWidget *containerAt( const QPoint &pos, QWidget *notParentOf ); + virtual TQWidget *containerAt( const TQPoint &pos, TQWidget *notParentOf ); - QObject *connectableObject( QObject *w, QObject *fallback ); + TQObject *connectableObject( TQObject *w, TQObject *fallback ); private slots: virtual void invalidCheckedSelections(); @@ -252,38 +252,38 @@ private slots: private: int currTool; bool oldRectValid, widgetPressed, drawRubber, checkedSelectionsForMove; - QRect currRect; - QPoint rectAnchor; - QPainter *unclippedPainter; - QPoint sizePreviewPos; - QPixmap sizePreviewPixmap; + TQRect currRect; + TQPoint rectAnchor; + TQPainter *unclippedPainter; + TQPoint sizePreviewPos; + TQPixmap sizePreviewPixmap; MainWindow *mainwindow; - QPtrList selections; - QPtrDict usedSelections; - QRect widgetGeom, rubber; - QPoint oldPressPos, origPressPos; + TQPtrList selections; + TQPtrDict usedSelections; + TQRect widgetGeom, rubber; + TQPoint oldPressPos, origPressPos; CommandHistory commands; - QMap moving; - QWidget *insertParent; - QObject *propertyWidget; - QLabel *sizePreviewLabel; - QTimer *checkSelectionsTimer; - QPtrDict insertedWidgets; + TQMap moving; + TQWidget *insertParent; + TQObject *propertyWidget; + TQLabel *sizePreviewLabel; + TQTimer *checkSelectionsTimer; + TQPtrDict insertedWidgets; bool propShowBlocked; - QTimer* updatePropertiesTimer, *showPropertiesTimer, *selectionChangedTimer; - QPoint connectStartPos, currentConnectPos; - QObject *connectSender, *connectReceiver; - QPixmap *buffer; - QPtrList orderIndicators; - QWidgetList orderedWidgets; - QWidgetList stackedWidgets; - QWidget *mContainer; + TQTimer* updatePropertiesTimer, *showPropertiesTimer, *selectionChangedTimer; + TQPoint connectStartPos, currentConnectPos; + TQObject *connectSender, *connectReceiver; + TQPixmap *buffer; + TQPtrList orderIndicators; + TQWidgetList orderedWidgets; + TQWidgetList stackedWidgets; + TQWidget *mContainer; bool pixInline; - QString pixLoader; + TQString pixLoader; bool toolFixed; - QPtrList actions; - QWidget* targetContainer; - QPalette restorePalette; + TQPtrList actions; + TQWidget* targetContainer; + TQPalette restorePalette; bool hadOwnPalette; int defSpacing, defMargin; FormFile *ff; diff --git a/kommander/editor/functionsimpl.cpp b/kommander/editor/functionsimpl.cpp index ad4924e5..a758ab30 100644 --- a/kommander/editor/functionsimpl.cpp +++ b/kommander/editor/functionsimpl.cpp @@ -14,11 +14,11 @@ ***************************************************************************/ /* QT INCLUDES */ -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include /* KDE INCLUDES */ #include @@ -41,7 +41,7 @@ const int MaxFunctionArgs = 6; -FunctionsDialog::FunctionsDialog(QWidget* a_parent, const QDict& a_widgetList, bool useInternalParser, char* a_name, +FunctionsDialog::FunctionsDialog(TQWidget* a_parent, const TQDict& a_widgetList, bool useInternalParser, char* a_name, bool a_modal) : FunctionsDialogBase(a_parent, a_name, a_modal), m_widgetList(a_widgetList), m_useInternalParser(useInternalParser) { @@ -49,21 +49,21 @@ FunctionsDialog::FunctionsDialog(QWidget* a_parent, const QDict& a_widg 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())); + connect(groupComboBox, TQT_SIGNAL(activated(int)), TQT_SLOT(groupChanged(int))); + connect(widgetComboBox, TQT_SIGNAL(activated(int)), TQT_SLOT(groupChanged(int))); + connect(functionListBox, TQT_SIGNAL(highlighted(int)), TQT_SLOT(functionChanged(int))); + connect(copyButton, TQT_SIGNAL(clicked()), TQT_SLOT(copyText())); + connect(clearButton, TQT_SIGNAL(clicked()), insertedText, TQT_SLOT(clear())); // build widget name list - for (QDictIterator It(m_widgetList); It.current(); ++It) + for (TQDictIterator 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); + TQString group = WidgetDatabase::group(j); if (group == "Kommander" || group == "Custom") m_widgetTypes << WidgetDatabase::className(j); } @@ -108,16 +108,16 @@ FunctionsDialog::~FunctionsDialog() { } -QString FunctionsDialog::functionText() const +TQString FunctionsDialog::functionText() const { return insertedText->text(); } -QString FunctionsDialog::currentFunctionText() +TQString FunctionsDialog::currentFunctionText() { - QString prefix, function; + TQString prefix, function; int index = groupComboBox->currentItem(); - QString s = (index != m_DCOP ) ? groupComboBox->text(index) : "DCOP"; + TQString s = (index != m_DCOP ) ? groupComboBox->text(index) : "DCOP"; if (m_useInternalParser) { function = SpecialInformation::parserGroupName(s); @@ -130,12 +130,12 @@ QString FunctionsDialog::currentFunctionText() function = s + "."; } if (groupComboBox->currentText() == "Kommander") - return QString("%1%2%3").arg(prefix).arg(functionListBox->currentText()).arg(params()); + return TQString("%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)) + return TQString("%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) + return TQString("%1%2%3%4").arg(prefix).arg(function) .arg(functionListBox->currentText()).arg(params()); } @@ -147,14 +147,14 @@ void FunctionsDialog::groupChanged(int index) if (index == m_Slots) { KommanderWidget* a_atw = dynamic_cast(m_widgetList[widgetComboBox->currentText()]); - QStringList pFunctions = QStringList::fromStrList(a_atw->object()->metaObject()->slotNames(true)); + TQStringList pFunctions = TQStringList::fromStrList(a_atw->object()->metaObject()->slotNames(true)); for (uint i=0; itext(index) : "DCOP"; - QStringList pFunctions = SpecialInformation::functions(s); + TQString s = (index != m_DCOP ) ? groupComboBox->text(index) : "DCOP"; + TQStringList pFunctions = SpecialInformation::functions(s); KommanderWidget* a_atw = 0; if (index == m_DCOP) a_atw = dynamic_cast(m_widgetList[widgetComboBox->currentText()]); @@ -194,10 +194,10 @@ void FunctionsDialog::functionChanged(int) if (groupComboBox->currentItem() == m_Slots) { KommanderWidget* w = dynamic_cast(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 %1.").arg(o->metaObject()->superClassName() ? QString(o->metaObject()->superClassName()) : QString(o->className()) ); - QString slotName = functionListBox->currentText(); - QString slot = m_slotList[slotName]; + TQObject *o = w->object(); + TQString slotHelp = i18n("To learn more about the slot, look at the documentation of the base Qt/KDE class, most probably %1.").arg(o->metaObject()->superClassName() ? TQString(o->metaObject()->superClassName()) : TQString(o->className()) ); + TQString slotName = functionListBox->currentText(); + TQString slot = m_slotList[slotName]; descriptionText->clear(); descriptionText->setText(i18n("

%1

" "

Description: %2\n

Syntax: %3%4") @@ -205,10 +205,10 @@ void FunctionsDialog::functionChanged(int) } else { int index = groupComboBox->currentItem(); - QString s = (index != m_DCOP ) ? groupComboBox->text(index) : "DCOP"; + TQString s = (index != m_DCOP ) ? groupComboBox->text(index) : "DCOP"; m_function = SpecialInformation::functionObject(s, functionListBox->currentText()); - QString defArgs; + TQString defArgs; if (m_function.minArg() < m_function.argumentCount()) if (!m_function.minArg()) defArgs = i18n("

Parameters are not obligatory."); @@ -233,7 +233,7 @@ void FunctionsDialog::functionChanged(int) void FunctionsDialog::copyText() { - QString text = currentFunctionText(); + TQString text = currentFunctionText(); int para, i; insertedText->getCursorPosition(¶, &i); // int cursorPos = insertedText->cursorPosition(); @@ -244,25 +244,25 @@ void FunctionsDialog::copyText() void FunctionsDialog::showParameters() { KLineEdit* edits[MaxFunctionArgs] = {arg1Edit, arg2Edit, arg3Edit, arg4Edit, arg5Edit, arg6Edit}; - QLabel* labels[MaxFunctionArgs] = {argLabel1, argLabel2, argLabel3, argLabel4, argLabel5, argLabel6}; + TQLabel* 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}; + TQCheckBox* 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); + TQString slot = m_slotList[functionListBox->currentText()]; + TQStringList slotArgs = TQStringList::split(',', slot.section(TQRegExp("\\(|\\)"), 1), false); int argsCount = slotArgs.count(); for (int i = 0; i < MaxFunctionArgs; i++) { labels[i]->setShown(i < argsCount); - QString type; + TQString type; if (i < argsCount) { - type = slotArgs[i].remove(QRegExp("\\*|\\&|const\\s")); - labels[i]->setText(QString("%1:").arg(type)); + type = slotArgs[i].remove(TQRegExp("\\*|\\&|const\\s")); + labels[i]->setText(TQString("%1:").arg(type)); } quotes[i]->setChecked(true); quotes[i]->setShown(false); @@ -279,7 +279,7 @@ void FunctionsDialog::showParameters() combos[i]->setShown(false); edits[i]->setShown(i < argsCount); edits[i]->clear(); - if (type == "QString") + if (type == "TQString") { quotes[i]->setShown(i < argsCount); } @@ -303,7 +303,7 @@ void FunctionsDialog::showParameters() { labels[i]->setShown(i < argsCount); if (i < argsCount) - labels[i]->setText(QString("%1:").arg(m_function.argumentName(i))); + labels[i]->setText(TQString("%1:").arg(m_function.argumentName(i))); quotes[i]->setChecked(true); quotes[i]->setShown(false); if (m_function.argumentType(i) == "bool") @@ -336,7 +336,7 @@ void FunctionsDialog::showParameters() combos[i]->setShown(false); edits[i]->setShown(i < argsCount); edits[i]->clear(); - if (m_function.argumentType(i) == "QString") + if (m_function.argumentType(i) == "TQString") { quotes[i]->setShown(i < argsCount); } @@ -346,24 +346,24 @@ void FunctionsDialog::showParameters() } } -QString FunctionsDialog::params() +TQString FunctionsDialog::params() { - QLabel* labels[MaxFunctionArgs] = {argLabel1, argLabel2, argLabel3, argLabel4, argLabel5, argLabel6}; + TQLabel* 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}; + TQStringList pars; + TQCheckBox* quotes[MaxFunctionArgs] = {quote1, quote2, quote3, quote4, quote5, quote6}; bool params = false; bool slotsShown = (groupComboBox->currentItem() == m_Slots); for (int i=0; iisShown()) { - QString s = edits[i]->text(); + TQString 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")) ) ) + if (quotes[i]->isChecked() && ( (!slotsShown && m_function.argumentType(i) == "TQString") + || (slotsShown && labels[i]->text().startsWith("TQString")) ) ) s = '"' + s + '"'; pars.append(s); } @@ -371,7 +371,7 @@ QString FunctionsDialog::params() } else if (combos[i]->isShown()) { - QString s = combos[i]->currentText(); + TQString s = combos[i]->currentText(); if (!s.isEmpty() || i < m_function.minArg()) { if (s != "true" && s !="false") @@ -381,9 +381,9 @@ QString FunctionsDialog::params() params = true; } } - QString a_param = pars.join(", "); + TQString a_param = pars.join(", "); if (params) - return QString("(%1)").arg(a_param); + return TQString("(%1)").arg(a_param); else return a_param; } diff --git a/kommander/editor/functionsimpl.h b/kommander/editor/functionsimpl.h index fab8661d..05df768f 100644 --- a/kommander/editor/functionsimpl.h +++ b/kommander/editor/functionsimpl.h @@ -15,10 +15,10 @@ #ifndef _HAVE_FUNCTIONSIMPL_H_ #define _HAVE_FUNCTIONSIMPL_H_ -#include -#include -#include -#include +#include +#include +#include +#include #include "functions.h" #include "specialinformation.h" @@ -27,12 +27,12 @@ class FunctionsDialog : public FunctionsDialogBase { Q_OBJECT public: - FunctionsDialog(QWidget*, const QDict&, bool m_useInternalParser, char* = 0, bool = true); + FunctionsDialog(TQWidget*, const TQDict&, bool m_useInternalParser, char* = 0, bool = true); ~FunctionsDialog(); // Return current content of text box - QString functionText() const; + TQString functionText() const; // Return current function and parameters - QString currentFunctionText(); + TQString currentFunctionText(); public slots: // Update list of function availabe for given group void groupChanged(int); @@ -44,16 +44,16 @@ public slots: void showParameters(); private: // Calculate current parameters - QString params(); + TQString params(); SpecialFunction m_function; int m_DCOP; int m_Slots; - const QDict m_widgetList; - QStringList m_widgetNames; - QStringList m_widgetTypes; + const TQDict m_widgetList; + TQStringList m_widgetNames; + TQStringList m_widgetTypes; bool m_useInternalParser; - QStringList m_acceptedSlots; - QMap m_slotList; + TQStringList m_acceptedSlots; + TQMap m_slotList; }; diff --git a/kommander/editor/globaldefs.h b/kommander/editor/globaldefs.h index cc6ed400..aebf63c3 100644 --- a/kommander/editor/globaldefs.h +++ b/kommander/editor/globaldefs.h @@ -21,23 +21,23 @@ #ifndef GLOBALDEFS_H #define GLOBALDEFS_H -#include +#include #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 TQColor *backColor1 = 0; +static TQColor *backColor2 = 0; +static TQColor *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 ); + backColor1 = new TQColor( 236, 245, 255 ); + backColor2 = new TQColor( 250, 250, 250 ); + selectedBack = new TQColor( 221, 221, 221 ); } #endif diff --git a/kommander/editor/hierarchyview.cpp b/kommander/editor/hierarchyview.cpp index b3f17713..c11a365c 100644 --- a/kommander/editor/hierarchyview.cpp +++ b/kommander/editor/hierarchyview.cpp @@ -29,19 +29,19 @@ #include "propertyeditor.h" #include "listeditor.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include @@ -72,27 +72,27 @@ static const char * const folder_xpm[]={ ".dddddddddddddd.", "................"}; -QListViewItem *newItem = 0; +TQListViewItem *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, TQListViewItem *parent, + const TQString &txt1, const TQString &txt2, const TQString &txt3 ) + : TQListViewItem( 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 ) +HierarchyItem::HierarchyItem( Type type, TQListView *parent, + const TQString &txt1, const TQString &txt2, const TQString &txt3 ) + : TQListViewItem( parent, txt1, txt2, txt3 ), typ( type ) { } -void HierarchyItem::paintCell( QPainter *p, const QColorGroup &cg, int column, int width, int align ) +void HierarchyItem::paintCell( TQPainter *p, const TQColorGroup &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 ); + TQColorGroup g( cg ); + g.setColor( TQColorGroup::Base, backgroundColor() ); + g.setColor( TQColorGroup::Foreground, Qt::black ); + g.setColor( TQColorGroup::Text, Qt::black ); + TQString txt = text( 0 ); if ( rtti() == Slot && ( txt == "init()" || txt == "destroy()" ) ) { listView()->setUpdatesEnabled( false ); @@ -100,14 +100,14 @@ void HierarchyItem::paintCell( QPainter *p, const QColorGroup &cg, int column, i setText( 0, txt + " " + i18n( "(Constructor)" ) ); else setText( 0, txt + " " + i18n( "(Destructor)" ) ); - QListViewItem::paintCell( p, g, column, width, align ); + TQListViewItem::paintCell( p, g, column, width, align ); setText( 0, txt ); listView()->setUpdatesEnabled( true ); } else { - QListViewItem::paintCell( p, g, column, width, align ); + TQListViewItem::paintCell( p, g, column, width, align ); } p->save(); - p->setPen( QPen( cg.dark(), 1 ) ); + p->setPen( TQPen( cg.dark(), 1 ) ); if ( column == 0 ) p->drawLine( 0, 0, 0, height() - 1 ); if ( listView()->firstChild() != this ) { @@ -121,7 +121,7 @@ void HierarchyItem::paintCell( QPainter *p, const QColorGroup &cg, int column, i p->restore(); } -QColor HierarchyItem::backgroundColor() +TQColor HierarchyItem::backgroundColor() { updateBackColor(); return backColor; @@ -134,7 +134,7 @@ void HierarchyItem::updateBackColor() return; } - QListViewItemIterator it( this ); + TQListViewItemIterator it( this ); --it; if ( it.current() ) { if ( ( ( HierarchyItem*)it.current() )->backColor == *backColor1 ) @@ -146,12 +146,12 @@ void HierarchyItem::updateBackColor() } } -void HierarchyItem::setWidget( QWidget *w ) +void HierarchyItem::setWidget( TQWidget *w ) { wid = w; } -QWidget *HierarchyItem::widget() const +TQWidget *HierarchyItem::widget() const { return wid; } @@ -160,25 +160,25 @@ void HierarchyItem::okRename( int col ) { if ( newItem == this ) newItem = 0; - QListViewItem::okRename( col ); + TQListViewItem::okRename( col ); } void HierarchyItem::cancelRename( int col ) { if ( newItem == this ) { newItem = 0; - QListViewItem::cancelRename( col ); + TQListViewItem::cancelRename( col ); delete this; return; } - QListViewItem::cancelRename( col ); + TQListViewItem::cancelRename( col ); } -HierarchyList::HierarchyList( QWidget *parent, FormWindow *fw, bool doConnects ) - : QListView( parent ), formWindow( fw ) +HierarchyList::HierarchyList( TQWidget *parent, FormWindow *fw, bool doConnects ) + : TQListView( parent ), formWindow( fw ) { init_colors(); @@ -189,62 +189,62 @@ HierarchyList::HierarchyList( QWidget *parent, FormWindow *fw, bool doConnects ) tabWidgetMenu = 0; addColumn( i18n("Name" ) ); addColumn( i18n("Class" ) ); - QPalette p( palette() ); - p.setColor( QColorGroup::Base, QColor( *backColor2 ) ); + TQPalette p( palette() ); + p.setColor( TQColorGroup::Base, TQColor( *backColor2 ) ); (void)*selectedBack; // hack setPalette( p ); - disconnect( header(), SIGNAL( sectionClicked( int ) ), - this, SLOT( changeSortColumn( int ) ) ); + disconnect( header(), TQT_SIGNAL( sectionClicked( int ) ), + this, TQT_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 & ) ) ); + connect( this, TQT_SIGNAL( clicked( TQListViewItem * ) ), + this, TQT_SLOT( objectClicked( TQListViewItem * ) ) ); + connect( this, TQT_SIGNAL( returnPressed( TQListViewItem * ) ), + this, TQT_SLOT( objectClicked( TQListViewItem * ) ) ); + connect( this, TQT_SIGNAL( contextMenuRequested( TQListViewItem *, const TQPoint&, int ) ), + this, TQT_SLOT( showRMBMenu( TQListViewItem *, const TQPoint & ) ) ); } deselect = true; setColumnWidthMode( 1, Manual ); } -void HierarchyList::keyPressEvent( QKeyEvent *e ) +void HierarchyList::keyPressEvent( TQKeyEvent *e ) { if ( e->key() == Key_Shift || e->key() == Key_Control ) deselect = false; else deselect = true; - QListView::keyPressEvent( e ); + TQListView::keyPressEvent( e ); } -void HierarchyList::keyReleaseEvent( QKeyEvent *e ) +void HierarchyList::keyReleaseEvent( TQKeyEvent *e ) { deselect = true; - QListView::keyReleaseEvent( e ); + TQListView::keyReleaseEvent( e ); } -void HierarchyList::viewportMousePressEvent( QMouseEvent *e ) +void HierarchyList::viewportMousePressEvent( TQMouseEvent *e ) { if ( e->state() & ShiftButton || e->state() & ControlButton ) deselect = false; else deselect = true; - QListView::viewportMousePressEvent( e ); + TQListView::viewportMousePressEvent( e ); } -void HierarchyList::viewportMouseReleaseEvent( QMouseEvent *e ) +void HierarchyList::viewportMouseReleaseEvent( TQMouseEvent *e ) { - QListView::viewportMouseReleaseEvent( e ); + TQListView::viewportMouseReleaseEvent( e ); } -void HierarchyList::objectClicked( QListViewItem *i ) +void HierarchyList::objectClicked( TQListViewItem *i ) { if ( !i ) return; - QWidget *w = findWidget( i ); + TQWidget *w = findWidget( i ); if ( !w ) return; if ( formWindow == w ) { @@ -255,15 +255,15 @@ void HierarchyList::objectClicked( QListViewItem *i ) } if ( !formWindow->widgets()->find( w ) ) { - if ( w->parent() && w->parent()->inherits( "QWidgetStack" ) && + if ( w->parent() && w->parent()->inherits( "TQWidgetStack" ) && 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 ); + ( w->parent()->parent()->inherits( "TQTabWidget" ) || + w->parent()->parent()->inherits( "TQWizard" ) ) ) { + if ( w->parent()->parent()->inherits( "TQTabWidget" ) ) + ( (TQTabWidget*)w->parent()->parent() )->showPage( w ); else ( (QDesignerWizard*)w->parent()->parent() )->setCurrentPage( ( (QDesignerWizard*)w->parent()->parent() )->pageNum( w ) ); - w = (QWidget*)w->parent()->parent(); + w = (TQWidget*)w->parent()->parent(); formWindow->emitUpdateProperties( formWindow->currentWidget() ); } else { return; @@ -276,14 +276,14 @@ void HierarchyList::objectClicked( QListViewItem *i ) formWindow->selectWidget( w, true ); } -QWidget *HierarchyList::findWidget( QListViewItem *i ) +TQWidget *HierarchyList::findWidget( TQListViewItem *i ) { return ( (HierarchyItem*)i )->widget(); } -QListViewItem *HierarchyList::findItem( QWidget *w ) +TQListViewItem *HierarchyList::findItem( TQWidget *w ) { - QListViewItemIterator it( this ); + TQListViewItemIterator it( this ); while ( it.current() ) { if ( ( (HierarchyItem*)it.current() )->widget() == w ) return it.current(); @@ -292,28 +292,28 @@ QListViewItem *HierarchyList::findItem( QWidget *w ) return 0; } -QWidget *HierarchyList::current() const +TQWidget *HierarchyList::current() const { if ( currentItem() ) return ( (HierarchyItem*)currentItem() )->widget(); return 0; } -void HierarchyList::changeNameOf( QWidget *w, const QString &name ) +void HierarchyList::changeNameOf( TQWidget *w, const TQString &name ) { - QListViewItem *item = findItem( w ); + TQListViewItem *item = findItem( w ); if ( !item ) return; item->setText( 0, name ); } -void HierarchyList::changeDatabaseOf( QWidget *w, const QString & info ) +void HierarchyList::changeDatabaseOf( TQWidget *w, const TQString & info ) { #ifndef QT_NO_SQL if ( !formWindow->isDatabaseAware() ) return; - QListViewItem *item = findItem( w ); + TQListViewItem *item = findItem( w ); if ( !item ) return; item->setText( 2, info ); @@ -328,7 +328,7 @@ void HierarchyList::setup() if ( !formWindow ) return; clear(); - QWidget *w = formWindow->mainContainer(); + TQWidget *w = formWindow->mainContainer(); #ifndef QT_NO_SQL if ( formWindow->isDatabaseAware() ) { if ( columns() == 2 ) { @@ -348,25 +348,25 @@ void HierarchyList::setup() insertObject( w, 0 ); } -void HierarchyList::setOpen( QListViewItem *i, bool b ) +void HierarchyList::setOpen( TQListViewItem *i, bool b ) { - QListView::setOpen( i, b ); + TQListView::setOpen( i, b ); } -void HierarchyList::insertObject( QObject *o, QListViewItem *parent ) +void HierarchyList::insertObject( TQObject *o, TQListViewItem *parent ) { bool fakeMainWindow = false; - if ( o && o->inherits( "QMainWindow" ) ) { - QObject *cw = ( (QMainWindow*)o )->centralWidget(); + if ( o && o->inherits( "TQMainWindow" ) ) { + TQObject *cw = ( (TQMainWindow*)o )->centralWidget(); if ( cw ) { o = cw; fakeMainWindow = true; } } - QListViewItem *item = 0; - QString className = WidgetFactory::classNameOf( o ); + TQListViewItem *item = 0; + TQString className = WidgetFactory::classNameOf( o ); if ( o->inherits( "QLayoutWidget" ) ) { - switch ( WidgetFactory::layoutType( (QWidget*)o ) ) { + switch ( WidgetFactory::layoutType( (TQWidget*)o ) ) { case WidgetFactory::HBox: className = "HBox"; break; @@ -381,29 +381,29 @@ void HierarchyList::insertObject( QObject *o, QListViewItem *parent ) } } - QString dbInfo; + TQString dbInfo; #ifndef QT_NO_SQL dbInfo = MetaDataBase::fakeProperty( o, "database" ).toStringList().join("."); #endif - QString name = o->name(); - if ( o->parent() && o->parent()->inherits( "QWidgetStack" ) && + TQString name = o->name(); + if ( o->parent() && o->parent()->inherits( "TQWidgetStack" ) && 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 ); + if ( o->parent()->parent()->inherits( "TQTabWidget" ) ) + name = ( (TQTabWidget*)o->parent()->parent() )->tabLabel( (TQWidget*)o ); + else if ( o->parent()->parent()->inherits( "TQWizard" ) ) + name = ( (TQWizard*)o->parent()->parent() )->title( (TQWidget*)o ); } - QToolBox *tb; + TQToolBox *tb; if ( o->parent() && o->parent()->parent() && - (tb = ::qt_cast(o->parent()->parent()->parent())) ) - name = tb->itemLabel( tb->indexOf((QWidget*)o) ); + (tb = ::qt_cast(o->parent()->parent()->parent())) ) + name = tb->itemLabel( tb->indexOf((TQWidget*)o) ); if ( fakeMainWindow ) { name = o->parent()->name(); - className = "QMainWindow"; + className = "TQMainWindow"; } if ( !parent ) @@ -416,43 +416,43 @@ void HierarchyList::insertObject( QObject *o, QListViewItem *parent ) 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 ); + pixmap( TQIconSet::Small, TQIconSet::Normal ) ); + ( (HierarchyItem*)item )->setWidget( (TQWidget*)o ); - const QObjectList *l = o->children(); + const TQObjectList *l = o->children(); if ( !l ) return; - QObjectListIt it( *l ); + TQObjectListIt it( *l ); it.toLast(); for ( ; it.current(); --it ) { - if ( !it.current()->isWidgetType() || ( (QWidget*)it.current() )->isHidden() ) + if ( !it.current()->isWidgetType() || ( (TQWidget*)it.current() )->isHidden() ) continue; - if ( !formWindow->widgets()->find( (QWidget*)it.current() ) ) { + if ( !formWindow->widgets()->find( (TQWidget*)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 ); + ( it.current()->parent()->inherits( "TQTabWidget" ) || + it.current()->parent()->inherits( "TQWizard" ) ) && + it.current()->inherits( "TQWidgetStack" ) ) { + TQObject *obj = it.current(); + TQObjectList *l2 = obj->queryList( "TQWidget", 0, true, false ); QDesignerTabWidget *tw = 0; QDesignerWizard *dw = 0; - if ( it.current()->parent()->inherits( "QTabWidget" ) ) + if ( it.current()->parent()->inherits( "TQTabWidget" ) ) tw = (QDesignerTabWidget*)it.current()->parent(); - if ( it.current()->parent()->inherits( "QWizard" ) ) + if ( it.current()->parent()->inherits( "TQWizard" ) ) dw = (QDesignerWizard*)it.current()->parent(); - QWidgetStack *stack = (QWidgetStack*)obj; + TQWidgetStack *stack = (TQWidgetStack*)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 ) ) ) + ( tw && !tw->tabBar()->tab( stack->id( (TQWidget*)obj ) ) ) || + ( dw && dw->isPageRemoved( (TQWidget*)obj ) ) ) continue; insertObject( obj, item ); } delete l2; - } else if ( ::qt_cast(it.current()->parent()) ) { - if ( !::qt_cast(it.current()) ) + } else if ( ::qt_cast(it.current()->parent()) ) { + if ( !::qt_cast(it.current()) ) continue; - QToolBox *tb = (QToolBox*)it.current()->parent(); + TQToolBox *tb = (TQToolBox*)it.current()->parent(); for ( int i = tb->count() - 1; i >= 0; --i ) insertObject( tb->item( i ), item ); } @@ -465,9 +465,9 @@ void HierarchyList::insertObject( QObject *o, QListViewItem *parent ) item->setOpen( true ); } -void HierarchyList::setCurrent( QWidget *w ) +void HierarchyList::setCurrent( TQWidget *w ) { - QListViewItemIterator it( this ); + TQListViewItemIterator it( this ); while ( it.current() ) { if ( ( (HierarchyItem*)it.current() )->widget() == w ) { blockSignals( true ); @@ -480,13 +480,13 @@ void HierarchyList::setCurrent( QWidget *w ) } } -void HierarchyList::showRMBMenu( QListViewItem *i, const QPoint & p ) +void HierarchyList::showRMBMenu( TQListViewItem *i, const TQPoint & p ) { if ( !i ) return; - QWidget *w = findWidget( i ); + TQWidget *w = findWidget( i ); if ( !w ) return; @@ -495,15 +495,15 @@ void HierarchyList::showRMBMenu( QListViewItem *i, const QPoint & p ) return; if ( w->isVisibleTo( formWindow ) ) { - if ( !w->inherits( "QTabWidget" ) && !w->inherits( "QWizard" ) ) { + if ( !w->inherits( "TQTabWidget" ) && !w->inherits( "TQWizard" ) ) { if ( !normalMenu ) normalMenu = formWindow->mainWindow()->setupNormalHierarchyMenu( this ); normalMenu->popup( p ); } else { if ( !tabWidgetMenu ) tabWidgetMenu = - formWindow->mainWindow()->setupTabWidgetHierarchyMenu( this, SLOT( addTabPage() ), - SLOT( removeTabPage() ) ); + formWindow->mainWindow()->setupTabWidgetHierarchyMenu( this, TQT_SLOT( addTabPage() ), + TQT_SLOT( removeTabPage() ) ); tabWidgetMenu->popup( p ); } } @@ -511,17 +511,17 @@ void HierarchyList::showRMBMenu( QListViewItem *i, const QPoint & p ) void HierarchyList::addTabPage() { - QWidget *w = current(); + TQWidget *w = current(); if ( !w ) return; - if ( w->inherits( "QTabWidget" ) ) { - QTabWidget *tw = (QTabWidget*)w; + if ( w->inherits( "TQTabWidget" ) ) { + TQTabWidget *tw = (TQTabWidget*)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(); + } else if ( w->inherits( "TQWizard" ) ) { + TQWizard *wiz = (TQWizard*)formWindow->mainContainer(); AddWizardPageCommand *cmd = new AddWizardPageCommand( i18n("Add Page to %1" ).arg( wiz->name() ), formWindow, wiz, "Page" ); formWindow->commandHistory()->addCommand( cmd ); @@ -531,11 +531,11 @@ void HierarchyList::addTabPage() void HierarchyList::removeTabPage() { - QWidget *w = current(); + TQWidget *w = current(); if ( !w ) return; - if ( w->inherits( "QTabWidget" ) ) { - QTabWidget *tw = (QTabWidget*)w; + if ( w->inherits( "TQTabWidget" ) ) { + TQTabWidget *tw = (TQTabWidget*)w; if ( tw->currentPage() ) { QDesignerTabWidget *dtw = (QDesignerTabWidget*)tw; DeleteTabPageCommand *cmd = new DeleteTabPageCommand( i18n("Delete Page %1 of %2" ). @@ -544,8 +544,8 @@ void HierarchyList::removeTabPage() formWindow->commandHistory()->addCommand( cmd ); cmd->execute(); } - } else if ( w->inherits( "QWizard" ) ) { - QWizard *wiz = (QWizard*)formWindow->mainContainer(); + } else if ( w->inherits( "TQWizard" ) ) { + TQWizard *wiz = (TQWizard*)formWindow->mainContainer(); if ( wiz->currentPage() ) { QDesignerWizard *dw = (QDesignerWizard*)wiz; DeleteWizardPageCommand *cmd = new DeleteWizardPageCommand( i18n("Delete Page %1 of %2" ). @@ -584,10 +584,10 @@ static HierarchyItem::Type getChildType( int type ) return (HierarchyItem::Type)type; } -void HierarchyList::insertEntry( QListViewItem *i, const QPixmap &pix, const QString &s ) +void HierarchyList::insertEntry( TQListViewItem *i, const TQPixmap &pix, const TQString &s ) { HierarchyItem *item = new HierarchyItem( getChildType( i->rtti() ), i, s, - QString::null, QString::null ); + TQString::null, TQString::null ); if ( !pix.isNull() ) item->setPixmap( 0, pix ); item->setRenameEnabled( 0, true ); @@ -598,8 +598,8 @@ void HierarchyList::insertEntry( QListViewItem *i, const QPixmap &pix, const QSt item->startRename( 0 ); } -HierarchyView::HierarchyView( QWidget *parent ) - : QTabWidget( parent, 0, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | +HierarchyView::HierarchyView( TQWidget *parent ) + : TQTabWidget( parent, 0, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_Tool |WStyle_MinMax | WStyle_SysMenu ) { formwindow = 0; @@ -617,7 +617,7 @@ void HierarchyView::clear() listview->clear(); } -void HierarchyView::setFormWindow( FormWindow *fw, QWidget *w ) +void HierarchyView::setFormWindow( FormWindow *fw, TQWidget *w ) { if (fw == 0 || w == 0) { @@ -648,45 +648,45 @@ FormWindow *HierarchyView::formWindow() const return formwindow; } -void HierarchyView::closeEvent( QCloseEvent *e ) +void HierarchyView::closeEvent( TQCloseEvent *e ) { emit hidden(); e->accept(); } -void HierarchyView::widgetInserted( QWidget * ) +void HierarchyView::widgetInserted( TQWidget * ) { listview->setup(); } -void HierarchyView::widgetRemoved( QWidget * ) +void HierarchyView::widgetRemoved( TQWidget * ) { listview->setup(); } -void HierarchyView::widgetsInserted( const QWidgetList & ) +void HierarchyView::widgetsInserted( const TQWidgetList & ) { listview->setup(); } -void HierarchyView::widgetsRemoved( const QWidgetList & ) +void HierarchyView::widgetsRemoved( const TQWidgetList & ) { listview->setup(); } -void HierarchyView::namePropertyChanged( QWidget *w, const QVariant & ) +void HierarchyView::namePropertyChanged( TQWidget *w, const TQVariant & ) { - QWidget *w2 = w; - if ( w->inherits( "QMainWindow" ) ) - w2 = ( (QMainWindow*)w )->centralWidget(); + TQWidget *w2 = w; + if ( w->inherits( "TQMainWindow" ) ) + w2 = ( (TQMainWindow*)w )->centralWidget(); listview->changeNameOf( w2, w->name() ); } -void HierarchyView::databasePropertyChanged( QWidget *w, const QStringList& info ) +void HierarchyView::databasePropertyChanged( TQWidget *w, const TQStringList& info ) { #ifndef QT_NO_SQL - QString i = info.join( "." ); + TQString i = info.join( "." ); listview->changeDatabaseOf( w, i ); #else Q_UNUSED(w); @@ -695,17 +695,17 @@ void HierarchyView::databasePropertyChanged( QWidget *w, const QStringList& info } -void HierarchyView::tabsChanged( QTabWidget * ) +void HierarchyView::tabsChanged( TQTabWidget * ) { listview->setup(); } -void HierarchyView::tabsChanged( QToolBox * ) +void HierarchyView::tabsChanged( TQToolBox * ) { listview->setup(); } -void HierarchyView::pagesChanged( QWizard * ) +void HierarchyView::pagesChanged( TQWizard * ) { listview->setup(); } diff --git a/kommander/editor/hierarchyview.h b/kommander/editor/hierarchyview.h index 54889ec2..debdf6a6 100644 --- a/kommander/editor/hierarchyview.h +++ b/kommander/editor/hierarchyview.h @@ -21,10 +21,10 @@ #ifndef HIRARCHYVIEW_H #define HIRARCHYVIEW_H -#include -#include -#include -#include +#include +#include +#include +#include #include class FormWindow; @@ -52,18 +52,18 @@ public: 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); + HierarchyItem(Type type, TQListViewItem * parent, + const TQString & txt1, const TQString & txt2, const TQString & txt3); + HierarchyItem(Type type, TQListView * parent, + const TQString & txt1, const TQString & txt2, const TQString & txt3); - void paintCell(QPainter * p, const QColorGroup & cg, int column, int width, int align); + void paintCell(TQPainter * p, const TQColorGroup & cg, int column, int width, int align); void updateBackColor(); - void setWidget(QWidget * w); - QWidget *widget() const; + void setWidget(TQWidget * w); + TQWidget *widget() const; - void setText(int col, const QString & txt) {if (!txt.isEmpty()) QListViewItem::setText(col, txt);} + void setText(int col, const TQString & txt) {if (!txt.isEmpty()) TQListViewItem::setText(col, txt);} int rtti() const { return (int) typ;} private: @@ -71,9 +71,9 @@ private: void cancelRename(int col); private: - QColor backgroundColor(); - QColor backColor; - QWidget *wid; + TQColor backgroundColor(); + TQColor backColor; + TQWidget *wid; Type typ; }; @@ -81,42 +81,42 @@ class HierarchyList:public QListView { Q_OBJECT public: - HierarchyList(QWidget * parent, FormWindow * fw, bool doConnects = TRUE); + HierarchyList(TQWidget * 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); + virtual void setCurrent(TQWidget * w); + void setOpen(TQListViewItem * i, bool b); + void changeNameOf(TQWidget * w, const TQString & name); + void changeDatabaseOf(TQWidget * w, const TQString & info); void setFormWindow(FormWindow * fw) {formWindow = fw;} - void drawContentsOffset(QPainter * p, int ox, int oy, int cx, int cy, int cw, int ch) + void drawContentsOffset(TQPainter * 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); + TQListView::drawContentsOffset(p, ox, oy, cx, cy, cw, ch); } + void insertEntry(TQListViewItem * i, const TQPixmap & pix = TQPixmap(), const TQString & s = + TQString::null); protected: - void keyPressEvent(QKeyEvent * e); - void keyReleaseEvent(QKeyEvent * e); - void viewportMousePressEvent(QMouseEvent * e); - void viewportMouseReleaseEvent(QMouseEvent * e); + void keyPressEvent(TQKeyEvent * e); + void keyReleaseEvent(TQKeyEvent * e); + void viewportMousePressEvent(TQMouseEvent * e); + void viewportMouseReleaseEvent(TQMouseEvent * 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; + void insertObject(TQObject * o, TQListViewItem * parent); + TQWidget *findWidget(TQListViewItem * i); + TQListViewItem *findItem(TQWidget * w); + TQWidget *current() const; - private slots: virtual void objectClicked(QListViewItem * i); - virtual void showRMBMenu(QListViewItem *, const QPoint &); + private slots: virtual void objectClicked(TQListViewItem * i); + virtual void showRMBMenu(TQListViewItem *, const TQPoint &); protected: FormWindow * formWindow; - QPopupMenu *normalMenu, *tabWidgetMenu; + TQPopupMenu *normalMenu, *tabWidgetMenu; bool deselect; }; @@ -125,28 +125,28 @@ class HierarchyView : public QTabWidget Q_OBJECT public: - HierarchyView( QWidget *parent ); + HierarchyView( TQWidget *parent ); ~HierarchyView(); - void setFormWindow( FormWindow *fw, QWidget *w ); + void setFormWindow( FormWindow *fw, TQWidget *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 widgetInserted( TQWidget *w ); + void widgetRemoved( TQWidget *w ); + void widgetsInserted( const TQWidgetList &l ); + void widgetsRemoved( const TQWidgetList &l ); + void namePropertyChanged( TQWidget *w, const TQVariant &old ); + void databasePropertyChanged( TQWidget *w, const TQStringList& info ); + void tabsChanged( TQTabWidget *w ); + void tabsChanged( TQToolBox *w ); + void pagesChanged( TQWizard *w ); void rebuild(); void closed( FormWindow *fw ); protected slots: protected: - void closeEvent( QCloseEvent *e ); + void closeEvent( TQCloseEvent *e ); signals: void hidden(); diff --git a/kommander/editor/iconvieweditorimpl.cpp b/kommander/editor/iconvieweditorimpl.cpp index f7552cee..9bff67ae 100644 --- a/kommander/editor/iconvieweditorimpl.cpp +++ b/kommander/editor/iconvieweditorimpl.cpp @@ -23,19 +23,19 @@ #include "mainwindow.h" #include "pixmapchooser.h" -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include -IconViewEditor::IconViewEditor( QWidget *parent, QWidget *editWidget, FormWindow *fw ) +IconViewEditor::IconViewEditor( TQWidget *parent, TQWidget *editWidget, FormWindow *fw ) : IconViewEditorBase( parent, 0, true ), formwindow( fw ) { - connect( buttonHelp, SIGNAL( clicked() ), MainWindow::self, SLOT( showDialogHelp() ) ); - iconview = (QIconView*)editWidget; + connect( buttonHelp, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) ); + iconview = (TQIconView*)editWidget; itemText->setText( "" ); itemText->setEnabled( false ); @@ -43,9 +43,9 @@ IconViewEditor::IconViewEditor( QWidget *parent, QWidget *editWidget, FormWindow itemChoosePixmap->setEnabled( false ); itemDeletePixmap->setEnabled( false ); - QIconViewItem *i = 0; + TQIconViewItem *i = 0; for ( i = iconview->firstItem(); i; i = i->nextItem() ) { - (void)new QIconViewItem( preview, i->text(), *i->pixmap() ); + (void)new TQIconViewItem( preview, i->text(), *i->pixmap() ); } if ( preview->firstItem() ) @@ -54,7 +54,7 @@ IconViewEditor::IconViewEditor( QWidget *parent, QWidget *editWidget, FormWindow void IconViewEditor::insertNewItem() { - QIconViewItem *i = new QIconViewItem( preview, i18n("New Item" ) ); + TQIconViewItem *i = new TQIconViewItem( preview, i18n("New Item" ) ); preview->setCurrentItem( i ); preview->setSelected( i, true ); } @@ -66,7 +66,7 @@ void IconViewEditor::deleteCurrentItem() preview->setSelected( preview->currentItem(), true ); } -void IconViewEditor::currentItemChanged( QIconViewItem *i ) +void IconViewEditor::currentItemChanged( TQIconViewItem *i ) { itemText->blockSignals( true ); itemText->setText( "" ); @@ -90,7 +90,7 @@ void IconViewEditor::currentItemChanged( QIconViewItem *i ) itemText->blockSignals( false ); } -void IconViewEditor::currentTextChanged( const QString &txt ) +void IconViewEditor::currentTextChanged( const TQString &txt ) { if ( !preview->currentItem() ) return; @@ -111,8 +111,8 @@ void IconViewEditor::cancelClicked() void IconViewEditor::applyClicked() { - QIconViewItem *i = 0; - QValueList items; + TQIconViewItem *i = 0; + TQValueList items; for ( i = preview->firstItem(); i; i = i->nextItem() ) { PopulateIconViewCommand::Item item; if ( i->pixmap() ) @@ -132,11 +132,11 @@ void IconViewEditor::choosePixmap() if ( !preview->currentItem() ) return; - QPixmap pix; + TQPixmap pix; if ( preview->currentItem()->pixmap() ) pix = qChoosePixmap( this, formwindow, *preview->currentItem()->pixmap() ); else - pix = qChoosePixmap( this, formwindow, QPixmap() ); + pix = qChoosePixmap( this, formwindow, TQPixmap() ); if ( pix.isNull() ) return; @@ -151,7 +151,7 @@ void IconViewEditor::deletePixmap() if ( !preview->currentItem() ) return; - preview->currentItem()->setPixmap( QPixmap() ); + preview->currentItem()->setPixmap( TQPixmap() ); itemPixmap->setText( "" ); itemDeletePixmap->setEnabled( false ); } diff --git a/kommander/editor/iconvieweditorimpl.h b/kommander/editor/iconvieweditorimpl.h index 120f0bb6..ffde0403 100644 --- a/kommander/editor/iconvieweditorimpl.h +++ b/kommander/editor/iconvieweditorimpl.h @@ -30,13 +30,13 @@ class IconViewEditor : public IconViewEditorBase Q_OBJECT public: - IconViewEditor( QWidget *parent, QWidget *editWidget, FormWindow *fw ); + IconViewEditor( TQWidget *parent, TQWidget *editWidget, FormWindow *fw ); protected slots: void insertNewItem(); void deleteCurrentItem(); - void currentItemChanged( QIconViewItem * ); - void currentTextChanged( const QString & ); + void currentItemChanged( TQIconViewItem * ); + void currentTextChanged( const TQString & ); void okClicked(); void cancelClicked(); void applyClicked(); @@ -44,7 +44,7 @@ protected slots: void deletePixmap(); private: - QIconView *iconview; + TQIconView *iconview; FormWindow *formwindow; }; diff --git a/kommander/editor/layout.cpp b/kommander/editor/layout.cpp index da4669f1..b0e226c0 100644 --- a/kommander/editor/layout.cpp +++ b/kommander/editor/layout.cpp @@ -23,14 +23,14 @@ #include "widgetdatabase.h" #include "widgetfactory.h" -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include -bool operator<( const QGuardedPtr &p1, const QGuardedPtr &p2 ) +bool operator<( const TQGuardedPtr &p1, const TQGuardedPtr &p2 ) { return p1.operator->() < p2.operator->(); } @@ -53,7 +53,7 @@ bool operator<( const QGuardedPtr &p1, const QGuardedPtr &p2 ) widget is found later by Layout.) */ -Layout::Layout( const QWidgetList &wl, QWidget *p, FormWindow *fw, QWidget *lb, bool doSetup, bool splitter ) +Layout::Layout( const TQWidgetList &wl, TQWidget *p, FormWindow *fw, TQWidget *lb, bool doSetup, bool splitter ) : widgets( wl ), parent( p ), formWindow( fw ), isBreak( !doSetup ), useSplitter( splitter ) { widgets.setAutoDelete( false ); @@ -70,11 +70,11 @@ Layout::Layout( const QWidgetList &wl, QWidget *p, FormWindow *fw, QWidget *lb, void Layout::setup() { - startPoint = QPoint( 32767, 32767 ); - QValueList lists; - QWidget *lastParent = 0; - QWidgetList *lastList = 0; - QWidget *w = 0; + startPoint = TQPoint( 32767, 32767 ); + TQValueList lists; + TQWidget *lastParent = 0; + TQWidgetList *lastList = 0; + TQWidget *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 @@ -88,13 +88,13 @@ void Layout::setup() if ( lastParent != w->parentWidget() ) { lastList = 0; lastParent = w->parentWidget(); - QValueList::Iterator it = lists.begin(); + TQValueList::Iterator it = lists.begin(); for ( ; it != lists.end(); ++it ) { if ( ( *it ).first()->parentWidget() == w->parentWidget() ) lastList = &( *it ); } if ( !lastList ) { - QWidgetList l; + TQWidgetList l; l.setAutoDelete( false ); lists.append( l ); lastList = &lists.last(); @@ -105,7 +105,7 @@ void Layout::setup() // So, now find the list with the most entries lastList = 0; - QValueList::Iterator it = lists.begin(); + TQValueList::Iterator it = lists.begin(); for ( ; it != lists.end(); ++it ) { if ( !lastList || ( *it ).count() > lastList->count() ) lastList = &( *it ); @@ -120,7 +120,7 @@ void Layout::setup() layoutBase != formWindow->mainContainer() ) ) ) ) { widgets.clear(); - startPoint = QPoint( 0, 0 ); + startPoint = TQPoint( 0, 0 ); return; } @@ -134,11 +134,11 @@ void Layout::setup() // 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() ), + connect( w, TQT_SIGNAL( destroyed() ), + this, TQT_SLOT( widgetDestroyed() ) ); + startPoint = TQPoint( QMIN( startPoint.x(), w->x() ), QMIN( startPoint.y(), w->y() ) ); - geometries.insert( w, QRect( w->pos(), w->size() ) ); + geometries.insert( w, TQRect( 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 @@ -149,23 +149,23 @@ void Layout::setup() void Layout::widgetDestroyed() { if ( sender() && sender()->isWidgetType() ) - widgets.removeRef( (QWidget*)sender() ); + widgets.removeRef( (TQWidget*)sender() ); } bool Layout::prepareLayout( bool &needMove, bool &needReparent ) { if ( !widgets.count() ) return false; - for ( QWidget *w = widgets.first(); w; w = widgets.next() ) + for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) w->raise(); needMove = !layoutBase; - needReparent = needMove || layoutBase->inherits( "QLayoutWidget" ) || layoutBase->inherits( "QSplitter" ); + needReparent = needMove || layoutBase->inherits( "QLayoutWidget" ) || layoutBase->inherits( "TQSplitter" ); if ( !layoutBase ) { if ( !useSplitter ) layoutBase = WidgetFactory::create( WidgetDatabase::idFromClassName( "QLayoutWidget" ), WidgetFactory::containerOfWidget( parent ) ); else - layoutBase = WidgetFactory::create( WidgetDatabase::idFromClassName( "QSplitter" ), + layoutBase = WidgetFactory::create( WidgetDatabase::idFromClassName( "TQSplitter" ), WidgetFactory::containerOfWidget( parent ) ); } else { WidgetFactory::deleteLayout( layoutBase ); @@ -174,11 +174,11 @@ bool Layout::prepareLayout( bool &needMove, bool &needReparent ) return true; } -void Layout::finishLayout( bool needMove, QLayout *layout ) +void Layout::finishLayout( bool needMove, TQLayout *layout ) { if ( needMove ) layoutBase->move( startPoint ); - QRect g( QRect( layoutBase->pos(), layoutBase->size() ) ); + TQRect g( TQRect( layoutBase->pos(), layoutBase->size() ) ); if ( WidgetFactory::layoutType( layoutBase->parentWidget() ) == WidgetFactory::NoLayout && !isBreak ) layoutBase->adjustSize(); else if ( isBreak ) @@ -188,9 +188,9 @@ void Layout::finishLayout( bool needMove, QLayout *layout ) layout->activate(); formWindow->insertWidget( layoutBase ); formWindow->selectWidget( layoutBase ); - QString n = layoutBase->name(); + TQString n = layoutBase->name(); if ( n.find( "qt_dead_widget_" ) != -1 ) { - n.remove( 0, QString( "qt_dead_widget_" ).length() ); + n.remove( 0, TQString( "qt_dead_widget_" ).length() ); layoutBase->setName( n ); } } @@ -199,7 +199,7 @@ void Layout::undoLayout() { if ( !widgets.count() ) return; - QMap, QRect>::Iterator it = geometries.begin(); + TQMap, TQRect>::Iterator it = geometries.begin(); for ( ; it != geometries.end(); ++it ) { if ( !it.key() ) continue; @@ -208,9 +208,9 @@ void Layout::undoLayout() } formWindow->selectWidget( layoutBase, false ); WidgetFactory::deleteLayout( layoutBase ); - if ( parent != layoutBase && !layoutBase->inherits( "QMainWindow" ) ) { + if ( parent != layoutBase && !layoutBase->inherits( "TQMainWindow" ) ) { layoutBase->hide(); - QString n = layoutBase->name(); + TQString n = layoutBase->name(); n.prepend( "qt_dead_widget_" ); layoutBase->setName( n ); } else { @@ -224,35 +224,35 @@ void Layout::undoLayout() void Layout::breakLayout() { - QMap rects; + TQMap rects; if ( !widgets.isEmpty() ) { - QWidget *w; + TQWidget *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 || + qstrcmp( layoutBase->className(), "TQSplitter" ) == 0 || ( !WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( layoutBase ) ) ) && layoutBase != formWindow->mainContainer() ); - bool needResize = qstrcmp( layoutBase->className(), "QSplitter" ) == 0; + bool needResize = qstrcmp( layoutBase->className(), "TQSplitter" ) == 0; bool add = geometries.isEmpty(); - for ( QWidget *w = widgets.first(); w; w = widgets.next() ) { + for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) { if ( needReparent ) w->reparent( layoutBase->parentWidget(), 0, layoutBase->pos() + w->pos(), true ); if ( needResize ) { - QMap::Iterator it = rects.find( w ); + TQMap::Iterator it = rects.find( w ); if ( it != rects.end() ) - w->setGeometry( QRect( layoutBase->pos() + (*it).topLeft(), (*it).size() ) ); + w->setGeometry( TQRect( layoutBase->pos() + (*it).topLeft(), (*it).size() ) ); } if ( add ) - geometries.insert( w, QRect( w->pos(), w->size() ) ); + geometries.insert( w, TQRect( w->pos(), w->size() ) ); } if ( needReparent ) { layoutBase->hide(); parent = layoutBase->parentWidget(); - QString n = layoutBase->name(); + TQString n = layoutBase->name(); n.prepend( "qt_dead_widget_" ); layoutBase->setName( n ); } else { @@ -267,12 +267,12 @@ void Layout::breakLayout() class HorizontalLayoutList : public QWidgetList { public: - HorizontalLayoutList( const QWidgetList &l ) - : QWidgetList( l ) {} + HorizontalLayoutList( const TQWidgetList &l ) + : TQWidgetList( l ) {} - int compareItems( QPtrCollection::Item item1, QPtrCollection::Item item2 ) { - QWidget *w1 = (QWidget*)item1; - QWidget *w2 = (QWidget*)item2; + int compareItems( TQPtrCollection::Item item1, TQPtrCollection::Item item2 ) { + TQWidget *w1 = (TQWidget*)item1; + TQWidget *w2 = (TQWidget*)item2; if ( w1->x() == w2->x() ) return 0; if ( w1->x() > w2->x() ) @@ -282,7 +282,7 @@ public: }; -HorizontalLayout::HorizontalLayout( const QWidgetList &wl, QWidget *p, FormWindow *fw, QWidget *lb, bool doSetup, bool splitter ) +HorizontalLayout::HorizontalLayout( const TQWidgetList &wl, TQWidget *p, FormWindow *fw, TQWidget *lb, bool doSetup, bool splitter ) : Layout( wl, p, fw, lb, doSetup, splitter ) { if ( doSetup ) @@ -303,11 +303,11 @@ void HorizontalLayout::doLayout() if ( !prepareLayout( needMove, needReparent ) ) return; - QHBoxLayout *layout = (QHBoxLayout*)WidgetFactory::createLayout( layoutBase, 0, WidgetFactory::HBox ); + TQHBoxLayout *layout = (TQHBoxLayout*)WidgetFactory::createLayout( layoutBase, 0, WidgetFactory::HBox ); - for ( QWidget *w = widgets.first(); w; w = widgets.next() ) { + for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) { if ( needReparent && w->parent() != layoutBase ) - w->reparent( layoutBase, 0, QPoint( 0, 0 ), false ); + w->reparent( layoutBase, 0, TQPoint( 0, 0 ), false ); if ( !useSplitter ) { if ( qstrcmp( w->className(), "Spacer" ) == 0 ) layout->addWidget( w, 0, ( (Spacer*)w )->alignment() ); @@ -319,8 +319,8 @@ void HorizontalLayout::doLayout() w->show(); } - if ( layoutBase->inherits( "QSplitter" ) ) - ( (QSplitter*)layoutBase )->setOrientation( Qt::Horizontal ); + if ( layoutBase->inherits( "TQSplitter" ) ) + ( (TQSplitter*)layoutBase )->setOrientation( Qt::Horizontal ); finishLayout( needMove, layout ); } @@ -331,12 +331,12 @@ void HorizontalLayout::doLayout() class VerticalLayoutList : public QWidgetList { public: - VerticalLayoutList( const QWidgetList &l ) - : QWidgetList( l ) {} + VerticalLayoutList( const TQWidgetList &l ) + : TQWidgetList( l ) {} - int compareItems( QPtrCollection::Item item1, QPtrCollection::Item item2 ) { - QWidget *w1 = (QWidget*)item1; - QWidget *w2 = (QWidget*)item2; + int compareItems( TQPtrCollection::Item item1, TQPtrCollection::Item item2 ) { + TQWidget *w1 = (TQWidget*)item1; + TQWidget *w2 = (TQWidget*)item2; if ( w1->y() == w2->y() ) return 0; if ( w1->y() > w2->y() ) @@ -346,7 +346,7 @@ public: }; -VerticalLayout::VerticalLayout( const QWidgetList &wl, QWidget *p, FormWindow *fw, QWidget *lb, bool doSetup, bool splitter ) +VerticalLayout::VerticalLayout( const TQWidgetList &wl, TQWidget *p, FormWindow *fw, TQWidget *lb, bool doSetup, bool splitter ) : Layout( wl, p, fw, lb, doSetup, splitter ) { if ( doSetup ) @@ -367,11 +367,11 @@ void VerticalLayout::doLayout() if ( !prepareLayout( needMove, needReparent ) ) return; - QVBoxLayout *layout = (QVBoxLayout*)WidgetFactory::createLayout( layoutBase, 0, WidgetFactory::VBox ); + TQVBoxLayout *layout = (TQVBoxLayout*)WidgetFactory::createLayout( layoutBase, 0, WidgetFactory::VBox ); - for ( QWidget *w = widgets.first(); w; w = widgets.next() ) { + for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) { if ( needReparent && w->parent() != layoutBase ) - w->reparent( layoutBase, 0, QPoint( 0, 0 ), false ); + w->reparent( layoutBase, 0, TQPoint( 0, 0 ), false ); if ( !useSplitter ) { if ( qstrcmp( w->className(), "Spacer" ) == 0 ) layout->addWidget( w, 0, ( (Spacer*)w )->alignment() ); @@ -383,8 +383,8 @@ void VerticalLayout::doLayout() w->show(); } - if ( layoutBase->inherits( "QSplitter" ) ) - ( (QSplitter*)layoutBase )->setOrientation( Qt::Vertical ); + if ( layoutBase->inherits( "TQSplitter" ) ) + ( (TQSplitter*)layoutBase )->setOrientation( Qt::Vertical ); finishLayout( needMove, layout ); } @@ -399,20 +399,20 @@ 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; } + TQWidget* cell( int row, int col ) const { return cells[ row * ncols + col]; } + void setCell( int row, int col, TQWidget* 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 ); + bool locateWidget( TQWidget* 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 ); + void setRow( int r, int c, TQWidget* w, int count ); + void setCol( int r, int c, TQWidget* w, int count ); bool isWidgetStartCol( int c ) const; bool isWidgetEndCol( int c ) const; bool isWidgetStartRow( int r ) const; @@ -422,7 +422,7 @@ private: void extendRight(); void extendUp(); void extendDown(); - QWidget** cells; + TQWidget** cells; bool* cols; bool* rows; int nrows, ncols; @@ -432,7 +432,7 @@ private: Grid::Grid( int r, int c ) : nrows( r ), ncols( c ) { - cells = new QWidget*[ r * c ]; + cells = new TQWidget*[ r * c ]; memset( cells, 0, sizeof( cells ) * r * c ); rows = new bool[ r ]; cols = new bool[ c ]; @@ -448,7 +448,7 @@ Grid::~Grid() int Grid::countRow( int r, int c ) const { - QWidget* w = cell( r, c ); + TQWidget* w = cell( r, c ); int i = c + 1; while ( i < ncols && cell( r, i ) == w ) i++; @@ -457,20 +457,20 @@ int Grid::countRow( int r, int c ) const int Grid::countCol( int r, int c ) const { - QWidget* w = cell( r, c ); + TQWidget* 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 ) +void Grid::setCol( int r, int c, TQWidget* 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 ) +void Grid::setRow( int r, int c, TQWidget* w, int count ) { for (int i = 0; i < count; i++ ) setCell( r, c + i, w ); @@ -520,7 +520,7 @@ bool Grid::isWidgetEndRow( int r ) const bool Grid::isWidgetTopLeft( int r, int c ) const { - QWidget* w = cell( r, c ); + TQWidget* w = cell( r, c ); if ( !w ) return false; return ( !r || cell( r-1, c) != w ) && (!c || cell( r, c-1) != w); @@ -531,7 +531,7 @@ void Grid::extendLeft() int r,c,i; for ( c = 1; c < ncols; c++ ) { for ( r = 0; r < nrows; r++ ) { - QWidget* w = cell( r, c ); + TQWidget* w = cell( r, c ); if ( !w ) continue; int cc = countCol( r, c); @@ -562,7 +562,7 @@ 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 ); + TQWidget* w = cell( r, c ); if ( !w ) continue; int cc = countCol( r, c); @@ -593,7 +593,7 @@ void Grid::extendUp() int r,c,i; for ( r = 1; r < nrows; r++ ) { for ( c = 0; c < ncols; c++ ) { - QWidget* w = cell( r, c ); + TQWidget* w = cell( r, c ); if ( !w ) continue; int cr = countRow( r, c); @@ -623,7 +623,7 @@ 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 ); + TQWidget* w = cell( r, c ); if ( !w ) continue; int cr = countRow( r, c); @@ -678,7 +678,7 @@ void Grid::merge() } } -bool Grid::locateWidget( QWidget* w, int& row, int& col, int& rowspan, int & colspan ) +bool Grid::locateWidget( TQWidget* w, int& row, int& col, int& rowspan, int & colspan ) { int r,c, r2, c2; for ( c = 0; c < ncols; c++ ) { @@ -714,7 +714,7 @@ bool Grid::locateWidget( QWidget* w, int& row, int& col, int& rowspan, int & col -GridLayout::GridLayout( const QWidgetList &wl, QWidget *p, FormWindow *fw, QWidget *lb, const QSize &res, bool doSetup ) +GridLayout::GridLayout( const TQWidgetList &wl, TQWidget *p, FormWindow *fw, TQWidget *lb, const TQSize &res, bool doSetup ) : Layout( wl, p, fw, lb, doSetup ), resolution( res ) { grid = 0; @@ -738,12 +738,12 @@ void GridLayout::doLayout() if ( !grid ) buildGrid(); - QWidget* w; + TQWidget* 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 ); + w->reparent( layoutBase, 0, TQPoint( 0, 0 ), false ); if ( rs * cs == 1 ) { layout->addWidget( w, r, c, w->inherits( "Spacer" ) ? ( (Spacer*)w )->alignment() : 0 ); } else { @@ -767,8 +767,8 @@ void GridLayout::setup() void GridLayout::buildGrid() { - QWidget* w; - QRect br; + TQWidget* w; + TQRect br; for ( w = widgets.first(); w; w = widgets.next() ) br = br.unite( w->geometry() ); @@ -779,12 +779,12 @@ void GridLayout::buildGrid() int r,c; for ( r = 0; r < grid->numRows(); r++ ) { for ( c = 0; c < grid->numCols(); c++ ) { - QPoint p( br.left() + c * resolution.width(), + TQPoint p( br.left() + c * resolution.width(), br.top() + r* resolution.height() ); - QRect cr( p, resolution ); + TQRect cr( p, resolution ); for ( w = widgets.first(); w; w = widgets.next() ) { // check that the overlap is significant - QRect intersect = cr.intersect( w->geometry() ); + TQRect intersect = cr.intersect( w->geometry() ); if ( intersect.size().width() > resolution.width()/2 && intersect.size().height() > resolution.height()/2 ) { grid->setCell( r, c, w ); @@ -801,17 +801,17 @@ void GridLayout::buildGrid() -Spacer::Spacer( QWidget *parent, const char *name ) - : QWidget( parent, name, WMouseNoMask ), - orient( Vertical ), interactive(true), sh( QSize(20,20) ) +Spacer::Spacer( TQWidget *parent, const char *name ) + : TQWidget( parent, name, WMouseNoMask ), + orient( Vertical ), interactive(true), sh( TQSize(20,20) ) { setSizeType( Expanding ); setAutoMask( true ); } -void Spacer::paintEvent( QPaintEvent * ) +void Spacer::paintEvent( TQPaintEvent * ) { - QPainter p( this ); + TQPainter p( this ); p.setPen( Qt::blue ); if ( orient == Horizontal ) { @@ -843,37 +843,37 @@ void Spacer::paintEvent( QPaintEvent * ) } } -void Spacer::resizeEvent( QResizeEvent* e) +void Spacer::resizeEvent( TQResizeEvent* e) { - QWidget::resizeEvent( e ); + TQWidget::resizeEvent( e ); if ( !parentWidget() || WidgetFactory::layoutType( parentWidget() ) == WidgetFactory::NoLayout ) sh = size(); } void Spacer::updateMask() { - QRegion r( rect() ); + TQRegion 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 ) ); + r = r.subtract( TQRect(1, 0, width() - 2, base - amplitude ) ); + r = r.subtract( TQRect(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 ) ); + r = r.subtract( TQRect(0, 1, base - amplitude, height() - 2 ) ); + r = r.subtract( TQRect( base + amplitude, 1, width() - base - amplitude, height() - 2 ) ); } setMask( r ); } void Spacer::setSizeType( SizeType t ) { - QSizePolicy sizeP; + TQSizePolicy sizeP; if ( orient == Vertical ) - sizeP = QSizePolicy( QSizePolicy::Minimum, (QSizePolicy::SizeType)t ); + sizeP = TQSizePolicy( TQSizePolicy::Minimum, (TQSizePolicy::SizeType)t ); else - sizeP = QSizePolicy( (QSizePolicy::SizeType)t, QSizePolicy::Minimum ); + sizeP = TQSizePolicy( (TQSizePolicy::SizeType)t, TQSizePolicy::Minimum ); setSizePolicy( sizeP ); } @@ -892,14 +892,14 @@ int Spacer::alignment() const return AlignVCenter; } -QSize Spacer::minimumSize() const +TQSize Spacer::minimumSize() const { - return QSize( 20, 20 ); + return TQSize( 20, 20 ); } -QSize Spacer::sizeHint() const +TQSize Spacer::sizeHint() const { - QSize s = sh.expandedTo( QSize(0,0) ); + TQSize s = sh.expandedTo( TQSize(0,0) ); if ( sizeType() == Expanding ) if ( orient == Horizontal ) s.rheight() = 0; @@ -909,7 +909,7 @@ QSize Spacer::sizeHint() const } -void Spacer::setSizeHint( const QSize &s ) +void Spacer::setSizeHint( const TQSize &s ) { sh = s; if ( !parentWidget() || WidgetFactory::layoutType( parentWidget() ) == WidgetFactory::NoLayout ) @@ -931,7 +931,7 @@ void Spacer::setOrientation( Qt::Orientation o ) orient = o; setSizeType( st ); if ( interactive ) { - sh = QSize( sh.height(), sh.width() ); + sh = TQSize( sh.height(), sh.width() ); if (!parentWidget() || WidgetFactory::layoutType( parentWidget() ) == WidgetFactory::NoLayout ) resize( height(), width() ); } @@ -941,16 +941,16 @@ void Spacer::setOrientation( Qt::Orientation o ) } -void QDesignerGridLayout::addWidget( QWidget *w, int row, int col, int align_ ) +void QDesignerGridLayout::addWidget( TQWidget *w, int row, int col, int align_ ) { items.insert( w, Item(row, col, 1, 1) ); - QGridLayout::addWidget( w, row, col, align_ ); + TQGridLayout::addWidget( w, row, col, align_ ); } -void QDesignerGridLayout::addMultiCellWidget( QWidget *w, int fromRow, int toRow, +void QDesignerGridLayout::addMultiCellWidget( TQWidget *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_ ); + TQGridLayout::addMultiCellWidget( w, fromRow, toRow, fromCol, toCol, align_ ); } #include "layout.moc" diff --git a/kommander/editor/layout.h b/kommander/editor/layout.h index 06dce7ac..e9874ca6 100644 --- a/kommander/editor/layout.h +++ b/kommander/editor/layout.h @@ -21,12 +21,12 @@ #ifndef LAYOUT_H #define LAYOUT_H -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include class FormWindow; class QPaintEvent; @@ -36,23 +36,23 @@ class Layout : public QObject Q_OBJECT public: - Layout( const QWidgetList &wl, QWidget *p, FormWindow *fw, QWidget *lb, bool doSetup = TRUE, bool splitter = FALSE ); + Layout( const TQWidgetList &wl, TQWidget *p, FormWindow *fw, TQWidget *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 ); + virtual void finishLayout( bool needMove, TQLayout *layout ); protected: - QWidgetList widgets; - QWidget *parent; - QPoint startPoint; - QMap, QRect> geometries; - QWidget *layoutBase; + TQWidgetList widgets; + TQWidget *parent; + TQPoint startPoint; + TQMap, TQRect> geometries; + TQWidget *layoutBase; FormWindow *formWindow; - QRect oldGeometry; + TQRect oldGeometry; bool isBreak; bool useSplitter; @@ -67,7 +67,7 @@ protected slots: class HorizontalLayout : public Layout { public: - HorizontalLayout( const QWidgetList &wl, QWidget *p, FormWindow *fw, QWidget *lb, bool doSetup = TRUE, bool splitter = FALSE ); + HorizontalLayout( const TQWidgetList &wl, TQWidget *p, FormWindow *fw, TQWidget *lb, bool doSetup = TRUE, bool splitter = FALSE ); void doLayout(); @@ -79,7 +79,7 @@ protected: class VerticalLayout : public Layout { public: - VerticalLayout( const QWidgetList &wl, QWidget *p, FormWindow *fw, QWidget *lb, bool doSetup = TRUE, bool splitter = FALSE ); + VerticalLayout( const TQWidgetList &wl, TQWidget *p, FormWindow *fw, TQWidget *lb, bool doSetup = TRUE, bool splitter = FALSE ); void doLayout(); @@ -93,7 +93,7 @@ class Grid; class GridLayout : public Layout { public: - GridLayout( const QWidgetList &wl, QWidget *p, FormWindow *fw, QWidget *lb, const QSize &res, bool doSetup = TRUE ); + GridLayout( const TQWidgetList &wl, TQWidget *p, FormWindow *fw, TQWidget *lb, const TQSize &res, bool doSetup = TRUE ); ~GridLayout(); void doLayout(); @@ -103,7 +103,7 @@ protected: protected: void buildGrid(); - QSize resolution; + TQSize resolution; Grid* grid; }; @@ -112,12 +112,12 @@ class Spacer : public QWidget { Q_OBJECT - Q_OVERRIDE( QCString name ) + Q_OVERRIDE( TQCString 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 ) + Q_PROPERTY( TQSize sizeHint READ sizeHint WRITE setSizeHint DESIGNABLE true STORED true ) + Q_OVERRIDE( TQRect geometry DESIGNABLE false ) private: enum { HSize = 6, HMask = 0x3f, VMask = HMask << HSize, @@ -131,36 +131,36 @@ public: MinimumExpanding = Minimum|ExpMask, Expanding = MinimumExpanding|MayShrink }; - Spacer( QWidget *parent, const char *name ); + Spacer( TQWidget *parent, const char *name ); - QSize minimumSize() const; - QSize sizeHint() const; + TQSize minimumSize() const; + TQSize 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 ); + void setSizeHint( const TQSize &s ); protected: - void paintEvent( QPaintEvent *e ); - void resizeEvent( QResizeEvent* e ); + void paintEvent( TQPaintEvent *e ); + void resizeEvent( TQResizeEvent* e ); void updateMask(); Qt::Orientation orient; bool interactive; - QSize sh; + TQSize sh; }; class QDesignerGridLayout : public QGridLayout { Q_OBJECT public: - QDesignerGridLayout( QWidget *parent ) : QGridLayout( parent ){}; - QDesignerGridLayout( QLayout *parentLayout ) : QGridLayout( parentLayout ){}; + QDesignerGridLayout( TQWidget *parent ) : TQGridLayout( parent ){}; + QDesignerGridLayout( TQLayout *parentLayout ) : TQGridLayout( parentLayout ){}; - void addWidget( QWidget *, int row, int col, int align = 0 ); - void addMultiCellWidget( QWidget *, int fromRow, int toRow, + void addWidget( TQWidget *, int row, int col, int align = 0 ); + void addMultiCellWidget( TQWidget *, int fromRow, int toRow, int fromCol, int toCol, int align = 0 ); struct Item @@ -173,7 +173,7 @@ public: int colspan; }; - QMap items; + TQMap items; }; diff --git a/kommander/editor/listboxeditorimpl.cpp b/kommander/editor/listboxeditorimpl.cpp index 5a2aac9d..1f820081 100644 --- a/kommander/editor/listboxeditorimpl.cpp +++ b/kommander/editor/listboxeditorimpl.cpp @@ -24,19 +24,19 @@ #include "pixmapchooser.h" #include "command.h" -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include -ListBoxEditor::ListBoxEditor( QWidget *parent, QWidget *editWidget, FormWindow *fw ) +ListBoxEditor::ListBoxEditor( TQWidget *parent, TQWidget *editWidget, FormWindow *fw ) : ListBoxEditorBase( parent, 0, true ), formwindow( fw ) { - connect( helpButton, SIGNAL( clicked() ), MainWindow::self, SLOT( showDialogHelp() ) ); - listbox = (QListBox*)editWidget; + connect( helpButton, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) ); + listbox = (TQListBox*)editWidget; itemText->setText( "" ); itemText->setEnabled( false ); @@ -44,12 +44,12 @@ ListBoxEditor::ListBoxEditor( QWidget *parent, QWidget *editWidget, FormWindow * itemChoosePixmap->setEnabled( false ); itemDeletePixmap->setEnabled( false ); - QListBoxItem *i = 0; + TQListBoxItem *i = 0; for ( i = listbox->firstItem(); i; i = i->next() ) { if ( i->pixmap() ) - (void)new QListBoxPixmap( preview, *i->pixmap(), i->text() ); + (void)new TQListBoxPixmap( preview, *i->pixmap(), i->text() ); else - (void)new QListBoxText( preview, i->text() ); + (void)new TQListBoxText( preview, i->text() ); } if ( preview->firstItem() ) @@ -58,7 +58,7 @@ ListBoxEditor::ListBoxEditor( QWidget *parent, QWidget *editWidget, FormWindow * void ListBoxEditor::insertNewItem() { - QListBoxItem *i = new QListBoxText( preview, i18n("New Item") ); + TQListBoxItem *i = new TQListBoxText( preview, i18n("New Item") ); preview->setCurrentItem( i ); preview->setSelected( i, true ); } @@ -70,7 +70,7 @@ void ListBoxEditor::deleteCurrentItem() preview->setSelected( preview->currentItem(), true ); } -void ListBoxEditor::currentItemChanged( QListBoxItem *i ) +void ListBoxEditor::currentItemChanged( TQListBoxItem *i ) { itemText->blockSignals( true ); itemText->setText( "" ); @@ -95,7 +95,7 @@ void ListBoxEditor::currentItemChanged( QListBoxItem *i ) itemText->blockSignals( false ); } -void ListBoxEditor::currentTextChanged( const QString &txt ) +void ListBoxEditor::currentTextChanged( const TQString &txt ) { if ( preview->currentItem() == -1 ) return; @@ -121,8 +121,8 @@ void ListBoxEditor::cancelClicked() void ListBoxEditor::applyClicked() { - QListBoxItem *i = 0; - QValueList items; + TQListBoxItem *i = 0; + TQValueList items; for ( i = preview->firstItem(); i; i = i->next() ) { PopulateListBoxCommand::Item item; if ( i->pixmap() ) @@ -142,16 +142,16 @@ void ListBoxEditor::choosePixmap() if ( preview->currentItem() == -1 ) return; - QPixmap pix; + TQPixmap pix; if ( preview->item( preview->currentItem() )->pixmap() ) pix = qChoosePixmap( this, formwindow, *preview->item( preview->currentItem() )->pixmap() ); else - pix = qChoosePixmap( this, formwindow, QPixmap() ); + pix = qChoosePixmap( this, formwindow, TQPixmap() ); if ( pix.isNull() ) return; - QString txt = preview->item( preview->currentItem() )->text(); + TQString txt = preview->item( preview->currentItem() )->text(); preview->changeItem( pix, txt, preview->currentItem() ); itemDeletePixmap->setEnabled( true ); } @@ -161,14 +161,14 @@ void ListBoxEditor::moveItemUp() if ( preview->currentItem() < 1 ) return; - QListBoxItem *i = preview->item( preview->currentItem() ); + TQListBoxItem *i = preview->item( preview->currentItem() ); bool hasPix = (i->pixmap() != 0); - QPixmap pix; + TQPixmap pix; if ( hasPix ) pix = *i->pixmap(); - QString txt = i->text(); + TQString txt = i->text(); - QListBoxItem *p = i->prev(); + TQListBoxItem *p = i->prev(); if ( p->pixmap() ) preview->changeItem( *p->pixmap(), p->text(), preview->currentItem() ); else @@ -185,14 +185,14 @@ void ListBoxEditor::moveItemDown() if ( preview->currentItem() == -1 || preview->currentItem() > (int)preview->count() - 2 ) return; - QListBoxItem *i = preview->item( preview->currentItem() ); + TQListBoxItem *i = preview->item( preview->currentItem() ); bool hasPix = (i->pixmap() != 0); - QPixmap pix; + TQPixmap pix; if ( hasPix ) pix = *i->pixmap(); - QString txt = i->text(); + TQString txt = i->text(); - QListBoxItem *n = i->next(); + TQListBoxItem *n = i->next(); if ( n->pixmap() ) preview->changeItem( *n->pixmap(), n->text(), preview->currentItem() ); else @@ -209,7 +209,7 @@ void ListBoxEditor::deletePixmap() if ( preview->currentItem() == -1 ) return; - QListBoxItem *i = preview->item( preview->currentItem() ); + TQListBoxItem *i = preview->item( preview->currentItem() ); preview->changeItem( i->text(), preview->currentItem() ); itemDeletePixmap->setEnabled( false ); } diff --git a/kommander/editor/listboxeditorimpl.h b/kommander/editor/listboxeditorimpl.h index 294ce33e..8177feb5 100644 --- a/kommander/editor/listboxeditorimpl.h +++ b/kommander/editor/listboxeditorimpl.h @@ -31,13 +31,13 @@ class ListBoxEditor : public ListBoxEditorBase Q_OBJECT public: - ListBoxEditor( QWidget *parent, QWidget *editWidget, FormWindow *fw ); + ListBoxEditor( TQWidget *parent, TQWidget *editWidget, FormWindow *fw ); protected slots: void insertNewItem(); void deleteCurrentItem(); - void currentItemChanged( QListBoxItem * ); - void currentTextChanged( const QString & ); + void currentItemChanged( TQListBoxItem * ); + void currentTextChanged( const TQString & ); void okClicked(); void cancelClicked(); void applyClicked(); @@ -47,7 +47,7 @@ protected slots: void deletePixmap(); private: - QListBox *listbox; + TQListBox *listbox; FormWindow *formwindow; }; diff --git a/kommander/editor/listvieweditorimpl.cpp b/kommander/editor/listvieweditorimpl.cpp index 3f30106a..fb2f0a6a 100644 --- a/kommander/editor/listvieweditorimpl.cpp +++ b/kommander/editor/listvieweditorimpl.cpp @@ -24,23 +24,23 @@ #include "pixmapchooser.h" #include "command.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include -ListViewEditor::ListViewEditor( QWidget *parent, QListView *lv, FormWindow *fw ) +ListViewEditor::ListViewEditor( TQWidget *parent, TQListView *lv, FormWindow *fw ) : ListViewEditorBase( parent, 0, true ), listview( lv ), formwindow( fw ) { - connect( helpButton, SIGNAL( clicked() ), MainWindow::self, SLOT( showDialogHelp() ) ); + connect( helpButton, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) ); itemText->setEnabled( false ); itemChoosePixmap->setEnabled( false ); itemDeletePixmap->setEnabled( false ); @@ -92,8 +92,8 @@ void ListViewEditor::columnDownClicked() return; colPreview->clearSelection(); - QListBoxItem *i = colPreview->item( colPreview->currentItem() ); - QListBoxItem *below = i->next(); + TQListBoxItem *i = colPreview->item( colPreview->currentItem() ); + TQListBoxItem *below = i->next(); colPreview->takeItem( i ); colPreview->insertItem( i, below ); @@ -108,11 +108,11 @@ void ListViewEditor::columnPixmapChosen() if ( !c ) return; - QPixmap pix; + TQPixmap pix; if ( colPixmap->pixmap() ) pix = qChoosePixmap( this, formwindow, *colPixmap->pixmap() ); else - pix = qChoosePixmap( this, formwindow, QPixmap() ); + pix = qChoosePixmap( this, formwindow, TQPixmap() ); if ( pix.isNull() ) return; @@ -135,7 +135,7 @@ void ListViewEditor::columnPixmapDeleted() if ( !c ) return; - c->pixmap = QPixmap(); + c->pixmap = TQPixmap(); colPreview->blockSignals( true ); if ( !c->pixmap.isNull() ) colPreview->changeItem( c->pixmap, c->text, colPreview->index( c->item ) ); @@ -155,7 +155,7 @@ void ListViewEditor::columnResizable( bool b ) c->resizable = b; } -void ListViewEditor::columnTextChanged( const QString &txt ) +void ListViewEditor::columnTextChanged( const TQString &txt ) { Column *c = findColumn( colPreview->item( colPreview->currentItem() ) ); if ( !c ) @@ -177,8 +177,8 @@ void ListViewEditor::columnUpClicked() return; colPreview->clearSelection(); - QListBoxItem *i = colPreview->item( colPreview->currentItem() ); - QListBoxItem *above = i->prev(); + TQListBoxItem *i = colPreview->item( colPreview->currentItem() ); + TQListBoxItem *above = i->prev(); colPreview->takeItem( above ); colPreview->insertItem( above, i ); @@ -187,7 +187,7 @@ void ListViewEditor::columnUpClicked() colPreview->setSelected( i, true ); } -void ListViewEditor::currentColumnChanged( QListBoxItem *i ) +void ListViewEditor::currentColumnChanged( TQListBoxItem *i ) { Column *c = findColumn( i ); if ( !i || !c ) { @@ -223,13 +223,13 @@ void ListViewEditor::newColumnClicked() { Column col; col.text = i18n("New Column" ); - col.pixmap = QPixmap(); + col.pixmap = TQPixmap(); col.clickable = true; col.resizable = true; if ( !col.pixmap.isNull() ) - col.item = new QListBoxPixmap( colPreview, col.pixmap, col.text ); + col.item = new TQListBoxPixmap( colPreview, col.pixmap, col.text ); else - col.item = new QListBoxText( colPreview, col.text ); + col.item = new TQListBoxText( colPreview, col.text ); columns.append( col ); colPreview->setCurrentItem( col.item ); colPreview->setSelected( col.item, true ); @@ -237,11 +237,11 @@ void ListViewEditor::newColumnClicked() void ListViewEditor::deleteColumnClicked() { - QListBoxItem *i = colPreview->item( colPreview->currentItem() ); + TQListBoxItem *i = colPreview->item( colPreview->currentItem() ); if ( !i ) return; - for ( QValueList::Iterator it = columns.begin(); it != columns.end(); ++it ) { + for ( TQValueList::Iterator it = columns.begin(); it != columns.end(); ++it ) { if ( ( *it ).item == i ) { delete (*it).item; columns.remove( it ); @@ -258,7 +258,7 @@ void ListViewEditor::deleteColumnClicked() -void ListViewEditor::currentItemChanged( QListViewItem *i ) +void ListViewEditor::currentItemChanged( TQListViewItem *i ) { if ( !i ) { itemText->setEnabled( false ); @@ -277,7 +277,7 @@ void ListViewEditor::currentItemChanged( QListViewItem *i ) displayItem( i, itemColumn->value() ); } -void ListViewEditor::displayItem( QListViewItem *i, int col ) +void ListViewEditor::displayItem( TQListViewItem *i, int col ) { itemText->blockSignals( true ); itemText->setText( i->text( col ) ); @@ -293,7 +293,7 @@ void ListViewEditor::displayItem( QListViewItem *i, int col ) void ListViewEditor::itemColChanged( int col ) { - QListViewItem *i = itemsPreview->currentItem(); + TQListViewItem *i = itemsPreview->currentItem(); if ( !i ) return; @@ -303,7 +303,7 @@ void ListViewEditor::itemColChanged( int col ) void ListViewEditor::itemDeleteClicked() { - QListViewItem *i = itemsPreview->currentItem(); + TQListViewItem *i = itemsPreview->currentItem(); if ( !i ) return; @@ -316,12 +316,12 @@ void ListViewEditor::itemDeleteClicked() void ListViewEditor::itemDownClicked() { - QListViewItem *i = itemsPreview->currentItem(); + TQListViewItem *i = itemsPreview->currentItem(); if ( !i ) return; - QListViewItemIterator it( i ); - QListViewItem *parent = i->parent(); + TQListViewItemIterator it( i ); + TQListViewItem *parent = i->parent(); it++; while ( it.current() ) { if ( it.current()->parent() == parent ) @@ -331,14 +331,14 @@ void ListViewEditor::itemDownClicked() if ( !it.current() ) return; - QListViewItem *other = it.current(); + TQListViewItem *other = it.current(); i->moveItem( other ); } void ListViewEditor::itemNewClicked() { - QListViewItem *item = new QListViewItem( itemsPreview ); + TQListViewItem *item = new TQListViewItem( itemsPreview ); item->setText( 0, "Item" ); itemsPreview->setCurrentItem( item ); itemsPreview->setSelected( item, true ); @@ -346,13 +346,13 @@ void ListViewEditor::itemNewClicked() void ListViewEditor::itemNewSubClicked() { - QListViewItem *parent = itemsPreview->currentItem(); - QListViewItem *item = 0; + TQListViewItem *parent = itemsPreview->currentItem(); + TQListViewItem *item = 0; if ( parent ) { - item = new QListViewItem( parent ); + item = new TQListViewItem( parent ); parent->setOpen( true ); } else { - item = new QListViewItem( itemsPreview ); + item = new TQListViewItem( itemsPreview ); } item->setText( 0, "Subitem" ); itemsPreview->setCurrentItem( item ); @@ -361,38 +361,38 @@ void ListViewEditor::itemNewSubClicked() void ListViewEditor::itemPixmapChoosen() { - QListViewItem *i = itemsPreview->currentItem(); + TQListViewItem *i = itemsPreview->currentItem(); if ( !i ) return; - QPixmap pix; + TQPixmap pix; if ( itemPixmap->pixmap() ) pix = qChoosePixmap( this, formwindow, *itemPixmap->pixmap() ); else - pix = qChoosePixmap( this, formwindow, QPixmap() ); + pix = qChoosePixmap( this, formwindow, TQPixmap() ); if ( pix.isNull() ) return; - i->setPixmap( itemColumn->value(), QPixmap( pix ) ); + i->setPixmap( itemColumn->value(), TQPixmap( pix ) ); itemPixmap->setPixmap( pix ); itemDeletePixmap->setEnabled( true ); } void ListViewEditor::itemPixmapDeleted() { - QListViewItem *i = itemsPreview->currentItem(); + TQListViewItem *i = itemsPreview->currentItem(); if ( !i ) return; - i->setPixmap( itemColumn->value(), QPixmap() ); + i->setPixmap( itemColumn->value(), TQPixmap() ); itemPixmap->setText( "" ); itemDeletePixmap->setEnabled( false ); } -void ListViewEditor::itemTextChanged( const QString &txt ) +void ListViewEditor::itemTextChanged( const TQString &txt ) { - QListViewItem *i = itemsPreview->currentItem(); + TQListViewItem *i = itemsPreview->currentItem(); if ( !i ) return; i->setText( itemColumn->value(), txt ); @@ -400,12 +400,12 @@ void ListViewEditor::itemTextChanged( const QString &txt ) void ListViewEditor::itemUpClicked() { - QListViewItem *i = itemsPreview->currentItem(); + TQListViewItem *i = itemsPreview->currentItem(); if ( !i ) return; - QListViewItemIterator it( i ); - QListViewItem *parent = i->parent(); + TQListViewItemIterator it( i ); + TQListViewItem *parent = i->parent(); --it; while ( it.current() ) { if ( it.current()->parent() == parent ) @@ -415,19 +415,19 @@ void ListViewEditor::itemUpClicked() if ( !it.current() ) return; - QListViewItem *other = it.current(); + TQListViewItem *other = it.current(); other->moveItem( i ); } void ListViewEditor::itemRightClicked() { - QListViewItem *i = itemsPreview->currentItem(); + TQListViewItem *i = itemsPreview->currentItem(); if ( !i ) return; - QListViewItemIterator it( i ); - QListViewItem *parent = i->parent(); + TQListViewItemIterator it( i ); + TQListViewItem *parent = i->parent(); parent = parent ? parent->firstChild() : itemsPreview->firstChild(); if ( !parent ) return; @@ -440,19 +440,19 @@ void ListViewEditor::itemRightClicked() if ( !it.current() ) return; - QListViewItem *other = it.current(); + TQListViewItem *other = it.current(); for ( int c = 0; c < itemsPreview->columns(); ++c ) { - QString s = i->text( c ); + TQString s = i->text( c ); i->setText( c, other->text( c ) ); other->setText( c, s ); - QPixmap pix; + TQPixmap pix; if ( i->pixmap( c ) ) pix = *i->pixmap( c ); if ( other->pixmap( c ) ) i->setPixmap( c, *other->pixmap( c ) ); else - i->setPixmap( c, QPixmap() ); + i->setPixmap( c, TQPixmap() ); other->setPixmap( c, pix ); } @@ -462,12 +462,12 @@ void ListViewEditor::itemRightClicked() void ListViewEditor::itemLeftClicked() { - QListViewItem *i = itemsPreview->currentItem(); + TQListViewItem *i = itemsPreview->currentItem(); if ( !i ) return; - QListViewItemIterator it( i ); - QListViewItem *parent = i->parent(); + TQListViewItemIterator it( i ); + TQListViewItem *parent = i->parent(); if ( !parent ) return; parent = parent->parent(); @@ -480,19 +480,19 @@ void ListViewEditor::itemLeftClicked() if ( !it.current() ) return; - QListViewItem *other = it.current(); + TQListViewItem *other = it.current(); for ( int c = 0; c < itemsPreview->columns(); ++c ) { - QString s = i->text( c ); + TQString s = i->text( c ); i->setText( c, other->text( c ) ); other->setText( c, s ); - QPixmap pix; + TQPixmap pix; if ( i->pixmap( c ) ) pix = *i->pixmap( c ); if ( other->pixmap( c ) ) i->setPixmap( c, *other->pixmap( c ) ); else - i->setPixmap( c, QPixmap() ); + i->setPixmap( c, TQPixmap() ); other->setPixmap( c, pix ); } @@ -502,19 +502,19 @@ void ListViewEditor::itemLeftClicked() void ListViewEditor::setupColumns() { - QHeader *h = listview->header(); + TQHeader *h = listview->header(); for ( int i = 0; i < (int)h->count(); ++i ) { Column col; col.text = h->label( i ); - col.pixmap = QPixmap(); + col.pixmap = TQPixmap(); 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 ); + col.item = new TQListBoxPixmap( colPreview, col.pixmap, col.text ); else - col.item = new QListBoxText( colPreview, col.text ); + col.item = new TQListBoxText( colPreview, col.text ); columns.append( col ); } @@ -533,8 +533,8 @@ 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() ) { + TQHeader *header = itemsPreview->header(); + for ( TQListBoxItem *item = colPreview->firstItem(); item; item = item->next() ) { Column *col = findColumn( item ); if ( !col ) continue; @@ -551,12 +551,12 @@ void ListViewEditor::setupItems() itemColumn->setValue( QMIN( numColumns - 1, itemColumn->value() ) ); } -ListViewEditor::Column *ListViewEditor::findColumn( QListBoxItem *i ) +ListViewEditor::Column *ListViewEditor::findColumn( TQListBoxItem *i ) { if ( !i ) return 0; - for ( QValueList::Iterator it = columns.begin(); it != columns.end(); ++it ) { + for ( TQValueList::Iterator it = columns.begin(); it != columns.end(); ++it ) { if ( ( *it ).item == i ) return &( *it ); } @@ -564,7 +564,7 @@ ListViewEditor::Column *ListViewEditor::findColumn( QListBoxItem *i ) return 0; } -void ListViewEditor::initTabPage( const QString &page ) +void ListViewEditor::initTabPage( const TQString &page ) { numColumns = colPreview->count(); if ( page == i18n("&Items" ) ) { diff --git a/kommander/editor/listvieweditorimpl.h b/kommander/editor/listvieweditorimpl.h index 91da67c8..37f9154e 100644 --- a/kommander/editor/listvieweditorimpl.h +++ b/kommander/editor/listvieweditorimpl.h @@ -23,9 +23,9 @@ #include "listvieweditor.h" -#include -#include -#include +#include +#include +#include class FormWindow; @@ -34,7 +34,7 @@ class ListViewEditor : public ListViewEditorBase Q_OBJECT public: - ListViewEditor( QWidget *parent, QListView *lv, FormWindow *fw ); + ListViewEditor( TQWidget *parent, TQListView *lv, FormWindow *fw ); protected slots: void applyClicked(); @@ -43,10 +43,10 @@ protected slots: void columnPixmapChosen(); void columnPixmapDeleted(); void columnResizable(bool); - void columnTextChanged(const QString &); + void columnTextChanged(const TQString &); void columnUpClicked(); - void currentColumnChanged(QListBoxItem*); - void currentItemChanged(QListViewItem*); + void currentColumnChanged(TQListBoxItem*); + void currentItemChanged(TQListViewItem*); void deleteColumnClicked(); void itemColChanged(int); void itemDeleteClicked(); @@ -55,20 +55,20 @@ protected slots: void itemNewSubClicked(); void itemPixmapChoosen(); void itemPixmapDeleted(); - void itemTextChanged(const QString &); + void itemTextChanged(const TQString &); void itemUpClicked(); void itemLeftClicked(); void itemRightClicked(); void newColumnClicked(); void okClicked(); - void initTabPage( const QString &page ); + void initTabPage( const TQString &page ); private: struct Column { - QListBoxItem *item; - QString text; - QPixmap pixmap; + TQListBoxItem *item; + TQString text; + TQPixmap pixmap; bool clickable, resizable; #if defined(Q_FULL_TEMPLATE_INSTANTIATION) bool operator==( const Column& ) const { return FALSE; } @@ -78,13 +78,13 @@ private: private: void setupColumns(); void setupItems(); - Column *findColumn( QListBoxItem *i ); - void transferItems( QListView *from, QListView *to ); - void displayItem( QListViewItem *i, int col ); + Column *findColumn( TQListBoxItem *i ); + void transferItems( TQListView *from, TQListView *to ); + void displayItem( TQListViewItem *i, int col ); private: - QListView *listview; - QValueList columns; + TQListView *listview; + TQValueList columns; int numColumns; FormWindow *formwindow; diff --git a/kommander/editor/mainwindow.cpp b/kommander/editor/mainwindow.cpp index a90a3b07..af062f16 100644 --- a/kommander/editor/mainwindow.cpp +++ b/kommander/editor/mainwindow.cpp @@ -46,25 +46,25 @@ #include "wizardeditorimpl.h" #include "workspace.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include "qcompletionedit.h" @@ -88,25 +88,25 @@ #include #include -extern QMap *qwf_functions; -extern QMap *qwf_forms; -extern QString *qwf_language; +extern TQMap *qwf_functions; +extern TQMap *qwf_forms; +extern TQString *qwf_language; extern bool qwf_execute_code; extern bool qwf_stays_on_top; -extern void set_splash_status(const QString &txt); +extern void set_splash_status(const TQString &txt); /*### static bool tbSettingsRead = false; */ MainWindow *MainWindow::self = 0; -QString assistantPath() +TQString assistantPath() { return "assistant"; } -static QString textNoAccel(const QString& text) +static TQString textNoAccel(const TQString& text) { - QString t = text; + TQString t = text; int i; while ((i = t.find('&'))>= 0) { t.remove(i,1); @@ -121,7 +121,7 @@ MainWindow::MainWindow(bool asClient) 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 * ))); + //connect(m_partManager, TQT_SIGNAL(activePartChanged(KParts::Part * )), this, TQT_SLOT(slotActivePartChanged(KParts::Part * ))); init_colors(); inDebugMode = true; //debugging kommander @@ -138,7 +138,7 @@ MainWindow::MainWindow(bool asClient) wspace = 0; statusBar()->clear(); - statusBar()->addWidget(new QLabel(i18n("Welcome to the Kommander Editor"), statusBar()), 1); + statusBar()->addWidget(new TQLabel(i18n("Welcome to the Kommander Editor"), statusBar()), 1); setupMDI(); setupFileActions(); @@ -165,11 +165,11 @@ MainWindow::MainWindow(bool asClient) lastPressWidget = 0; kapp->installEventFilter(this); - QSize as(kapp->desktop()->size()); - as -= QSize(30, 30); - resize(QSize(1200, 1000).boundedTo(as)); + TQSize as(kapp->desktop()->size()); + as -= TQSize(30, 30); + resize(TQSize(1200, 1000).boundedTo(as)); - connect(kapp->clipboard(), SIGNAL(dataChanged()), this, SLOT(clipboardChanged())); + connect(kapp->clipboard(), TQT_SIGNAL(dataChanged()), this, TQT_SLOT(clipboardChanged())); clipboardChanged(); layoutChilds = false; layoutSelected = false; @@ -178,25 +178,25 @@ MainWindow::MainWindow(bool asClient) 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); + // hack to make WidgetFactory happy (so it knows TQWidget and TQDialog for resetting properties) + TQWidget *w = WidgetFactory::create(WidgetDatabase::idFromClassName("TQWidget"), 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); + w = WidgetFactory::create(WidgetDatabase::idFromClassName("TQLabel"), this, 0, false); delete w; - w = WidgetFactory::create(WidgetDatabase::idFromClassName("QTabWidget"), this, 0, false); + w = WidgetFactory::create(WidgetDatabase::idFromClassName("TQTabWidget"), this, 0, false); delete w; - w = WidgetFactory::create(WidgetDatabase::idFromClassName("QFrame"), this, 0, false); + w = WidgetFactory::create(WidgetDatabase::idFromClassName("TQFrame"), 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 = new TQTimer(this); + connect(backupTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotCreateBackups())); backupTimer->start(1000*60*5); //fire it every five minutes //createGUI(0); @@ -209,9 +209,9 @@ MainWindow::~MainWindow() void MainWindow::setupMDI() { - KDockWidget* toolDock = createDockWidget("Workspace", QPixmap(), 0L, "main_workspace"); - QVBox *vbox = new QVBox(toolDock); - vbox->setFrameStyle(QFrame::StyledPanel | QFrame::Sunken); + KDockWidget* toolDock = createDockWidget("Workspace", TQPixmap(), 0L, "main_workspace"); + TQVBox *vbox = new TQVBox(toolDock); + vbox->setFrameStyle(TQFrame::StyledPanel | TQFrame::Sunken); vbox->setMargin(1); vbox->setLineWidth(1); @@ -221,27 +221,27 @@ void MainWindow::setupMDI() setView(toolDock); setMainDockWidget(toolDock); - qworkspace = new QWorkspace(vbox); + qworkspace = new TQWorkspace(vbox); qworkspace->setBackgroundMode(PaletteDark); qworkspace->setBackgroundPixmap(PixmapChooser::loadPixmap("background.png", PixmapChooser::NoSize)); - qworkspace->setPaletteBackgroundColor(QColor(238, 238, 238)); + qworkspace->setPaletteBackgroundColor(TQColor(238, 238, 238)); qworkspace->setScrollBarsEnabled(true); - connect(qworkspace, SIGNAL(windowActivated(QWidget *)), - this, SLOT(activeWindowChanged(QWidget *))); + connect(qworkspace, TQT_SIGNAL(windowActivated(TQWidget *)), + this, TQT_SLOT(activeWindowChanged(TQWidget *))); lastActiveFormWindow = 0; qworkspace->setAcceptDrops(true); } void MainWindow::setupPropertyEditor() { - KDockWidget *dw = createDockWidget("Property Editor", QPixmap(), 0, i18n("Properties")); + KDockWidget *dw = createDockWidget("Property Editor", TQPixmap(), 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, + TQWhatsThis::add(propertyEditor, i18n("

The Property Editor

" "

You can change the appearance and behavior of the selected widget in the " "property editor.

" @@ -265,11 +265,11 @@ void MainWindow::setupHierarchyView() { if (hierarchyView) return; - KDockWidget *dw = createDockWidget("Object Explorer", QPixmap(), 0, i18n("Widgets")); + KDockWidget *dw = createDockWidget("Object Explorer", TQPixmap(), 0, i18n("Widgets")); hierarchyView = new HierarchyView(dw); dw->setWidget(hierarchyView); dw->setCaption(i18n("Object Explorer")); - QWhatsThis::add(hierarchyView, + TQWhatsThis::add(hierarchyView, i18n("

The Object Explorer

" "

The Object Explorer provides an overview of the relationships " "between the widgets in a form. You can use the clipboard functions using " @@ -281,29 +281,29 @@ void MainWindow::setupHierarchyView() void MainWindow::setupWorkspace() { - KDockWidget *dw = createDockWidget("Dialogs", QPixmap(), 0, i18n("Dialogs")); - QVBox *vbox = new QVBox(dw); + KDockWidget *dw = createDockWidget("Dialogs", TQPixmap(), 0, i18n("Dialogs")); + TQVBox *vbox = new TQVBox(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())); + TQToolTip::add(edit, i18n("Start typing the buffer you want to switch to here (ALT+B)")); + TQAccel *a = new TQAccel(this); + a->connectItem(a->insertItem(ALT + Key_B), edit, TQT_SLOT(setFocus())); wspace = new Workspace(vbox, this); wspace->setBufferEdit(edit); dw->setWidget(vbox); dw->setCaption(i18n("Dialogs")); - QWhatsThis::add(wspace, i18n("

The File Overview Window

" + TQWhatsThis::add(wspace, i18n("

The File Overview Window

" "

The File Overview Window displays all open dialogs.

")); } void MainWindow::setupActionEditor() { - KDockWidget *dw = createDockWidget("Action Editor", QPixmap(), 0, i18n("Actions")); + KDockWidget *dw = createDockWidget("Action Editor", TQPixmap(), 0, i18n("Actions")); actionEditor = new ActionEditor(dw, "ActionEditor"); //addToolBar(dw, Qt::DockLeft); dw->setWidget(actionEditor); dw->setCaption(i18n("Action Editor")); - QWhatsThis::add(actionEditor, i18n("The Action Editor" + TQWhatsThis::add(actionEditor, i18n("The Action Editor" "

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 " @@ -313,7 +313,7 @@ void MainWindow::setupActionEditor() void MainWindow::setupMessageLog() { - KDockWidget *dw = createDockWidget("Message Log", QPixmap(), 0, i18n("Message Log")); + KDockWidget *dw = createDockWidget("Message Log", TQPixmap(), 0, i18n("Message Log")); messageLog = new MessageLog(dw, "MessageLog"); dw->setWidget(messageLog); dw->setCaption(i18n("Message Log")); @@ -322,7 +322,7 @@ void MainWindow::setupMessageLog() void MainWindow::setupRMBMenus() { - rmbWidgets = new QPopupMenu(this); + rmbWidgets = new TQPopupMenu(this); actionEditCut->plug(rmbWidgets); actionEditCopy->plug(rmbWidgets); actionEditPaste->plug(rmbWidgets); @@ -338,7 +338,7 @@ void MainWindow::setupRMBMenus() actionEditBreakLayout->plug(rmbWidgets); rmbWidgets->insertSeparator(); actionEditConnections->plug(rmbWidgets); - rmbFormWindow = new QPopupMenu(this); + rmbFormWindow = new TQPopupMenu(this); actionEditPaste->plug(rmbFormWindow); actionEditSelectAll->plug(rmbFormWindow); actionEditAccels->plug(rmbFormWindow); @@ -368,20 +368,20 @@ int MainWindow::currentTool() const { if (!actionCurrentTool) return POINTER_TOOL; - return QString::fromLatin1(actionCurrentTool->name()).toInt(); + return TQString::fromLatin1(actionCurrentTool->name()).toInt(); } void MainWindow::slotCreateBackups() { //create a backup of the opened forms - QWidgetList windows = qworkspace->windowList(QWorkspace::StackingOrder); + TQWidgetList windows = qworkspace->windowList(TQWorkspace::StackingOrder); for (int i = 0; i < (int)windows.count(); ++i) { FormWindow* form = dynamic_cast(windows.at(i)); if (!form || !form->formFile()) continue; - QString fileName = form->formFile()->fileName(); - QString backupName = fileName + ".backup"; + TQString fileName = form->formFile()->fileName(); + TQString backupName = fileName + ".backup"; bool modified = form->formFile()->isModified(); if (form->formFile()->hasTempFileName()) continue; //no need to create a backup @@ -410,9 +410,9 @@ void MainWindow::runForm() if (!form || !form->formFile()) return; - QObjectList *editors = queryList("AssocTextEditor"); - QObjectListIt it(*editors); - QObject *editor; + TQObjectList *editors = queryList("AssocTextEditor"); + TQObjectListIt it(*editors); + TQObject *editor; while ((editor = it.current()) != 0L) { @@ -431,7 +431,7 @@ void MainWindow::runForm() m_backupName = m_fileName + ".running"; m_modified = form->formFile()->isModified(); - bool readOnlyFile = !QFileInfo(m_fileName).isWritable(); + bool readOnlyFile = !TQFileInfo(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)) @@ -451,12 +451,12 @@ void MainWindow::runForm() ::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*))); + (*process) << "kmdr-executor" << TQString("\"%1\"").arg(form->formFile()->fileName()); + connect(process, TQT_SIGNAL(receivedStdout(KProcess*, char*, int)), messageLog, + TQT_SLOT(receivedStdout(KProcess*, char*, int))); + connect(process, TQT_SIGNAL(receivedStderr(KProcess*, char*, int)), messageLog, + TQT_SLOT(receivedStderr(KProcess*, char*, int))); + connect(process, TQT_SIGNAL(processExited(KProcess*)), TQT_SLOT(closeRunningForm(KProcess*))); messageLog->clear(MessageLog::All); previewing = process->start(KProcess::NotifyOnExit, KProcess::AllOutput); } @@ -474,9 +474,9 @@ void MainWindow::runForm4() if (!form || !form->formFile()) return; - QObjectList *editors = queryList("AssocTextEditor"); - QObjectListIt it(*editors); - QObject *editor; + TQObjectList *editors = queryList("AssocTextEditor"); + TQObjectListIt it(*editors); + TQObject *editor; while ((editor = it.current()) != 0L) { @@ -495,7 +495,7 @@ void MainWindow::runForm4() m_backupName = m_fileName + ".running"; m_modified = form->formFile()->isModified(); - bool readOnlyFile = !QFileInfo(m_fileName).isWritable(); + bool readOnlyFile = !TQFileInfo(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)) @@ -515,12 +515,12 @@ void MainWindow::runForm4() ::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*))); + (*process) << "kommander" << TQString("\"%1\"").arg(form->formFile()->fileName()); + connect(process, TQT_SIGNAL(receivedStdout(KProcess*, char*, int)), messageLog, + TQT_SLOT(receivedStdout(KProcess*, char*, int))); + connect(process, TQT_SIGNAL(receivedStderr(KProcess*, char*, int)), messageLog, + TQT_SLOT(receivedStderr(KProcess*, char*, int))); + connect(process, TQT_SIGNAL(processExited(KProcess*)), TQT_SLOT(closeRunningForm(KProcess*))); messageLog->clear(MessageLog::All); previewing = process->start(KProcess::NotifyOnExit, KProcess::AllOutput); } @@ -532,7 +532,7 @@ void MainWindow::closeRunningForm(KProcess* process) previewing = false; delete process; - if (QFileInfo(m_backupName).exists()) + if (TQFileInfo(m_backupName).exists()) { struct stat statbuf; ::stat(m_fileName.local8Bit(), &statbuf); @@ -542,7 +542,7 @@ void MainWindow::closeRunningForm(KProcess* process) } } -void MainWindow::showProperties(QObject *o) +void MainWindow::showProperties(TQObject *o) { if (!o->isWidgetType()) { propertyEditor->setWidget(o, lastActiveFormWindow); @@ -552,7 +552,7 @@ void MainWindow::showProperties(QObject *o) hierarchyView->setFormWindow(0, 0); return; } - QWidget *w = (QWidget*)o; + TQWidget *w = (TQWidget*)o; setupHierarchyView(); FormWindow *fw = (FormWindow*)isAFormWindowChild(w); if (fw) { @@ -575,24 +575,24 @@ void MainWindow::resetTool() emit currentToolChanged(); } -void MainWindow::updateProperties(QObject *) +void MainWindow::updateProperties(TQObject *) { if (propertyEditor) propertyEditor->refetchData(); } -bool MainWindow::eventFilter(QObject *o, QEvent *e) +bool MainWindow::eventFilter(TQObject *o, TQEvent *e) { if (!o || !e || !o->isWidgetType()) - return QMainWindow::eventFilter(o, e); + return TQMainWindow::eventFilter(o, e); - QWidget *w = 0; + TQWidget *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; + case TQEvent::AccelOverride: + if (((TQKeyEvent*)e)->key() == Key_F1 && + (((TQKeyEvent*)e)->state() & ShiftButton) != ShiftButton) { + w = (TQWidget*)o; while (w) { if (w->inherits("PropertyList")) break; @@ -600,229 +600,229 @@ bool MainWindow::eventFilter(QObject *o, QEvent *e) } if (w) { propertyEditor->propertyList()->showCurrentWhatsThis(); - ((QKeyEvent*)e)->accept(); + ((TQKeyEvent*)e)->accept(); return true; } } break; - case QEvent::Accel: - if ((((QKeyEvent*)e)->key() == Key_A || - ((QKeyEvent*)e)->key() == Key_E) && - ((QKeyEvent*)e)->state() & ControlButton) { + case TQEvent::Accel: + if ((((TQKeyEvent*)e)->key() == Key_A || + ((TQKeyEvent*)e)->key() == Key_E) && + ((TQKeyEvent*)e)->state() & ControlButton) { if (qWorkspace()->activeWindow() && qWorkspace()->activeWindow()->inherits("SourceEditor")) { - ((QKeyEvent*)e)->ignore(); + ((TQKeyEvent*)e)->ignore(); return true; } } break; - case QEvent::MouseButtonPress: - if (((QMouseEvent*)e)->button() == MidButton && dynamic_cast(o)) + case TQEvent::MouseButtonPress: + if (((TQMouseEvent*)e)->button() == MidButton && dynamic_cast(o)) { - AssocTextEditor *editor = new AssocTextEditor((QWidget*)o, formWindow(), propertyEditor, m_partManager, + AssocTextEditor *editor = new AssocTextEditor((TQWidget*)o, formWindow(), propertyEditor, m_partManager, this, "AssocTextEditor", false); //deletes itself! editor->show(); - ((QKeyEvent*)e)->accept(); + ((TQKeyEvent*)e)->accept(); return true; } - case QEvent::ContextMenu: + case TQEvent::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->inherits("TQComboBox") || o->inherits("TQToolButton") || o->inherits("QDesignerToolBarSeparator")) && o->parent() && o->parent()->inherits("QDesignerToolBar"))) { - QWidget *w = (QWidget*)o; - if (w->inherits("QToolButton") || w->inherits("QComboBox") || w->inherits("QDesignerToolBarSeparator")) + TQWidget *w = (TQWidget*)o; + if (w->inherits("TQToolButton") || w->inherits("TQComboBox") || w->inherits("QDesignerToolBarSeparator")) w = w->parentWidget(); - QWidget *pw = w->parentWidget(); + TQWidget *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"); + return !o->inherits("TQToolButton") && !o->inherits("TQMenuBar") && + !o->inherits("TQComboBox") && !o->inherits("QDesignerToolBarSeparator"); } pw = pw->parentWidget(); } } if (o && (o->inherits("QDesignerToolBar") || o->inherits("QDockWindowHandle")) - && e->type() == QEvent::ContextMenu) + && e->type() == TQEvent::ContextMenu) break; if (isAToolBarChild(o) && currentTool() != CONNECT_TOOL) break; - if (o && o->inherits("QSizeGrip")) + if (o && o->inherits("TQSizeGrip")) 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, + if(e->type() == TQEvent::ContextMenu) { + ((FormWindow*)w)->handleContextMenu((TQContextMenuEvent*)e, ((FormWindow*)w)->designerWidget(o)); return true; } else { - ((FormWindow*)w)->handleMousePress((QMouseEvent*)e, + ((FormWindow*)w)->handleMousePress((TQMouseEvent*)e, ((FormWindow*)w)->designerWidget(o)); } } - lastPressWidget = (QWidget*)o; + lastPressWidget = (TQWidget*)o; if (passiveInteractor) - QTimer::singleShot(0, formWindow(), SLOT(visibilityChanged())); + TQTimer::singleShot(0, formWindow(), TQT_SLOT(visibilityChanged())); if (currentTool() == CONNECT_TOOL) return true; return !passiveInteractor; - case QEvent::MouseButtonRelease: + case TQEvent::MouseButtonRelease: lastPressWidget = 0; if (isAToolBarChild(o) && currentTool() != CONNECT_TOOL) break; - if (o && o->inherits("QSizeGrip")) + if (o && o->inherits("TQSizeGrip")) break; if (!(w = isAFormWindowChild(o)) || o->inherits("SizeHandle") || o->inherits("OrderIndicator")) break; if (!passiveInteractor) - ((FormWindow*)w)->handleMouseRelease((QMouseEvent*)e, ((FormWindow*)w)->designerWidget(o)); + ((FormWindow*)w)->handleMouseRelease((TQMouseEvent*)e, ((FormWindow*)w)->designerWidget(o)); if (passiveInteractor) { selectionChanged(); - QTimer::singleShot(0, formWindow(), SLOT(visibilityChanged())); + TQTimer::singleShot(0, formWindow(), TQT_SLOT(visibilityChanged())); } return !passiveInteractor; - case QEvent::MouseMove: + case TQEvent::MouseMove: if (isAToolBarChild(o) && currentTool() != CONNECT_TOOL) break; w = isAFormWindowChild(o); - if (lastPressWidget != (QWidget*)o && w && + if (lastPressWidget != (TQWidget*)o && w && !o->inherits("SizeHandle") && !o->inherits("OrderIndicator") && - !o->inherits("QPopupMenu") && !o->inherits("QMenuBar") && - !o->inherits("QSizeGrip")) + !o->inherits("TQPopupMenu") && !o->inherits("TQMenuBar") && + !o->inherits("TQSizeGrip")) return true; - if (o && o->inherits("QSizeGrip")) + if (o && o->inherits("TQSizeGrip")) break; - if (lastPressWidget != (QWidget*)o || + if (lastPressWidget != (TQWidget*)o || (!w || o->inherits("SizeHandle") || o->inherits("OrderIndicator"))) break; if (!passiveInteractor) - ((FormWindow*)w)->handleMouseMove((QMouseEvent*)e, ((FormWindow*)w)->designerWidget(o)); + ((FormWindow*)w)->handleMouseMove((TQMouseEvent*)e, ((FormWindow*)w)->designerWidget(o)); return !passiveInteractor; - case QEvent::KeyPress: - if (((QKeyEvent*)e)->key() == Key_Escape && currentTool() != POINTER_TOOL) { + case TQEvent::KeyPress: + if (((TQKeyEvent*)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()) + ((FormWindow*)w)->handleKeyPress((TQKeyEvent*)e, ((FormWindow*)w)->designerWidget(o)); + if (((TQKeyEvent*)e)->isAccepted()) return true; break; - case QEvent::MouseButtonDblClick: + case TQEvent::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()) + if (o && o->inherits("TQToolButton") && ((TQToolButton*)o)->isOn() && + o->parent() && o->parent()->inherits("TQToolBar") && formWindow()) formWindow()->setToolFixed(); break; } if (currentTool() == ORDER_TOOL) { - ((FormWindow*)w)->handleMouseDblClick((QMouseEvent*)e, ((FormWindow*)w)->designerWidget(o)); + ((FormWindow*)w)->handleMouseDblClick((TQMouseEvent*)e, ((FormWindow*)w)->designerWidget(o)); return true; } if (!WidgetFactory::isPassiveInteractor(o)) return openEditor(((FormWindow*)w)->designerWidget(o), (FormWindow*)w); return true; - case QEvent::KeyRelease: + case TQEvent::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()) + ((FormWindow*)w)->handleKeyRelease((TQKeyEvent*)e, ((FormWindow*)w)->designerWidget(o)); + if (((TQKeyEvent*)e)->isAccepted()) return true; break; - case QEvent::Hide: + case TQEvent::Hide: if (!(w = isAFormWindowChild(o)) || o->inherits("SizeHandle") || o->inherits("OrderIndicator")) break; - if (((FormWindow*)w)->isWidgetSelected((QWidget*)o)) - ((FormWindow*)w)->selectWidget((QWidget*)o, false); + if (((FormWindow*)w)->isWidgetSelected((TQWidget*)o)) + ((FormWindow*)w)->selectWidget((TQWidget*)o, false); break; - case QEvent::Enter: - case QEvent::Leave: + case TQEvent::Enter: + case TQEvent::Leave: if (!(w = isAFormWindowChild(o)) || o->inherits("SizeHandle") || o->inherits("OrderIndicator") || o->inherits("QDesignerMenuBar")) break; return true; - case QEvent::Resize: - case QEvent::Move: + case TQEvent::Resize: + case TQEvent::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); + if (WidgetFactory::layoutType((TQWidget*)o->parent()) != WidgetFactory::NoLayout) { + ((FormWindow*)w)->updateSelection((TQWidget*)o); + if (e->type() != TQEvent::Resize) + ((FormWindow*)w)->updateChildSelections((TQWidget*)o); } break; - case QEvent::Close: + case TQEvent::Close: break; - case QEvent::DragEnter: + case TQEvent::DragEnter: if (o == qWorkspace() || o == workspace() || o == workspace()->viewport()) { - workspace()->contentsDragEnterEvent((QDragEnterEvent*)e); + workspace()->contentsDragEnterEvent((TQDragEnterEvent*)e); return true; } break; - case QEvent::DragMove: + case TQEvent::DragMove: if (o == qWorkspace() || o == workspace() || o == workspace()->viewport()) { - workspace()->contentsDragMoveEvent((QDragMoveEvent*)e); + workspace()->contentsDragMoveEvent((TQDragMoveEvent*)e); return true; } break; - case QEvent::Drop: + case TQEvent::Drop: if (o == qWorkspace() || o == workspace() || o == workspace()->viewport()) { - workspace()->contentsDropEvent((QDropEvent*)e); + workspace()->contentsDropEvent((TQDropEvent*)e); return true; } break; - case QEvent::Show: + case TQEvent::Show: if (o != this) break; - if (((QShowEvent*)e)->spontaneous()) + if (((TQShowEvent*)e)->spontaneous()) break; - QApplication::sendPostedEvents(qworkspace, QEvent::ChildInserted); - showEvent((QShowEvent*)e); + TQApplication::sendPostedEvents(qworkspace, TQEvent::ChildInserted); + showEvent((TQShowEvent*)e); checkTempFiles(); return true; - case QEvent::Wheel: + case TQEvent::Wheel: if (!(w = isAFormWindowChild(o)) || o->inherits("SizeHandle") || o->inherits("OrderIndicator")) break; return true; - case QEvent::FocusIn: + case TQEvent::FocusIn: if (!o->inherits("FormWindow") && isAFormWindowChild(o)) return true; break; - case QEvent::FocusOut: + case TQEvent::FocusOut: if (!o->inherits("FormWindow") && isAFormWindowChild(o)) return true; break; default: - return QMainWindow::eventFilter(o, e); + return TQMainWindow::eventFilter(o, e); } - return QMainWindow::eventFilter(o, e); + return TQMainWindow::eventFilter(o, e); } -QWidget *MainWindow::isAFormWindowChild(QObject *o) const +TQWidget *MainWindow::isAFormWindowChild(TQObject *o) const { - if (o->parent() && o->parent()->inherits("QWizard") && !o->inherits("QPushButton")) + if (o->parent() && o->parent()->inherits("TQWizard") && !o->inherits("TQPushButton")) return 0; while (o) { if (o->inherits("FormWindow")) - return (QWidget*)o; + return (TQWidget*)o; o = o->parent(); } return 0; } -QWidget *MainWindow::isAToolBarChild(QObject *o) const +TQWidget *MainWindow::isAToolBarChild(TQObject *o) const { while (o) { if (o->inherits("QDesignerToolBar")) - return (QWidget*)o; + return (TQWidget*)o; if (o->inherits("FormWindow")) return 0; o = o->parent(); @@ -847,7 +847,7 @@ FormWindow *MainWindow::formWindow() void MainWindow::insertFormWindow(FormWindow *fw) { if (fw) - QWhatsThis::add(fw, i18n("The Form Window" + TQWhatsThis::add(fw, i18n("The Form Window" "

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 " @@ -859,16 +859,16 @@ void MainWindow::insertFormWindow(FormWindow *fw) "

You can have several forms open, and all open forms are listed " "in the Form List.")); - 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 &))); + connect(fw, TQT_SIGNAL(showProperties(TQObject *)), + this, TQT_SLOT(showProperties(TQObject *))); + connect(fw, TQT_SIGNAL(updateProperties(TQObject *)), + this, TQT_SLOT(updateProperties(TQObject *))); + connect(this, TQT_SIGNAL(currentToolChanged()), + fw, TQT_SLOT(currentToolChanged())); + connect(fw, TQT_SIGNAL(selectionChanged()), + this, TQT_SLOT(selectionChanged())); + connect(fw, TQT_SIGNAL(undoRedoChanged(bool, bool, const TQString &, const TQString &)), + this, TQT_SLOT(updateUndoRedo(bool, bool, const TQString &, const TQString &))); fw->show(); fw->currentToolChanged(); @@ -897,9 +897,9 @@ bool MainWindow::unregisterClient(FormWindow *w) return true; } -void MainWindow::activeWindowChanged(QWidget *w) +void MainWindow::activeWindowChanged(TQWidget *w) { - QWidget *old = formWindow(); + TQWidget *old = formWindow(); if (w && w->inherits("FormWindow")) { FormWindow *fw = (FormWindow *) w; @@ -934,7 +934,7 @@ void MainWindow::activeWindowChanged(QWidget *w) emit hasActiveForm(false); propertyEditor->clear(); hierarchyView->clear(); - updateUndoRedo(false, false, QString::null, QString::null); + updateUndoRedo(false, false, TQString::null, TQString::null); } selectionChanged(); @@ -947,7 +947,7 @@ void MainWindow::activeWindowChanged(QWidget *w) void MainWindow::updateUndoRedo(bool undoAvailable, bool redoAvailable, - const QString &undoCmd, const QString &redoCmd) + const TQString &undoCmd, const TQString &redoCmd) { actionEditUndo->setEnabled(undoAvailable); actionEditRedo->setEnabled(redoAvailable); @@ -969,15 +969,15 @@ void MainWindow::updateUndoRedo(bool undoAvailable, bool redoAvailable, } } -QWorkspace *MainWindow::qWorkspace() const +TQWorkspace *MainWindow::qWorkspace() const { return qworkspace; } -void MainWindow::popupFormWindowMenu(const QPoint & gp, FormWindow *fw) +void MainWindow::popupFormWindowMenu(const TQPoint & gp, FormWindow *fw) { - QValueList ids; - QMap commands; + TQValueList ids; + TQMap commands; setupRMBSpecialCommands(ids, commands, fw); setupRMBProperties(ids, commands, fw); @@ -988,14 +988,14 @@ void MainWindow::popupFormWindowMenu(const QPoint & gp, FormWindow *fw) handleRMBProperties(r, commands, fw); handleRMBSpecialCommands(r, commands, fw); - for (QValueList::Iterator i = ids.begin(); i != ids.end(); ++i) + for (TQValueList::Iterator i = ids.begin(); i != ids.end(); ++i) rmbFormWindow->removeItem(*i); } -void MainWindow::popupWidgetMenu(const QPoint &gp, FormWindow * /*fw*/, QWidget * w) +void MainWindow::popupWidgetMenu(const TQPoint &gp, FormWindow * /*fw*/, TQWidget * w) { - QValueList ids; - QMap commands; + TQValueList ids; + TQMap commands; setupRMBSpecialCommands(ids, commands, w); setupRMBProperties(ids, commands, w); @@ -1006,25 +1006,25 @@ void MainWindow::popupWidgetMenu(const QPoint &gp, FormWindow * /*fw*/, QWidget handleRMBProperties(r, commands, w); handleRMBSpecialCommands(r, commands, w); - for (QValueList::Iterator i = ids.begin(); i != ids.end(); ++i) + for (TQValueList::Iterator i = ids.begin(); i != ids.end(); ++i) rmbWidgets->removeItem(*i); } -void MainWindow::setupRMBProperties(QValueList &ids, QMap &props, QWidget *w) +void MainWindow::setupRMBProperties(TQValueList &ids, TQMap &props, TQWidget *w) { - const QMetaProperty* text = w->metaObject()->property(w->metaObject()->findProperty("text", true), true); - if (text && qstrcmp(text->type(), "QString") != 0) + const TQMetaProperty* text = w->metaObject()->property(w->metaObject()->findProperty("text", true), true); + if (text && qstrcmp(text->type(), "TQString") != 0) text = 0; - const QMetaProperty* title = w->metaObject()->property(w->metaObject()->findProperty("title", true), true); - if (title && qstrcmp(title->type(), "QString") != 0) + const TQMetaProperty* title = w->metaObject()->property(w->metaObject()->findProperty("title", true), true); + if (title && qstrcmp(title->type(), "TQString") != 0) title = 0; - const QMetaProperty* pagetitle = + const TQMetaProperty* pagetitle = w->metaObject()->property(w->metaObject()->findProperty("pageTitle", true), true); - if (pagetitle && qstrcmp(pagetitle->type(), "QString") != 0) + if (pagetitle && qstrcmp(pagetitle->type(), "TQString") != 0) pagetitle = 0; - const QMetaProperty* pixmap = + const TQMetaProperty* pixmap = w->metaObject()->property(w->metaObject()->findProperty("pixmap", true), true); - if (pixmap && qstrcmp(pixmap->type(), "QPixmap") != 0) + if (pixmap && qstrcmp(pixmap->type(), "TQPixmap") != 0) pixmap = 0; if (text && text->designable(w) || @@ -1038,7 +1038,7 @@ void MainWindow::setupRMBProperties(QValueList &ids, QMap &pr ids << (id = rmbWidgets->insertItem(i18n("Choose Pixmap..."), -1, 0)); props.insert("pixmap", id); } - if (text && text->designable(w) && !w->inherits("QTextEdit")) { + if (text && text->designable(w) && !w->inherits("TQTextEdit")) { ids << (id = rmbWidgets->insertItem(i18n("Edit Text..."), -1, 0)); props.insert("text", id); } @@ -1053,7 +1053,7 @@ void MainWindow::setupRMBProperties(QValueList &ids, QMap &pr } } -void MainWindow::setupRMBSpecialCommands(QValueList &ids, QMap &commands, QWidget *w) +void MainWindow::setupRMBSpecialCommands(TQValueList &ids, TQMap &commands, TQWidget *w) { int id; // KommanderWidget doesn't derive from QObject @@ -1068,7 +1068,7 @@ void MainWindow::setupRMBSpecialCommands(QValueList &ids, QMapinherits("QTabWidget")) { + if (w->inherits("TQTabWidget")) { if (ids.isEmpty()) ids << rmbWidgets->insertSeparator(0); if (((QDesignerTabWidget*)w)->count() > 1) { @@ -1078,10 +1078,10 @@ void MainWindow::setupRMBSpecialCommands(QValueList &ids, QMapinsertItem(i18n("Add Page"), -1, 0)); commands.insert("add", id); } - if (w->inherits("QToolBox")) { + if (w->inherits("TQToolBox")) { if (ids.isEmpty()) ids << rmbWidgets->insertSeparator(0); - if (((QToolBox*)w)->count() > 1) { + if (((TQToolBox*)w)->count() > 1) { ids << (id = rmbWidgets->insertItem(i18n("Delete Page"), -1, 0)); commands.insert("remove", id); } @@ -1097,7 +1097,7 @@ void MainWindow::setupRMBSpecialCommands(QValueList &ids, QMap &ids, QMap &commands, FormWindow *fw) +void MainWindow::setupRMBSpecialCommands(TQValueList &ids, TQMap &commands, FormWindow *fw) { int id; @@ -1113,11 +1113,11 @@ void MainWindow::setupRMBSpecialCommands(QValueList &ids, QMapmainContainer()->inherits("QWizard")) { + if (fw->mainContainer()->inherits("TQWizard")) { if (ids.isEmpty()) ids << rmbFormWindow->insertSeparator(0); - if (((QWizard*)fw->mainContainer())->pageCount() > 1) { + if (((TQWizard*)fw->mainContainer())->pageCount() > 1) { ids << (id = rmbFormWindow->insertItem(i18n("Delete Page"), -1, 0)); commands.insert("remove", id); } @@ -1131,7 +1131,7 @@ void MainWindow::setupRMBSpecialCommands(QValueList &ids, QMapinsertItem(i18n("Edit Pages..."), -1, 0)); commands.insert("edit", id); - } else if (fw->mainContainer()->inherits("QMainWindow")) { + } else if (fw->mainContainer()->inherits("TQMainWindow")) { if (ids.isEmpty()) ids << rmbFormWindow->insertSeparator(0); ids << (id = rmbFormWindow->insertItem(i18n("Add Menu Item"), -1, 0)); @@ -1141,58 +1141,58 @@ void MainWindow::setupRMBSpecialCommands(QValueList &ids, QMap &props, QWidget *w) +void MainWindow::handleRMBProperties(int id, TQMap &props, TQWidget *w) { if (id == props[ "text" ]) { bool ok = false; - QString text; - if (w->inherits("QTextView") || w->inherits("QLabel")) { + TQString text; + if (w->inherits("TQTextView") || w->inherits("TQLabel")) { 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())); + TQString 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); + text, TQString::null, TQString::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); + TQString 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())); + TQString 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); + title, TQString::null, TQString::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); + TQString 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())); + TQString 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); + text, TQString::null, TQString::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); + TQPixmap oldPix = w->property("pixmap").toPixmap(); + TQPixmap pix = qChoosePixmap(this, formWindow(), oldPix); if (!pix.isNull()) { - QString pn(i18n("Set the 'pixmap' of '%1'").arg(w->name())); + TQString 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); + pix, TQString::null, TQString::null); cmd->execute(); formWindow()->commandHistory()->addCommand(cmd); MetaDataBase::setPropertyChanged(w, "pixmap", true); @@ -1200,7 +1200,7 @@ void MainWindow::handleRMBProperties(int id, QMap &props, QWidget } } -void MainWindow::handleRMBSpecialCommands(int id, QMap &commands, QWidget *w) +void MainWindow::handleRMBSpecialCommands(int id, TQMap &commands, TQWidget *w) { // associated text menu // we assume all widgets derive from KommanderWidget [MB02] @@ -1211,8 +1211,8 @@ void MainWindow::handleRMBSpecialCommands(int id, QMap &commands, editor->show(); } - if (w->inherits("QTabWidget")) { - QTabWidget *tw = (QTabWidget*)w; + if (w->inherits("TQTabWidget")) { + TQTabWidget *tw = (TQTabWidget*)w; if (id == commands[ "add" ]) { AddTabPageCommand *cmd = new AddTabPageCommand(i18n("Add Page to %1").arg(tw->name()), formWindow(), tw, "Tab"); @@ -1229,8 +1229,8 @@ void MainWindow::handleRMBSpecialCommands(int id, QMap &commands, } } } - if (w->inherits("QToolBox")) { - QToolBox *tw = (QToolBox*)w; + if (w->inherits("TQToolBox")) { + TQToolBox *tw = (TQToolBox*)w; if (id == commands[ "add" ]) { AddToolBoxPageCommand *cmd = new AddToolBoxPageCommand(i18n("Add Page to %1").arg(tw->name()), formWindow(), tw, "Page"); @@ -1253,7 +1253,7 @@ void MainWindow::handleRMBSpecialCommands(int id, QMap &commands, } } -void MainWindow::handleRMBSpecialCommands(int id, QMap &commands, FormWindow *fw) +void MainWindow::handleRMBSpecialCommands(int id, TQMap &commands, FormWindow *fw) { if(id == commands["assoc"]) @@ -1264,8 +1264,8 @@ void MainWindow::handleRMBSpecialCommands(int id, QMap &commands, } - if (fw->mainContainer()->inherits("QWizard")) { - QWizard *wiz = (QWizard*)fw->mainContainer(); + if (fw->mainContainer()->inherits("TQWizard")) { + TQWizard *wiz = (TQWizard*)fw->mainContainer(); if (id == commands[ "add" ]) { AddWizardPageCommand *cmd = new AddWizardPageCommand(i18n("Add Page to %1").arg(wiz->name()), formWindow(), wiz, "Page"); @@ -1288,17 +1288,17 @@ void MainWindow::handleRMBSpecialCommands(int id, QMap &commands, bool ok = false; QDesignerWizard *dw = (QDesignerWizard*)wiz; - QString text = KInputDialog::getText(i18n("Page Title"), i18n("New page title:"), dw->pageTitle(), &ok, this); + TQString 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())); + TQString 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(); + } else if (fw->mainContainer()->inherits("TQMainWindow")) { + TQMainWindow *mw = (TQMainWindow*)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); @@ -1313,8 +1313,8 @@ void MainWindow::handleRMBSpecialCommands(int id, QMap &commands, void MainWindow::clipboardChanged() { - QString text(kapp->clipboard()->text()); - QString start(""); + TQString text(kapp->clipboard()->text()); + TQString start(""); actionEditPaste->setEnabled(text.left(start.length()) == start); } @@ -1353,11 +1353,11 @@ void MainWindow::selectionChanged() actionEditSplitVertical->setEnabled(false); enable = false; - QWidgetList widgets = formWindow()->selectedWidgets(); + TQWidgetList widgets = formWindow()->selectedWidgets(); if (selectedWidgets > 1) { int unlaidout = 0; int laidout = 0; - for (QWidget *w = widgets.first(); w; w = widgets.next()) { + for (TQWidget *w = widgets.first(); w; w = widgets.next()) { if (!w->parentWidget() || WidgetFactory::layoutType(w->parentWidget()) == WidgetFactory::NoLayout) unlaidout++; else @@ -1373,7 +1373,7 @@ void MainWindow::selectionChanged() layoutSelected = unlaidout > 1; breakLayout = laidout > 0; } else if (selectedWidgets == 1) { - QWidget *w = widgets.first(); + TQWidget *w = widgets.first(); bool isContainer = WidgetDatabase::isContainer(WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(w))) || w == formWindow()->mainContainer(); actionEditAdjustSize->setEnabled(!w->parentWidget() || @@ -1417,7 +1417,7 @@ void MainWindow::selectionChanged() } } else if (selectedWidgets == 0 && formWindow()) { actionEditAdjustSize->setEnabled(true); - QWidget *w = formWindow()->mainContainer(); + TQWidget *w = formWindow()->mainContainer(); if (WidgetFactory::layoutType(w) == WidgetFactory::NoLayout) { if (!formWindow()->hasInsertedChildren(w)) { actionEditHLayout->setEnabled(false); @@ -1491,7 +1491,7 @@ void MainWindow::readConfig() restoreConfig = config->readBoolEntry("RestoreWorkspace", true); splashScreen = config->readBoolEntry("SplashScreen", true); docPath = config->readEntry("DocPath", docPath); - templPath = config->readEntry("TemplatePath", QString::null); + templPath = config->readEntry("TemplatePath", TQString::null); config->setGroup("Grid"); sGrid = config->readBoolEntry("Snap", true); @@ -1503,11 +1503,11 @@ void MainWindow::readConfig() if (config->readBoolEntry("UsePixmap", true)) qworkspace->setBackgroundPixmap(PixmapChooser::loadPixmap("background.png", PixmapChooser::NoSize)); else - qworkspace->setBackgroundColor(QColor(config->readEntry("Color", "#f0f0f0")).rgb()); + qworkspace->setBackgroundColor(TQColor(config->readEntry("Color", "#f0f0f0")).rgb()); /* config->setGroup("Geometry"); - QSize winSize = size(); + TQSize winSize = size(); resize(config->readSizeEntry("MainWindow", &winSize)); if (config->readBoolEntry("MainWindowMax", false)) showMaximized(); @@ -1526,7 +1526,7 @@ void MainWindow::readConfig() KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); for(int i = 0; i < args->count(); i++) { - QFileInfo fi(args->url(i).path()); + TQFileInfo fi(args->url(i).path()); if (fi.exists() && openFormWindow(args->url(i).path())) actionRecent->addURL(args->url(i)); } @@ -1541,9 +1541,9 @@ HierarchyView *MainWindow::objectHierarchy() const return hierarchyView; } -QPopupMenu *MainWindow::setupNormalHierarchyMenu(QWidget *parent) +TQPopupMenu *MainWindow::setupNormalHierarchyMenu(TQWidget *parent) { - QPopupMenu *menu = new QPopupMenu(parent); + TQPopupMenu *menu = new TQPopupMenu(parent); actionEditCut->plug(menu); actionEditCopy->plug(menu); @@ -1553,9 +1553,9 @@ QPopupMenu *MainWindow::setupNormalHierarchyMenu(QWidget *parent) return menu; } -QPopupMenu *MainWindow::setupTabWidgetHierarchyMenu(QWidget *parent, const char *addSlot, const char *removeSlot) +TQPopupMenu *MainWindow::setupTabWidgetHierarchyMenu(TQWidget *parent, const char *addSlot, const char *removeSlot) { - QPopupMenu *menu = new QPopupMenu(parent); + TQPopupMenu *menu = new TQPopupMenu(parent); menu->insertItem(i18n("Add Page"), parent, addSlot); menu->insertItem(i18n("Delete Page"), parent, removeSlot); @@ -1568,13 +1568,13 @@ QPopupMenu *MainWindow::setupTabWidgetHierarchyMenu(QWidget *parent, const char return menu; } -void MainWindow::closeEvent(QCloseEvent *e) +void MainWindow::closeEvent(TQCloseEvent *e) { - QWidgetList windows = qWorkspace()->windowList(); - QWidgetListIt wit(windows); + TQWidgetList windows = qWorkspace()->windowList(); + TQWidgetListIt wit(windows); while (wit.current()) { - QWidget *w = wit.current(); + TQWidget *w = wit.current(); ++wit; if (w->inherits("FormWindow")) { @@ -1592,7 +1592,7 @@ void MainWindow::closeEvent(QCloseEvent *e) if (client) { - QDir home(QDir::homeDirPath()); + TQDir home(TQDir::homeDirPath()); home.remove(".designerpid"); } } @@ -1618,7 +1618,7 @@ ActionEditor *MainWindow::actioneditor() const return actionEditor; } -bool MainWindow::openEditor(QWidget* w, FormWindow*) +bool MainWindow::openEditor(TQWidget* w, FormWindow*) { if (WidgetFactory::hasSpecialEditor(WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(w)))) { statusBar()->message(i18n("Edit %1...").arg(w->className())); @@ -1627,22 +1627,22 @@ bool MainWindow::openEditor(QWidget* w, FormWindow*) 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); + const TQMetaProperty* text = w->metaObject()->property(w->metaObject()->findProperty("text", true), true); + const TQMetaProperty* 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")) { + TQString text; + if (w->inherits("TQTextView") || w->inherits("TQLabel")) { 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())); + TQString 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); + text, TQString::null, TQString::null); cmd->execute(); formWindow()->commandHistory()->addCommand(cmd); MetaDataBase::setPropertyChanged(w, "text", true); @@ -1651,13 +1651,13 @@ bool MainWindow::openEditor(QWidget* w, FormWindow*) } if (title && title->designable(w)) { bool ok = false; - QString text; + TQString 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())); + TQString 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); + text, TQString::null, TQString::null); cmd->execute(); formWindow()->commandHistory()->addCommand(cmd); MetaDataBase::setPropertyChanged(w, "title", true); @@ -1668,13 +1668,13 @@ bool MainWindow::openEditor(QWidget* w, FormWindow*) return true; } -void MainWindow::setGrid(const QPoint &p) +void MainWindow::setGrid(const TQPoint &p) { if (p == grd) return; grd = p; - QWidgetList windows = qWorkspace()->windowList(); - for (QWidget *w = windows.first(); w; w = windows.next()) { + TQWidgetList windows = qWorkspace()->windowList(); + for (TQWidget *w = windows.first(); w; w = windows.next()) { if (!w->inherits("FormWindow")) continue; ((FormWindow*)w)->mainContainer()->update(); @@ -1686,8 +1686,8 @@ void MainWindow::setShowGrid(bool b) if (b == sGrid) return; sGrid = b; - QWidgetList windows = qWorkspace()->windowList(); - for (QWidget *w = windows.first(); w; w = windows.next()) { + TQWidgetList windows = qWorkspace()->windowList(); + for (TQWidget *w = windows.first(); w; w = windows.next()) { if (!w->inherits("FormWindow")) continue; ((FormWindow*)w)->mainContainer()->update(); @@ -1701,9 +1701,9 @@ void MainWindow::setSnapGrid(bool b) snGrid = b; } -QString MainWindow::documentationPath() const +TQString MainWindow::documentationPath() const { - QString result = docPath; + TQString result = docPath; if (docPath[0] == '$') { int fs = docPath.find('/'); @@ -1724,7 +1724,7 @@ QString MainWindow::documentationPath() const void MainWindow::windowsMenuActivated(int id) { - QWidget* w = qworkspace->windowList().at(id); + TQWidget* w = qworkspace->windowList().at(id); if (w) w->setFocus(); } @@ -1733,20 +1733,20 @@ void MainWindow::windowsMenuActivated(int id) void MainWindow::checkTempFiles() { - QString s = QDir::homeDirPath() + "/.designer"; - QString baseName = s+ "/saved-form-"; - if (!QFile::exists(baseName + "1.kmdr")) + TQString s = TQDir::homeDirPath() + "/.designer"; + TQString baseName = s+ "/saved-form-"; + if (!TQFile::exists(baseName + "1.kmdr")) return; - QDir d(s); + TQDir d(s); d.setNameFilter("*.kmdr"); - QStringList lst = d.entryList(); - QApplication::restoreOverrideCursor(); + TQStringList lst = d.entryList(); + TQApplication::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) { + TQApplication::setOverrideCursor(waitCursor); + for (TQStringList::Iterator it = lst.begin(); it != lst.end(); ++it) { if (load) openFormWindow(s + "/" + *it, false); d.remove(*it); @@ -1755,10 +1755,10 @@ void MainWindow::checkTempFiles() void MainWindow::showDialogHelp() { - QWidget *w = (QWidget*)sender(); + TQWidget *w = (TQWidget*)sender(); w = w->topLevelWidget(); - QString link = "designer-manual-12.html#"; + TQString link = "designer-manual-12.html#"; if (w->inherits("NewFormBase")) link += "dialog-file-new"; @@ -1809,7 +1809,7 @@ void MainWindow::showDialogHelp() void MainWindow::fileOpenRecent(const KURL& filename) { - if (!QFile::exists(filename.path())) + if (!TQFile::exists(filename.path())) { KMessageBox::error(this, i18n("Could not open file:
%1
File does not exist.
"). arg(filename.path()), i18n("Open File")); @@ -1826,9 +1826,9 @@ void MainWindow::setupPlugins() -void MainWindow::setModified(bool b, QWidget *window) +void MainWindow::setModified(bool b, TQWidget *window) { - QWidget *w = window; + TQWidget *w = window; while (w) { if (w->inherits("FormWindow")) @@ -1851,11 +1851,11 @@ void MainWindow::updateWorkspace() { } -QWidget *MainWindow::findRealForm(QWidget *wid) +TQWidget *MainWindow::findRealForm(TQWidget *wid) { - QWidgetList windows = qWorkspace()->windowList(); - for (QWidget *w = windows.first(); w; w = windows.next()) { - if (QString(w->name()) == QString(wid->name())) + TQWidgetList windows = qWorkspace()->windowList(); + for (TQWidget *w = windows.first(); w; w = windows.next()) { + if (TQString(w->name()) == TQString(wid->name())) return w; } return 0; @@ -1880,9 +1880,9 @@ int MainWindow::currentLayoutDefaultMargin() const return BOXLAYOUT_DEFAULT_MARGIN; } -QString MainWindow::whatsThisFrom(const QString&) +TQString MainWindow::whatsThisFrom(const TQString&) { - return QString::null; + return TQString::null; } void MainWindow::slotActivePartChanged(KParts::Part * part) diff --git a/kommander/editor/mainwindow.h b/kommander/editor/mainwindow.h index 7a18438f..db685e55 100644 --- a/kommander/editor/mainwindow.h +++ b/kommander/editor/mainwindow.h @@ -25,9 +25,9 @@ #include #include -#include -#include -#include +#include +#include +#include class ActionEditor; class AssistProc; @@ -54,7 +54,7 @@ class ReplaceDialog; class Workspace; #if defined(Q_FULL_TEMPLATE_INSTANTIATION) -#include +#include #else class QToolBar; #endif @@ -84,39 +84,39 @@ public: FormWindow *formWindow(); bool unregisterClient( FormWindow *w ); - QWidget *isAFormWindowChild( QObject *o ) const; - QWidget *isAToolBarChild( QObject *o ) const; + TQWidget *isAFormWindowChild( TQObject *o ) const; + TQWidget *isAToolBarChild( TQObject *o ) const; void insertFormWindow( FormWindow *fw ); - QWorkspace *qWorkspace() const; + TQWorkspace *qWorkspace() const; - void popupFormWindowMenu( const QPoint &gp, FormWindow *fw ); - void popupWidgetMenu( const QPoint &gp, FormWindow *fw, QWidget *w ); + void popupFormWindowMenu( const TQPoint &gp, FormWindow *fw ); + void popupWidgetMenu( const TQPoint &gp, FormWindow *fw, TQWidget *w ); - QPopupMenu *setupNormalHierarchyMenu( QWidget *parent ); - QPopupMenu *setupTabWidgetHierarchyMenu( QWidget *parent, const char *addSlot, const char *removeSlot ); + TQPopupMenu *setupNormalHierarchyMenu( TQWidget *parent ); + TQPopupMenu *setupTabWidgetHierarchyMenu( TQWidget *parent, const char *addSlot, const char *removeSlot ); - FormWindow *openFormWindow( const QString &fn, bool validFileName = TRUE, FormFile *ff = 0 ); + FormWindow *openFormWindow( const TQString &fn, bool validFileName = TRUE, FormFile *ff = 0 ); - void setGrid( const QPoint &p ); + void setGrid( const TQPoint &p ); void setShowGrid( bool b ); void setSnapGrid( bool b ); - QPoint grid() const { return grd; } + TQPoint grid() const { return grd; } bool showGrid() const { return sGrid; } bool snapGrid() const { return snGrid && sGrid; } - QString documentationPath() const; + TQString documentationPath() const; static MainWindow *self; void saveAllTemp(); - QString templatePath() const { return templPath; } + TQString templatePath() const { return templPath; } bool isPreviewing() const { return previewing; } FormWindow *activeForm() const { return lastActiveFormWindow; } - void setModified( bool b, QWidget *window ); + void setModified( bool b, TQWidget *window ); void updateWorkspace(); void formNameChanged( FormWindow *fw ); @@ -126,8 +126,8 @@ public: public slots: - void showProperties( QObject *w ); - void updateProperties( QObject *w ); + void showProperties( TQObject *w ); + void updateProperties( TQObject *w ); void showDialogHelp(); void slotActivePartChanged(KParts::Part * ); @@ -143,14 +143,14 @@ signals: void formWindowChanged(); protected: - bool eventFilter( QObject *o, QEvent *e ); - void closeEvent( QCloseEvent *e ); + bool eventFilter( TQObject *o, TQEvent *e ); + void closeEvent( TQCloseEvent *e ); public slots: void fileNew(); void fileClose(); void fileOpen(); - void fileOpen(const QString &filename); + void fileOpen(const TQString &filename); void fileOpenRecent(const KURL& name); bool fileSave(); bool fileSaveForm(); // not visible in menu, called from fileSave @@ -194,8 +194,8 @@ public slots: void runForm4(); private slots: - void activeWindowChanged( QWidget *w ); - void updateUndoRedo( bool, bool, const QString &, const QString & ); + void activeWindowChanged( TQWidget *w ); + void updateUndoRedo( bool, bool, const TQString &, const TQString & ); void toolSelected(); @@ -228,40 +228,40 @@ private: void setupMessageLog(); void setupPlugins(); - QWidget* previewFormInternal( QStyle* style = 0, QPalette* pal = 0 ); + TQWidget* previewFormInternal( TQStyle* style = 0, TQPalette* pal = 0 ); void writeConfig(); void readConfig(); - void setupRMBProperties( QValueList &ids, QMap &props, QWidget *w ); - void handleRMBProperties( int id, QMap &props, QWidget *w ); - void setupRMBSpecialCommands( QValueList &ids, QMap &commands, QWidget *w ); - void handleRMBSpecialCommands( int id, QMap &commands, QWidget *w ); - void setupRMBSpecialCommands( QValueList &ids, QMap &commands, FormWindow *w ); - void handleRMBSpecialCommands( int id, QMap &commands, FormWindow *w ); - bool openEditor( QWidget *w, FormWindow *fw ); + void setupRMBProperties( TQValueList &ids, TQMap &props, TQWidget *w ); + void handleRMBProperties( int id, TQMap &props, TQWidget *w ); + void setupRMBSpecialCommands( TQValueList &ids, TQMap &commands, TQWidget *w ); + void handleRMBSpecialCommands( int id, TQMap &commands, TQWidget *w ); + void setupRMBSpecialCommands( TQValueList &ids, TQMap &commands, FormWindow *w ); + void handleRMBSpecialCommands( int id, TQMap &commands, FormWindow *w ); + bool openEditor( TQWidget *w, FormWindow *fw ); void checkTempFiles(); - void addRecentlyOpened(const QString &fn); - QWidget *findRealForm( QWidget *w ); + void addRecentlyOpened(const TQString &fn); + TQWidget *findRealForm( TQWidget *w ); - QString whatsThisFrom( const QString &key ); + TQString whatsThisFrom( const TQString &key ); private: PropertyEditor *propertyEditor; HierarchyView *hierarchyView; Workspace *wspace; - QWidget *lastPressWidget; - QWorkspace *qworkspace; + TQWidget *lastPressWidget; + TQWorkspace *qworkspace; KMenuBar *menubar; FormWindow *lastActiveFormWindow; bool breakLayout, layoutChilds, layoutSelected; - QPoint grd; + TQPoint grd; bool sGrid, snGrid; bool restoreConfig; bool backPix; bool splashScreen; - QString docPath; + TQString docPath; KAction *actionEditUndo, *actionEditRedo, *actionEditCut, *actionEditCopy, *actionEditPaste, *actionEditDelete, *actionEditAdjustSize, @@ -275,42 +275,42 @@ private: KAction *actionEditFormSettings, *actionEditAccels; KRecentFilesAction* actionRecent; - QPopupMenu *rmbWidgets; - QPopupMenu *rmbFormWindow; - QPopupMenu *windowMenu, *fileMenu; + TQPopupMenu *rmbWidgets; + TQPopupMenu *rmbFormWindow; + TQPopupMenu *windowMenu, *fileMenu; - QToolBar *layoutToolBar; + TQToolBar *layoutToolBar; KToolBar *fileTb; Preferences *prefDia; - QMap propertyDocumentation; + TQMap propertyDocumentation; bool client; - QString templPath; + TQString templPath; ActionEditor *actionEditor; bool databaseAutoEdit; - QTimer *updateSlotsTimer; - QTimer *backupTimer; + TQTimer *updateSlotsTimer; + TQTimer *backupTimer; bool inDebugMode; - QObjectList debuggingForms; - QString lastOpenFilter; - QString menuHelpFile; + TQObjectList debuggingForms; + TQString lastOpenFilter; + TQString menuHelpFile; AssistProc *assistant; bool previewing; MessageLog* messageLog; // Paths of external Kommander tools for Editor - QStringList m_editorTools; - QString m_toolOutput; + TQStringList m_editorTools; + TQString m_toolOutput; KParts::PartManager *m_partManager; - QString m_fileName; - QString m_backupName; + TQString m_fileName; + TQString m_backupName; bool m_modified; public: - QString lastSaveFilter; + TQString lastSaveFilter; }; diff --git a/kommander/editor/mainwindowactions.cpp b/kommander/editor/mainwindowactions.cpp index f7657d26..a4d4c430 100644 --- a/kommander/editor/mainwindowactions.cpp +++ b/kommander/editor/mainwindowactions.cpp @@ -19,18 +19,18 @@ #include "mainwindow.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include "defs.h" #include "widgetdatabase.h" @@ -76,15 +76,15 @@ #include -const QString toolbarHelp = "

Toolbars contain a number of buttons to " +const TQString toolbarHelp = "

Toolbars contain a number of buttons to " "provide quick access to often used functions.%1" "
Click on the toolbar handle to hide the toolbar, " "or drag and place the toolbar to a different location.

"; -static QIconSet createIconSet( const QString &name ) +static TQIconSet createIconSet( const TQString &name ) { - QIconSet ic( PixmapChooser::loadPixmap( name, PixmapChooser::Small ) ); - ic.setPixmap( PixmapChooser::loadPixmap( name, PixmapChooser::Disabled ), QIconSet::Small, QIconSet::Disabled ); + TQIconSet ic( PixmapChooser::loadPixmap( name, PixmapChooser::Small ) ); + ic.setPixmap( PixmapChooser::loadPixmap( name, PixmapChooser::Disabled ), TQIconSet::Small, TQIconSet::Disabled ); return ic; } @@ -92,81 +92,81 @@ int forms = 0; void MainWindow::setupEditActions() { - actionEditUndo = KStdAction::undo(this, SLOT(editUndo()), actionCollection()); + actionEditUndo = KStdAction::undo(this, TQT_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 = KStdAction::redo(this, TQT_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 = KStdAction::cut(this, TQT_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 = KStdAction::copy(this, TQT_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 = KStdAction::paste(this, TQT_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()), + actionEditDelete = new KAction(i18n("Delete"), Key_Delete, this, TQT_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 = KStdAction::selectAll(this, TQT_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"); + KShortcut::null(), this, TQT_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"); + KShortcut::null(), this, TQT_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 = new KAction(i18n("Find in Form..."), CTRL + ALT + Key_F, this, TQT_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))); + connect(this, TQT_SIGNAL(hasActiveForm(bool)), actionEditFindGlobal, TQT_SLOT(setEnabled(bool))); - actionEditAccels = new KAction(i18n("Check Accelerators"), ALT + Key_R, this, SLOT(editAccels()), + actionEditAccels = new KAction(i18n("Check Accelerators"), ALT + Key_R, this, TQT_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))); + connect(this, TQT_SIGNAL(hasActiveForm(bool)), actionEditAccels, TQT_SLOT(setEnabled(bool))); actionEditConnections = new KAction(i18n("Connections"), createIconSet("connecttool.xpm"), - KShortcut::null(), this, SLOT(editConnections()), actionCollection(), + KShortcut::null(), this, TQT_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))); + connect(this, TQT_SIGNAL(hasActiveForm(bool)), actionEditConnections, TQT_SLOT(setEnabled(bool))); actionEditFormSettings = new KAction(i18n("Form Settings..."), KShortcut::null(), - this, SLOT(editFormSettings()), actionCollection(), "edit_form"); + this, TQT_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))); + connect(this, TQT_SIGNAL(hasActiveForm(bool)), actionEditFormSettings, TQT_SLOT(setEnabled(bool))); KToolBar *tb = new KToolBar(this, "Edit"); tb->setFullSize(false); - QWhatsThis::add(tb, i18n("The Edit toolbar%1").arg(toolbarHelp)); + TQWhatsThis::add(tb, i18n("The Edit toolbar%1").arg(toolbarHelp)); addToolBar(tb, i18n("Edit")); actionEditUndo->plug(tb); actionEditRedo->plug(tb); @@ -175,7 +175,7 @@ void MainWindow::setupEditActions() actionEditCopy->plug(tb); actionEditPaste->plug(tb); - QPopupMenu *menu = new QPopupMenu(this, "Edit"); + TQPopupMenu *menu = new TQPopupMenu(this, "Edit"); menuBar()->insertItem(i18n("&Edit"), menu); actionEditUndo->plug(menu); actionEditRedo->plug(menu); @@ -198,51 +198,51 @@ void MainWindow::setupEditActions() void MainWindow::setupLayoutActions() { actionEditAdjustSize = new KAction(i18n("Adjust Size"), createIconSet("adjustsize.xpm"), - CTRL + Key_J, this, SLOT(editAdjustSize()), actionCollection(), "edit_adjust_size"); + CTRL + Key_J, this, TQT_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"); + CTRL + Key_H, this, TQT_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"); + CTRL + Key_L, this, TQT_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"); + CTRL + Key_G, this, TQT_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(), + KShortcut::null(), this, TQT_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(), + KShortcut::null(), this, TQT_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"); + CTRL + Key_B, this, TQT_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()); + KToggleAction *a = new KToggleAction(i18n("Spacer"), createIconSet("spacer.xpm"), KShortcut::null(), this, TQT_SLOT(toolSelected()), + actionCollection(), TQString::number(id).latin1()); a->setExclusiveGroup("tool"); a->setText(i18n("Add ") + WidgetDatabase::className(id)); a->setToolTip(i18n("Insert a %1").arg(WidgetDatabase::toolTip(id))); @@ -251,7 +251,7 @@ void MainWindow::setupLayoutActions() "or double click to keep the tool selected.").arg(WidgetDatabase::toolTip(id)). arg(WidgetDatabase::whatsThis(id)).arg(WidgetDatabase::toolTip(id))); - QWhatsThis::add(layoutToolBar, i18n("The Layout toolbar%1").arg(toolbarHelp)); + TQWhatsThis::add(layoutToolBar, i18n("The Layout toolbar%1").arg(toolbarHelp)); actionEditAdjustSize->plug(layoutToolBar); layoutToolBar->addSeparator(); actionEditHLayout->plug(layoutToolBar); @@ -263,7 +263,7 @@ void MainWindow::setupLayoutActions() layoutToolBar->addSeparator(); a->plug(layoutToolBar); - QPopupMenu *menu = new QPopupMenu(this, "Layout"); + TQPopupMenu *menu = new TQPopupMenu(this, "Layout"); menuBar()->insertItem(i18n("&Layout"), menu); actionEditAdjustSize->plug(menu); menu->insertSeparator(); @@ -280,36 +280,36 @@ void MainWindow::setupLayoutActions() void MainWindow::setupToolActions() { actionPointerTool = new KToggleAction(i18n("Pointer"), "arrow", Key_F2, - this, SLOT(toolSelected()), actionCollection(), - QString::number(POINTER_TOOL).latin1()); + this, TQT_SLOT(toolSelected()), actionCollection(), + TQString::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()); + Key_F3, this, TQT_SLOT(toolSelected()), actionCollection(), + TQString::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()); + Key_F4, this, TQT_SLOT(toolSelected()), actionCollection(), + TQString::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("The Tools toolbar%1").arg(toolbarHelp)); + TQWhatsThis::add(tb, i18n("The Tools toolbar%1").arg(toolbarHelp)); - addToolBar(tb, i18n("Tools"), QMainWindow::DockTop, true); + addToolBar(tb, i18n("Tools"), TQMainWindow::DockTop, true); actionPointerTool->plug(tb); actionConnectTool->plug(tb); actionOrderTool->plug(tb); - QPopupMenu *mmenu = new QPopupMenu(this, "Tools"); + TQPopupMenu *mmenu = new TQPopupMenu(this, "Tools"); menuBar()->insertItem(i18n("&Tools"), mmenu); actionPointerTool->plug(mmenu); actionConnectTool->plug(mmenu); @@ -318,7 +318,7 @@ void MainWindow::setupToolActions() for (int j = 0; j < WidgetDatabase::numWidgetGroups(); ++j) { - QString grp = WidgetDatabase::widgetGroup(j); + TQString grp = WidgetDatabase::widgetGroup(j); if (!WidgetDatabase::isGroupVisible(grp) || WidgetDatabase::isGroupEmpty(grp)) continue; KToolBar *tb = new KToolBar(this, grp.latin1()); @@ -326,17 +326,17 @@ void MainWindow::setupToolActions() bool plural = grp[(int) grp.length() - 1] == 's'; if (plural) { - QWhatsThis::add(tb, i18n("The %1%2").arg(grp).arg(toolbarHelp). + TQWhatsThis::add(tb, i18n("The %1%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("The %1 Widgets%2").arg(grp).arg(toolbarHelp). + TQWhatsThis::add(tb, i18n("The %1 Widgets%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()); + TQPopupMenu *menu = new TQPopupMenu(this, grp.latin1()); mmenu->insertItem(grp, menu); for (int i = 0; i < WidgetDatabase::count(); ++i) @@ -344,9 +344,9 @@ void MainWindow::setupToolActions() 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()); + this, TQT_SLOT(toolSelected()), actionCollection(), TQString::number(i).latin1()); a->setExclusiveGroup("tool"); - QString atext = WidgetDatabase::className(i); + TQString atext = WidgetDatabase::className(i); if (atext[0] == 'Q') atext = atext.mid(1); while (atext.length() && atext[0] >= 'a' && atext[0] <= 'z') @@ -354,16 +354,16 @@ void MainWindow::setupToolActions() if (atext.isEmpty()) atext = WidgetDatabase::className(i); a->setText(atext); - QString ttip = WidgetDatabase::toolTip(i); + TQString 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("A %1").arg(WidgetDatabase::className(i)); + TQString whats = i18n("A %1").arg(WidgetDatabase::className(i)); if (!WidgetDatabase::whatsThis(i).isEmpty()) - whats += QString("

%1

").arg(WidgetDatabase::whatsThis(i)); + whats += TQString("

%1

").arg(WidgetDatabase::whatsThis(i)); a->setWhatsThis(whats + i18n("

Double click on this tool to keep it selected.

")); if (grp != "KDE") @@ -374,23 +374,23 @@ void MainWindow::setupToolActions() // 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) + TQPopupMenu* editMenu = new TQPopupMenu(this); + TQStringList searchPaths = KGlobal::dirs()->findDirs("data", "kmdr-editor/editor"); + for (TQStringList::ConstIterator it = searchPaths.begin(); it != searchPaths.end(); ++it) { - if (!QFile::exists(*it)) + if (!TQFile::exists(*it)) continue; - QDir dir(*it); - const QFileInfoList* fileList = dir.entryInfoList(QDir::DefaultFilter, QDir::DirsFirst | QDir::Name); + TQDir dir(*it); + const QFileInfoList* fileList = dir.entryInfoList(TQDir::DefaultFilter, TQDir::DirsFirst | TQDir::Name); if (fileList) for (QFileInfoListIterator fit(*fileList); fit.current(); ++fit) { - QFileInfo* fi = fit.current(); + TQFileInfo* fi = fit.current(); if (!fi->isFile() || fi->extension() != "kmdr") continue; - QString name = fi->baseName(); + TQString name = fi->baseName(); name = name.replace("_", " "); - editMenu->insertItem(name, this, SLOT(editExternalTool(int)), 0, m_editorTools.count()); + editMenu->insertItem(name, this, TQT_SLOT(editExternalTool(int)), 0, m_editorTools.count()); m_editorTools.append(fi->filePath()); } } @@ -405,59 +405,59 @@ void MainWindow::setupFileActions() fileTb = new KToolBar(this, "File"); fileTb->setFullSize(false); - QWhatsThis::add(fileTb, i18n("The File toolbar%1").arg(toolbarHelp)); + TQWhatsThis::add(fileTb, i18n("The File toolbar%1").arg(toolbarHelp)); addToolBar(fileTb, i18n("File")); - fileMenu = new QPopupMenu(this, "File"); + fileMenu = new TQPopupMenu(this, "File"); menuBar()->insertItem(i18n("&File"), fileMenu); - KAction *a = KStdAction::openNew(this, SLOT(fileNew()), actionCollection()); + KAction *a = KStdAction::openNew(this, TQT_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 = KStdAction::open(this, TQT_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 = KStdAction::openRecent(this, TQT_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 = KStdAction::close(this, TQT_SLOT(fileClose()), actionCollection()); a->setToolTip(i18n("Closes the current dialog")); a->setWhatsThis(whatsThisFrom("File|Close")); - connect(this, SIGNAL(hasActiveWindow(bool)), a, SLOT(setEnabled(bool))); + connect(this, TQT_SIGNAL(hasActiveWindow(bool)), a, TQT_SLOT(setEnabled(bool))); a->plug(fileMenu); fileMenu->insertSeparator(); - a = KStdAction::save(this, SLOT(fileSave()), actionCollection()); + a = KStdAction::save(this, TQT_SLOT(fileSave()), actionCollection()); a->setToolTip(i18n("Saves the current dialog")); a->setWhatsThis(whatsThisFrom("File|Save")); - connect(this, SIGNAL(hasActiveWindow(bool)), a, SLOT(setEnabled(bool))); + connect(this, TQT_SIGNAL(hasActiveWindow(bool)), a, TQT_SLOT(setEnabled(bool))); a->plug(fileTb); a->plug(fileMenu); - a = KStdAction::saveAs(this, SLOT(fileSaveAs()), actionCollection()); + a = KStdAction::saveAs(this, TQT_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))); + connect(this, TQT_SIGNAL(hasActiveWindow(bool)), a, TQT_SLOT(setEnabled(bool))); a->plug(fileMenu); - a = new KAction(i18n("Save All"), "save_all", KShortcut::null(), this, SLOT(fileSaveAll()), + a = new KAction(i18n("Save All"), "save_all", KShortcut::null(), this, TQT_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))); + connect(this, TQT_SIGNAL(hasActiveWindow(bool)), a, TQT_SLOT(setEnabled(bool))); a->plug(fileMenu); fileMenu->insertSeparator(); - a = KStdAction::quit(kapp, SLOT(closeAllWindows()), actionCollection()); + a = KStdAction::quit(kapp, TQT_SLOT(closeAllWindows()), actionCollection()); a->setToolTip(i18n("Quits the application and prompts to save any changed dialogs")); a->setWhatsThis(whatsThisFrom("File|Exit")); a->plug(fileMenu); @@ -466,23 +466,23 @@ void MainWindow::setupFileActions() void MainWindow::setupRunActions() { - QPopupMenu *menu = new QPopupMenu(this, "Run"); + TQPopupMenu *menu = new TQPopupMenu(this, "Run"); menuBar()->insertItem(i18n("&Run"), menu); KAction* a = new KAction(i18n("Run Dialog"), "run", CTRL + Key_R, - this, SLOT(runForm()), actionCollection(), "run"); + this, TQT_SLOT(runForm()), actionCollection(), "run"); a->setToolTip(i18n("Executes dialog")); a->setWhatsThis(whatsThisFrom("Run|Run dialog")); - connect(this, SIGNAL(hasActiveForm(bool)), a, SLOT(setEnabled(bool))); + connect(this, TQT_SIGNAL(hasActiveForm(bool)), a, TQT_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"); + this, TQT_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))); + connect(this, TQT_SIGNAL(hasActiveForm(bool)), b, TQT_SLOT(setEnabled(bool))); b->plug(menu); } @@ -493,39 +493,39 @@ void MainWindow::setupWindowActions() { windowActionsSetup = true; - KAction* actionWindowTile = new KAction(i18n("Tile"), KShortcut::null(), qworkspace, SLOT(tile()), + KAction* actionWindowTile = new KAction(i18n("Tile"), KShortcut::null(), qworkspace, TQT_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()), + KAction* actionWindowCascade = new KAction(i18n("Cascade"), KShortcut::null(), qworkspace, TQT_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()), + KAction* actionWindowClose = new KAction(i18n("Cascade"), KShortcut::null(), qworkspace, TQT_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"); + TQT_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"); + TQT_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"); + TQT_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())); + connect(windowMenu, TQT_SIGNAL(aboutToShow()), this, TQT_SLOT(setupWindowActions())); actionWindowClose->plug(windowMenu); actionWindowCloseAll->plug(windowMenu); @@ -544,25 +544,25 @@ void MainWindow::setupWindowActions() while (windowMenu->count() > 11) windowMenu->removeItemAt(windowMenu->count() - 1); - QWidgetList windows = qworkspace->windowList(); + TQWidgetList 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); + TQWidget *w = windows.at(i); if (!w->inherits("FormWindow") && !w->inherits("SourceEditor")) continue; j++; - QString itemText; + TQString itemText; if (j < 10) - itemText = QString("&%1 ").arg(j); + itemText = TQString("&%1 ").arg(j); if (w->inherits("FormWindow")) itemText += w->name(); else itemText += w->caption(); - int id = windowMenu->insertItem(itemText, this, SLOT(windowsMenuActivated(int))); + int id = windowMenu->insertItem(itemText, this, TQT_SLOT(windowsMenuActivated(int))); windowMenu->setItemParameter(id, i); windowMenu->setItemChecked(id, qworkspace->activeWindow() == windows.at(i)); } @@ -572,21 +572,21 @@ void MainWindow::setupWindowActions() void MainWindow::setupSettingsActions() { KPopupMenu *settings = new KPopupMenu(this, "Settings"); - KAction* a = KStdAction::keyBindings(this, SLOT(editShortcuts()), actionCollection()); + KAction* a = KStdAction::keyBindings(this, TQT_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()), + a = new KAction(i18n("Configure &Plugins..."), KShortcut::null(), this, TQT_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()), + a = new KAction(i18n("&Configure Editor..."), KShortcut::null(), this, TQT_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 = KStdAction::preferences(this, TQT_SLOT(editPreferences()), actionCollection()); a->setToolTip(i18n("Opens a dialog to change preferences")); a->setWhatsThis(whatsThisFrom("Edit|Preferences")); a->plug(settings); @@ -604,14 +604,14 @@ void MainWindow::setupHelpActions() void MainWindow::fileNew() { statusBar()->message(i18n("Create a new dialog...")); - NewForm dlg(this, QString::null); + NewForm dlg(this, TQString::null); dlg.exec(); statusBar()->clear(); } void MainWindow::fileClose() { - QWidget *w = qworkspace->activeWindow(); + TQWidget *w = qworkspace->activeWindow(); if (w->inherits("FormWindow")) { emit removedFormFile(((FormWindow *) w)->formFile()); @@ -624,22 +624,22 @@ void MainWindow::fileOpen() // as called by the menu fileOpen(""); } -void MainWindow::fileOpen(const QString & fn) +void MainWindow::fileOpen(const TQString & fn) { statusBar()->message(i18n("Open a file...")); - QStringList additionalSources; + TQStringList additionalSources; - QStringList filenames; + TQStringList filenames; if (fn.isEmpty()) - filenames = KFileDialog::getOpenFileNames(QString::null, i18n("*.kmdr|Kommander Files"), this, i18n("Open Files")); + filenames = KFileDialog::getOpenFileNames(TQString::null, i18n("*.kmdr|Kommander Files"), this, i18n("Open Files")); else filenames << fn; - for (QStringList::ConstIterator fit = filenames.constBegin(); fit != filenames.constEnd(); ++fit) + for (TQStringList::ConstIterator fit = filenames.constBegin(); fit != filenames.constEnd(); ++fit) { - QString filename = *fit; + TQString filename = *fit; if (!filename.isEmpty()) { - QFileInfo fi(filename); + TQFileInfo fi(filename); if (fi.exists() && openFormWindow(filename)) actionRecent->addURL(filename); } @@ -648,36 +648,36 @@ void MainWindow::fileOpen(const QString & fn) -FormWindow *MainWindow::openFormWindow(const QString &filename, bool validFileName, FormFile *ff) +FormWindow *MainWindow::openFormWindow(const TQString &filename, bool validFileName, FormFile *ff) { if (filename.isEmpty()) return 0; bool makeNew = false; - if (!QFile::exists(filename)) + if (!TQFile::exists(filename)) { makeNew = true; } else { - QFile f(filename); + TQFile f(filename); f.open(IO_ReadOnly); - QTextStream ts(&f); + TQTextStream ts(&f); makeNew = ts.read().length() < 2; } if (!makeNew) { statusBar()->message(i18n("Reading file '%1'...").arg(filename)); - if (QFile::exists(filename)) + if (TQFile::exists(filename)) { - QApplication::setOverrideCursor(WaitCursor); + TQApplication::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(); + ((FormWindow *) resource.widget())->setFileName(TQString::null); + TQApplication::restoreOverrideCursor(); if (b) { statusBar()->message(i18n("Loaded file '%1'").arg(filename), 3000); @@ -716,7 +716,7 @@ bool MainWindow::fileSaveForm() fw = formWindow(); if (!fw || !fw->formFile()->save()) return false; - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); return true; } @@ -724,7 +724,7 @@ bool MainWindow::fileSaveAs() { statusBar()->message(i18n("Enter a filename...")); - QWidget *w = qworkspace->activeWindow(); + TQWidget *w = qworkspace->activeWindow(); if (!w) return true; if (w->inherits("FormWindow")) @@ -734,7 +734,7 @@ bool MainWindow::fileSaveAs() void MainWindow::fileSaveAll() { - QWidgetList windows = qworkspace->windowList(QWorkspace::StackingOrder); + TQWidgetList windows = qworkspace->windowList(TQWorkspace::StackingOrder); for (int i = 0; i < (int)windows.count(); ++i) { FormWindow* fw = dynamic_cast(windows.at(i)); @@ -751,15 +751,15 @@ void MainWindow::saveAllTemp() 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-"; + TQWidgetList windows = qWorkspace()->windowList(); + TQString baseName = TQDir::homeDirPath() + "/.designer/saved-form-"; int i = 1; - for (QWidget * w = windows.first(); w; w = windows.next()) + for (TQWidget * w = windows.first(); w; w = windows.next()) { if (!w->inherits("FormWindow")) continue; - QString fn = baseName + QString::number(i++) + ".kmdr"; + TQString fn = baseName + TQString::number(i++) + ".kmdr"; ((FormWindow *) w)->setFileName(fn); ((FormWindow *) w)->formFile()->save(); } @@ -781,29 +781,29 @@ void MainWindow::fileCreateTemplate() for (i = 0; i < WidgetDatabase::count(); ++i) { if (WidgetDatabase::isContainer(i) && !WidgetDatabase::isForm(i) && - WidgetDatabase::className(i) != "QTabWidget" && WidgetDatabase::widgetGroup(i) != "Temp") + WidgetDatabase::className(i) != "TQTabWidget" && WidgetDatabase::widgetGroup(i) != "Temp") { dia.listClass->insertItem(WidgetDatabase::className(i)); } } dia.editName->setText(i18n("NewTemplate")); - connect(dia.buttonCreate, SIGNAL(clicked()), this, SLOT(createNewTemplate())); + connect(dia.buttonCreate, TQT_SIGNAL(clicked()), this, TQT_SLOT(createNewTemplate())); dia.exec(); } void MainWindow::createNewTemplate() { CreateTemplate *dia = (CreateTemplate *) sender()->parent(); - QString fn = dia->editName->text(); - QString cn = dia->listClass->currentText(); + TQString fn = dia->editName->text(); + TQString cn = dia->listClass->currentText(); if (fn.isEmpty() || cn.isEmpty()) { KMessageBox::information(this, i18n("Could not create the template"), i18n("Create Template")); return; } - QStringList templRoots; + TQStringList templRoots; const char *qtdir = getenv("QTDIR"); if (qtdir) templRoots << qtdir; @@ -814,13 +814,13 @@ void MainWindow::createNewTemplate() 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) + templRoots << TQString(qtdir) + "/tools/designer"; + TQFile f; + for (TQStringList::Iterator it = templRoots.begin(); it != templRoots.end(); ++it) { - if (QFile::exists((*it) + "/templates/")) + if (TQFile::exists((*it) + "/templates/")) { - QString tmpfn = (*it) + "/templates/" + fn + ".kmdr"; + TQString tmpfn = (*it) + "/templates/" + fn + ".kmdr"; f.setName(tmpfn); if (f.open(IO_WriteOnly)) break; @@ -831,7 +831,7 @@ void MainWindow::createNewTemplate() KMessageBox::information(this, i18n("Could not create the template"), i18n("Create Template")); return; } - QTextStream ts(&f); + TQTextStream ts(&f); ts << "" << endl; ts << "" << endl; @@ -884,8 +884,8 @@ void MainWindow::editPaste() if (!formWindow()) return; - QWidget *w = formWindow()->mainContainer(); - QWidgetList l(formWindow()->selectedWidgets()); + TQWidget *w = formWindow()->mainContainer(); + TQWidgetList l(formWindow()->selectedWidgets()); if (l.count() == 1) { w = l.first(); @@ -983,8 +983,8 @@ void MainWindow::editLayoutContainerVertical() { if (!formWindow()) return; - QWidget *w = formWindow()->mainContainer(); - QWidgetList l(formWindow()->selectedWidgets()); + TQWidget *w = formWindow()->mainContainer(); + TQWidgetList l(formWindow()->selectedWidgets()); if (l.count() == 1) w = l.first(); if (w) @@ -995,8 +995,8 @@ void MainWindow::editLayoutContainerHorizontal() { if (!formWindow()) return; - QWidget *w = formWindow()->mainContainer(); - QWidgetList l(formWindow()->selectedWidgets()); + TQWidget *w = formWindow()->mainContainer(); + TQWidgetList l(formWindow()->selectedWidgets()); if (l.count() == 1) w = l.first(); if (w) @@ -1007,8 +1007,8 @@ void MainWindow::editLayoutContainerGrid() { if (!formWindow()) return; - QWidget *w = formWindow()->mainContainer(); - QWidgetList l(formWindow()->selectedWidgets()); + TQWidget *w = formWindow()->mainContainer(); + TQWidgetList l(formWindow()->selectedWidgets()); if (l.count() == 1) w = l.first(); if (w) @@ -1022,7 +1022,7 @@ void MainWindow::editBreakLayout() { return; } - QWidget *w = formWindow()->mainContainer(); + TQWidget *w = formWindow()->mainContainer(); if (formWindow()->currentWidget()) w = formWindow()->currentWidget(); if (WidgetFactory::layoutType(w) != WidgetFactory::NoLayout || @@ -1033,7 +1033,7 @@ void MainWindow::editBreakLayout() } else { - QWidgetList widgets = formWindow()->selectedWidgets(); + TQWidgetList widgets = formWindow()->selectedWidgets(); for (w = widgets.first(); w; w = widgets.next()) { if (WidgetFactory::layoutType(w) != WidgetFactory::NoLayout || @@ -1098,7 +1098,7 @@ 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())); + connect(dia->helpButton, TQT_SIGNAL(clicked()), MainWindow::self, TQT_SLOT(showDialogHelp())); dia->buttonColor->setEditor(StyledButton::ColorEditor); dia->buttonPixmap->setEditor(StyledButton::PixmapEditor); dia->checkBoxShowGrid->setChecked(sGrid); @@ -1119,13 +1119,13 @@ void MainWindow::editPreferences() dia->checkBoxSplash->setChecked(splashScreen); dia->editDocPath->setText(docPath); dia->checkAutoEdit->setChecked(!databaseAutoEdit); - connect(dia->buttonDocPath, SIGNAL(clicked()), this, SLOT(chooseDocPath())); + connect(dia->buttonDocPath, TQT_SIGNAL(clicked()), this, TQT_SLOT(chooseDocPath())); - if (dia->exec() == QDialog::Accepted) + if (dia->exec() == TQDialog::Accepted) { setSnapGrid(dia->checkBoxGrid->isChecked()); setShowGrid(dia->checkBoxShowGrid->isChecked()); - setGrid(QPoint(dia->spinGridX->value(), dia->spinGridY->value())); + setGrid(TQPoint(dia->spinGridX->value(), dia->spinGridY->value())); restoreConfig = dia->checkBoxWorkspace->isChecked(); setUsesBigPixmaps(false /*dia->checkBoxBigIcons->isChecked() */ ); // ### disable for now setUsesTextLabel(dia->checkBoxTextLabels->isChecked()); @@ -1173,8 +1173,8 @@ 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))); + connect(process, TQT_SIGNAL(processExited(KProcess*)), TQT_SLOT(editToolExited(KProcess*))); + connect(process, TQT_SIGNAL(receivedStdout(KProcess*, char*, int)), TQT_SLOT(editToolOutput(KProcess*, char*, int))); m_toolOutput = '\0'; process->start(KProcess::NotifyOnExit, KProcess::Stdout); } @@ -1186,14 +1186,14 @@ void MainWindow::editToolExited(KProcess* process) void MainWindow::editToolOutput(KProcess*, char* buffer, int buflen) { - m_toolOutput += QString::fromLocal8Bit(buffer, buflen); + m_toolOutput += TQString::fromLocal8Bit(buffer, buflen); } void MainWindow::chooseDocPath() { if (!prefDia) return; - QString fn = KFileDialog::getExistingDirectory(QString::null, this); + TQString fn = KFileDialog::getExistingDirectory(TQString::null, this); if (!fn.isEmpty()) prefDia->editDocPath->setText(fn); } diff --git a/kommander/editor/messagelog.cpp b/kommander/editor/messagelog.cpp index 952dd19f..ecaed31a 100644 --- a/kommander/editor/messagelog.cpp +++ b/kommander/editor/messagelog.cpp @@ -24,26 +24,26 @@ #include #include -#include -#include -#include +#include +#include +#include -MessageLog::MessageLog(QWidget* parent, const char* name) : QTabWidget(parent, name) +MessageLog::MessageLog(TQWidget* parent, const char* name) : TQTabWidget(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->insertItem(SmallIconSet("editcopy"), i18n("Copy Current &Line"), this, TQT_SLOT(copyLine())); + m_popupMenu->insertItem(SmallIconSet("editcopy"), i18n("&Copy Content"), this, TQT_SLOT(copyContent())); + m_popupMenu->insertItem(SmallIconSet("filesaveas"), i18n("&Save As..."), this, TQT_SLOT(saveToFile())); m_popupMenu->insertSeparator(); - m_popupMenu->insertItem(SmallIconSet("editclear"), i18n("Clear"), this, SLOT(clearContent())); + m_popupMenu->insertItem(SmallIconSet("editclear"), i18n("Clear"), this, TQT_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&))); + connect(m_lists[i], TQT_SIGNAL(contextMenuRequested(TQListBoxItem*, const TQPoint&)), + this, TQT_SLOT(showMenu(TQListBoxItem*, const TQPoint&))); } } @@ -51,13 +51,13 @@ MessageLog::~MessageLog() { } -void MessageLog::insertItem(InfoType i, QString text) +void MessageLog::insertItem(InfoType i, TQString 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 ) + TQStringList items(TQStringList::split('\n', text)); + for (TQStringList::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); @@ -69,9 +69,9 @@ void MessageLog::insertItem(InfoType i, QString text) m_lists[i]->ensureCurrentVisible(); } -QString MessageLog::content() +TQString MessageLog::content() { - QString p_content; + TQString p_content; KListBox* list = m_lists[currentPageIndex()]; for (uint i=0; i < list->count(); i++) p_content.append(list->text(i) + "\n"); @@ -92,12 +92,12 @@ void MessageLog::clear(InfoType i) void MessageLog::receivedStdout(KProcess*, char* buffer, int buflen) { - insertItem(Stdout, QString::fromLocal8Bit(buffer, buflen)); + insertItem(Stdout, TQString::fromLocal8Bit(buffer, buflen)); } void MessageLog::receivedStderr(KProcess*, char* buffer, int buflen) { - insertItem(Stderr, QString::fromLocal8Bit(buffer, buflen)); + insertItem(Stderr, TQString::fromLocal8Bit(buffer, buflen)); } void MessageLog::clearContent() @@ -118,32 +118,32 @@ void MessageLog::copyContent() void MessageLog::saveToFile() { - KURL url=KFileDialog::getSaveURL(QDir::currentDirPath(), + KURL url=KFileDialog::getSaveURL(TQDir::currentDirPath(), i18n("*.log|Log Files (*.log)\n*|All Files"), this, i18n("Save Log File")); if (url.isEmpty()) return; - QFileInfo fileinfo(url.path()); + TQFileInfo fileinfo(url.path()); if (fileinfo.exists() && KMessageBox::warningContinueCancel(0, i18n("File
%1
already exists. Overwrite it?
") - .arg(url.path()), QString::null, i18n("Overwrite")) == KMessageBox::Cancel) + .arg(url.path()), TQString::null, i18n("Overwrite")) == KMessageBox::Cancel) return; - QFile file(url.path()); + TQFile file(url.path()); if (!file.open(IO_WriteOnly)) { KMessageBox::error(0, i18n("Cannot save log file
%1
") .arg(url.url())); return; } - QTextStream textfile(&file); + TQTextStream textfile(&file); textfile << content(); file.close(); } -void MessageLog::showMenu(QListBoxItem*, const QPoint& l_point) +void MessageLog::showMenu(TQListBoxItem*, const TQPoint& l_point) { m_popupMenu->exec(l_point); } -QString MessageLog::m_listNames[m_listCount] = {i18n("Stdout"), i18n("Stderr")}; +TQString MessageLog::m_listNames[m_listCount] = {i18n("Stdout"), i18n("Stderr")}; #include "messagelog.moc" diff --git a/kommander/editor/messagelog.h b/kommander/editor/messagelog.h index 6b071cf4..468a7d23 100644 --- a/kommander/editor/messagelog.h +++ b/kommander/editor/messagelog.h @@ -17,7 +17,7 @@ #ifndef MESSAGELOG_H #define MESSAGELOG_H -#include +#include #include @@ -31,11 +31,11 @@ class MessageLog : public QTabWidget Q_OBJECT public: enum InfoType {Stdout, Stderr, All}; - MessageLog(QWidget* parent = 0, const char* name = 0); + MessageLog(TQWidget* parent = 0, const char* name = 0); ~MessageLog(); - virtual void insertItem(InfoType i, QString text); + virtual void insertItem(InfoType i, TQString text); virtual void clear(InfoType i = All); - QString content(); + TQString content(); public slots: void receivedStdout(KProcess *proc, char *buffer, int buflen); void receivedStderr(KProcess *proc, char *buffer, int buflen); @@ -43,10 +43,10 @@ public slots: void copyLine(); void copyContent(); void saveToFile(); - void showMenu(QListBoxItem*, const QPoint& l_point); + void showMenu(TQListBoxItem*, const TQPoint& l_point); private: static const int m_listCount = 2; - static QString m_listNames[m_listCount]; + static TQString m_listNames[m_listCount]; KListBox* m_lists[m_listCount]; bool m_seenEOL[m_listCount]; KPopupMenu* m_popupMenu; diff --git a/kommander/editor/metadatabase.cpp b/kommander/editor/metadatabase.cpp index b902f2f4..84072865 100644 --- a/kommander/editor/metadatabase.cpp +++ b/kommander/editor/metadatabase.cpp @@ -24,21 +24,21 @@ #include "widgetdatabase.h" #include "formfile.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include -#include -#include -#include -#include +#include +#include +#include +#include #include @@ -46,33 +46,33 @@ class MetaDataBaseRecord { public: - QObject *object; - QStringList changedProperties; - QMap fakeProperties; - QMap propertyComments; + TQObject *object; + TQStringList changedProperties; + TQMap fakeProperties; + TQMap propertyComments; int spacing, margin; - QValueList connections; - QValueList slotList; - QValueList includes; - QStringList forwards, variables, sigs; - QWidgetList tabOrder; + TQValueList connections; + TQValueList slotList; + TQValueList includes; + TQStringList forwards, variables, sigs; + TQWidgetList tabOrder; MetaDataBase::MetaInfo metaInfo; - QCursor cursor; - QMap pixmapArguments; - QMap pixmapKeys; - QMap columnFields; - QMap eventFunctions; - QMap functionBodies; - QMap functionComments; - QValueList breakPoints; - QString exportMacro; + TQCursor cursor; + TQMap pixmapArguments; + TQMap pixmapKeys; + TQMap columnFields; + TQMap eventFunctions; + TQMap functionBodies; + TQMap functionComments; + TQValueList breakPoints; + TQString exportMacro; }; -static QPtrDict *db = 0; -static QPtrList *cWidgets = 0; +static TQPtrDict *db = 0; +static TQPtrList *cWidgets = 0; static bool doUpdate = true; -static QStringList langList; -static QStringList editorLangList; +static TQStringList langList; +static TQStringList editorLangList; /*! \class MetaDataBase metadatabase.h @@ -90,9 +90,9 @@ MetaDataBase::MetaDataBase() inline void setupDataBase() { if ( !db || !cWidgets ) { - db = new QPtrDict( 1481 ); + db = new TQPtrDict( 1481 ); db->setAutoDelete( true ); - cWidgets = new QPtrList; + cWidgets = new TQPtrList; cWidgets->setAutoDelete( true ); } } @@ -105,7 +105,7 @@ void MetaDataBase::clearDataBase() cWidgets = 0; } -void MetaDataBase::addEntry( QObject *o ) +void MetaDataBase::addEntry( TQObject *o ) { if ( !o ) return; @@ -120,13 +120,13 @@ void MetaDataBase::addEntry( QObject *o ) WidgetFactory::initChangedProperties( o ); } -void MetaDataBase::removeEntry( QObject *o ) +void MetaDataBase::removeEntry( TQObject *o ) { setupDataBase(); db->remove( o ); } -void MetaDataBase::setPropertyChanged( QObject *o, const QString &property, bool changed ) +void MetaDataBase::setPropertyChanged( TQObject *o, const TQString &property, bool changed ) { setupDataBase(); MetaDataBaseRecord *r = db->find( (void*)o ); @@ -163,7 +163,7 @@ void MetaDataBase::setPropertyChanged( QObject *o, const QString &property, bool } } -bool MetaDataBase::isPropertyChanged( QObject *o, const QString &property ) +bool MetaDataBase::isPropertyChanged( TQObject *o, const TQString &property ) { setupDataBase(); MetaDataBaseRecord *r = db->find( (void*)o ); @@ -176,21 +176,21 @@ bool MetaDataBase::isPropertyChanged( QObject *o, const QString &property ) return r->changedProperties.findIndex( property ) != -1; } -QStringList MetaDataBase::changedProperties( QObject *o ) +TQStringList MetaDataBase::changedProperties( TQObject *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 TQStringList(); } - QStringList lst( r->changedProperties ); + TQStringList lst( r->changedProperties ); return lst; } -void MetaDataBase::setPropertyComment( QObject *o, const QString &property, const QString &comment ) +void MetaDataBase::setPropertyComment( TQObject *o, const TQString &property, const TQString &comment ) { setupDataBase(); MetaDataBaseRecord *r = db->find( (void*)o ); @@ -203,20 +203,20 @@ void MetaDataBase::setPropertyComment( QObject *o, const QString &property, cons r->propertyComments.insert( property, comment ); } -QString MetaDataBase::propertyComment( QObject *o, const QString &property ) +TQString MetaDataBase::propertyComment( TQObject *o, const TQString &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 TQString::null; } return *r->propertyComments.find( property ); } -void MetaDataBase::setFakeProperty( QObject *o, const QString &property, const QVariant& value ) +void MetaDataBase::setFakeProperty( TQObject *o, const TQString &property, const TQVariant& value ) { setupDataBase(); MetaDataBaseRecord *r = db->find( (void*)o ); @@ -228,23 +228,23 @@ void MetaDataBase::setFakeProperty( QObject *o, const QString &property, const Q r->fakeProperties[property] = value; } -QVariant MetaDataBase::fakeProperty( QObject * o, const QString &property) +TQVariant MetaDataBase::fakeProperty( TQObject * o, const TQString &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(); + return TQVariant(); } - QMap::Iterator it = r->fakeProperties.find( property ); + TQMap::Iterator it = r->fakeProperties.find( property ); if ( it != r->fakeProperties.end() ) return r->fakeProperties[property]; return WidgetFactory::defaultValue( o, property ); } -QMap* MetaDataBase::fakeProperties( QObject* o ) +TQMap* MetaDataBase::fakeProperties( TQObject* o ) { setupDataBase(); MetaDataBaseRecord *r = db->find( (void*)o ); @@ -256,7 +256,7 @@ QMap* MetaDataBase::fakeProperties( QObject* o ) return &r->fakeProperties; } -void MetaDataBase::setSpacing( QObject *o, int spacing ) +void MetaDataBase::setSpacing( TQObject *o, int spacing ) { if ( !o ) return; @@ -269,19 +269,19 @@ void MetaDataBase::setSpacing( QObject *o, int spacing ) } r->spacing = spacing; - QLayout * layout = 0; - WidgetFactory::layoutType( (QWidget*)o, layout ); + TQLayout * layout = 0; + WidgetFactory::layoutType( (TQWidget*)o, layout ); if ( layout ) layout->setSpacing( spacing ); } -int MetaDataBase::spacing( QObject *o ) +int MetaDataBase::spacing( TQObject *o ) { if ( !o ) return -1; setupDataBase(); - if ( o->inherits( "QMainWindow" ) ) - o = ( (QMainWindow*)o )->centralWidget(); + if ( o->inherits( "TQMainWindow" ) ) + o = ( (TQMainWindow*)o )->centralWidget(); MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r || !o->isWidgetType() ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", @@ -292,7 +292,7 @@ int MetaDataBase::spacing( QObject *o ) return r->spacing; } -void MetaDataBase::setMargin( QObject *o, int margin ) +void MetaDataBase::setMargin( TQObject *o, int margin ) { if ( !o ) return; @@ -305,21 +305,21 @@ void MetaDataBase::setMargin( QObject *o, int margin ) } r->margin = margin; - QLayout * layout = 0; - WidgetFactory::layoutType( (QWidget*)o, layout ); + TQLayout * layout = 0; + WidgetFactory::layoutType( (TQWidget*)o, layout ); if ( margin < 1 ) margin = 1; if ( layout ) layout->setMargin( margin ); } -int MetaDataBase::margin( QObject *o ) +int MetaDataBase::margin( TQObject *o ) { if ( !o ) return -1; setupDataBase(); - if ( o->inherits( "QMainWindow" ) ) - o = ( (QMainWindow*)o )->centralWidget(); + if ( o->inherits( "TQMainWindow" ) ) + o = ( (TQMainWindow*)o )->centralWidget(); MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r || !o->isWidgetType() ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", @@ -330,8 +330,8 @@ int MetaDataBase::margin( QObject *o ) return r->margin; } -void MetaDataBase::addConnection( QObject *o, QObject *sender, const QCString &signal, - QObject *receiver, const QCString &slot ) +void MetaDataBase::addConnection( TQObject *o, TQObject *sender, const TQCString &signal, + TQObject *receiver, const TQCString &slot ) { setupDataBase(); MetaDataBaseRecord *r = db->find( (void*)o ); @@ -348,8 +348,8 @@ void MetaDataBase::addConnection( QObject *o, QObject *sender, const QCString &s r->connections.append( conn ); } -void MetaDataBase::removeConnection( QObject *o, QObject *sender, const QCString &signal, - QObject *receiver, const QCString &slot ) +void MetaDataBase::removeConnection( TQObject *o, TQObject *sender, const TQCString &signal, + TQObject *receiver, const TQCString &slot ) { setupDataBase(); MetaDataBaseRecord *r = db->find( (void*)o ); @@ -359,7 +359,7 @@ void MetaDataBase::removeConnection( QObject *o, QObject *sender, const QCString return; } - for ( QValueList::Iterator it = r->connections.begin(); it != r->connections.end(); ++it ) { + for ( TQValueList::Iterator it = r->connections.begin(); it != r->connections.end(); ++it ) { Connection conn = *it; if ( conn.sender == sender && conn.signal == signal && @@ -371,31 +371,31 @@ void MetaDataBase::removeConnection( QObject *o, QObject *sender, const QCString } } -QValueList MetaDataBase::connections( QObject *o ) +TQValueList MetaDataBase::connections( TQObject *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(); + return TQValueList(); } return r->connections; } -QValueList MetaDataBase::connections( QObject *o, QObject *sender, - QObject *receiver ) +TQValueList MetaDataBase::connections( TQObject *o, TQObject *sender, + TQObject *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(); + return TQValueList(); } - QValueList::Iterator it = r->connections.begin(); - QValueList ret; - QValueList::Iterator conn; + TQValueList::Iterator it = r->connections.begin(); + TQValueList ret; + TQValueList::Iterator conn; while ( ( conn = it ) != r->connections.end() ) { ++it; if ( (*conn).sender == sender && @@ -406,18 +406,18 @@ QValueList MetaDataBase::connections( QObject *o, QObj return ret; } -QValueList MetaDataBase::connections( QObject *o, QObject *object ) +TQValueList MetaDataBase::connections( TQObject *o, TQObject *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(); + return TQValueList(); } - QValueList::Iterator it = r->connections.begin(); - QValueList ret; - QValueList::Iterator conn; + TQValueList::Iterator it = r->connections.begin(); + TQValueList ret; + TQValueList::Iterator conn; while ( ( conn = it ) != r->connections.end() ) { ++it; if ( (*conn).sender == object || @@ -427,7 +427,7 @@ QValueList MetaDataBase::connections( QObject *o, QObj return ret; } -void MetaDataBase::doConnections( QObject *o ) +void MetaDataBase::doConnections( TQObject *o ) { setupDataBase(); MetaDataBaseRecord *r = db->find( (void*)o ); @@ -437,9 +437,9 @@ void MetaDataBase::doConnections( QObject *o ) return; } - QObject *sender = 0, *receiver = 0; - QObjectList *l = 0; - QValueList::Iterator it = r->connections.begin(); + TQObject *sender = 0, *receiver = 0; + TQObjectList *l = 0; + TQValueList::Iterator it = r->connections.begin(); for ( ; it != r->connections.end(); ++it ) { Connection conn = *it; if ( qstrcmp( conn.sender->name(), o->name() ) == 0 ) { @@ -464,25 +464,25 @@ void MetaDataBase::doConnections( QObject *o ) receiver = l->first(); delete l; } - QString s = "2""%1"; + TQString s = "2""%1"; s = s.arg( conn.signal ); - QString s2 = "1""%1"; + TQString s2 = "1""%1"; s2 = s2.arg( conn.slot ); - QStrList signalList = sender->metaObject()->signalNames( true ); - QStrList slotList = receiver->metaObject()->slotNames( true ); + TQStrList signalList = sender->metaObject()->signalNames( true ); + TQStrList 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 ); + TQObject::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 ) +void MetaDataBase::addSlot( TQObject *o, const TQCString &slot, const TQString& specifier, + const TQString &access, const TQString &language, const TQString &returnType ) { setupDataBase(); MetaDataBaseRecord *r = db->find( (void*)o ); @@ -498,7 +498,7 @@ void MetaDataBase::addSlot( QObject *o, const QCString &slot, const QString& spe s.access = access; s.language = language; s.returnType = returnType; - QValueList::Iterator it = r->slotList.find( s ); + TQValueList::Iterator it = r->slotList.find( s ); if ( it != r->slotList.end() ) r->slotList.remove( it ); r->slotList.append( s ); @@ -507,7 +507,7 @@ void MetaDataBase::addSlot( QObject *o, const QCString &slot, const QString& spe #endif } -void MetaDataBase::setSlotList( QObject *o, const QValueList &slotList ) +void MetaDataBase::setSlotList( TQObject *o, const TQValueList &slotList ) { setupDataBase(); MetaDataBaseRecord *r = db->find( (void*)o ); @@ -519,8 +519,8 @@ void MetaDataBase::setSlotList( QObject *o, const QValueList &slotList ) r->slotList = slotList; } -void MetaDataBase::removeSlot( QObject *o, const QCString &slot, const QString& specifier, - const QString &access, const QString &language, const QString &returnType ) +void MetaDataBase::removeSlot( TQObject *o, const TQCString &slot, const TQString& specifier, + const TQString &access, const TQString &language, const TQString &returnType ) { setupDataBase(); MetaDataBaseRecord *r = db->find( (void*)o ); @@ -530,7 +530,7 @@ void MetaDataBase::removeSlot( QObject *o, const QCString &slot, const QString& return; } - for ( QValueList::Iterator it = r->slotList.begin(); it != r->slotList.end(); ++it ) { + for ( TQValueList::Iterator it = r->slotList.begin(); it != r->slotList.end(); ++it ) { Slot s = *it; if ( s.slot == slot && s.specifier == specifier && @@ -543,7 +543,7 @@ void MetaDataBase::removeSlot( QObject *o, const QCString &slot, const QString& } } -void MetaDataBase::removeSlot( QObject *o, const QString &slot ) +void MetaDataBase::removeSlot( TQObject *o, const TQString &slot ) { setupDataBase(); MetaDataBaseRecord *r = db->find( (void*)o ); @@ -553,7 +553,7 @@ void MetaDataBase::removeSlot( QObject *o, const QString &slot ) return; } - for ( QValueList::Iterator it = r->slotList.begin(); it != r->slotList.end(); ++it ) { + for ( TQValueList::Iterator it = r->slotList.begin(); it != r->slotList.end(); ++it ) { Slot s = *it; if ( normalizeSlot( s.slot ) == normalizeSlot( slot ) ) { r->slotList.remove( it ); @@ -562,20 +562,20 @@ void MetaDataBase::removeSlot( QObject *o, const QString &slot ) } } -QValueList MetaDataBase::slotList( QObject *o ) +TQValueList MetaDataBase::slotList( TQObject *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(); + return TQValueList(); } return r->slotList; } -bool MetaDataBase::isSlotUsed( QObject *o, const QCString &slot ) +bool MetaDataBase::isSlotUsed( TQObject *o, const TQCString &slot ) { setupDataBase(); MetaDataBaseRecord *r = db->find( (void*)o ); @@ -585,15 +585,15 @@ bool MetaDataBase::isSlotUsed( QObject *o, const QCString &slot ) return false; } - QValueList conns = connections( o ); - for ( QValueList::Iterator it = conns.begin(); it != conns.end(); ++it ) { + TQValueList conns = connections( o ); + for ( TQValueList::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 ) +void MetaDataBase::changeSlot( TQObject *o, const TQCString &slot, const TQCString &newName ) { setupDataBase(); MetaDataBaseRecord *r = db->find( (void*)o ); @@ -603,7 +603,7 @@ void MetaDataBase::changeSlot( QObject *o, const QCString &slot, const QCString return; } - for ( QValueList::Iterator it = r->slotList.begin(); it != r->slotList.end(); ++it ) { + for ( TQValueList::Iterator it = r->slotList.begin(); it != r->slotList.end(); ++it ) { Slot s = *it; if ( normalizeSlot( s.slot ) == normalizeSlot( slot ) ) { (*it).slot = newName; @@ -612,9 +612,9 @@ void MetaDataBase::changeSlot( QObject *o, const QCString &slot, const QCString } } -void MetaDataBase::changeSlotAttributes( QObject *o, const QCString &slot, - const QString& specifier, const QString &access, - const QString &language, const QString &returnType ) +void MetaDataBase::changeSlotAttributes( TQObject *o, const TQCString &slot, + const TQString& specifier, const TQString &access, + const TQString &language, const TQString &returnType ) { setupDataBase(); MetaDataBaseRecord *r = db->find( (void*)o ); @@ -624,7 +624,7 @@ void MetaDataBase::changeSlotAttributes( QObject *o, const QCString &slot, return; } - for ( QValueList::Iterator it = r->slotList.begin(); it != r->slotList.end(); ++it ) { + for ( TQValueList::Iterator it = r->slotList.begin(); it != r->slotList.end(); ++it ) { Slot s = *it; if ( normalizeSlot( s.slot ) == normalizeSlot( slot ) ) { (*it).specifier = specifier; @@ -636,7 +636,7 @@ void MetaDataBase::changeSlotAttributes( QObject *o, const QCString &slot, } } -bool MetaDataBase::hasSlot( QObject *o, const QCString &slot, bool onlyCustom ) +bool MetaDataBase::hasSlot( TQObject *o, const TQCString &slot, bool onlyCustom ) { setupDataBase(); MetaDataBaseRecord *r = db->find( (void*)o ); @@ -647,7 +647,7 @@ bool MetaDataBase::hasSlot( QObject *o, const QCString &slot, bool onlyCustom ) } if ( !onlyCustom ) { - QStrList slotList = o->metaObject()->slotNames( true ); + TQStrList slotList = o->metaObject()->slotNames( true ); if ( slotList.find( slot ) != -1 ) return true; @@ -660,8 +660,8 @@ bool MetaDataBase::hasSlot( QObject *o, const QCString &slot, bool onlyCustom ) if ( o->inherits( "CustomWidget" ) ) { MetaDataBase::CustomWidget *w = ( (::CustomWidget*)o )->customWidget(); - for ( QValueList::Iterator it = w->lstSlots.begin(); it != w->lstSlots.end(); ++it ) { - QCString s = (*it).slot; + for ( TQValueList::Iterator it = w->lstSlots.begin(); it != w->lstSlots.end(); ++it ) { + TQCString s = (*it).slot; if ( !s.data() ) continue; if ( s == slot ) @@ -670,7 +670,7 @@ bool MetaDataBase::hasSlot( QObject *o, const QCString &slot, bool onlyCustom ) } } - for ( QValueList::Iterator it = r->slotList.begin(); it != r->slotList.end(); ++it ) { + for ( TQValueList::Iterator it = r->slotList.begin(); it != r->slotList.end(); ++it ) { Slot s = *it; if ( normalizeSlot( s.slot ) == normalizeSlot( slot ) ) return true; @@ -679,26 +679,26 @@ bool MetaDataBase::hasSlot( QObject *o, const QCString &slot, bool onlyCustom ) return false; } -QString MetaDataBase::languageOfSlot( QObject *o, const QCString &slot ) +TQString MetaDataBase::languageOfSlot( TQObject *o, const TQCString &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; + return TQString::null; } - QString sl = slot; + TQString sl = slot; sl = normalizeSlot( sl ); - for ( QValueList::Iterator it = r->slotList.begin(); it != r->slotList.end(); ++it ) { + for ( TQValueList::Iterator it = r->slotList.begin(); it != r->slotList.end(); ++it ) { Slot s = *it; - QString sl2 = s.slot; + TQString sl2 = s.slot; sl2 = normalizeSlot( sl2 ); if ( sl == sl2 ) return s.language; } - return QString::null; + return TQString::null; } bool MetaDataBase::addCustomWidget( CustomWidget *wid ) @@ -707,15 +707,15 @@ bool MetaDataBase::addCustomWidget( CustomWidget *wid ) for ( CustomWidget *w = cWidgets->first(); w; w = cWidgets->next() ) { if ( *wid == *w ) { - for ( QValueList::ConstIterator it = wid->lstSignals.begin(); it != wid->lstSignals.end(); ++it ) { + for ( TQValueList::ConstIterator it = wid->lstSignals.begin(); it != wid->lstSignals.end(); ++it ) { if ( !w->hasSignal( *it ) ) w->lstSignals.append( *it ); } - for ( QValueList::ConstIterator it2 = wid->lstSlots.begin(); it2 != wid->lstSlots.end(); ++it2 ) { + for ( TQValueList::ConstIterator it2 = wid->lstSlots.begin(); it2 != wid->lstSlots.end(); ++it2 ) { if ( !w->hasSlot( MetaDataBase::normalizeSlot( (*it2).slot ).latin1() ) ) w->lstSlots.append( *it2 ); } - for ( QValueList::ConstIterator it3 = wid->lstProperties.begin(); it3 != wid->lstProperties.end(); ++it3 ) { + for ( TQValueList::ConstIterator it3 = wid->lstProperties.begin(); it3 != wid->lstProperties.end(); ++it3 ) { if ( !w->hasProperty( (*it3).property ) ) w->lstProperties.append( *it3 ); } @@ -729,7 +729,7 @@ bool MetaDataBase::addCustomWidget( CustomWidget *wid ) r->name = wid->className; r->group = WidgetDatabase::widgetGroup( "Custom" ); r->toolTip = wid->className; - r->iconSet = new QIconSet( *wid->pixmap, *wid->pixmap ); + r->iconSet = new TQIconSet( *wid->pixmap, *wid->pixmap ); r->isContainer = wid->isContainer; wid->id = WidgetDatabase::addCustomWidget( r ); cWidgets->append( wid ); @@ -741,7 +741,7 @@ void MetaDataBase::removeCustomWidget( CustomWidget *w ) cWidgets->removeRef( w ); } -QPtrList *MetaDataBase::customWidgets() +TQPtrList *MetaDataBase::customWidgets() { setupDataBase(); return cWidgets; @@ -767,7 +767,7 @@ bool MetaDataBase::isWidgetNameUsed( CustomWidget *wid ) return false; } -bool MetaDataBase::hasCustomWidget( const QString &className ) +bool MetaDataBase::hasCustomWidget( const TQString &className ) { for ( CustomWidget *w = cWidgets->first(); w; w = cWidgets->next() ) { if ( w->className == className ) @@ -776,7 +776,7 @@ bool MetaDataBase::hasCustomWidget( const QString &className ) return false; } -void MetaDataBase::setTabOrder( QWidget *w, const QWidgetList &order ) +void MetaDataBase::setTabOrder( TQWidget *w, const TQWidgetList &order ) { setupDataBase(); MetaDataBaseRecord *r = db->find( (void*) w ); @@ -789,20 +789,20 @@ void MetaDataBase::setTabOrder( QWidget *w, const QWidgetList &order ) r->tabOrder = order; } -QWidgetList MetaDataBase::tabOrder( QWidget *w ) +TQWidgetList MetaDataBase::tabOrder( TQWidget *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 TQWidgetList(); } return r->tabOrder; } -void MetaDataBase::setIncludes( QObject *o, const QValueList &incs ) +void MetaDataBase::setIncludes( TQObject *o, const TQValueList &incs ) { setupDataBase(); MetaDataBaseRecord *r = db->find( (void*)o ); @@ -815,20 +815,20 @@ void MetaDataBase::setIncludes( QObject *o, const QValueList &incs ) r->includes = incs; } -QValueList MetaDataBase::includes( QObject *o ) +TQValueList MetaDataBase::includes( TQObject *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(); + return TQValueList(); } return r->includes; } -void MetaDataBase::setForwards( QObject *o, const QStringList &fwds ) +void MetaDataBase::setForwards( TQObject *o, const TQStringList &fwds ) { setupDataBase(); MetaDataBaseRecord *r = db->find( (void*)o ); @@ -841,20 +841,20 @@ void MetaDataBase::setForwards( QObject *o, const QStringList &fwds ) r->forwards = fwds; } -QStringList MetaDataBase::forwards( QObject *o ) +TQStringList MetaDataBase::forwards( TQObject *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 TQStringList(); } return r->forwards; } -void MetaDataBase::setSignalList( QObject *o, const QStringList &sigs ) +void MetaDataBase::setSignalList( TQObject *o, const TQStringList &sigs ) { setupDataBase(); MetaDataBaseRecord *r = db->find( (void*)o ); @@ -866,8 +866,8 @@ void MetaDataBase::setSignalList( QObject *o, const QStringList &sigs ) r->sigs.clear(); - for ( QStringList::ConstIterator it = sigs.begin(); it != sigs.end(); ++it ) { - QString s = (*it).simplifyWhiteSpace(); + for ( TQStringList::ConstIterator it = sigs.begin(); it != sigs.end(); ++it ) { + TQString s = (*it).simplifyWhiteSpace(); bool hasSemicolon = s.endsWith( ";" ); if ( hasSemicolon ) s = s.left( s.length() - 1 ); @@ -887,20 +887,20 @@ void MetaDataBase::setSignalList( QObject *o, const QStringList &sigs ) } } -QStringList MetaDataBase::signalList( QObject *o ) +TQStringList MetaDataBase::signalList( TQObject *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 TQStringList(); } return r->sigs; } -void MetaDataBase::setMetaInfo( QObject *o, MetaInfo mi ) +void MetaDataBase::setMetaInfo( TQObject *o, MetaInfo mi ) { setupDataBase(); MetaDataBaseRecord *r = db->find( (void*)o ); @@ -913,7 +913,7 @@ void MetaDataBase::setMetaInfo( QObject *o, MetaInfo mi ) r->metaInfo = mi; } -MetaDataBase::MetaInfo MetaDataBase::metaInfo( QObject *o ) +MetaDataBase::MetaInfo MetaDataBase::metaInfo( TQObject *o ) { setupDataBase(); MetaDataBaseRecord *r = db->find( (void*)o ); @@ -934,10 +934,10 @@ MetaDataBase::CustomWidget::CustomWidget() className = "MyCustomWidget"; includeFile = "mywidget.h"; includePolicy = Local; - sizeHint = QSize( -1, -1 ); - pixmap = new QPixmap( PixmapChooser::loadPixmap( "customwidget.xpm" ) ); + sizeHint = TQSize( -1, -1 ); + pixmap = new TQPixmap( PixmapChooser::loadPixmap( "customwidget.xpm" ) ); id = -1; - sizePolicy = QSizePolicy( QSizePolicy::Preferred, QSizePolicy::Preferred ); + sizePolicy = TQSizePolicy( TQSizePolicy::Preferred, TQSizePolicy::Preferred ); isContainer = false; } @@ -948,14 +948,14 @@ MetaDataBase::CustomWidget::CustomWidget( const CustomWidget &w ) includePolicy = w.includePolicy; sizeHint = w.sizeHint; if ( w.pixmap ) - pixmap = new QPixmap( *w.pixmap ); + pixmap = new TQPixmap( *w.pixmap ); else pixmap = 0; id = w.id; isContainer = w.isContainer; } -void MetaDataBase::setCursor( QWidget *w, const QCursor &c ) +void MetaDataBase::setCursor( TQWidget *w, const TQCursor &c ) { setupDataBase(); MetaDataBaseRecord *r = db->find( (void*)w ); @@ -968,7 +968,7 @@ void MetaDataBase::setCursor( QWidget *w, const QCursor &c ) r->cursor = c; } -QCursor MetaDataBase::cursor( QWidget *w ) +TQCursor MetaDataBase::cursor( TQWidget *w ) { setupDataBase(); MetaDataBaseRecord *r = db->find( (void*)w ); @@ -993,7 +993,7 @@ MetaDataBase::CustomWidget &MetaDataBase::CustomWidget::operator=( const CustomW includePolicy = w.includePolicy; sizeHint = w.sizeHint; if ( w.pixmap ) - pixmap = new QPixmap( *w.pixmap ); + pixmap = new TQPixmap( *w.pixmap ); else pixmap = 0; lstSignals = w.lstSignals; @@ -1004,45 +1004,45 @@ MetaDataBase::CustomWidget &MetaDataBase::CustomWidget::operator=( const CustomW return *this; } -bool MetaDataBase::CustomWidget::hasSignal( const QCString &signal ) const +bool MetaDataBase::CustomWidget::hasSignal( const TQCString &signal ) const { - QStrList sigList = QWidget::staticMetaObject()->signalNames( true ); + TQStrList sigList = TQWidget::staticMetaObject()->signalNames( true ); if ( sigList.find( signal ) != -1 ) return true; - for ( QValueList::ConstIterator it = lstSignals.begin(); it != lstSignals.end(); ++it ) { + for ( TQValueList::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 +bool MetaDataBase::CustomWidget::hasSlot( const TQCString &slot ) const { - QStrList slotList = QWidget::staticMetaObject()->slotNames( true ); + TQStrList slotList = TQWidget::staticMetaObject()->slotNames( true ); if ( slotList.find( normalizeSlot( slot ) ) != -1 ) return true; - for ( QValueList::ConstIterator it = lstSlots.begin(); it != lstSlots.end(); ++it ) { + for ( TQValueList::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 +bool MetaDataBase::CustomWidget::hasProperty( const TQCString &prop ) const { - QStrList propList = QWidget::staticMetaObject()->propertyNames( true ); + TQStrList propList = TQWidget::staticMetaObject()->propertyNames( true ); if ( propList.find( prop ) != -1 ) return true; - for ( QValueList::ConstIterator it = lstProperties.begin(); it != lstProperties.end(); ++it ) { + for ( TQValueList::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 ) +void MetaDataBase::setPixmapArgument( TQObject *o, int pixmap, const TQString &arg ) { if ( !o ) return; @@ -1058,22 +1058,22 @@ void MetaDataBase::setPixmapArgument( QObject *o, int pixmap, const QString &arg r->pixmapArguments.insert( pixmap, arg ); } -QString MetaDataBase::pixmapArgument( QObject *o, int pixmap ) +TQString MetaDataBase::pixmapArgument( TQObject *o, int pixmap ) { if ( !o ) - return QString::null; + return TQString::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 TQString::null; } return *r->pixmapArguments.find( pixmap ); } -void MetaDataBase::clearPixmapArguments( QObject *o ) +void MetaDataBase::clearPixmapArguments( TQObject *o ) { if ( !o ) return; @@ -1089,7 +1089,7 @@ void MetaDataBase::clearPixmapArguments( QObject *o ) } -void MetaDataBase::setPixmapKey( QObject *o, int pixmap, const QString &arg ) +void MetaDataBase::setPixmapKey( TQObject *o, int pixmap, const TQString &arg ) { if ( !o ) return; @@ -1105,22 +1105,22 @@ void MetaDataBase::setPixmapKey( QObject *o, int pixmap, const QString &arg ) r->pixmapKeys.insert( pixmap, arg ); } -QString MetaDataBase::pixmapKey( QObject *o, int pixmap ) +TQString MetaDataBase::pixmapKey( TQObject *o, int pixmap ) { if ( !o ) - return QString::null; + return TQString::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 TQString::null; } return *r->pixmapKeys.find( pixmap ); } -void MetaDataBase::clearPixmapKeys( QObject *o ) +void MetaDataBase::clearPixmapKeys( TQObject *o ) { if ( !o ) return; @@ -1137,7 +1137,7 @@ void MetaDataBase::clearPixmapKeys( QObject *o ) -void MetaDataBase::setColumnFields( QObject *o, const QMap &columnFields ) +void MetaDataBase::setColumnFields( TQObject *o, const TQMap &columnFields ) { if ( !o ) return; @@ -1152,37 +1152,37 @@ void MetaDataBase::setColumnFields( QObject *o, const QMap &co r->columnFields = columnFields; } -QMap MetaDataBase::columnFields( QObject *o ) +TQMap MetaDataBase::columnFields( TQObject *o ) { if ( !o ) - return QMap(); + return TQMap(); 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(); + return TQMap(); } return r->columnFields; } -QString MetaDataBase::normalizeSlot( const QString &s ) +TQString MetaDataBase::normalizeSlot( const TQString &s ) { return Parser::cleanArgs( s ); } -void MetaDataBase::clear( QObject *o ) +void MetaDataBase::clear( TQObject *o ) { if ( !o ) return; setupDataBase(); db->remove( (void*)o ); - for ( QPtrDictIterator it( *( (FormWindow*)o )->widgets() ); it.current(); ++it ) + for ( TQPtrDictIterator it( *( (FormWindow*)o )->widgets() ); it.current(); ++it ) db->remove( (void*)it.current() ); } -void MetaDataBase::setExportMacro( QObject *o, const QString ¯o ) +void MetaDataBase::setExportMacro( TQObject *o, const TQString ¯o ) { if ( !o ) return; @@ -1197,7 +1197,7 @@ void MetaDataBase::setExportMacro( QObject *o, const QString ¯o ) r->exportMacro = macro; } -QString MetaDataBase::exportMacro( QObject *o ) +TQString MetaDataBase::exportMacro( TQObject *o ) { if ( !o ) return ""; @@ -1212,7 +1212,7 @@ QString MetaDataBase::exportMacro( QObject *o ) return r->exportMacro; } -bool MetaDataBase::hasObject( QObject *o ) +bool MetaDataBase::hasObject( TQObject *o ) { return !!db->find( o ); } diff --git a/kommander/editor/metadatabase.h b/kommander/editor/metadatabase.h index 8bb79c38..4fd203b8 100644 --- a/kommander/editor/metadatabase.h +++ b/kommander/editor/metadatabase.h @@ -21,15 +21,15 @@ #ifndef METADATABASE_H #define METADATABASE_H -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include "pixmapchooser.h" @@ -41,8 +41,8 @@ class MetaDataBase public: struct Connection { - QObject *sender, *receiver; - QCString signal, slot; + TQObject *sender, *receiver; + TQCString signal, slot; bool operator==( const Connection &c ) const { return sender == c.sender && receiver == c.receiver && signal == c.signal && slot == c.slot ; @@ -51,11 +51,11 @@ public: struct Slot { - QString returnType; - QCString slot; - QString specifier; - QString access; - QString language; + TQString returnType; + TQCString slot; + TQString specifier; + TQString access; + TQString language; bool operator==( const Slot &s ) const { return ( returnType == s.returnType && slot == s.slot && @@ -68,8 +68,8 @@ public: struct Property { - QCString property; - QString type; + TQCString property; + TQString type; bool operator==( const Property &p ) const { return property == p.property && type == p.type; @@ -84,20 +84,20 @@ public: 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; + bool hasSignal( const TQCString &signal ) const; + bool hasSlot( const TQCString &slot ) const; + bool hasProperty( const TQCString &prop ) const; enum IncludePolicy { Global, Local }; - QString className; - QString includeFile; + TQString className; + TQString includeFile; IncludePolicy includePolicy; - QSize sizeHint; - QSizePolicy sizePolicy; - QPixmap *pixmap; - QValueList lstSignals; - QValueList lstSlots; - QValueList lstProperties; + TQSize sizeHint; + TQSizePolicy sizePolicy; + TQPixmap *pixmap; + TQValueList lstSignals; + TQValueList lstSlots; + TQValueList lstProperties; int id; bool isContainer; }; @@ -105,26 +105,26 @@ public: struct Include { Include() : header(), location(), implDecl( "in implementation" ) {} - QString header; - QString location; + TQString header; + TQString location; bool operator==( const Include &i ) const { return header == i.header && location == i.location; } - QString implDecl; + TQString implDecl; }; struct MetaInfo { - QString license; - QString version; - QString comment; - QString author; + TQString license; + TQString version; + TQString comment; + TQString author; }; struct EventDescription { - QString name; - QStringList args; + TQString name; + TQStringList args; #if defined(Q_FULL_TEMPLATE_INSTANTIATION) bool operator==( const EventDescription& ) const { return FALSE; } #endif @@ -133,89 +133,89 @@ public: 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* 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 connections( QObject *o ); - static QValueList connections( QObject *o, QObject *sender, QObject *receiver ); - static QValueList 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 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 &slotList ); + static void addEntry( TQObject *o ); + static void removeEntry( TQObject *o ); + static void setPropertyChanged( TQObject *o, const TQString &property, bool changed ); + static bool isPropertyChanged( TQObject *o, const TQString &property ); + static void setPropertyComment( TQObject *o, const TQString &property, const TQString &comment ); + static TQString propertyComment( TQObject *o, const TQString &property ); + static TQStringList changedProperties( TQObject *o ); + + static void setFakeProperty( TQObject *o, const TQString &property, const TQVariant& value ); + static TQVariant fakeProperty( TQObject * o, const TQString &property ); + static TQMap* fakeProperties( TQObject* o ); + + static void setSpacing( TQObject *o, int spacing ); + static int spacing( TQObject *o ); + static void setMargin( TQObject *o, int margin ); + static int margin( TQObject *o ); + + static void addConnection( TQObject *o, TQObject *sender, const TQCString &signal, + TQObject *receiver, const TQCString &slot ); + static void removeConnection( TQObject *o, TQObject *sender, const TQCString &signal, + TQObject *receiver, const TQCString &slot ); + static TQValueList connections( TQObject *o ); + static TQValueList connections( TQObject *o, TQObject *sender, TQObject *receiver ); + static TQValueList connections( TQObject *o, TQObject *object ); + static void doConnections( TQObject *o ); + + static void addSlot( TQObject *o, const TQCString &slot, const TQString& specifier, const TQString &access, const TQString &language, const TQString &returnType ); + static void removeSlot( TQObject *o, const TQCString &slot, const TQString& specifier, const TQString &access, const TQString &language, const TQString &returnType ); + static void removeSlot( TQObject *o, const TQString &slot ); + static TQValueList slotList( TQObject *o ); + static bool isSlotUsed( TQObject *o, const TQCString &slot ); + static bool hasSlot( TQObject *o, const TQCString &slot, bool onlyCustom = FALSE ); + static void changeSlot( TQObject *o, const TQCString &slot, const TQCString &newName ); + static void changeSlotAttributes( TQObject *o, const TQCString &slot, + const TQString& specifier, const TQString &access, + const TQString &language, const TQString &returnType ); + static TQString languageOfSlot( TQObject *o, const TQCString &slot ); + static void setSlotList( TQObject *o, const TQValueList &slotList ); static bool addCustomWidget( CustomWidget *w ); static void removeCustomWidget( CustomWidget *w ); - static QPtrList *customWidgets(); + static TQPtrList *customWidgets(); static CustomWidget *customWidget( int id ); static bool isWidgetNameUsed( CustomWidget *w ); - static bool hasCustomWidget( const QString &className ); + static bool hasCustomWidget( const TQString &className ); - static void setTabOrder( QWidget *w, const QWidgetList &order ); - static QWidgetList tabOrder( QWidget *w ); + static void setTabOrder( TQWidget *w, const TQWidgetList &order ); + static TQWidgetList tabOrder( TQWidget *w ); - static void setIncludes( QObject *o, const QValueList &incs ); - static QValueList includes( QObject *o ); + static void setIncludes( TQObject *o, const TQValueList &incs ); + static TQValueList includes( TQObject *o ); - static void setForwards( QObject *o, const QStringList &fwds ); - static QStringList forwards( QObject *o ); + static void setForwards( TQObject *o, const TQStringList &fwds ); + static TQStringList forwards( TQObject *o ); - static void setSignalList( QObject *o, const QStringList &sigs ); - static QStringList signalList( QObject *o ); + static void setSignalList( TQObject *o, const TQStringList &sigs ); + static TQStringList signalList( TQObject *o ); - static void setMetaInfo( QObject *o, MetaInfo mi ); - static MetaInfo metaInfo( QObject *o ); + static void setMetaInfo( TQObject *o, MetaInfo mi ); + static MetaInfo metaInfo( TQObject *o ); - static void setCursor( QWidget *w, const QCursor &c ); - static QCursor cursor( QWidget *w ); + static void setCursor( TQWidget *w, const TQCursor &c ); + static TQCursor cursor( TQWidget *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 setPixmapArgument( TQObject *o, int pixmap, const TQString &arg ); + static TQString pixmapArgument( TQObject *o, int pixmap ); + static void clearPixmapArguments( TQObject *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 setPixmapKey( TQObject *o, int pixmap, const TQString &arg ); + static TQString pixmapKey( TQObject *o, int pixmap ); + static void clearPixmapKeys( TQObject *o ); - static void setColumnFields( QObject *o, const QMap &columnFields ); - static QMap columnFields( QObject *o ); + static void setColumnFields( TQObject *o, const TQMap &columnFields ); + static TQMap columnFields( TQObject *o ); - static QString normalizeSlot( const QString &slot ); + static TQString normalizeSlot( const TQString &slot ); - static void clear( QObject *o ); + static void clear( TQObject *o ); - static void setExportMacro( QObject *o, const QString ¯o ); - static QString exportMacro( QObject *o ); + static void setExportMacro( TQObject *o, const TQString ¯o ); + static TQString exportMacro( TQObject *o ); - static bool hasObject( QObject *o ); + static bool hasObject( TQObject *o ); }; diff --git a/kommander/editor/multilineeditorimpl.cpp b/kommander/editor/multilineeditorimpl.cpp index 1b823d3f..2a0ec9b7 100644 --- a/kommander/editor/multilineeditorimpl.cpp +++ b/kommander/editor/multilineeditorimpl.cpp @@ -23,16 +23,16 @@ #include "command.h" #include "mainwindow.h" -#include -#include +#include +#include #include -MultiLineEditor::MultiLineEditor( QWidget *parent, QWidget *editWidget, FormWindow *fw ) +MultiLineEditor::MultiLineEditor( TQWidget *parent, TQWidget *editWidget, FormWindow *fw ) : MultiLineEditorBase( parent, 0, true ), formwindow( fw ) { - connect( buttonHelp, SIGNAL( clicked() ), MainWindow::self, SLOT( showDialogHelp() ) ); - mlined = (QMultiLineEdit*)editWidget; + connect( buttonHelp, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) ); + mlined = (TQMultiLineEdit*)editWidget; // #### complete list of properties here preview->setAlignment( mlined->alignment() ); preview->setMaxLines( mlined->maxLines() ); @@ -61,7 +61,7 @@ void MultiLineEditor::applyClicked() } -TextEditor::TextEditor( QWidget *parent, const QString &text ) +TextEditor::TextEditor( TQWidget *parent, const TQString &text ) : MultiLineEditorBase( parent, 0, true ) { buttonApply->hide(); @@ -71,11 +71,11 @@ TextEditor::TextEditor( QWidget *parent, const QString &text ) preview->selectAll(); } -QString TextEditor::getText( QWidget *parent, const QString &text ) +TQString TextEditor::getText( TQWidget *parent, const TQString &text ) { TextEditor dlg( parent, text ); - if ( dlg.exec() == QDialog::Accepted ) { - QString txt = dlg.preview->text(); + if ( dlg.exec() == TQDialog::Accepted ) { + TQString txt = dlg.preview->text(); int i = txt.length() - 1; while ( i >= 0 && ( txt[ i ] == '\n' || txt[ i ] == ' ' || txt[ i ] == '\t' || txt[ i ].isSpace() ) ) { @@ -84,7 +84,7 @@ QString TextEditor::getText( QWidget *parent, const QString &text ) } return txt; } - return QString::null; + return TQString::null; } void TextEditor::okClicked() diff --git a/kommander/editor/multilineeditorimpl.h b/kommander/editor/multilineeditorimpl.h index 16314b2a..0f6ff96a 100644 --- a/kommander/editor/multilineeditorimpl.h +++ b/kommander/editor/multilineeditorimpl.h @@ -31,14 +31,14 @@ class MultiLineEditor : public MultiLineEditorBase Q_OBJECT public: - MultiLineEditor( QWidget *parent, QWidget *editWidget, FormWindow *fw ); + MultiLineEditor( TQWidget *parent, TQWidget *editWidget, FormWindow *fw ); protected slots: void okClicked(); void applyClicked(); private: - QMultiLineEdit *mlined; + TQMultiLineEdit *mlined; FormWindow *formwindow; }; @@ -48,9 +48,9 @@ class TextEditor : public MultiLineEditorBase Q_OBJECT public: - TextEditor( QWidget *parent, const QString &text ); + TextEditor( TQWidget *parent, const TQString &text ); - static QString getText( QWidget *parent, const QString &text ); + static TQString getText( TQWidget *parent, const TQString &text ); protected slots: void okClicked(); diff --git a/kommander/editor/newformimpl.cpp b/kommander/editor/newformimpl.cpp index 70e7b1df..ee623e48 100644 --- a/kommander/editor/newformimpl.cpp +++ b/kommander/editor/newformimpl.cpp @@ -28,16 +28,16 @@ #include "resource.h" #include "formfile.h" -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include -#include -#include -#include +#include +#include +#include #include #include @@ -47,18 +47,18 @@ static int _forms = 0; -FormItem::FormItem(QIconView *view, const QString &text) : NewItem(view, text) +FormItem::FormItem(TQIconView *view, const TQString &text) : NewItem(view, text) { } void FormItem::insert() { - QString n = "Form" + QString::number(++_forms); + TQString n = "Form" + TQString::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; + TQWidget *w = 0L; if (fType == Dialog) { w = WidgetFactory::create(WidgetDatabase::idFromClassName("Dialog"), fw, n.latin1()); @@ -87,60 +87,60 @@ void FormItem::insert() -CustomFormItem::CustomFormItem(QIconView *view, const QString &text) +CustomFormItem::CustomFormItem(TQIconView *view, const TQString &text) : NewItem(view, text) { } -static void unifyFormName(FormWindow *fw, QWorkspace *qworkspace) +static void unifyFormName(FormWindow *fw, TQWorkspace *qworkspace) { - QStringList lst; - QWidgetList windows = qworkspace->windowList(); - for (QWidget* w = windows.first(); w; w = windows.next()) + TQStringList lst; + TQWidgetList windows = qworkspace->windowList(); + for (TQWidget* 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; + TQString origName = fw->name(); + TQString n = origName; int i = 1; while (lst.findIndex(n) != -1) - n = origName + QString::number(i++); + n = origName + TQString::number(i++); fw->setName(n); fw->setCaption(n); } void CustomFormItem::insert() { - QString filename = templateFileName(); - if (!filename.isEmpty() && QFile::exists(filename)) + TQString filename = templateFileName(); + if (!filename.isEmpty() && TQFile::exists(filename)) { Resource resource(MainWindow::self); FormFile *ff = new FormFile(filename, true); if (!resource.load(ff)) { - QMessageBox::information(MainWindow::self, i18n("Load Template"), + TQMessageBox::information(MainWindow::self, i18n("Load Template"), i18n("Could not load form description from template '%1'").arg(filename)); delete ff; return; } - ff->setFileName(QString::null); + ff->setFileName(TQString::null); if (MainWindow::self->formWindow()) { - MainWindow::self->formWindow()->setFileName(QString::null); + MainWindow::self->formWindow()->setFileName(TQString::null); unifyFormName(MainWindow::self->formWindow(), MainWindow::self->qWorkspace()); } } } -NewForm::NewForm(QWidget *parent, const QString &templatePath) +NewForm::NewForm(TQWidget *parent, const TQString &templatePath) : NewFormBase(parent, 0, true) { - connect(helpButton, SIGNAL(clicked()), MainWindow::self, SLOT(showDialogHelp())); + connect(helpButton, TQT_SIGNAL(clicked()), MainWindow::self, TQT_SLOT(showDialogHelp())); - QIconViewItem *cur = 0; + TQIconViewItem *cur = 0; FormItem *fi = new FormItem(templateView, i18n("Dialog")); allItems.append(fi); fi->setFormType(FormItem::Dialog); @@ -154,25 +154,25 @@ NewForm::NewForm(QWidget *parent, const QString &templatePath) fi->setDragEnabled(false); - QStringList searchPaths = KGlobal::dirs()->findDirs("data", "kmdr-editor/templates"); + TQStringList 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) + for (TQStringList::ConstIterator it = searchPaths.begin(); it != searchPaths.end(); ++it) { - if (!QFile::exists(*it)) + if (!TQFile::exists(*it)) continue; - QDir dir(*it); - const QFileInfoList* fileList = dir.entryInfoList(QDir::DefaultFilter, QDir::DirsFirst | QDir::Name); + TQDir dir(*it); + const QFileInfoList* fileList = dir.entryInfoList(TQDir::DefaultFilter, TQDir::DirsFirst | TQDir::Name); if (fileList) for (QFileInfoListIterator fit(*fileList); fit.current(); ++fit) { - QFileInfo* fi = fit.current(); + TQFileInfo* fi = fit.current(); if (!fi->isFile() || fi->extension() != "kmdr") continue; - QString name = fi->baseName(); + TQString name = fi->baseName(); name = name.replace("_", " "); CustomFormItem *ci = new CustomFormItem(templateView, name); allItems.append(ci); @@ -194,7 +194,7 @@ void NewForm::accept() } -void NewForm::itemChanged(QIconViewItem *item) +void NewForm::itemChanged(TQIconViewItem *item) { Q_UNUSED(item); } diff --git a/kommander/editor/newformimpl.h b/kommander/editor/newformimpl.h index 12fec22c..9aad4155 100644 --- a/kommander/editor/newformimpl.h +++ b/kommander/editor/newformimpl.h @@ -20,7 +20,7 @@ #define NEWFORMIMPL_H #include "newform.h" -#include +#include class FormFile; @@ -29,7 +29,7 @@ class NewItem : public QIconViewItem { public: enum Type {Form, CustomForm}; - NewItem( QIconView *view, const QString &text ) : QIconViewItem( view, text ) {} + NewItem( TQIconView *view, const TQString &text ) : TQIconViewItem( view, text ) {} virtual void insert( ) = 0; }; @@ -37,7 +37,7 @@ class FormItem : public NewItem { public: enum FormType {Dialog, Wizard, MainWindow}; - FormItem( QIconView *view, const QString &text); + FormItem( TQIconView *view, const TQString &text); void insert(); int rtti() const {return (int)Form;} void setFormType(FormType ft) {fType = ft;} @@ -49,25 +49,25 @@ private: class CustomFormItem : public NewItem { public: - CustomFormItem( QIconView *view, const QString &text ); + CustomFormItem( TQIconView *view, const TQString &text ); void insert(); int rtti() const {return (int)CustomForm; } - void setTemplateFile(const QString &tf) {templFile = tf;} - QString templateFileName() const {return templFile;} + void setTemplateFile(const TQString &tf) {templFile = tf;} + TQString templateFileName() const {return templFile;} private: - QString templFile; + TQString templFile; }; class NewForm : public NewFormBase { Q_OBJECT public: - NewForm( QWidget *parent, const QString &templatePath ); + NewForm( TQWidget *parent, const TQString &templatePath ); void accept(); protected slots: - void itemChanged(QIconViewItem *item); + void itemChanged(TQIconViewItem *item); private: - QPtrList allItems; + TQPtrList allItems; }; #endif diff --git a/kommander/editor/orderindicator.cpp b/kommander/editor/orderindicator.cpp index 31450bbf..fee29150 100644 --- a/kommander/editor/orderindicator.cpp +++ b/kommander/editor/orderindicator.cpp @@ -18,17 +18,17 @@ ** **********************************************************************/ -#include // HP-UX compiler need this here +#include // HP-UX compiler need this here #include "orderindicator.h" #include "formwindow.h" -#include -#include -#include +#include +#include +#include -OrderIndicator::OrderIndicator( int i, QWidget* w, FormWindow *fw ) - : QWidget( fw, "order_indicator", WMouseNoMask ), formWindow( fw ) +OrderIndicator::OrderIndicator( int i, TQWidget* w, FormWindow *fw ) + : TQWidget( fw, "order_indicator", WMouseNoMask ), formWindow( fw ) { order = -1; widget = w; @@ -43,7 +43,7 @@ OrderIndicator::~OrderIndicator() } -void OrderIndicator::setOrder( int i, QWidget* wid ) +void OrderIndicator::setOrder( int i, TQWidget* wid ) { if ( widget != wid ) return; @@ -58,9 +58,9 @@ void OrderIndicator::setOrder( int i, QWidget* wid ) return; } order = i; - int w = fontMetrics().width( QString::number( i ) ) + 10; + int w = fontMetrics().width( TQString::number( i ) ) + 10; int h = fontMetrics().lineSpacing() * 3 / 2; - QFont f( font() ); + TQFont f( font() ); f.setBold( true ); setFont( f ); resize( QMAX( w, h ), h ); @@ -72,27 +72,27 @@ void OrderIndicator::setOrder( int i, QWidget* wid ) void OrderIndicator::reposition() { - QPoint p =parentWidget()->mapFromGlobal( widget->mapToGlobal( widget->rect().topLeft() ) ); - move( p - QPoint( width()/3, height()/3 ) ); + TQPoint p =parentWidget()->mapFromGlobal( widget->mapToGlobal( widget->rect().topLeft() ) ); + move( p - TQPoint( width()/3, height()/3 ) ); } -void OrderIndicator::paintEvent( QPaintEvent * ) +void OrderIndicator::paintEvent( TQPaintEvent * ) { - QPainter p( this ); + TQPainter p( this ); p.setPen( white ); p.setBrush( blue ); p.drawEllipse( rect() ); - p.drawText( rect(), AlignCenter, QString::number( order ) ); + p.drawText( rect(), AlignCenter, TQString::number( order ) ); } void OrderIndicator::updateMask() { - QBitmap bm( size() ); + TQBitmap bm( size() ); bm.fill( color0 ); { - QPainter p( &bm, this ); + TQPainter p( &bm, this ); p.setPen( color1 ); p.setBrush( color1 ); p.drawEllipse( rect() ); @@ -100,8 +100,8 @@ void OrderIndicator::updateMask() setMask( bm ); } -void OrderIndicator::mousePressEvent( QMouseEvent *e ) +void OrderIndicator::mousePressEvent( TQMouseEvent *e ) { - QApplication::sendEvent( widget, e ); + TQApplication::sendEvent( widget, e ); } #include "orderindicator.moc" diff --git a/kommander/editor/orderindicator.h b/kommander/editor/orderindicator.h index 28cc7816..24cae185 100644 --- a/kommander/editor/orderindicator.h +++ b/kommander/editor/orderindicator.h @@ -21,7 +21,7 @@ #ifndef ORDER_INDICATOR_H #define ORDER_INDICATOR_H -#include +#include class FormWindow; @@ -30,20 +30,20 @@ class OrderIndicator : public QWidget Q_OBJECT public: - OrderIndicator( int i, QWidget* w, FormWindow* fw ); + OrderIndicator( int i, TQWidget* w, FormWindow* fw ); ~OrderIndicator(); - void setOrder( int i, QWidget* w ); + void setOrder( int i, TQWidget* w ); void reposition(); protected: - void paintEvent( QPaintEvent * ); - void mousePressEvent( QMouseEvent *e ); + void paintEvent( TQPaintEvent * ); + void mousePressEvent( TQMouseEvent *e ); void updateMask(); private: int order; - QWidget* widget; + TQWidget* widget; FormWindow *formWindow; }; diff --git a/kommander/editor/paletteeditoradvancedimpl.cpp b/kommander/editor/paletteeditoradvancedimpl.cpp index 3b5ccffd..69c90c33 100644 --- a/kommander/editor/paletteeditoradvancedimpl.cpp +++ b/kommander/editor/paletteeditoradvancedimpl.cpp @@ -23,13 +23,13 @@ #include "mainwindow.h" #include "formwindow.h" -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include /*! Class used by PaletteEditor for bold combobox items @@ -38,36 +38,36 @@ class BoldListBoxText : public QListBoxText { public: - BoldListBoxText( QString text, QListBox* lb = 0 ); + BoldListBoxText( TQString text, TQListBox* lb = 0 ); protected: - virtual void paint( QPainter* ); + virtual void paint( TQPainter* ); }; -BoldListBoxText::BoldListBoxText( QString text, QListBox* lb ) - : QListBoxText( lb ) +BoldListBoxText::BoldListBoxText( TQString text, TQListBox* lb ) + : TQListBoxText( lb ) { setText( text ); } -void BoldListBoxText::paint( QPainter* painter ) +void BoldListBoxText::paint( TQPainter* painter ) { - QFont f = painter->font(); + TQFont f = painter->font(); f.setBold( true ); painter->setFont( f ); - QListBoxText::paint( painter ); + TQListBoxText::paint( painter ); } -PaletteEditorAdvanced::PaletteEditorAdvanced( FormWindow *fw, QWidget * parent, +PaletteEditorAdvanced::PaletteEditorAdvanced( FormWindow *fw, TQWidget * 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() ) ); + connect( buttonHelp, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) ); buttonPixmap->setEditor( StyledButton::PixmapEditor ); - editPalette = QApplication::palette(); + editPalette = TQApplication::palette(); setPreviewPalette( editPalette ); buttonPixmap->setFormWindow( formWindow ); @@ -187,58 +187,58 @@ void PaletteEditorAdvanced::onToggleBuildEffects( bool on ) buildDisabledEffect(); } -QColorGroup::ColorRole PaletteEditorAdvanced::centralFromItem( int item ) +TQColorGroup::ColorRole PaletteEditorAdvanced::centralFromItem( int item ) { switch( item ) { case 0: - return QColorGroup::Background; + return TQColorGroup::Background; case 1: - return QColorGroup::Foreground; + return TQColorGroup::Foreground; case 2: - return QColorGroup::Button; + return TQColorGroup::Button; case 3: - return QColorGroup::Base; + return TQColorGroup::Base; case 4: - return QColorGroup::Text; + return TQColorGroup::Text; case 5: - return QColorGroup::BrightText; + return TQColorGroup::BrightText; case 6: - return QColorGroup::ButtonText; + return TQColorGroup::ButtonText; case 7: - return QColorGroup::Highlight; + return TQColorGroup::Highlight; case 8: - return QColorGroup::HighlightedText; + return TQColorGroup::HighlightedText; case 9: - return QColorGroup::Link; + return TQColorGroup::Link; case 10: - return QColorGroup::LinkVisited; + return TQColorGroup::LinkVisited; default: - return QColorGroup::NColorRoles; + return TQColorGroup::NColorRoles; } } -QColorGroup::ColorRole PaletteEditorAdvanced::effectFromItem( int item ) +TQColorGroup::ColorRole PaletteEditorAdvanced::effectFromItem( int item ) { switch( item ) { case 0: - return QColorGroup::Light; + return TQColorGroup::Light; case 1: - return QColorGroup::Midlight; + return TQColorGroup::Midlight; case 2: - return QColorGroup::Mid; + return TQColorGroup::Mid; case 3: - return QColorGroup::Dark; + return TQColorGroup::Dark; case 4: - return QColorGroup::Shadow; + return TQColorGroup::Shadow; default: - return QColorGroup::NColorRoles; + return TQColorGroup::NColorRoles; } } void PaletteEditorAdvanced::onCentral( int item ) { - QPixmap* p = 0; - QColor c; + TQPixmap* p = 0; + TQColor c; switch(selectedPalette) { case 0: @@ -261,12 +261,12 @@ void PaletteEditorAdvanced::onCentral( int item ) if (p) buttonPixmap->setPixmap( *p ); else - buttonPixmap->setPixmap( QPixmap() ); + buttonPixmap->setPixmap( TQPixmap() ); } void PaletteEditorAdvanced::onEffect( int item ) { - QColor c; + TQColor c; switch(selectedPalette) { case 0: default: @@ -282,9 +282,9 @@ void PaletteEditorAdvanced::onEffect( int item ) buttonEffect->setColor(c); } -void PaletteEditorAdvanced::mapToActiveCentralRole( const QColor& c ) +void PaletteEditorAdvanced::mapToActiveCentralRole( const TQColor& c ) { - QColorGroup cg = editPalette.active(); + TQColorGroup cg = editPalette.active(); cg.setColor( centralFromItem(comboCentral->currentItem()), c ); editPalette.setActive( cg ); @@ -297,9 +297,9 @@ void PaletteEditorAdvanced::mapToActiveCentralRole( const QColor& c ) setPreviewPalette( editPalette ); } -void PaletteEditorAdvanced::mapToActiveEffectRole( const QColor& c ) +void PaletteEditorAdvanced::mapToActiveEffectRole( const TQColor& c ) { - QColorGroup cg = editPalette.active(); + TQColorGroup cg = editPalette.active(); cg.setColor( effectFromItem(comboEffect->currentItem()), c ); editPalette.setActive( cg ); @@ -311,14 +311,14 @@ void PaletteEditorAdvanced::mapToActiveEffectRole( const QColor& c ) setPreviewPalette( editPalette ); } -void PaletteEditorAdvanced::mapToActivePixmapRole( const QPixmap& pm ) +void PaletteEditorAdvanced::mapToActivePixmapRole( const TQPixmap& pm ) { - QColorGroup::ColorRole role = centralFromItem(comboCentral->currentItem()); - QColorGroup cg = editPalette.active(); + TQColorGroup::ColorRole role = centralFromItem(comboCentral->currentItem()); + TQColorGroup cg = editPalette.active(); if ( !pm.isNull() ) - cg.setBrush( role, QBrush( cg.color( role ), pm ) ); + cg.setBrush( role, TQBrush( cg.color( role ), pm ) ); else - cg.setBrush( role, QBrush( cg.color( role ) ) ); + cg.setBrush( role, TQBrush( cg.color( role ) ) ); editPalette.setActive( cg ); @@ -331,9 +331,9 @@ void PaletteEditorAdvanced::mapToActivePixmapRole( const QPixmap& pm ) setPreviewPalette( editPalette ); } -void PaletteEditorAdvanced::mapToInactiveCentralRole( const QColor& c ) +void PaletteEditorAdvanced::mapToInactiveCentralRole( const TQColor& c ) { - QColorGroup cg = editPalette.inactive(); + TQColorGroup cg = editPalette.inactive(); cg.setColor( centralFromItem(comboCentral->currentItem()), c ); editPalette.setInactive( cg ); @@ -342,31 +342,31 @@ void PaletteEditorAdvanced::mapToInactiveCentralRole( const QColor& c ) setPreviewPalette( editPalette ); } -void PaletteEditorAdvanced::mapToInactiveEffectRole( const QColor& c ) +void PaletteEditorAdvanced::mapToInactiveEffectRole( const TQColor& c ) { - QColorGroup cg = editPalette.inactive(); + TQColorGroup cg = editPalette.inactive(); cg.setColor( effectFromItem(comboEffect->currentItem()), c ); editPalette.setInactive( cg ); setPreviewPalette( editPalette ); } -void PaletteEditorAdvanced::mapToInactivePixmapRole( const QPixmap& pm ) +void PaletteEditorAdvanced::mapToInactivePixmapRole( const TQPixmap& pm ) { - QColorGroup::ColorRole role = centralFromItem(comboCentral->currentItem()); - QColorGroup cg = editPalette.inactive(); + TQColorGroup::ColorRole role = centralFromItem(comboCentral->currentItem()); + TQColorGroup cg = editPalette.inactive(); if ( !pm.isNull() ) - cg.setBrush( role, QBrush( cg.color( role ), pm ) ); + cg.setBrush( role, TQBrush( cg.color( role ), pm ) ); else - cg.setBrush( role, QBrush( cg.color( role ) ) ); + cg.setBrush( role, TQBrush( cg.color( role ) ) ); editPalette.setInactive( cg ); setPreviewPalette( editPalette ); } -void PaletteEditorAdvanced::mapToDisabledCentralRole( const QColor& c ) +void PaletteEditorAdvanced::mapToDisabledCentralRole( const TQColor& c ) { - QColorGroup cg = editPalette.disabled(); + TQColorGroup cg = editPalette.disabled(); cg.setColor( centralFromItem(comboCentral->currentItem()), c ); editPalette.setDisabled( cg ); @@ -375,23 +375,23 @@ void PaletteEditorAdvanced::mapToDisabledCentralRole( const QColor& c ) setPreviewPalette( editPalette ); } -void PaletteEditorAdvanced::mapToDisabledEffectRole( const QColor& c ) +void PaletteEditorAdvanced::mapToDisabledEffectRole( const TQColor& c ) { - QColorGroup cg = editPalette.disabled(); + TQColorGroup cg = editPalette.disabled(); cg.setColor( effectFromItem(comboEffect->currentItem()), c ); editPalette.setDisabled( cg ); setPreviewPalette( editPalette ); } -void PaletteEditorAdvanced::mapToDisabledPixmapRole( const QPixmap& pm ) +void PaletteEditorAdvanced::mapToDisabledPixmapRole( const TQPixmap& pm ) { - QColorGroup::ColorRole role = centralFromItem(comboCentral->currentItem()); - QColorGroup cg = editPalette.disabled(); + TQColorGroup::ColorRole role = centralFromItem(comboCentral->currentItem()); + TQColorGroup cg = editPalette.disabled(); if ( !pm.isNull() ) - cg.setBrush( role, QBrush( cg.color( role ), pm ) ); + cg.setBrush( role, TQBrush( cg.color( role ), pm ) ); else - cg.setBrush( role, QBrush( cg.color( role ) ) ); + cg.setBrush( role, TQBrush( cg.color( role ) ) ); editPalette.setDisabled( cg ); @@ -400,10 +400,10 @@ void PaletteEditorAdvanced::mapToDisabledPixmapRole( const QPixmap& pm ) void PaletteEditorAdvanced::buildActiveEffect() { - QColorGroup cg = editPalette.active(); - QColor btn = cg.color( QColorGroup::Button ); + TQColorGroup cg = editPalette.active(); + TQColor btn = cg.color( TQColorGroup::Button ); - QPalette temp( btn, btn ); + TQPalette temp( btn, btn ); for (int i = 0; i<5; i++) cg.setColor( effectFromItem(i), temp.active().color( effectFromItem(i) ) ); @@ -422,10 +422,10 @@ void PaletteEditorAdvanced::buildInactive() void PaletteEditorAdvanced::buildInactiveEffect() { - QColorGroup cg = editPalette.inactive(); + TQColorGroup cg = editPalette.inactive(); - QColor light, midlight, mid, dark, shadow; - QColor btn = cg.color( QColorGroup::Button ); + TQColor light, midlight, mid, dark, shadow; + TQColor btn = cg.color( TQColorGroup::Button ); light = btn.light(150); midlight = btn.light(115); @@ -433,11 +433,11 @@ void PaletteEditorAdvanced::buildInactiveEffect() 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 ); + cg.setColor( TQColorGroup::Light, light ); + cg.setColor( TQColorGroup::Midlight, midlight ); + cg.setColor( TQColorGroup::Mid, mid ); + cg.setColor( TQColorGroup::Dark, dark ); + cg.setColor( TQColorGroup::Shadow, shadow ); editPalette.setInactive( cg ); setPreviewPalette( editPalette ); @@ -446,9 +446,9 @@ void PaletteEditorAdvanced::buildInactiveEffect() void PaletteEditorAdvanced::buildDisabled() { - QColorGroup cg = editPalette.active(); - cg.setColor( QColorGroup::ButtonText, darkGray ); - cg.setColor( QColorGroup::Foreground, darkGray ); + TQColorGroup cg = editPalette.active(); + cg.setColor( TQColorGroup::ButtonText, darkGray ); + cg.setColor( TQColorGroup::Foreground, darkGray ); editPalette.setDisabled( cg ); buildDisabledEffect(); @@ -456,10 +456,10 @@ void PaletteEditorAdvanced::buildDisabled() void PaletteEditorAdvanced::buildDisabledEffect() { - QColorGroup cg = editPalette.disabled(); + TQColorGroup cg = editPalette.disabled(); - QColor light, midlight, mid, dark, shadow; - QColor btn = cg.color( QColorGroup::Button ); + TQColor light, midlight, mid, dark, shadow; + TQColor btn = cg.color( TQColorGroup::Button ); light = btn.light(150); midlight = btn.light(115); @@ -467,20 +467,20 @@ void PaletteEditorAdvanced::buildDisabledEffect() 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 ); + cg.setColor( TQColorGroup::Light, light ); + cg.setColor( TQColorGroup::Midlight, midlight ); + cg.setColor( TQColorGroup::Mid, mid ); + cg.setColor( TQColorGroup::Dark, dark ); + cg.setColor( TQColorGroup::Shadow, shadow ); editPalette.setDisabled( cg ); setPreviewPalette( editPalette ); updateStyledButtons(); } -void PaletteEditorAdvanced::setPreviewPalette( const QPalette& pal ) +void PaletteEditorAdvanced::setPreviewPalette( const TQPalette& pal ) { - QColorGroup cg; + TQColorGroup cg; switch (selectedPalette) { case 0: @@ -501,8 +501,8 @@ void PaletteEditorAdvanced::setPreviewPalette( const QPalette& pal ) void PaletteEditorAdvanced::updateStyledButtons() { - QColor central, effect; - QPixmap *pm = 0; + TQColor central, effect; + TQPixmap *pm = 0; switch (selectedPalette) { case 0: default: @@ -527,17 +527,17 @@ void PaletteEditorAdvanced::updateStyledButtons() if ( pm && !pm->isNull() ) buttonPixmap->setPixmap( *pm ); else - buttonPixmap->setPixmap(QPixmap()); + buttonPixmap->setPixmap(TQPixmap()); } -void PaletteEditorAdvanced::setPal( const QPalette& pal ) +void PaletteEditorAdvanced::setPal( const TQPalette& pal ) { editPalette = pal; setPreviewPalette( pal ); updateStyledButtons(); } -QPalette PaletteEditorAdvanced::pal() const +TQPalette PaletteEditorAdvanced::pal() const { return editPalette; } @@ -599,32 +599,32 @@ void PaletteEditorAdvanced::setupBackgroundMode( BackgroundMode mode ) if (initRole > 8 ) { comboEffect->setCurrentItem( initRole - 9 ); if ( comboEffect->listBox() ) { - QString text = comboEffect->currentText(); + TQString text = comboEffect->currentText(); comboEffect->listBox()->changeItem( new BoldListBoxText( text ), initRole - 9 ); } } else { comboCentral->setCurrentItem( initRole ); if ( comboCentral->listBox() ) { - QString text = comboCentral->currentText(); + TQString text = comboCentral->currentText(); comboCentral->listBox()->changeItem( new BoldListBoxText( text ), initRole ); } } } -QPalette PaletteEditorAdvanced::getPalette( bool *ok, const QPalette &init, - BackgroundMode mode, QWidget* parent, +TQPalette PaletteEditorAdvanced::getPalette( bool *ok, const TQPalette &init, + BackgroundMode mode, TQWidget* parent, const char* name, FormWindow *fw ) { PaletteEditorAdvanced* dlg = new PaletteEditorAdvanced( fw, parent, name, true ); dlg->setupBackgroundMode( mode ); - if ( init != QPalette() ) + if ( init != TQPalette() ) dlg->setPal( init ); int resultCode = dlg->exec(); - QPalette result = init; - if ( resultCode == QDialog::Accepted ) { + TQPalette result = init; + if ( resultCode == TQDialog::Accepted ) { if ( ok ) *ok = true; result = dlg->pal(); diff --git a/kommander/editor/paletteeditoradvancedimpl.h b/kommander/editor/paletteeditoradvancedimpl.h index a1b56c06..b9c378dd 100644 --- a/kommander/editor/paletteeditoradvancedimpl.h +++ b/kommander/editor/paletteeditoradvancedimpl.h @@ -29,12 +29,12 @@ class PaletteEditorAdvanced : public PaletteEditorAdvancedBase { Q_OBJECT public: - PaletteEditorAdvanced( FormWindow *fw, QWidget * parent=0, const char * name=0, + PaletteEditorAdvanced( FormWindow *fw, TQWidget * 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 ); + static TQPalette getPalette( bool *ok, const TQPalette &pal, BackgroundMode mode = PaletteBackground, + TQWidget* parent = 0, const char* name = 0, FormWindow *fw = 0 ); protected slots: void paletteSelected(int); @@ -51,15 +51,15 @@ protected slots: 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 mapToActiveCentralRole( const TQColor& ); + void mapToActiveEffectRole( const TQColor& ); + void mapToActivePixmapRole( const TQPixmap& ); + void mapToInactiveCentralRole( const TQColor& ); + void mapToInactiveEffectRole( const TQColor& ); + void mapToInactivePixmapRole( const TQPixmap& ); + void mapToDisabledCentralRole( const TQColor& ); + void mapToDisabledEffectRole( const TQColor& ); + void mapToDisabledPixmapRole( const TQPixmap& ); void buildPalette(); @@ -70,17 +70,17 @@ protected: void buildDisabledEffect(); private: - void setPreviewPalette( const QPalette& ); + void setPreviewPalette( const TQPalette& ); void updateStyledButtons(); void setupBackgroundMode( BackgroundMode ); - QPalette pal() const; - void setPal( const QPalette& ); + TQPalette pal() const; + void setPal( const TQPalette& ); - QColorGroup::ColorRole centralFromItem( int ); - QColorGroup::ColorRole effectFromItem( int ); - QPalette editPalette; - QPalette previewPalette; + TQColorGroup::ColorRole centralFromItem( int ); + TQColorGroup::ColorRole effectFromItem( int ); + TQPalette editPalette; + TQPalette previewPalette; FormWindow *formWindow; diff --git a/kommander/editor/paletteeditorimpl.cpp b/kommander/editor/paletteeditorimpl.cpp index 9264c810..bc3877f4 100644 --- a/kommander/editor/paletteeditorimpl.cpp +++ b/kommander/editor/paletteeditorimpl.cpp @@ -25,21 +25,21 @@ #include "mainwindow.h" #include "formwindow.h" -#include -#include -#include -#include +#include +#include +#include +#include -PaletteEditor::PaletteEditor( FormWindow *fw, QWidget * parent, const char * name, bool modal, WFlags f ) +PaletteEditor::PaletteEditor( FormWindow *fw, TQWidget * parent, const char * name, bool modal, WFlags f ) : PaletteEditorBase( parent, name, modal, f ), formWindow( fw ) { - connect( buttonHelp, SIGNAL( clicked() ), MainWindow::self, SLOT( showDialogHelp() ) ); + connect( buttonHelp, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) ); - editPalette = QApplication::palette(); + editPalette = TQApplication::palette(); setPreviewPalette( editPalette ); - buttonMainColor->setColor( editPalette.active().color( QColorGroup::Button ) ); - buttonMainColor2->setColor( editPalette.active().color( QColorGroup::Background ) ); + buttonMainColor->setColor( editPalette.active().color( TQColorGroup::Button ) ); + buttonMainColor2->setColor( editPalette.active().color( TQColorGroup::Background ) ); } PaletteEditor::~PaletteEditor() @@ -49,7 +49,7 @@ PaletteEditor::~PaletteEditor() void PaletteEditor::onTune() { bool ok; - QPalette pal = PaletteEditorAdvanced::getPalette( &ok, editPalette, backgroundMode, this, "tune_palette", formWindow); + TQPalette pal = PaletteEditorAdvanced::getPalette( &ok, editPalette, backgroundMode, this, "tune_palette", formWindow); if (!ok) return; editPalette = pal; @@ -71,59 +71,59 @@ void PaletteEditor::paletteSelected(int) setPreviewPalette(editPalette); } -QColorGroup::ColorRole PaletteEditor::centralFromItem( int item ) +TQColorGroup::ColorRole PaletteEditor::centralFromItem( int item ) { switch( item ) { case 0: - return QColorGroup::Background; + return TQColorGroup::Background; case 1: - return QColorGroup::Foreground; + return TQColorGroup::Foreground; case 2: - return QColorGroup::Button; + return TQColorGroup::Button; case 3: - return QColorGroup::Base; + return TQColorGroup::Base; case 4: - return QColorGroup::Text; + return TQColorGroup::Text; case 5: - return QColorGroup::BrightText; + return TQColorGroup::BrightText; case 6: - return QColorGroup::ButtonText; + return TQColorGroup::ButtonText; case 7: - return QColorGroup::Highlight; + return TQColorGroup::Highlight; case 8: - return QColorGroup::HighlightedText; + return TQColorGroup::HighlightedText; default: - return QColorGroup::NColorRoles; + return TQColorGroup::NColorRoles; } } -QColorGroup::ColorRole PaletteEditor::effectFromItem( int item ) +TQColorGroup::ColorRole PaletteEditor::effectFromItem( int item ) { switch( item ) { case 0: - return QColorGroup::Light; + return TQColorGroup::Light; case 1: - return QColorGroup::Midlight; + return TQColorGroup::Midlight; case 2: - return QColorGroup::Mid; + return TQColorGroup::Mid; case 3: - return QColorGroup::Dark; + return TQColorGroup::Dark; case 4: - return QColorGroup::Shadow; + return TQColorGroup::Shadow; default: - return QColorGroup::NColorRoles; + return TQColorGroup::NColorRoles; } } void PaletteEditor::buildPalette() { int i; - QColorGroup cg; - QColor btn = buttonMainColor->color(); - QColor back = buttonMainColor2->color(); - QPalette automake( btn, back ); + TQColorGroup cg; + TQColor btn = buttonMainColor->color(); + TQColor back = buttonMainColor2->color(); + TQPalette automake( btn, back ); for (i = 0; i<9; i++) cg.setColor( centralFromItem(i), automake.active().color( centralFromItem(i) ) ); @@ -133,8 +133,8 @@ void PaletteEditor::buildPalette() cg = editPalette.inactive(); - QPalette temp( editPalette.active().color( QColorGroup::Button ), - editPalette.active().color( QColorGroup::Background ) ); + TQPalette temp( editPalette.active().color( TQColorGroup::Button ), + editPalette.active().color( TQColorGroup::Background ) ); for (i = 0; i<9; i++) cg.setColor( centralFromItem(i), temp.inactive().color( centralFromItem(i) ) ); @@ -155,10 +155,10 @@ void PaletteEditor::buildPalette() void PaletteEditor::buildActiveEffect() { - QColorGroup cg = editPalette.active(); - QColor btn = cg.color( QColorGroup::Button ); + TQColorGroup cg = editPalette.active(); + TQColor btn = cg.color( TQColorGroup::Button ); - QPalette temp( btn, btn ); + TQPalette temp( btn, btn ); for (int i = 0; i<5; i++) cg.setColor( effectFromItem(i), temp.active().color( effectFromItem(i) ) ); @@ -177,10 +177,10 @@ void PaletteEditor::buildInactive() void PaletteEditor::buildInactiveEffect() { - QColorGroup cg = editPalette.inactive(); + TQColorGroup cg = editPalette.inactive(); - QColor light, midlight, mid, dark, shadow; - QColor btn = cg.color( QColorGroup::Button ); + TQColor light, midlight, mid, dark, shadow; + TQColor btn = cg.color( TQColorGroup::Button ); light = btn.light(150); midlight = btn.light(115); @@ -188,11 +188,11 @@ void PaletteEditor::buildInactiveEffect() 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 ); + cg.setColor( TQColorGroup::Light, light ); + cg.setColor( TQColorGroup::Midlight, midlight ); + cg.setColor( TQColorGroup::Mid, mid ); + cg.setColor( TQColorGroup::Dark, dark ); + cg.setColor( TQColorGroup::Shadow, shadow ); editPalette.setInactive( cg ); setPreviewPalette( editPalette ); @@ -201,9 +201,9 @@ void PaletteEditor::buildInactiveEffect() void PaletteEditor::buildDisabled() { - QColorGroup cg = editPalette.active(); - cg.setColor( QColorGroup::ButtonText, darkGray ); - cg.setColor( QColorGroup::Foreground, darkGray ); + TQColorGroup cg = editPalette.active(); + cg.setColor( TQColorGroup::ButtonText, darkGray ); + cg.setColor( TQColorGroup::Foreground, darkGray ); editPalette.setDisabled( cg ); buildDisabledEffect(); @@ -211,10 +211,10 @@ void PaletteEditor::buildDisabled() void PaletteEditor::buildDisabledEffect() { - QColorGroup cg = editPalette.disabled(); + TQColorGroup cg = editPalette.disabled(); - QColor light, midlight, mid, dark, shadow; - QColor btn = cg.color( QColorGroup::Button ); + TQColor light, midlight, mid, dark, shadow; + TQColor btn = cg.color( TQColorGroup::Button ); light = btn.light(150); midlight = btn.light(115); @@ -222,20 +222,20 @@ void PaletteEditor::buildDisabledEffect() 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 ); + cg.setColor( TQColorGroup::Light, light ); + cg.setColor( TQColorGroup::Midlight, midlight ); + cg.setColor( TQColorGroup::Mid, mid ); + cg.setColor( TQColorGroup::Dark, dark ); + cg.setColor( TQColorGroup::Shadow, shadow ); editPalette.setDisabled( cg ); setPreviewPalette( editPalette ); updateStyledButtons(); } -void PaletteEditor::setPreviewPalette( const QPalette& pal ) +void PaletteEditor::setPreviewPalette( const TQPalette& pal ) { - QColorGroup cg; + TQColorGroup cg; switch (paletteCombo->currentItem()) { case 0: @@ -258,34 +258,34 @@ void PaletteEditor::setPreviewPalette( const QPalette& pal ) void PaletteEditor::updateStyledButtons() { - buttonMainColor->setColor( editPalette.active().color( QColorGroup::Button )); - buttonMainColor2->setColor( editPalette.active().color( QColorGroup::Background )); + buttonMainColor->setColor( editPalette.active().color( TQColorGroup::Button )); + buttonMainColor2->setColor( editPalette.active().color( TQColorGroup::Background )); } -void PaletteEditor::setPal( const QPalette& pal ) +void PaletteEditor::setPal( const TQPalette& pal ) { editPalette = pal; setPreviewPalette( pal ); updateStyledButtons(); } -QPalette PaletteEditor::pal() const +TQPalette PaletteEditor::pal() const { return editPalette; } -QPalette PaletteEditor::getPalette( bool *ok, const QPalette &init, BackgroundMode mode, - QWidget* parent, const char* name, FormWindow *fw ) +TQPalette PaletteEditor::getPalette( bool *ok, const TQPalette &init, BackgroundMode mode, + TQWidget* parent, const char* name, FormWindow *fw ) { PaletteEditor* dlg = new PaletteEditor( fw, parent, name, true ); dlg->setupBackgroundMode( mode ); - if ( init != QPalette() ) + if ( init != TQPalette() ) dlg->setPal( init ); int resultCode = dlg->exec(); - QPalette result = init; - if ( resultCode == QDialog::Accepted ) { + TQPalette result = init; + if ( resultCode == TQDialog::Accepted ) { if ( ok ) *ok = true; result = dlg->pal(); diff --git a/kommander/editor/paletteeditorimpl.h b/kommander/editor/paletteeditorimpl.h index 258d0978..abd68dfc 100644 --- a/kommander/editor/paletteeditorimpl.h +++ b/kommander/editor/paletteeditorimpl.h @@ -30,11 +30,11 @@ class PaletteEditor : public PaletteEditorBase Q_OBJECT public: - PaletteEditor( FormWindow *fw, QWidget * parent=0, const char * name=0, bool modal=FALSE, WFlags f=0 ); + PaletteEditor( FormWindow *fw, TQWidget * 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 ); + static TQPalette getPalette( bool *ok, const TQPalette &pal, BackgroundMode mode = PaletteBackground, + TQWidget* parent = 0, const char* name = 0, FormWindow *fw = 0 ); protected slots: void onChooseMainColor(); @@ -51,17 +51,17 @@ protected: void buildDisabledEffect(); private: - void setPreviewPalette( const QPalette& ); + void setPreviewPalette( const TQPalette& ); void updateStyledButtons(); void setupBackgroundMode( BackgroundMode mode ) { backgroundMode = mode; } - QPalette pal() const; - void setPal( const QPalette& ); + TQPalette pal() const; + void setPal( const TQPalette& ); - QColorGroup::ColorRole centralFromItem( int ); - QColorGroup::ColorRole effectFromItem( int ); - QPalette editPalette; - QPalette previewPalette; + TQColorGroup::ColorRole centralFromItem( int ); + TQColorGroup::ColorRole effectFromItem( int ); + TQPalette editPalette; + TQPalette previewPalette; FormWindow *formWindow; BackgroundMode backgroundMode; diff --git a/kommander/editor/parser.cpp b/kommander/editor/parser.cpp index 4fc13c5f..15374aa5 100644 --- a/kommander/editor/parser.cpp +++ b/kommander/editor/parser.cpp @@ -19,28 +19,28 @@ **********************************************************************/ #include "parser.h" -#include -#include +#include +#include class NormalizeObject : public QObject { public: - NormalizeObject() : QObject() {} - static QCString normalizeSignalSlot( const char *signalSlot ) { return QObject::normalizeSignalSlot( signalSlot ); } + NormalizeObject() : TQObject() {} + static TQCString normalizeSignalSlot( const char *signalSlot ) { return TQObject::normalizeSignalSlot( signalSlot ); } }; -QString Parser::cleanArgs( const QString &func ) +TQString Parser::cleanArgs( const TQString &func ) { - QString slot( func ); + TQString slot( func ); int begin = slot.find( "(" ) + 1; - QString args = slot.mid( begin ); + TQString 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 ) { + TQStringList lst = TQStringList::split( ',', args ); + TQString res = slot.left( begin ); + for ( TQStringList::Iterator it = lst.begin(); it != lst.end(); ++it ) { if ( it != lst.begin() ) res += ","; - QString arg = *it; + TQString arg = *it; int pos = 0; if ( ( pos = arg.find( "&" ) ) != -1 ) { arg = arg.left( pos + 1 ); @@ -50,7 +50,7 @@ QString Parser::cleanArgs( const QString &func ) arg = arg.simplifyWhiteSpace(); if ( ( pos = arg.find( ':' ) ) != -1 ) arg = arg.left( pos ).simplifyWhiteSpace() + ":" + arg.mid( pos + 1 ).simplifyWhiteSpace(); - QStringList l = QStringList::split( ' ', arg ); + TQStringList l = TQStringList::split( ' ', arg ); if ( l.count() == 2 ) { if ( l[ 0 ] != "const" && l[ 0 ] != "unsigned" && l[ 0 ] != "var" ) arg = l[ 0 ]; @@ -62,5 +62,5 @@ QString Parser::cleanArgs( const QString &func ) } res += ")"; - return QString::fromLatin1( NormalizeObject::normalizeSignalSlot( res.latin1() ) ); + return TQString::fromLatin1( NormalizeObject::normalizeSignalSlot( res.latin1() ) ); } diff --git a/kommander/editor/parser.h b/kommander/editor/parser.h index 5a5671ad..ace96d9e 100644 --- a/kommander/editor/parser.h +++ b/kommander/editor/parser.h @@ -21,12 +21,12 @@ #ifndef PARSER_H #define PARSER_H -#include +#include class Parser { public: - static QString cleanArgs( const QString &func ); + static TQString cleanArgs( const TQString &func ); }; diff --git a/kommander/editor/pics/images.h b/kommander/editor/pics/images.h index adec0936..71009fb6 100644 --- a/kommander/editor/pics/images.h +++ b/kommander/editor/pics/images.h @@ -10826,8 +10826,8 @@ static const unsigned char qtlogo_png_data[] = { 0x82 }; -#include -#include +#include +#include static struct Embed { unsigned int size; const unsigned char *data; @@ -10954,10 +10954,10 @@ static struct Embed { { 0, 0, 0 } }; -static const QByteArray& qembed_findData( const char* name ) +static const TQByteArray& qembed_findData( const char* name ) { - static QDict dict; - QByteArray* ba = dict.find( name ); + static TQDict dict; + TQByteArray* ba = dict.find( name ); if ( !ba ) { for ( int i = 0; embed_vec[i].data; i++ ) { if ( strcmp(embed_vec[i].name, name) == 0 ) { @@ -10969,7 +10969,7 @@ static const QByteArray& qembed_findData( const char* name ) } } if ( !ba ) { - static QByteArray dummy; + static TQByteArray dummy; return dummy; } } diff --git a/kommander/editor/pixmapchooser.cpp b/kommander/editor/pixmapchooser.cpp index 1a5a8535..92512c68 100644 --- a/kommander/editor/pixmapchooser.cpp +++ b/kommander/editor/pixmapchooser.cpp @@ -18,7 +18,7 @@ ** **********************************************************************/ -#include // HP-UX compiler needs this here +#include // HP-UX compiler needs this here #include "pixmapchooser.h" #include "formwindow.h" @@ -37,13 +37,13 @@ #include "project.h" #endif -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include @@ -876,30 +876,30 @@ static ImageIconProvider *imageIconProvider = 0; static PixmapChooser *pixmapChooser = 0; #endif -PixmapView::PixmapView( QWidget *parent ) - : QScrollView( parent ) +PixmapView::PixmapView( TQWidget *parent ) + : TQScrollView( parent ) { viewport()->setBackgroundMode( PaletteBase ); } -void PixmapView::setPixmap( const QPixmap &pix ) +void PixmapView::setPixmap( const TQPixmap &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 ) +void PixmapView::drawContents( TQPainter *p, int cx, int cy, int cw, int ch ) { - p->fillRect( cx, cy, cw, ch, colorGroup().brush( QColorGroup::Base ) ); + p->fillRect( cx, cy, cw, ch, colorGroup().brush( TQColorGroup::Base ) ); p->drawPixmap( 0, 0, pixmap ); } -void PixmapView::previewUrl( const QUrl &u ) +void PixmapView::previewUrl( const TQUrl &u ) { if ( u.isLocalFile() ) { - QString path = u.path(); - QPixmap pix( path ); + TQString path = u.path(); + TQPixmap pix( path ); if ( !pix.isNull() ) setPixmap( pix ); } else { @@ -907,63 +907,63 @@ void PixmapView::previewUrl( const QUrl &u ) } } -QStringList qChoosePixmaps( QWidget *parent ) +TQStringList qChoosePixmaps( TQWidget *parent ) { - if ( !imageIconProvider && !QFileDialog::iconProvider() ) - QFileDialog::setIconProvider( ( imageIconProvider = new ImageIconProvider ) ); + if ( !imageIconProvider && !TQFileDialog::iconProvider() ) + TQFileDialog::setIconProvider( ( imageIconProvider = new ImageIconProvider ) ); - QString filter; - QString all = qApp->translate( "qChoosePixmap", "All Pixmaps (" ); - for ( uint i = 0; i < QImageIO::outputFormats().count(); i++ ) { + TQString filter; + TQString all = qApp->translate( "qChoosePixmap", "All Pixmaps (" ); + for ( uint i = 0; i < TQImageIO::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() + ";"; + arg( TQImageIO::outputFormats().at( i ) ). + arg( "*." + TQString( TQImageIO::outputFormats().at( i ) ).lower() ); + all += "*." + TQString( TQImageIO::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 ); + TQFileDialog fd( TQString::null, filter, parent, 0, true ); + fd.setMode( TQFileDialog::ExistingFiles ); fd.setContentsPreviewEnabled( true ); PixmapView *pw = new PixmapView( &fd ); fd.setContentsPreview( pw, pw ); - fd.setViewMode( QFileDialog::List ); - fd.setPreviewMode( QFileDialog::Contents ); + fd.setViewMode( TQFileDialog::List ); + fd.setPreviewMode( TQFileDialog::Contents ); fd.setCaption( qApp->translate( "qChoosePixmap", "Choose Images" ) ); - if ( fd.exec() == QDialog::Accepted ) + if ( fd.exec() == TQDialog::Accepted ) return fd.selectedFiles(); - return QStringList(); + return TQStringList(); } -QPixmap qChoosePixmap( QWidget *parent, FormWindow *fw, const QPixmap &old, QString *fn ) +TQPixmap qChoosePixmap( TQWidget *parent, FormWindow *fw, const TQPixmap &old, TQString *fn ) { #if defined(DESIGNER) if ( !fw || fw->savePixmapInline() ) { - if ( !imageIconProvider && !QFileDialog::iconProvider() ) - QFileDialog::setIconProvider( ( imageIconProvider = new ImageIconProvider ) ); + if ( !imageIconProvider && !TQFileDialog::iconProvider() ) + TQFileDialog::setIconProvider( ( imageIconProvider = new ImageIconProvider ) ); - QString filter; - QString all = i18n( "All Pixmaps" ); + TQString filter; + TQString all = i18n( "All Pixmaps" ); all += " ("; - for ( uint i = 0; i < QImageIO::outputFormats().count(); i++ ) { + for ( uint i = 0; i < TQImageIO::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() + ";"; + arg( TQImageIO::outputFormats().at( i ) ). + arg( "*." + TQString( TQImageIO::outputFormats().at( i ) ).lower() ); + all += "*." + TQString( TQImageIO::outputFormats().at( i ) ).lower() + ";"; } filter.prepend( all + ")\n" ); filter += i18n( "All Files (*)" ); - QFileDialog fd( QString::null, filter, parent, 0, true ); + TQFileDialog fd( TQString::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.setViewMode( TQFileDialog::List ); + fd.setPreviewMode( TQFileDialog::Contents ); fd.setCaption( i18n( "Choose Pixmap" ) ); - if ( fd.exec() == QDialog::Accepted ) { - QPixmap pix( fd.selectedFile() ); + if ( fd.exec() == TQDialog::Accepted ) { + TQPixmap pix( fd.selectedFile() ); if ( fn ) *fn = fd.selectedFile(); MetaDataBase::setPixmapArgument( fw, pix.serialNumber(), fd.selectedFile() ); @@ -976,8 +976,8 @@ QPixmap qChoosePixmap( QWidget *parent, FormWindow *fw, const QPixmap &old, QStr 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() ) ); + if ( dia.exec() == TQDialog::Accepted ) { + TQPixmap pix( fw->project()->pixmapCollection()->pixmap( dia.viewPixmaps->currentItem()->text() ) ); MetaDataBase::setPixmapKey( fw, pix.serialNumber(), dia.viewPixmaps->currentItem()->text() ); return pix; } @@ -985,12 +985,12 @@ QPixmap qChoosePixmap( QWidget *parent, FormWindow *fw, const QPixmap &old, QStr #endif else { PixmapFunction dia( parent, 0, true ); - QObject::connect( dia.helpButton, SIGNAL( clicked() ), MainWindow::self, SLOT( showDialogHelp() ) ); + TQObject::connect( dia.helpButton, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_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" ) ); + if ( dia.exec() == TQDialog::Accepted ) { + TQPixmap pix( PixmapChooser::loadPixmap( "image.xpm" ) ); MetaDataBase::setPixmapArgument( fw, pix.serialNumber(), dia.editArguments->text() ); return pix; } @@ -1000,26 +1000,26 @@ QPixmap qChoosePixmap( QWidget *parent, FormWindow *fw, const QPixmap &old, QStr Q_UNUSED( fw ); Q_UNUSED( old ); #endif - return QPixmap(); + return TQPixmap(); } -ImageIconProvider::ImageIconProvider( QWidget *parent, const char *name ) - : QFileIconProvider( parent, name ), imagepm( PixmapChooser::loadPixmap( "image.xpm", PixmapChooser::Mini ) ) +ImageIconProvider::ImageIconProvider( TQWidget *parent, const char *name ) + : TQFileIconProvider( parent, name ), imagepm( PixmapChooser::loadPixmap( "image.xpm", PixmapChooser::Mini ) ) { - fmts = QImage::inputFormats(); + fmts = TQImage::inputFormats(); } ImageIconProvider::~ImageIconProvider() { } -const QPixmap * ImageIconProvider::pixmap( const QFileInfo &fi ) +const TQPixmap * ImageIconProvider::pixmap( const TQFileInfo &fi ) { - QString ext = fi.extension().upper(); + TQString ext = fi.extension().upper(); if ( fmts.contains( ext ) ) { return &imagepm; } else { - return QFileIconProvider::pixmap( fi ); + return TQFileIconProvider::pixmap( fi ); } } @@ -1032,7 +1032,7 @@ PixmapChooser::PixmapChooser() largePixDir = "pics/large/"; } -QString PixmapChooser::pixmapPath( Size size ) const +TQString PixmapChooser::pixmapPath( Size size ) const { if ( size == Small ) return smallPixDir; @@ -1043,19 +1043,19 @@ QString PixmapChooser::pixmapPath( Size size ) const return largePixDir; } -QPixmap PixmapChooser::loadPixmap( const QString &name, Size size ) +TQPixmap PixmapChooser::loadPixmap( const TQString &name, Size size ) { #if defined(DESIGNER) if ( !pixmapChooser ) pixmapChooser = new PixmapChooser; if ( name == "logo" ) - return QPixmap( logo_xpm ); + return TQPixmap( logo_xpm ); if ( name[ 0 ] == '/' || name[ 0 ] == '\\' || name[ 1 ] == ':' ) - return QPixmap( name ); + return TQPixmap( name ); - QString lookup; + TQString lookup; switch ( size ) { case Small: lookup = "small/"; @@ -1073,21 +1073,21 @@ QPixmap PixmapChooser::loadPixmap( const QString &name, Size size ) break; } - QString lookup_png = lookup + QFileInfo( name ).baseName() + ".png"; + TQString lookup_png = lookup + TQFileInfo( name ).baseName() + ".png"; lookup += name; Embed *e = &embed_vec[ 0 ]; while ( e->name ) { - if ( QString( e->name ) == lookup ) { - QImage img; + if ( TQString( e->name ) == lookup ) { + TQImage img; img.loadFromData( (const uchar*)e->data, e->size ); - QPixmap pix; + TQPixmap pix; pix.convertFromImage( img ); return pix; - } else if ( QString( e->name ) == lookup_png ) { - QImage img; + } else if ( TQString( e->name ) == lookup_png ) { + TQImage img; img.loadFromData( (const uchar*)e->data, e->size ); - QPixmap pix; + TQPixmap pix; pix.convertFromImage( img ); return pix; } @@ -1095,11 +1095,11 @@ QPixmap PixmapChooser::loadPixmap( const QString &name, Size size ) } // fallback - return QPixmap( pixmapChooser->pixmapPath( size ) + name ); + return TQPixmap( pixmapChooser->pixmapPath( size ) + name ); #else Q_UNUSED( name ); Q_UNUSED( size ); - return QPixmap(); + return TQPixmap(); #endif } #include "pixmapchooser.moc" diff --git a/kommander/editor/pixmapchooser.h b/kommander/editor/pixmapchooser.h index 22e5f94c..fe54942e 100644 --- a/kommander/editor/pixmapchooser.h +++ b/kommander/editor/pixmapchooser.h @@ -21,26 +21,26 @@ #ifndef PIXMAPCHOOSER_H #define PIXMAPCHOOSER_H -#include -#include -#include -#include +#include +#include +#include +#include class FormWindow; -class PixmapView : public QScrollView, +class PixmapView : public TQScrollView, 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 ); + PixmapView( TQWidget *parent ); + void setPixmap( const TQPixmap &pix ); + void drawContents( TQPainter *p, int, int, int, int ); + void previewUrl( const TQUrl &u ); private: - QPixmap pixmap; + TQPixmap pixmap; }; @@ -49,19 +49,19 @@ class ImageIconProvider : public QFileIconProvider Q_OBJECT public: - ImageIconProvider( QWidget *parent = 0, const char *name = 0 ); + ImageIconProvider( TQWidget *parent = 0, const char *name = 0 ); ~ImageIconProvider(); - const QPixmap *pixmap( const QFileInfo &fi ); + const TQPixmap *pixmap( const TQFileInfo &fi ); private: - QStrList fmts; - QPixmap imagepm; + TQStrList fmts; + TQPixmap imagepm; }; -QPixmap qChoosePixmap( QWidget *parent, FormWindow *fw = 0, const QPixmap &old = QPixmap(), QString *fn = 0 ); -QStringList qChoosePixmaps( QWidget *parent ); +TQPixmap qChoosePixmap( TQWidget *parent, FormWindow *fw = 0, const TQPixmap &old = TQPixmap(), TQString *fn = 0 ); +TQStringList qChoosePixmaps( TQWidget *parent ); class PixmapChooser @@ -70,15 +70,15 @@ public: enum Size { Mini, Small, Large, NoSize, Disabled }; PixmapChooser(); - QString pixmapPath( Size size ) const; + TQString pixmapPath( Size size ) const; - static QPixmap loadPixmap( const QString &name, Size size = Small ); + static TQPixmap loadPixmap( const TQString &name, Size size = Small ); private: - QString smallPixDir; - QString largePixDir; - QString miniPixDir; - QString noSizePixDir; + TQString smallPixDir; + TQString largePixDir; + TQString miniPixDir; + TQString noSizePixDir; }; diff --git a/kommander/editor/previewframe.cpp b/kommander/editor/previewframe.cpp index 9ffd77af..3be0c2ae 100644 --- a/kommander/editor/previewframe.cpp +++ b/kommander/editor/previewframe.cpp @@ -18,16 +18,16 @@ ** **********************************************************************/ -#include -#include +#include +#include #include "previewframe.h" -PreviewFrame::PreviewFrame( QWidget *parent, const char *name ) - : QVBox( parent, name ) +PreviewFrame::PreviewFrame( TQWidget *parent, const char *name ) + : TQVBox( parent, name ) { setMinimumSize(200, 200); - setFrameStyle(QFrame::StyledPanel | QFrame::Sunken); + setFrameStyle(TQFrame::StyledPanel | TQFrame::Sunken); setLineWidth(1); PreviewWorkspace * w = new PreviewWorkspace( this ); @@ -36,15 +36,15 @@ PreviewFrame::PreviewFrame( QWidget *parent, const char *name ) previewWidget->move( 10, 10 ); } -void PreviewFrame::setPreviewPalette(QPalette pal) +void PreviewFrame::setPreviewPalette(TQPalette pal) { previewWidget->setPalette(pal); } -void PreviewWorkspace::paintEvent( QPaintEvent* ) +void PreviewWorkspace::paintEvent( TQPaintEvent* ) { - QPainter p ( this ); - p.setPen( QPen( white ) ); + TQPainter p ( this ); + p.setPen( TQPen( white ) ); p.drawText ( 0, height() / 2, width(), height(), AlignHCenter, "The moose in the noose\nate the goose who was loose." ); } diff --git a/kommander/editor/previewframe.h b/kommander/editor/previewframe.h index b8ff33a4..21ecd9a7 100644 --- a/kommander/editor/previewframe.h +++ b/kommander/editor/previewframe.h @@ -21,8 +21,8 @@ #ifndef __previewframe_h__ #define __previewframe_h__ -#include -#include +#include +#include #include "previewwidgetimpl.h" @@ -30,12 +30,12 @@ class PreviewWorkspace : public QWorkspace { Q_OBJECT public: - PreviewWorkspace( QWidget* parent = 0, const char* name = 0 ) - : QWorkspace( parent, name ) {} + PreviewWorkspace( TQWidget* parent = 0, const char* name = 0 ) + : TQWorkspace( parent, name ) {} ~PreviewWorkspace() {} protected: - void paintEvent( QPaintEvent* ); + void paintEvent( TQPaintEvent* ); }; class PreviewFrame : public QVBox @@ -43,8 +43,8 @@ class PreviewFrame : public QVBox Q_OBJECT public: - PreviewFrame( QWidget *parent = 0, const char *name = 0 ); - void setPreviewPalette(QPalette); + PreviewFrame( TQWidget *parent = 0, const char *name = 0 ); + void setPreviewPalette(TQPalette); private: PreviewWidget *previewWidget; diff --git a/kommander/editor/previewwidgetimpl.cpp b/kommander/editor/previewwidgetimpl.cpp index 9febc180..98fb66b7 100644 --- a/kommander/editor/previewwidgetimpl.cpp +++ b/kommander/editor/previewwidgetimpl.cpp @@ -18,39 +18,39 @@ ** **********************************************************************/ -#include "qobjectlist.h" +#include "tqobjectlist.h" #include "previewwidgetimpl.h" -PreviewWidget::PreviewWidget( QWidget *parent, const char *name ) +PreviewWidget::PreviewWidget( TQWidget *parent, const char *name ) : PreviewWidgetBase( parent, name ) { // install event filter on child widgets - QObjectList *l = queryList("QWidget"); - QObjectListIt it(*l); - QObject * obj; + TQObjectList *l = queryList("TQWidget"); + TQObjectListIt it(*l); + TQObject * obj; while ((obj = it.current()) != 0) { ++it; obj->installEventFilter(this); - ((QWidget*)obj)->setFocusPolicy(NoFocus); + ((TQWidget*)obj)->setFocusPolicy(NoFocus); } } -void PreviewWidget::closeEvent(QCloseEvent *e) +void PreviewWidget::closeEvent(TQCloseEvent *e) { e->ignore(); } -bool PreviewWidget::eventFilter(QObject *, QEvent *e) +bool PreviewWidget::eventFilter(TQObject *, TQEvent *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: + case TQEvent::MouseButtonPress: + case TQEvent::MouseButtonRelease: + case TQEvent::MouseButtonDblClick: + case TQEvent::MouseMove: + case TQEvent::KeyPress: + case TQEvent::KeyRelease: + case TQEvent::Enter: + case TQEvent::Leave: return true; // ignore; default: break; diff --git a/kommander/editor/previewwidgetimpl.h b/kommander/editor/previewwidgetimpl.h index 142a7758..37080916 100644 --- a/kommander/editor/previewwidgetimpl.h +++ b/kommander/editor/previewwidgetimpl.h @@ -28,10 +28,10 @@ class PreviewWidget : public PreviewWidgetBase Q_OBJECT public: - PreviewWidget( QWidget *parent = 0, const char *name = 0 ); + PreviewWidget( TQWidget *parent = 0, const char *name = 0 ); - void closeEvent(QCloseEvent *); - bool eventFilter(QObject *, QEvent *); + void closeEvent(TQCloseEvent *); + bool eventFilter(TQObject *, TQEvent *); }; #endif diff --git a/kommander/editor/propertyeditor.cpp b/kommander/editor/propertyeditor.cpp index 9dfb7759..bb35c570 100644 --- a/kommander/editor/propertyeditor.cpp +++ b/kommander/editor/propertyeditor.cpp @@ -18,7 +18,7 @@ ** **********************************************************************/ -#include // HP-UX compiler needs this here +#include // HP-UX compiler needs this here #include "propertyeditor.h" #include "pixmapchooser.h" @@ -40,38 +40,38 @@ #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include "pics/arrow.xbm" #include "pics/uparrow.xbm" @@ -90,8 +90,8 @@ #include -static QFontDatabase *fontDataBase = 0; -QString assistantPath(); +static TQFontDatabase *fontDataBase = 0; +TQString assistantPath(); static void cleanupFontDatabase() { @@ -99,7 +99,7 @@ static void cleanupFontDatabase() fontDataBase = 0; } -static QStringList getFontList() +static TQStringList getFontList() { if ( !fontDataBase ) { fontDataBase = new QFontDatabase; @@ -113,8 +113,8 @@ class PropertyWhatsThis : public QWhatsThis { public: PropertyWhatsThis( PropertyList *l ); - QString text( const QPoint &pos ); - bool clicked( const QString& href ); + TQString text( const TQPoint &pos ); + bool clicked( const TQString& href ); private: PropertyList *propertyList; @@ -122,21 +122,21 @@ private: }; PropertyWhatsThis::PropertyWhatsThis( PropertyList *l ) - : QWhatsThis( l->viewport() ), propertyList( l ) + : TQWhatsThis( l->viewport() ), propertyList( l ) { } -QString PropertyWhatsThis::text( const QPoint &pos ) +TQString PropertyWhatsThis::text( const TQPoint &pos ) { return propertyList->whatsThisAt( pos ); } -bool PropertyWhatsThis::clicked( const QString& href ) +bool PropertyWhatsThis::clicked( const TQString& href ) { if ( !href.isEmpty() ) { - QStringList lst; - lst << assistantPath() << (QString( "d:" ) + QString( href )); - QProcess proc( lst ); + TQStringList lst; + lst << assistantPath() << (TQString( "d:" ) + TQString( href )); + TQProcess proc( lst ); proc.start(); } return false; // do not hide window @@ -158,8 +158,8 @@ bool PropertyWhatsThis::clicked( const QString& href ) \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 ) +PropertyItem::PropertyItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const TQString &propName ) + : TQListViewItem( l, after ), listview( l ), property( prop ), propertyName( propName ) { setSelectable( false ); open = false; @@ -194,10 +194,10 @@ void PropertyItem::updateBackColor() backColor = *backColor1; } -QColor PropertyItem::backgroundColor() +TQColor PropertyItem::backgroundColor() { updateBackColor(); - if ( (QListViewItem*)this == listview->currentItem() ) + if ( (TQListViewItem*)this == listview->currentItem() ) return *selectedBack; return backColor; } @@ -218,12 +218,12 @@ void PropertyItem::initChildren() { } -void PropertyItem::paintCell( QPainter *p, const QColorGroup &cg, int column, int width, int align ) +void PropertyItem::paintCell( TQPainter *p, const TQColorGroup &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 ); + TQColorGroup g( cg ); + g.setColor( TQColorGroup::Base, backgroundColor() ); + g.setColor( TQColorGroup::Foreground, Qt::black ); + g.setColor( TQColorGroup::Text, Qt::black ); int indent = 0; if ( column == 0 ) { indent = 20 + ( property ? 20 : 0 ); @@ -234,16 +234,16 @@ void PropertyItem::paintCell( QPainter *p, const QColorGroup &cg, int column, in if ( isChanged() && column == 0 ) { p->save(); - QFont f = p->font(); + TQFont f = p->font(); f.setBold( true ); p->setFont( f ); } if ( !hasCustomContents() || column != 1 ) { - QListViewItem::paintCell( p, g, column, width - indent, align ); + TQListViewItem::paintCell( p, g, column, width - indent, align ); } else { p->fillRect( 0, 0, width, height(), backgroundColor() ); - drawCustomContents( p, QRect( 0, 0, width, height() ) ); + drawCustomContents( p, TQRect( 0, 0, width, height() ) ); } if ( isChanged() && column == 0 ) @@ -261,29 +261,29 @@ void PropertyItem::paintCell( QPainter *p, const QColorGroup &cg, int column, in p->restore(); } p->save(); - p->setPen( QPen( cg.dark(), 1 ) ); + p->setPen( TQPen( 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() ) ); + paintFocus( p, cg, TQRect( 0, 0, width, height() ) ); } -void PropertyItem::paintBranches( QPainter * p, const QColorGroup & cg, +void PropertyItem::paintBranches( TQPainter * p, const TQColorGroup & cg, int w, int y, int h ) { - QColorGroup g( cg ); - g.setColor( QColorGroup::Base, backgroundColor() ); - QListViewItem::paintBranches( p, g, w, y, h ); + TQColorGroup g( cg ); + g.setColor( TQColorGroup::Base, backgroundColor() ); + TQListViewItem::paintBranches( p, g, w, y, h ); } -void PropertyItem::paintFocus( QPainter *p, const QColorGroup &cg, const QRect &r ) +void PropertyItem::paintFocus( TQPainter *p, const TQColorGroup &cg, const TQRect &r ) { p->save(); - QApplication::style().drawPrimitive(QStyle::PE_Panel, p, r, cg, - QStyle::Style_Sunken, QStyleOption(1,1) ); + TQApplication::style().drawPrimitive(TQStyle::PE_Panel, p, r, cg, + TQStyle::Style_Sunken, TQStyleOption(1,1) ); p->restore(); } @@ -353,12 +353,12 @@ void PropertyItem::hideEditor() subclasses to init the editor */ -void PropertyItem::setValue( const QVariant &v ) +void PropertyItem::setValue( const TQVariant &v ) { val = v; } -QVariant PropertyItem::value() const +TQVariant PropertyItem::value() const { return val; } @@ -381,7 +381,7 @@ void PropertyItem::setChanged( bool b, bool updateDb ) updateResetButtonState(); } -QString PropertyItem::name() const +TQString PropertyItem::name() const { return propertyName; } @@ -392,19 +392,19 @@ void PropertyItem::createResetButton() resetButton->parentWidget()->lower(); return; } - QHBox *hbox = new QHBox( listview->viewport() ); - hbox->setFrameStyle( QFrame::StyledPanel | QFrame::Sunken ); + TQHBox *hbox = new TQHBox( listview->viewport() ); + hbox->setFrameStyle( TQFrame::StyledPanel | TQFrame::Sunken ); hbox->setLineWidth( 1 ); - resetButton = new QPushButton( hbox ); + resetButton = new TQPushButton( 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" ) ); + TQObject::connect( resetButton, TQT_SIGNAL( clicked() ), + listview, TQT_SLOT( resetProperty() ) ); + TQToolTip::add( resetButton, i18n("Reset the property to its default value" ) ); + TQWhatsThis::add( resetButton, i18n("Click this button to reset the property to its default value" ) ); updateResetButtonState(); } @@ -422,10 +422,10 @@ void PropertyItem::updateResetButtonState() call it from showEditor()) */ -void PropertyItem::placeEditor( QWidget *w ) +void PropertyItem::placeEditor( TQWidget *w ) { createResetButton(); - QRect r = listview->itemRect( this ); + TQRect r = listview->itemRect( this ); if ( !r.size().isValid() ) { listview->ensureItemVisible( this ); #if defined(Q_WS_WIN) @@ -436,7 +436,7 @@ void PropertyItem::placeEditor( QWidget *w ) 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() ); + r = TQRect( 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() ); @@ -503,13 +503,13 @@ bool PropertyItem::hasCustomContents() const \sa hasCustomContents() */ -void PropertyItem::drawCustomContents( QPainter *, const QRect & ) +void PropertyItem::drawCustomContents( TQPainter *, const TQRect & ) { } -QString PropertyItem::currentItem() const +TQString PropertyItem::currentItem() const { - return QString::null; + return TQString::null; } int PropertyItem::currentIntItem() const @@ -517,7 +517,7 @@ int PropertyItem::currentIntItem() const return -1; } -void PropertyItem::setCurrentItem( const QString & ) +void PropertyItem::setCurrentItem( const TQString & ) { } @@ -530,12 +530,12 @@ int PropertyItem::currentIntItemFromObject() const return -1; } -QString PropertyItem::currentItemFromObject() const +TQString PropertyItem::currentItemFromObject() const { - return QString::null; + return TQString::null; } -void PropertyItem::setFocus( QWidget *w ) +void PropertyItem::setFocus( TQWidget *w ) { if ( !qApp->focusWidget() || listview->propertyEditor()->formWindow() && @@ -544,18 +544,18 @@ void PropertyItem::setFocus( QWidget *w ) w->setFocus(); } -void PropertyItem::setText( int col, const QString &t ) +void PropertyItem::setText( int col, const TQString &t ) { - QString txt( t ); + TQString txt( t ); if ( col == 1 ) - txt = txt.replace( QRegExp( "\n" ), " " ); - QListViewItem::setText( col, txt ); + txt = txt.replace( TQRegExp( "\n" ), " " ); + TQListViewItem::setText( col, txt ); } // -------------------------------------------------------------- PropertyTextItem::PropertyTextItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, - const QString &propName, bool comment, bool multiLine, bool ascii, bool a ) + const TQString &propName, bool comment, bool multiLine, bool ascii, bool a ) : PropertyItem( l, after, prop, propName ), withComment( comment ), hasMultiLines( multiLine ), asciiOnly( ascii ), accel( a ) { @@ -563,28 +563,28 @@ PropertyTextItem::PropertyTextItem( PropertyList *l, PropertyItem *after, Proper box = 0; } -QLineEdit *PropertyTextItem::lined() +TQLineEdit *PropertyTextItem::lined() { if ( lin ) return lin; if ( hasMultiLines ) { - box = new QHBox( listview->viewport() ); - box->setFrameStyle( QFrame::StyledPanel | QFrame::Sunken ); + box = new TQHBox( listview->viewport() ); + box->setFrameStyle( TQFrame::StyledPanel | TQFrame::Sunken ); box->setLineWidth( 2 ); box->hide(); } lin = 0; if ( hasMultiLines ) - lin = new QLineEdit( box ); + lin = new TQLineEdit( box ); else - lin = new QLineEdit( listview->viewport() ); + lin = new TQLineEdit( listview->viewport() ); if ( asciiOnly ) { if ( PropertyItem::name() == "name" ) lin->setValidator( new AsciiValidator( lin, "ascii_validator" ) ); else - lin->setValidator( new AsciiValidator( QString("!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~" + lin->setValidator( new AsciiValidator( TQString("!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~" "\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" @@ -592,29 +592,29 @@ QLineEdit *PropertyTextItem::lined() } if ( !hasMultiLines ) { lin->hide(); } else { - button = new QPushButton( i18n("..."), box ); + button = new TQPushButton( i18n("..."), box ); button->setFixedWidth( 20 ); - connect( button, SIGNAL( clicked() ), - this, SLOT( getText() ) ); + connect( button, TQT_SIGNAL( clicked() ), + this, TQT_SLOT( getText() ) ); lin->setFrame( false ); } - connect( lin, SIGNAL( returnPressed() ), - this, SLOT( setValue() ) ); - connect( lin, SIGNAL( textChanged( const QString & ) ), - this, SLOT( setValue() ) ); + connect( lin, TQT_SIGNAL( returnPressed() ), + this, TQT_SLOT( setValue() ) ); + connect( lin, TQT_SIGNAL( textChanged( const TQString & ) ), + this, TQT_SLOT( setValue() ) ); if ( PropertyItem::name() == "name" || PropertyItem::name() == "itemName" ) - connect( lin, SIGNAL( returnPressed() ), + connect( lin, TQT_SIGNAL( returnPressed() ), listview->propertyEditor()->formWindow()->commandHistory(), - SLOT( checkCompressedCommand() ) ); + TQT_SLOT( checkCompressedCommand() ) ); lin->installEventFilter( listview ); return lin; } PropertyTextItem::~PropertyTextItem() { - delete (QLineEdit*)lin; + delete (TQLineEdit*)lin; lin = 0; - delete (QHBox*)box; + delete (TQHBox*)box; box = 0; } @@ -640,11 +640,11 @@ void PropertyTextItem::childValueChanged( PropertyItem *child ) listview->propertyEditor()->formWindow()->commandHistory()->setModified( true ); } -static QString to_string( const QVariant &v, bool accel ) +static TQString to_string( const TQVariant &v, bool accel ) { if ( !accel ) return v.toString(); - return QAccel::keyToString( v.toInt() ); + return TQAccel::keyToString( v.toInt() ); } void PropertyTextItem::showEditor() @@ -656,7 +656,7 @@ void PropertyTextItem::showEditor() lined()->blockSignals( false ); } - QWidget* w; + TQWidget* w; if ( hasMultiLines ) w = box; else @@ -696,7 +696,7 @@ void PropertyTextItem::initChildren() void PropertyTextItem::hideEditor() { PropertyItem::hideEditor(); - QWidget* w; + TQWidget* w; if ( hasMultiLines ) w = box; else @@ -705,7 +705,7 @@ void PropertyTextItem::hideEditor() w->hide(); } -void PropertyTextItem::setValue( const QVariant &v ) +void PropertyTextItem::setValue( const TQVariant &v ) { if ( ( !hasSubItems() || !isOpen() ) && value() == v ) @@ -726,9 +726,9 @@ void PropertyTextItem::setValue( const QVariant &v ) void PropertyTextItem::setValue() { setText( 1, lined()->text() ); - QVariant v; + TQVariant v; if ( accel ) - v = QAccel::stringToKey( lined()->text() ); + v = TQAccel::stringToKey( lined()->text() ); else v = lined()->text(); PropertyItem::setValue( v ); @@ -737,7 +737,7 @@ void PropertyTextItem::setValue() void PropertyTextItem::getText() { - QString txt = TextEditor::getText( listview, value().toString() ); + TQString txt = TextEditor::getText( listview, value().toString() ); if ( !txt.isEmpty() ) { setText( 1, txt ); PropertyItem::setValue( txt ); @@ -751,30 +751,30 @@ void PropertyTextItem::getText() // -------------------------------------------------------------- PropertyDoubleItem::PropertyDoubleItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, - const QString &propName ) + const TQString &propName ) : PropertyItem( l, after, prop, propName ) { lin = 0; } -QLineEdit *PropertyDoubleItem::lined() +TQLineEdit *PropertyDoubleItem::lined() { if ( lin ) return lin; - lin = new QLineEdit( listview->viewport() ); - lin->setValidator( new QDoubleValidator( lin, "double_validator" ) ); + lin = new TQLineEdit( listview->viewport() ); + lin->setValidator( new TQDoubleValidator( lin, "double_validator" ) ); - connect( lin, SIGNAL( returnPressed() ), - this, SLOT( setValue() ) ); - connect( lin, SIGNAL( textChanged( const QString & ) ), - this, SLOT( setValue() ) ); + connect( lin, TQT_SIGNAL( returnPressed() ), + this, TQT_SLOT( setValue() ) ); + connect( lin, TQT_SIGNAL( textChanged( const TQString & ) ), + this, TQT_SLOT( setValue() ) ); lin->installEventFilter( listview ); return lin; } PropertyDoubleItem::~PropertyDoubleItem() { - delete (QLineEdit*)lin; + delete (TQLineEdit*)lin; lin = 0; } @@ -783,10 +783,10 @@ void PropertyDoubleItem::showEditor() PropertyItem::showEditor(); if ( !lin ) { lined()->blockSignals( true ); - lined()->setText( QString::number( value().toDouble() ) ); + lined()->setText( TQString::number( value().toDouble() ) ); lined()->blockSignals( false ); } - QWidget* w = lined(); + TQWidget* w = lined(); placeEditor( w ); if ( !w->isVisible() || !lined()->hasFocus() ) { @@ -799,11 +799,11 @@ void PropertyDoubleItem::showEditor() void PropertyDoubleItem::hideEditor() { PropertyItem::hideEditor(); - QWidget* w = lined(); + TQWidget* w = lined(); w->hide(); } -void PropertyDoubleItem::setValue( const QVariant &v ) +void PropertyDoubleItem::setValue( const TQVariant &v ) { if ( value() == v ) return; @@ -811,19 +811,19 @@ void PropertyDoubleItem::setValue( const QVariant &v ) lined()->blockSignals( true ); int oldCursorPos; oldCursorPos = lin->cursorPosition(); - lined()->setText( QString::number( v.toDouble() ) ); + lined()->setText( TQString::number( v.toDouble() ) ); if ( oldCursorPos < (int)lin->text().length() ) lin->setCursorPosition( oldCursorPos ); lined()->blockSignals( false ); } - setText( 1, QString::number( v.toDouble() ) ); + setText( 1, TQString::number( v.toDouble() ) ); PropertyItem::setValue( v ); } void PropertyDoubleItem::setValue() { setText( 1, lined()->text() ); - QVariant v = lined()->text().toDouble(); + TQVariant v = lined()->text().toDouble(); PropertyItem::setValue( v ); notifyValueChange(); } @@ -831,7 +831,7 @@ void PropertyDoubleItem::setValue() // -------------------------------------------------------------- -PropertyDateItem::PropertyDateItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const QString &propName ) +PropertyDateItem::PropertyDateItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const TQString &propName ) : PropertyItem( l, after, prop, propName ) { lin = 0; @@ -842,12 +842,12 @@ 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() ) + TQObjectList *l = lin->queryList( "TQLineEdit" ); + for ( TQObject *o = l->first(); o; o = l->next() ) o->installEventFilter( listview ); delete l; - connect( lin, SIGNAL( valueChanged( const QDate & ) ), - this, SLOT( setValue() ) ); + connect( lin, TQT_SIGNAL( valueChanged( const TQDate & ) ), + this, TQT_SLOT( setValue() ) ); return lin; } @@ -879,7 +879,7 @@ void PropertyDateItem::hideEditor() lin->hide(); } -void PropertyDateItem::setValue( const QVariant &v ) +void PropertyDateItem::setValue( const TQVariant &v ) { if ( ( !hasSubItems() || !isOpen() ) && value() == v ) @@ -898,7 +898,7 @@ void PropertyDateItem::setValue( const QVariant &v ) void PropertyDateItem::setValue() { setText( 1, lined()->date().toString( ::Qt::ISODate ) ); - QVariant v; + TQVariant v; v = lined()->date(); PropertyItem::setValue( v ); notifyValueChange(); @@ -906,7 +906,7 @@ void PropertyDateItem::setValue() // -------------------------------------------------------------- -PropertyTimeItem::PropertyTimeItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const QString &propName ) +PropertyTimeItem::PropertyTimeItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const TQString &propName ) : PropertyItem( l, after, prop, propName ) { lin = 0; @@ -917,10 +917,10 @@ 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() ) + connect( lin, TQT_SIGNAL( valueChanged( const TQTime & ) ), + this, TQT_SLOT( setValue() ) ); + TQObjectList *l = lin->queryList( "TQLineEdit" ); + for ( TQObject *o = l->first(); o; o = l->next() ) o->installEventFilter( listview ); delete l; return lin; @@ -954,7 +954,7 @@ void PropertyTimeItem::hideEditor() lin->hide(); } -void PropertyTimeItem::setValue( const QVariant &v ) +void PropertyTimeItem::setValue( const TQVariant &v ) { if ( ( !hasSubItems() || !isOpen() ) && value() == v ) @@ -973,7 +973,7 @@ void PropertyTimeItem::setValue( const QVariant &v ) void PropertyTimeItem::setValue() { setText( 1, lined()->time().toString( ::Qt::ISODate ) ); - QVariant v; + TQVariant v; v = lined()->time(); PropertyItem::setValue( v ); notifyValueChange(); @@ -981,7 +981,7 @@ void PropertyTimeItem::setValue() // -------------------------------------------------------------- -PropertyDateTimeItem::PropertyDateTimeItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const QString &propName ) +PropertyDateTimeItem::PropertyDateTimeItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const TQString &propName ) : PropertyItem( l, after, prop, propName ) { lin = 0; @@ -992,10 +992,10 @@ 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() ) + connect( lin, TQT_SIGNAL( valueChanged( const TQDateTime & ) ), + this, TQT_SLOT( setValue() ) ); + TQObjectList *l = lin->queryList( "TQLineEdit" ); + for ( TQObject *o = l->first(); o; o = l->next() ) o->installEventFilter( listview ); delete l; return lin; @@ -1029,7 +1029,7 @@ void PropertyDateTimeItem::hideEditor() lin->hide(); } -void PropertyDateTimeItem::setValue( const QVariant &v ) +void PropertyDateTimeItem::setValue( const TQVariant &v ) { if ( ( !hasSubItems() || !isOpen() ) && value() == v ) @@ -1048,7 +1048,7 @@ void PropertyDateTimeItem::setValue( const QVariant &v ) void PropertyDateTimeItem::setValue() { setText( 1, lined()->dateTime().toString( ::Qt::ISODate ) ); - QVariant v; + TQVariant v; v = lined()->dateTime(); PropertyItem::setValue( v ); notifyValueChange(); @@ -1056,36 +1056,36 @@ void PropertyDateTimeItem::setValue() // -------------------------------------------------------------- -PropertyBoolItem::PropertyBoolItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const QString &propName ) +PropertyBoolItem::PropertyBoolItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const TQString &propName ) : PropertyItem( l, after, prop, propName ) { comb = 0; } -QComboBox *PropertyBoolItem::combo() +TQComboBox *PropertyBoolItem::combo() { if ( comb ) return comb; - comb = new QComboBox( false, listview->viewport() ); + comb = new TQComboBox( false, listview->viewport() ); comb->hide(); comb->insertItem( i18n("False" ) ); comb->insertItem( i18n("True" ) ); - connect( comb, SIGNAL( activated( int ) ), - this, SLOT( setValue() ) ); + connect( comb, TQT_SIGNAL( activated( int ) ), + this, TQT_SLOT( setValue() ) ); comb->installEventFilter( listview ); return comb; } PropertyBoolItem::~PropertyBoolItem() { - delete (QComboBox*)comb; + delete (TQComboBox*)comb; comb = 0; } void PropertyBoolItem::toggle() { bool b = value().toBool(); - setValue( QVariant( !b, 0 ) ); + setValue( TQVariant( !b, 0 ) ); setValue(); } @@ -1113,7 +1113,7 @@ void PropertyBoolItem::hideEditor() combo()->hide(); } -void PropertyBoolItem::setValue( const QVariant &v ) +void PropertyBoolItem::setValue( const TQVariant &v ) { if ( ( !hasSubItems() || !isOpen() ) && value() == v ) @@ -1127,7 +1127,7 @@ void PropertyBoolItem::setValue( const QVariant &v ) combo()->setCurrentItem( 0 ); combo()->blockSignals( false ); } - QString tmp = i18n("True" ); + TQString tmp = i18n("True" ); if ( !v.toBool() ) tmp = i18n("False" ); setText( 1, tmp ); @@ -1140,41 +1140,41 @@ void PropertyBoolItem::setValue() return; setText( 1, combo()->currentText() ); bool b = combo()->currentItem() == 0 ? (bool)false : (bool)true; - PropertyItem::setValue( QVariant( b, 0 ) ); + PropertyItem::setValue( TQVariant( b, 0 ) ); notifyValueChange(); } // -------------------------------------------------------------- PropertyIntItem::PropertyIntItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, - const QString &propName, bool s ) + const TQString &propName, bool s ) : PropertyItem( l, after, prop, propName ), signedValue( s ) { spinBx = 0; } -QSpinBox *PropertyIntItem::spinBox() +TQSpinBox *PropertyIntItem::spinBox() { if ( spinBx ) return spinBx; if ( signedValue ) - spinBx = new QSpinBox( -INT_MAX, INT_MAX, 1, listview->viewport() ); + spinBx = new TQSpinBox( -INT_MAX, INT_MAX, 1, listview->viewport() ); else - spinBx = new QSpinBox( 0, INT_MAX, 1, listview->viewport() ); + spinBx = new TQSpinBox( 0, INT_MAX, 1, listview->viewport() ); spinBx->hide(); spinBx->installEventFilter( listview ); - QObjectList *ol = spinBx->queryList( "QLineEdit" ); + TQObjectList *ol = spinBx->queryList( "TQLineEdit" ); if ( ol && ol->first() ) ol->first()->installEventFilter( listview ); delete ol; - connect( spinBx, SIGNAL( valueChanged( int ) ), - this, SLOT( setValue() ) ); + connect( spinBx, TQT_SIGNAL( valueChanged( int ) ), + this, TQT_SLOT( setValue() ) ); return spinBx; } PropertyIntItem::~PropertyIntItem() { - delete (QSpinBox*)spinBx; + delete (TQSpinBox*)spinBx; spinBx = 0; } @@ -1202,7 +1202,7 @@ void PropertyIntItem::hideEditor() spinBox()->hide(); } -void PropertyIntItem::setValue( const QVariant &v ) +void PropertyIntItem::setValue( const TQVariant &v ) { if ( ( !hasSubItems() || !isOpen() ) && value() == v ) @@ -1218,9 +1218,9 @@ void PropertyIntItem::setValue( const QVariant &v ) } if ( signedValue ) - setText( 1, QString::number( v.toInt() ) ); + setText( 1, TQString::number( v.toInt() ) ); else - setText( 1, QString::number( v.toUInt() ) ); + setText( 1, TQString::number( v.toUInt() ) ); PropertyItem::setValue( v ); } @@ -1228,7 +1228,7 @@ void PropertyIntItem::setValue() { if ( !spinBx ) return; - setText( 1, QString::number( spinBox()->value() ) ); + setText( 1, TQString::number( spinBox()->value() ) ); if ( signedValue ) PropertyItem::setValue( spinBox()->value() ); else @@ -1239,24 +1239,24 @@ void PropertyIntItem::setValue() // -------------------------------------------------------------- PropertyListItem::PropertyListItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, - const QString &propName, bool e ) + const TQString &propName, bool e ) : PropertyItem( l, after, prop, propName ), editable( e ) { comb = 0; oldInt = -1; } -QComboBox *PropertyListItem::combo() +TQComboBox *PropertyListItem::combo() { if ( comb ) return comb; - comb = new QComboBox( editable, listview->viewport() ); + comb = new TQComboBox( editable, listview->viewport() ); comb->hide(); - connect( comb, SIGNAL( activated( int ) ), - this, SLOT( setValue() ) ); + connect( comb, TQT_SIGNAL( activated( int ) ), + this, TQT_SLOT( setValue() ) ); comb->installEventFilter( listview ); if ( editable ) { - QObjectList *ol = comb->queryList( "QLineEdit" ); + TQObjectList *ol = comb->queryList( "TQLineEdit" ); if ( ol && ol->first() ) ol->first()->installEventFilter( listview ); delete ol; @@ -1266,7 +1266,7 @@ QComboBox *PropertyListItem::combo() PropertyListItem::~PropertyListItem() { - delete (QComboBox*)comb; + delete (TQComboBox*)comb; comb = 0; } @@ -1292,7 +1292,7 @@ void PropertyListItem::hideEditor() combo()->hide(); } -void PropertyListItem::setValue( const QVariant &v ) +void PropertyListItem::setValue( const TQVariant &v ) { if ( comb ) { combo()->blockSignals( true ); @@ -1309,7 +1309,7 @@ void PropertyListItem::setValue() if ( !comb ) return; setText( 1, combo()->currentText() ); - QStringList lst; + TQStringList lst; for ( uint i = 0; i < combo()->listBox()->count(); ++i ) lst << combo()->listBox()->item( i )->text(); PropertyItem::setValue( lst ); @@ -1318,12 +1318,12 @@ void PropertyListItem::setValue() oldString = currentItem(); } -QString PropertyListItem::currentItem() const +TQString PropertyListItem::currentItem() const { return ( (PropertyListItem*)this )->combo()->currentText(); } -void PropertyListItem::setCurrentItem( const QString &s ) +void PropertyListItem::setCurrentItem( const TQString &s ) { if ( comb && currentItem().lower() == s.lower() ) return; @@ -1345,7 +1345,7 @@ void PropertyListItem::setCurrentItem( const QString &s ) oldString = currentItem(); } -void PropertyListItem::addItem( const QString &s ) +void PropertyListItem::addItem( const TQString &s ) { combo()->insertItem( s ); } @@ -1377,7 +1377,7 @@ int PropertyListItem::currentIntItemFromObject() const return oldInt; } -QString PropertyListItem::currentItemFromObject() const +TQString PropertyListItem::currentItemFromObject() const { return oldString; } @@ -1385,18 +1385,18 @@ QString PropertyListItem::currentItemFromObject() const // -------------------------------------------------------------- PropertyCoordItem::PropertyCoordItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, - const QString &propName, Type t ) + const TQString &propName, Type t ) : PropertyItem( l, after, prop, propName ), typ( t ) { lin = 0; } -QLineEdit *PropertyCoordItem::lined() +TQLineEdit *PropertyCoordItem::lined() { if ( lin ) return lin; - lin = new QLineEdit( listview->viewport() ); + lin = new TQLineEdit( listview->viewport() ); lin->setReadOnly( true ); lin->installEventFilter( listview ); lin->hide(); @@ -1451,7 +1451,7 @@ void PropertyCoordItem::initChildren() PropertyCoordItem::~PropertyCoordItem() { - delete (QLineEdit*)lin; + delete (TQLineEdit*)lin; lin = 0; } @@ -1473,22 +1473,22 @@ void PropertyCoordItem::hideEditor() lined()->hide(); } -void PropertyCoordItem::setValue( const QVariant &v ) +void PropertyCoordItem::setValue( const TQVariant &v ) { if ( ( !hasSubItems() || !isOpen() ) && value() == v ) return; - QString s; + TQString 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() ) + " ]"; + s = "[ " + TQString::number( v.toRect().x() ) + ", " + TQString::number( v.toRect().y() ) + ", " + + TQString::number( v.toRect().width() ) + ", " + TQString::number( v.toRect().height() ) + " ]"; else if ( typ == Point ) - s = "[ " + QString::number( v.toPoint().x() ) + ", " + - QString::number( v.toPoint().y() ) + " ]"; + s = "[ " + TQString::number( v.toPoint().x() ) + ", " + + TQString::number( v.toPoint().y() ) + " ]"; else if ( typ == Size ) - s = "[ " + QString::number( v.toSize().width() ) + ", " + - QString::number( v.toSize().height() ) + " ]"; + s = "[ " + TQString::number( v.toSize().width() ) + ", " + + TQString::number( v.toSize().height() ) + " ]"; setText( 1, s ); if ( lin ) lined()->setText( s ); @@ -1503,7 +1503,7 @@ bool PropertyCoordItem::hasSubItems() const void PropertyCoordItem::childValueChanged( PropertyItem *child ) { if ( typ == Rect ) { - QRect r = value().toRect(); + TQRect r = value().toRect(); if ( child->name() == i18n("x" ) ) r.setX( child->value().toInt() ); else if ( child->name() == i18n("y" ) ) @@ -1514,14 +1514,14 @@ void PropertyCoordItem::childValueChanged( PropertyItem *child ) r.setHeight( child->value().toInt() ); setValue( r ); } else if ( typ == Point ) { - QPoint r = value().toPoint(); + TQPoint 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(); + TQSize r = value().toSize(); if ( child->name() == i18n("width" ) ) r.setWidth( child->value().toInt() ); else if ( child->name() == i18n("height" ) ) @@ -1534,26 +1534,26 @@ void PropertyCoordItem::childValueChanged( PropertyItem *child ) // -------------------------------------------------------------- PropertyPixmapItem::PropertyPixmapItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, - const QString &propName, bool isIconSet ) + const TQString &propName, bool isIconSet ) : PropertyItem( l, after, prop, propName ), iconSet( isIconSet ) { - box = new QHBox( listview->viewport() ); + box = new TQHBox( 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 ); + pixPrev = new TQLabel( box ); + pixPrev->setSizePolicy( TQSizePolicy( TQSizePolicy::Preferred, TQSizePolicy::Minimum ) ); + pixPrev->setBackgroundColor( pixPrev->colorGroup().color( TQColorGroup::Base ) ); + button = new TQPushButton( "...", box ); button->setFixedWidth( 20 ); - box->setFrameStyle( QFrame::StyledPanel | QFrame::Sunken ); + box->setFrameStyle( TQFrame::StyledPanel | TQFrame::Sunken ); box->setLineWidth( 2 ); - pixPrev->setFrameStyle( QFrame::NoFrame ); + pixPrev->setFrameStyle( TQFrame::NoFrame ); box->installEventFilter( listview ); - connect( button, SIGNAL( clicked() ), - this, SLOT( getPixmap() ) ); + connect( button, TQT_SIGNAL( clicked() ), + this, TQT_SLOT( getPixmap() ) ); } PropertyPixmapItem::~PropertyPixmapItem() { - delete (QHBox*)box; + delete (TQHBox*)box; } void PropertyPixmapItem::showEditor() @@ -1572,9 +1572,9 @@ void PropertyPixmapItem::hideEditor() box->hide(); } -void PropertyPixmapItem::setValue( const QVariant &v ) +void PropertyPixmapItem::setValue( const TQVariant &v ) { - QString s; + TQString s; if ( !iconSet ) pixPrev->setPixmap( v.toPixmap() ); else @@ -1585,12 +1585,12 @@ void PropertyPixmapItem::setValue( const QVariant &v ) void PropertyPixmapItem::getPixmap() { - QPixmap pix = qChoosePixmap( listview, listview->propertyEditor()->formWindow(), value().toPixmap() ); + TQPixmap pix = qChoosePixmap( listview, listview->propertyEditor()->formWindow(), value().toPixmap() ); if ( !pix.isNull() ) { if ( !iconSet ) setValue( pix ); else - setValue( QIconSet( pix ) ); + setValue( TQIconSet( pix ) ); notifyValueChange(); } } @@ -1600,12 +1600,12 @@ bool PropertyPixmapItem::hasCustomContents() const return true; } -void PropertyPixmapItem::drawCustomContents( QPainter *p, const QRect &r ) +void PropertyPixmapItem::drawCustomContents( TQPainter *p, const TQRect &r ) { - QPixmap pix( (!iconSet ? value().toPixmap() : value().toIconSet().pixmap()) ); + TQPixmap pix( (!iconSet ? value().toPixmap() : value().toIconSet().pixmap()) ); if ( !pix.isNull() ) { p->save(); - p->setClipRect( QRect( QPoint( (int)(p->worldMatrix().dx() + r.x()), + p->setClipRect( TQRect( TQPoint( (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 ); @@ -1617,28 +1617,28 @@ void PropertyPixmapItem::drawCustomContents( QPainter *p, const QRect &r ) // -------------------------------------------------------------- PropertyColorItem::PropertyColorItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, - const QString &propName, bool children ) + const TQString &propName, bool children ) : PropertyItem( l, after, prop, propName ), withChildren( children ) { - box = new QHBox( listview->viewport() ); + box = new TQHBox( listview->viewport() ); box->hide(); - colorPrev = new QFrame( box ); - button = new QPushButton( "...", box ); + colorPrev = new TQFrame( box ); + button = new TQPushButton( "...", box ); button->setFixedWidth( 20 ); - box->setFrameStyle( QFrame::StyledPanel | QFrame::Sunken ); + box->setFrameStyle( TQFrame::StyledPanel | TQFrame::Sunken ); box->setLineWidth( 2 ); - colorPrev->setFrameStyle( QFrame::Plain | QFrame::Box ); + colorPrev->setFrameStyle( TQFrame::Plain | TQFrame::Box ); colorPrev->setLineWidth( 2 ); - QPalette pal = colorPrev->palette(); - QColorGroup cg = pal.active(); - cg.setColor( QColorGroup::Foreground, cg.color( QColorGroup::Base ) ); + TQPalette pal = colorPrev->palette(); + TQColorGroup cg = pal.active(); + cg.setColor( TQColorGroup::Foreground, cg.color( TQColorGroup::Base ) ); pal.setActive( cg ); pal.setInactive( cg ); pal.setDisabled( cg ); colorPrev->setPalette( pal ); box->installEventFilter( listview ); - connect( button, SIGNAL( clicked() ), - this, SLOT( getColor() ) ); + connect( button, TQT_SIGNAL( clicked() ), + this, TQT_SLOT( getColor() ) ); } void PropertyColorItem::createChildren() @@ -1668,7 +1668,7 @@ void PropertyColorItem::initChildren() PropertyColorItem::~PropertyColorItem() { - delete (QHBox*)box; + delete (TQHBox*)box; } void PropertyColorItem::showEditor() @@ -1687,13 +1687,13 @@ void PropertyColorItem::hideEditor() box->hide(); } -void PropertyColorItem::setValue( const QVariant &v ) +void PropertyColorItem::setValue( const TQVariant &v ) { if ( ( !hasSubItems() || !isOpen() ) && value() == v ) return; - QString s; + TQString s; setText( 1, v.toColor().name() ); colorPrev->setBackgroundColor( v.toColor() ); PropertyItem::setValue( v ); @@ -1706,7 +1706,7 @@ bool PropertyColorItem::hasSubItems() const void PropertyColorItem::childValueChanged( PropertyItem *child ) { - QColor c( val.toColor() ); + TQColor c( val.toColor() ); if ( child->name() == i18n("Red" ) ) c.setRgb( child->value().toInt(), c.green(), c.blue() ); else if ( child->name() == i18n("Green" ) ) @@ -1719,8 +1719,8 @@ void PropertyColorItem::childValueChanged( PropertyItem *child ) void PropertyColorItem::getColor() { - QColor c = val.asColor(); - if ( KColorDialog::getColor( c, listview ) == QDialog::Accepted ) { + TQColor c = val.asColor(); + if ( KColorDialog::getColor( c, listview ) == TQDialog::Accepted ) { setValue( c ); notifyValueChange(); } @@ -1731,10 +1731,10 @@ bool PropertyColorItem::hasCustomContents() const return true; } -void PropertyColorItem::drawCustomContents( QPainter *p, const QRect &r ) +void PropertyColorItem::drawCustomContents( TQPainter *p, const TQRect &r ) { p->save(); - p->setPen( QPen( black, 1 ) ); + p->setPen( TQPen( black, 1 ) ); p->setBrush( val.toColor() ); p->drawRect( r.x() + 2, r.y() + 2, r.width() - 5, r.height() - 5 ); p->restore(); @@ -1742,15 +1742,15 @@ void PropertyColorItem::drawCustomContents( QPainter *p, const QRect &r ) // -------------------------------------------------------------- -PropertyFontItem::PropertyFontItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const QString &propName ) +PropertyFontItem::PropertyFontItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const TQString &propName ) : PropertyItem( l, after, prop, propName ) { - box = new QHBox( listview->viewport() ); + box = new TQHBox( listview->viewport() ); box->hide(); - lined = new QLineEdit( box ); - button = new QPushButton( "...", box ); + lined = new TQLineEdit( box ); + button = new TQPushButton( "...", box ); button->setFixedWidth( 20 ); - box->setFrameStyle( QFrame::StyledPanel | QFrame::Sunken ); + box->setFrameStyle( TQFrame::StyledPanel | TQFrame::Sunken ); box->setLineWidth( 2 ); lined->setFrame( false ); lined->setReadOnly( true ); @@ -1758,8 +1758,8 @@ PropertyFontItem::PropertyFontItem( PropertyList *l, PropertyItem *after, Proper box->installEventFilter( listview ); lined->installEventFilter( listview ); button->installEventFilter( listview ); - connect( button, SIGNAL( clicked() ), - this, SLOT( getFont() ) ); + connect( button, TQT_SIGNAL( clicked() ), + this, TQT_SLOT( getFont() ) ); } void PropertyFontItem::createChildren() @@ -1790,19 +1790,19 @@ void PropertyFontItem::initChildren() } 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 ) ); + item->setValue( TQVariant( val.toFont().bold(), 0 ) ); else if ( item->name() == i18n("Italic" ) ) - item->setValue( QVariant( val.toFont().italic(), 0 ) ); + item->setValue( TQVariant( val.toFont().italic(), 0 ) ); else if ( item->name() == i18n("Underline" ) ) - item->setValue( QVariant( val.toFont().underline(), 0 ) ); + item->setValue( TQVariant( val.toFont().underline(), 0 ) ); else if ( item->name() == i18n("Strikeout" ) ) - item->setValue( QVariant( val.toFont().strikeOut(), 0 ) ); + item->setValue( TQVariant( val.toFont().strikeOut(), 0 ) ); } } PropertyFontItem::~PropertyFontItem() { - delete (QHBox*)box; + delete (TQHBox*)box; } void PropertyFontItem::showEditor() @@ -1821,20 +1821,20 @@ void PropertyFontItem::hideEditor() box->hide(); } -void PropertyFontItem::setValue( const QVariant &v ) +void PropertyFontItem::setValue( const TQVariant &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() ) ); + setText( 1, v.toFont().family() + "-" + TQString::number( v.toFont().pointSize() ) ); + lined->setText( v.toFont().family() + "-" + TQString::number( v.toFont().pointSize() ) ); PropertyItem::setValue( v ); } void PropertyFontItem::getFont() { bool ok = false; - QFont f = QFontDialog::getFont( &ok, val.toFont(), listview ); + TQFont f = QFontDialog::getFont( &ok, val.toFont(), listview ); if ( ok && f != val.toFont() ) { setValue( f ); notifyValueChange(); @@ -1848,7 +1848,7 @@ bool PropertyFontItem::hasSubItems() const void PropertyFontItem::childValueChanged( PropertyItem *child ) { - QFont f = val.toFont(); + TQFont f = val.toFont(); if ( child->name() == i18n("Family" ) ) f.setFamily( ( (PropertyListItem*)child )->currentItem() ); else if ( child->name() == i18n("Point Size" ) ) @@ -1868,15 +1868,15 @@ void PropertyFontItem::childValueChanged( PropertyItem *child ) // -------------------------------------------------------------- PropertyDatabaseItem::PropertyDatabaseItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, - const QString &propName, bool wField ) + const TQString &propName, bool wField ) : PropertyItem( l, after, prop, propName ), withField( wField ) { - box = new QHBox( listview->viewport() ); + box = new TQHBox( listview->viewport() ); box->hide(); - lined = new QLineEdit( box ); - button = new QPushButton( "...", box ); + lined = new TQLineEdit( box ); + button = new TQPushButton( "...", box ); button->setFixedWidth( 20 ); - box->setFrameStyle( QFrame::StyledPanel | QFrame::Sunken ); + box->setFrameStyle( TQFrame::StyledPanel | TQFrame::Sunken ); box->setLineWidth( 2 ); lined->setFrame( false ); lined->setReadOnly( true ); @@ -1903,18 +1903,18 @@ void PropertyDatabaseItem::initChildren() { #ifndef QT_NO_SQL PropertyItem *item = 0; - QStringList lst = value().toStringList(); - QString conn, table; + TQStringList lst = value().toStringList(); + TQString 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(); + TQStringList cl = listview->propertyEditor()->formWindow()->project()->databaseConnectionList(); if ( !cl.isEmpty() ) item->setValue( cl ); else if ( lst.count() > 0 ) - item->setValue( QStringList( lst[ 0 ] ) ); + item->setValue( TQStringList( lst[ 0 ] ) ); else if ( withField ) - item->setValue( QStringList( MetaDataBase::fakeProperty( listview->propertyEditor()->formWindow()->mainContainer(), + item->setValue( TQStringList( MetaDataBase::fakeProperty( listview->propertyEditor()->formWindow()->mainContainer(), "database" ).toStringList()[ 0 ] ) ); if ( lst.count() > 0 && !lst[ 0 ].isEmpty() ) @@ -1926,13 +1926,13 @@ void PropertyDatabaseItem::initChildren() item->setCurrentItem( 0 ); conn = item->currentItem(); } else if ( item->name() == i18n("Table" ) ) { - QStringList cl = listview->propertyEditor()->formWindow()->project()->databaseTableList( conn ); + TQStringList cl = listview->propertyEditor()->formWindow()->project()->databaseTableList( conn ); if ( !cl.isEmpty() ) item->setValue( cl ); else if ( lst.count() > 1 ) - item->setValue( QStringList( lst[ 1 ] ) ); + item->setValue( TQStringList( lst[ 1 ] ) ); else if ( withField ) { - QStringList fakeLst = MetaDataBase::fakeProperty( listview->propertyEditor()->formWindow()->mainContainer(), "database" ).toStringList(); + TQStringList fakeLst = MetaDataBase::fakeProperty( listview->propertyEditor()->formWindow()->mainContainer(), "database" ).toStringList(); if ( fakeLst.count() > 1 ) item->setValue( fakeLst[ 1 ] ); } @@ -1940,7 +1940,7 @@ void PropertyDatabaseItem::initChildren() 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(); + TQStringList fakeLst = MetaDataBase::fakeProperty( listview->propertyEditor()->formWindow()->mainContainer(), "database" ).toStringList(); if ( fakeLst.count() > 1 ) item->setCurrentItem( fakeLst[ 1 ] ); else @@ -1949,11 +1949,11 @@ void PropertyDatabaseItem::initChildren() item->setCurrentItem( 0 ); table = item->currentItem(); } else if ( item->name() == i18n("Field" ) ) { - QStringList cl = listview->propertyEditor()->formWindow()->project()->databaseFieldList( conn, table ); + TQStringList cl = listview->propertyEditor()->formWindow()->project()->databaseFieldList( conn, table ); if ( !cl.isEmpty() ) item->setValue( cl ); else if ( lst.count() > 2 ) - item->setValue( QStringList( lst[ 2 ] ) ); + item->setValue( TQStringList( lst[ 2 ] ) ); if ( lst.count() > 2 && !lst[ 2 ].isEmpty() ) item->setCurrentItem( lst[ 2 ] ); else @@ -1965,7 +1965,7 @@ void PropertyDatabaseItem::initChildren() PropertyDatabaseItem::~PropertyDatabaseItem() { - delete (QHBox*)box; + delete (TQHBox*)box; } void PropertyDatabaseItem::showEditor() @@ -1984,13 +1984,13 @@ void PropertyDatabaseItem::hideEditor() box->hide(); } -void PropertyDatabaseItem::setValue( const QVariant &v ) +void PropertyDatabaseItem::setValue( const TQVariant &v ) { if ( value() == v ) return; - QStringList lst = v.toStringList(); - QString s = lst.join( "." ); + TQStringList lst = v.toStringList(); + TQString s = lst.join( "." ); setText( 1, s ); lined->setText( s ); PropertyItem::setValue( v ); @@ -2004,7 +2004,7 @@ bool PropertyDatabaseItem::hasSubItems() const void PropertyDatabaseItem::childValueChanged( PropertyItem *c ) { #ifndef QT_NO_SQL - QStringList lst; + TQStringList lst; lst << ( (PropertyListItem*)PropertyItem::child( 0 ) )->currentItem() << ( (PropertyListItem*)PropertyItem::child( 1 ) )->currentItem(); if ( withField ) @@ -2034,17 +2034,17 @@ void PropertyDatabaseItem::childValueChanged( PropertyItem *c ) // -------------------------------------------------------------- PropertySizePolicyItem::PropertySizePolicyItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, - const QString &propName ) + const TQString &propName ) : PropertyItem( l, after, prop, propName ) { lin = 0; } -QLineEdit *PropertySizePolicyItem::lined() +TQLineEdit *PropertySizePolicyItem::lined() { if ( lin ) return lin; - lin = new QLineEdit( listview->viewport() ); + lin = new TQLineEdit( listview->viewport() ); lin->hide(); lin->setReadOnly( true ); return lin; @@ -2052,7 +2052,7 @@ QLineEdit *PropertySizePolicyItem::lined() void PropertySizePolicyItem::createChildren() { - QStringList lst; + TQStringList lst; lst << "Fixed" << "Minimum" << "Maximum" << "Preferred" << "MinimumExpanding" << "Expanding" << "Ignored"; PropertyItem *i = this; @@ -2071,7 +2071,7 @@ void PropertySizePolicyItem::createChildren() void PropertySizePolicyItem::initChildren() { PropertyItem *item = 0; - QSizePolicy sp = val.toSizePolicy(); + TQSizePolicy sp = val.toSizePolicy(); for ( int i = 0; i < childCount(); ++i ) { item = PropertyItem::child( i ); if ( item->name() == i18n("hSizeType" ) ) @@ -2087,7 +2087,7 @@ void PropertySizePolicyItem::initChildren() PropertySizePolicyItem::~PropertySizePolicyItem() { - delete (QLineEdit*)lin; + delete (TQLineEdit*)lin; } void PropertySizePolicyItem::showEditor() @@ -2106,12 +2106,12 @@ void PropertySizePolicyItem::hideEditor() lined()->hide(); } -void PropertySizePolicyItem::setValue( const QVariant &v ) +void PropertySizePolicyItem::setValue( const TQVariant &v ) { if ( value() == v ) return; - QString s = QString( "%1/%2/%2/%2" ); + TQString s = TQString( "%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() ). @@ -2123,7 +2123,7 @@ void PropertySizePolicyItem::setValue( const QVariant &v ) void PropertySizePolicyItem::childValueChanged( PropertyItem *child ) { - QSizePolicy sp = val.toSizePolicy(); + TQSizePolicy sp = val.toSizePolicy(); if ( child->name() == i18n("hSizeType" ) ) sp.setHorData( int_to_size_type( ( ( PropertyListItem*)child )->currentIntItem() ) ); else if ( child->name() == i18n("vSizeType" ) ) @@ -2144,24 +2144,24 @@ bool PropertySizePolicyItem::hasSubItems() const // -------------------------------------------------------------- PropertyPaletteItem::PropertyPaletteItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, - const QString &propName ) + const TQString &propName ) : PropertyItem( l, after, prop, propName ) { - box = new QHBox( listview->viewport() ); + box = new TQHBox( listview->viewport() ); box->hide(); - palettePrev = new QLabel( box ); - button = new QPushButton( "...", box ); + palettePrev = new TQLabel( box ); + button = new TQPushButton( "...", box ); button->setFixedWidth( 20 ); - box->setFrameStyle( QFrame::StyledPanel | QFrame::Sunken ); + box->setFrameStyle( TQFrame::StyledPanel | TQFrame::Sunken ); box->setLineWidth( 2 ); - palettePrev->setFrameStyle( QFrame::NoFrame ); + palettePrev->setFrameStyle( TQFrame::NoFrame ); box->installEventFilter( listview ); - connect( button, SIGNAL( clicked() ), - this, SLOT( getPalette() ) ); + connect( button, TQT_SIGNAL( clicked() ), + this, TQT_SLOT( getPalette() ) ); } PropertyPaletteItem::~PropertyPaletteItem() { - delete (QHBox*)box; + delete (TQHBox*)box; } void PropertyPaletteItem::showEditor() @@ -2180,9 +2180,9 @@ void PropertyPaletteItem::hideEditor() box->hide(); } -void PropertyPaletteItem::setValue( const QVariant &v ) +void PropertyPaletteItem::setValue( const TQVariant &v ) { - QString s; + TQString s; palettePrev->setPalette( v.toPalette() ); PropertyItem::setValue( v ); repaint(); @@ -2193,10 +2193,10 @@ 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(), + TQWidget *w = (TQWidget*)listview->propertyEditor()->widget(); + if ( w->inherits( "TQScrollView" ) ) + w = ( (TQScrollView*)w )->viewport(); + TQPalette pal = PaletteEditor::getPalette( &ok, val.toPalette(), #if defined(QT_NON_COMMERCIAL) w->backgroundMode(), listview->topLevelWidget(), #else @@ -2214,19 +2214,19 @@ bool PropertyPaletteItem::hasCustomContents() const return true; } -void PropertyPaletteItem::drawCustomContents( QPainter *p, const QRect &r ) +void PropertyPaletteItem::drawCustomContents( TQPainter *p, const TQRect &r ) { - QPalette pal( value().toPalette() ); + TQPalette pal( value().toPalette() ); p->save(); - p->setClipRect( QRect( QPoint( (int)(p->worldMatrix().dx() + r.x()), + p->setClipRect( TQRect( TQPoint( (int)(p->worldMatrix().dx() + r.x()), (int)(p->worldMatrix().dy() + r.y()) ), r.size() ) ); - QRect r2( r ); + TQRect 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->setPen( TQPen( black, 1 ) ); p->setBrush( pal.active().background() ); p->drawRect( r2 ); p->restore(); @@ -2235,89 +2235,89 @@ void PropertyPaletteItem::drawCustomContents( QPainter *p, const QRect &r ) // -------------------------------------------------------------- PropertyCursorItem::PropertyCursorItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, - const QString &propName ) + const TQString &propName ) : PropertyItem( l, after, prop, propName ) { comb = 0; } -QComboBox *PropertyCursorItem::combo() +TQComboBox *PropertyCursorItem::combo() { if ( comb ) return comb; - comb = new QComboBox( false, listview->viewport() ); + comb = new TQComboBox( false, listview->viewport() ); comb->hide(); - QBitmap cur; + TQBitmap cur; - cur = QBitmap(arrow_width, arrow_height, arrow_bits, true); + cur = TQBitmap(arrow_width, arrow_height, arrow_bits, true); cur.setMask( cur ); - comb->insertItem( cur, i18n("Arrow"), QObject::ArrowCursor); + comb->insertItem( cur, i18n("Arrow"), TQObject::ArrowCursor); - cur = QBitmap(uparrow_width, uparrow_height, uparrow_bits, true); + cur = TQBitmap(uparrow_width, uparrow_height, uparrow_bits, true); cur.setMask( cur ); - comb->insertItem( cur, i18n("Up-Arrow"), QObject::UpArrowCursor ); + comb->insertItem( cur, i18n("Up-Arrow"), TQObject::UpArrowCursor ); - cur = QBitmap(cross_width, cross_height, cross_bits, true); + cur = TQBitmap(cross_width, cross_height, cross_bits, true); cur.setMask( cur ); - comb->insertItem( cur, i18n("Cross"), QObject::CrossCursor ); + comb->insertItem( cur, i18n("Cross"), TQObject::CrossCursor ); - cur = QBitmap(wait_width, wait_height, wait_bits, true); + cur = TQBitmap(wait_width, wait_height, wait_bits, true); cur.setMask( cur ); - comb->insertItem( cur, i18n("Waiting"), QObject::WaitCursor ); + comb->insertItem( cur, i18n("Waiting"), TQObject::WaitCursor ); - cur = QBitmap(ibeam_width, ibeam_height, ibeam_bits, true); + cur = TQBitmap(ibeam_width, ibeam_height, ibeam_bits, true); cur.setMask( cur ); - comb->insertItem( cur, i18n("iBeam"), QObject::IbeamCursor ); + comb->insertItem( cur, i18n("iBeam"), TQObject::IbeamCursor ); - cur = QBitmap(sizev_width, sizev_height, sizev_bits, true); + cur = TQBitmap(sizev_width, sizev_height, sizev_bits, true); cur.setMask( cur ); - comb->insertItem( cur, i18n("Size Vertical"), QObject::SizeVerCursor ); + comb->insertItem( cur, i18n("Size Vertical"), TQObject::SizeVerCursor ); - cur = QBitmap(sizeh_width, sizeh_height, sizeh_bits, true); + cur = TQBitmap(sizeh_width, sizeh_height, sizeh_bits, true); cur.setMask( cur ); - comb->insertItem( cur, i18n("Size Horizontal"), QObject::SizeHorCursor ); + comb->insertItem( cur, i18n("Size Horizontal"), TQObject::SizeHorCursor ); - cur = QBitmap(sizef_width, sizef_height, sizef_bits, true); + cur = TQBitmap(sizef_width, sizef_height, sizef_bits, true); cur.setMask( cur ); - comb->insertItem( cur, i18n("Size Slash"), QObject::SizeBDiagCursor ); + comb->insertItem( cur, i18n("Size Slash"), TQObject::SizeBDiagCursor ); - cur = QBitmap(sizeb_width, sizeb_height, sizeb_bits, true); + cur = TQBitmap(sizeb_width, sizeb_height, sizeb_bits, true); cur.setMask( cur ); - comb->insertItem( cur, i18n("Size Backslash"), QObject::SizeFDiagCursor ); + comb->insertItem( cur, i18n("Size Backslash"), TQObject::SizeFDiagCursor ); - cur = QBitmap(sizeall_width, sizeall_height, sizeall_bits, true); + cur = TQBitmap(sizeall_width, sizeall_height, sizeall_bits, true); cur.setMask( cur ); - comb->insertItem( cur, i18n("Size All"), QObject::SizeAllCursor ); + comb->insertItem( cur, i18n("Size All"), TQObject::SizeAllCursor ); - cur = QBitmap( 25, 25, 1 ); + cur = TQBitmap( 25, 25, 1 ); cur.setMask( cur ); - comb->insertItem( cur, i18n("Blank"), QObject::BlankCursor ); + comb->insertItem( cur, i18n("Blank"), TQObject::BlankCursor ); - cur = QBitmap(vsplit_width, vsplit_height, vsplit_bits, true); + cur = TQBitmap(vsplit_width, vsplit_height, vsplit_bits, true); cur.setMask( cur ); - comb->insertItem( cur, i18n("Split Vertical"), QObject::SplitVCursor ); + comb->insertItem( cur, i18n("Split Vertical"), TQObject::SplitVCursor ); - cur = QBitmap(hsplit_width, hsplit_height, hsplit_bits, true); + cur = TQBitmap(hsplit_width, hsplit_height, hsplit_bits, true); cur.setMask( cur ); - comb->insertItem( cur, i18n("Split Horizontal"), QObject::SplitHCursor ); + comb->insertItem( cur, i18n("Split Horizontal"), TQObject::SplitHCursor ); - cur = QBitmap(hand_width, hand_height, hand_bits, true); + cur = TQBitmap(hand_width, hand_height, hand_bits, true); cur.setMask( cur ); - comb->insertItem( cur, i18n("Pointing Hand"), QObject::PointingHandCursor ); + comb->insertItem( cur, i18n("Pointing Hand"), TQObject::PointingHandCursor ); - cur = QBitmap(no_width, no_height, no_bits, true); + cur = TQBitmap(no_width, no_height, no_bits, true); cur.setMask( cur ); - comb->insertItem( cur, i18n("Forbidden"), QObject::ForbiddenCursor ); + comb->insertItem( cur, i18n("Forbidden"), TQObject::ForbiddenCursor ); - connect( comb, SIGNAL( activated( int ) ), - this, SLOT( setValue() ) ); + connect( comb, TQT_SIGNAL( activated( int ) ), + this, TQT_SLOT( setValue() ) ); comb->installEventFilter( listview ); return comb; } PropertyCursorItem::~PropertyCursorItem() { - delete (QComboBox*)comb; + delete (TQComboBox*)comb; } void PropertyCursorItem::showEditor() @@ -2341,7 +2341,7 @@ void PropertyCursorItem::hideEditor() combo()->hide(); } -void PropertyCursorItem::setValue( const QVariant &v ) +void PropertyCursorItem::setValue( const TQVariant &v ) { if ( ( !hasSubItems() || !isOpen() ) && value() == v ) @@ -2358,10 +2358,10 @@ void PropertyCursorItem::setValue() { if ( !comb ) return; - if ( QVariant( QCursor( combo()->currentItem() ) ) == val ) + if ( TQVariant( TQCursor( combo()->currentItem() ) ) == val ) return; setText( 1, combo()->currentText() ); - PropertyItem::setValue( QCursor( combo()->currentItem() ) ); + PropertyItem::setValue( TQCursor( combo()->currentItem() ) ); notifyValueChange(); } @@ -2369,7 +2369,7 @@ void PropertyCursorItem::setValue() /*! \class PropertyList propertyeditor.h - \brief PropertyList is a QListView derived class which is used for editing widget properties + \brief PropertyList is a TQListView derived class which is used for editing widget properties This class is used for widget properties. It has to be child of a PropertyEditor. @@ -2388,7 +2388,7 @@ void PropertyCursorItem::setValue() */ PropertyList::PropertyList( PropertyEditor *e ) - : QListView( e ), editor( e ) + : TQListView( e ), editor( e ) { init_colors(); @@ -2396,21 +2396,21 @@ PropertyList::PropertyList( PropertyEditor *e ) showSorted = false; header()->setMovingEnabled( false ); header()->setStretchEnabled( true ); - setResizePolicy( QScrollView::Manual ); + setResizePolicy( TQScrollView::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 * ) ) ); + connect( header(), TQT_SIGNAL( sizeChange( int, int, int ) ), + this, TQT_SLOT( updateEditorSize() ) ); + disconnect( header(), TQT_SIGNAL( sectionClicked( int ) ), + this, TQT_SLOT( changeSortColumn( int ) ) ); + connect( header(), TQT_SIGNAL( sectionClicked( int ) ), + this, TQT_SLOT( toggleSort() ) ); + connect( this, TQT_SIGNAL( pressed( TQListViewItem *, const TQPoint &, int ) ), + this, TQT_SLOT( itemPressed( TQListViewItem *, const TQPoint &, int ) ) ); + connect( this, TQT_SIGNAL( doubleClicked( TQListViewItem * ) ), + this, TQT_SLOT( toggleOpen( TQListViewItem * ) ) ); setSorting( -1 ); setHScrollBarMode( AlwaysOff ); setVScrollBarMode( AlwaysOn ); @@ -2427,83 +2427,83 @@ void PropertyList::toggleSort() editor->setup(); } -void PropertyList::resizeEvent( QResizeEvent *e ) +void PropertyList::resizeEvent( TQResizeEvent *e ) { - QListView::resizeEvent( e ); + TQListView::resizeEvent( e ); if ( currentItem() ) ( ( PropertyItem* )currentItem() )->showEditor(); } -static QVariant::Type type_to_variant( const QString &s ) +static TQVariant::Type type_to_variant( const TQString &s ) { if ( s == "Invalid " ) - return QVariant::Invalid; + return TQVariant::Invalid; if ( s == "Map" ) - return QVariant::Map; + return TQVariant::Map; if ( s == "List" ) - return QVariant::List; + return TQVariant::List; if ( s == "String" ) - return QVariant::String; + return TQVariant::String; if ( s == "StringList" ) - return QVariant::StringList; + return TQVariant::StringList; if ( s == "Font" ) - return QVariant::Font; + return TQVariant::Font; if ( s == "Pixmap" ) - return QVariant::Pixmap; + return TQVariant::Pixmap; if ( s == "Brush" ) - return QVariant::Brush; + return TQVariant::Brush; if ( s == "Rect" ) - return QVariant::Rect; + return TQVariant::Rect; if ( s == "Size" ) - return QVariant::Size; + return TQVariant::Size; if ( s == "Color" ) - return QVariant::Color; + return TQVariant::Color; if ( s == "Palette" ) - return QVariant::Palette; + return TQVariant::Palette; if ( s == "ColorGroup" ) - return QVariant::ColorGroup; + return TQVariant::ColorGroup; if ( s == "IconSet" ) - return QVariant::IconSet; + return TQVariant::IconSet; if ( s == "Point" ) - return QVariant::Point; + return TQVariant::Point; if ( s == "Image" ) - return QVariant::Image; + return TQVariant::Image; if ( s == "Int" ) - return QVariant::Int; + return TQVariant::Int; if ( s == "UInt" ) - return QVariant::UInt; + return TQVariant::UInt; if ( s == "Bool" ) - return QVariant::Bool; + return TQVariant::Bool; if ( s == "Double" ) - return QVariant::Double; + return TQVariant::Double; if ( s == "CString" ) - return QVariant::CString; + return TQVariant::CString; if ( s == "PointArray" ) - return QVariant::PointArray; + return TQVariant::PointArray; if ( s == "Region" ) - return QVariant::Region; + return TQVariant::Region; if ( s == "Bitmap" ) - return QVariant::Bitmap; + return TQVariant::Bitmap; if ( s == "Cursor" ) - return QVariant::Cursor; + return TQVariant::Cursor; if ( s == "SizePolicy" ) - return QVariant::SizePolicy; + return TQVariant::SizePolicy; if ( s == "Date" ) - return QVariant::Date; + return TQVariant::Date; if ( s == "Time" ) - return QVariant::Time; + return TQVariant::Time; if ( s == "DateTime" ) - return QVariant::DateTime; - return QVariant::Invalid; + return TQVariant::DateTime; + return TQVariant::Invalid; } #ifndef QT_NO_SQL -static bool parent_is_data_aware( QObject *o ) +static bool parent_is_data_aware( TQObject *o ) { - if ( !o->inherits( "QWidget" ) ) + if ( !o->inherits( "TQWidget" ) ) return false; - QWidget *w = (QWidget*)o; - QWidget *p = w->parentWidget(); + TQWidget *w = (TQWidget*)o; + TQWidget *p = w->parentWidget(); while ( p && !p->isTopLevel() ) { if ( p->inherits( "QDesignerDataBrowser" ) || p->inherits( "QDesignerDataView" ) ) return true; @@ -2522,22 +2522,22 @@ void PropertyList::setupProperties() if ( !editor->widget() ) return; bool allProperties = !editor->widget()->inherits( "Spacer" ); - QStrList lst = editor->widget()->metaObject()->propertyNames( allProperties ); + TQStrList lst = editor->widget()->metaObject()->propertyNames( allProperties ); PropertyItem *item = 0; - QMap unique; - QObject *w = editor->widget(); - QStringList valueSet; + TQMap unique; + TQObject *w = editor->widget(); + TQStringList valueSet; bool parentHasLayout = w->isWidgetType() && - !editor->formWindow()->isMainContainer( (QWidget*)w ) && ( (QWidget*)w )->parentWidget() && - WidgetFactory::layoutType( ( (QWidget*)w )->parentWidget() ) != WidgetFactory::NoLayout; - for ( QPtrListIterator it( lst ); it.current(); ++it ) { - const QMetaProperty* p = + !editor->formWindow()->isMainContainer( (TQWidget*)w ) && ( (TQWidget*)w )->parentWidget() && + WidgetFactory::layoutType( ( (TQWidget*)w )->parentWidget() ) != WidgetFactory::NoLayout; + for ( TQPtrListIterator it( lst ); it.current(); ++it ) { + const TQMetaProperty* p = editor->widget()->metaObject()-> property( editor->widget()->metaObject()->findProperty( it.current(), allProperties), allProperties ); if ( !p ) continue; - if ( unique.contains( QString::fromLatin1( it.current() ) ) ) + if ( unique.contains( TQString::fromLatin1( it.current() ) ) ) continue; if ( editor->widget()->inherits( "QDesignerToolBar" ) || editor->widget()->inherits( "QDesignerMenuBar" ) ) { if ( qstrcmp( p->name(), "minimumHeight" ) == 0 ) @@ -2557,9 +2557,9 @@ void PropertyList::setupProperties() if ( qstrcmp( p->name(), "maximumSize" ) == 0 ) continue; } - unique.insert( QString::fromLatin1( it.current() ), true ); + unique.insert( TQString::fromLatin1( it.current() ), true ); if ( editor->widget()->isWidgetType() && - editor->formWindow()->isMainContainer( (QWidget*)editor->widget() ) ) { + editor->formWindow()->isMainContainer( (TQWidget*)editor->widget() ) ) { if ( qstrcmp( p->name(), "geometry" ) == 0 ) continue; } else { // hide some toplevel-only stuff @@ -2618,7 +2618,7 @@ void PropertyList::setupProperties() continue; } } - if ( w->inherits( "QActionGroup" ) ) { + if ( w->inherits( "TQActionGroup" ) ) { if ( qstrcmp( p->name(), "usesDropDown" ) == 0 ) continue; if ( qstrcmp( p->name(), "toggleAction" ) == 0 ) @@ -2635,15 +2635,15 @@ void PropertyList::setupProperties() 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" ) ) + !editor->widget()->parent()->inherits( "TQButtonGroup" ) ) continue; } if ( p->designable(w) ) { if ( p->isSetType() ) { - if ( QString( p->name() ) == "alignment" ) { - QStringList lst; + if ( TQString( p->name() ) == "alignment" ) { + TQStringList lst; lst << p->valueToKey( AlignAuto ) << p->valueToKey( AlignLeft ) << p->valueToKey( AlignHCenter ) @@ -2654,7 +2654,7 @@ void PropertyList::setupProperties() setPropertyValue( item ); if ( MetaDataBase::isPropertyChanged( editor->widget(), "hAlign" ) ) item->setChanged( true, false ); - if ( !editor->widget()->inherits( "QMultiLineEdit" ) ) { + if ( !editor->widget()->inherits( "TQMultiLineEdit" ) ) { lst.clear(); lst << p->valueToKey( AlignTop ) << p->valueToKey( AlignVCenter ) @@ -2665,7 +2665,7 @@ void PropertyList::setupProperties() if ( MetaDataBase::isPropertyChanged( editor->widget(), "vAlign" ) ) item->setChanged( true, false ); item = new PropertyBoolItem( this, item, 0, "wordwrap" ); - if ( w->inherits( "QGroupBox" ) ) + if ( w->inherits( "TQGroupBox" ) ) item->setVisible( false ); setPropertyValue( item ); if ( MetaDataBase::isPropertyChanged( editor->widget(), "wordwrap" ) ) @@ -2675,19 +2675,19 @@ void PropertyList::setupProperties() qWarning( "Sets except 'alignment' not supported yet.... %s.", p->name() ); } } else if ( p->isEnumType() ) { - QStrList l = p->enumKeys(); - QStringList lst; + TQStrList l = p->enumKeys(); + TQStringList lst; for ( uint i = 0; i < l.count(); ++i ) { - QString k = l.at( i ); + TQString k = l.at( i ); // filter out enum-masks - if ( k[0] == 'M' && k[1].category() == QChar::Letter_Uppercase ) + if ( k[0] == 'M' && k[1].category() == TQChar::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() ); + TQVariant::Type t = TQVariant::nameToType( p->type() ); if ( !addPropertyItem( item, p->name(), t ) ) continue; } @@ -2702,8 +2702,8 @@ void PropertyList::setupProperties() } } - if ( !w->inherits( "QSplitter" ) && !w->inherits( "QDesignerMenuBar" ) && !w->inherits( "QDesignerToolBar" ) && - w->isWidgetType() && WidgetFactory::layoutType( (QWidget*)w ) != WidgetFactory::NoLayout ) { + if ( !w->inherits( "TQSplitter" ) && !w->inherits( "QDesignerMenuBar" ) && !w->inherits( "QDesignerToolBar" ) && + w->isWidgetType() && WidgetFactory::layoutType( (TQWidget*)w ) != WidgetFactory::NoLayout ) { item = new PropertyIntItem( this, item, 0, "layoutSpacing", true ); setPropertyValue( item ); item->setChanged( true ); @@ -2713,7 +2713,7 @@ void PropertyList::setupProperties() } - if ( !w->inherits( "Spacer" ) && !w->inherits( "QLayoutWidget" ) && !w->inherits( "QAction" ) && + if ( !w->inherits( "Spacer" ) && !w->inherits( "QLayoutWidget" ) && !w->inherits( "TQAction" ) && !w->inherits( "QDesignerMenuBar" ) && !w->inherits( "QDesignerToolBar" ) ) { item = new PropertyTextItem( this, item, 0, "toolTip", true, false ); setPropertyValue( item ); @@ -2726,15 +2726,15 @@ void PropertyList::setupProperties() } #ifndef QT_NO_SQL - if ( !editor->widget()->inherits( "QDataTable" ) && !editor->widget()->inherits( "QDataBrowser" ) && - !editor->widget()->inherits( "QDataView" ) && parent_is_data_aware( editor->widget() ) ) { + if ( !editor->widget()->inherits( "TQDataTable" ) && !editor->widget()->inherits( "TQDataBrowser" ) && + !editor->widget()->inherits( "TQDataView" ) && 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" ) ) { + if ( editor->widget()->inherits( "TQDataTable" ) || editor->widget()->inherits( "TQDataBrowser" ) || editor->widget()->inherits( "TQDataView" ) ) { item = new PropertyDatabaseItem( this, item, 0, "database", false ); setPropertyValue( item ); if ( MetaDataBase::isPropertyChanged( editor->widget(), "database" ) ) @@ -2749,10 +2749,10 @@ void PropertyList::setupProperties() if ( w->inherits( "CustomWidget" ) ) { MetaDataBase::CustomWidget *cw = ( (CustomWidget*)w )->customWidget(); if ( cw ) { - for ( QValueList::Iterator it = cw->lstProperties.begin(); it != cw->lstProperties.end(); ++it ) { - if ( unique.contains( QString( (*it).property ) ) ) + for ( TQValueList::Iterator it = cw->lstProperties.begin(); it != cw->lstProperties.end(); ++it ) { + if ( unique.contains( TQString( (*it).property ) ) ) continue; - unique.insert( QString( (*it).property ), true ); + unique.insert( TQString( (*it).property ), true ); addPropertyItem( item, (*it).property, type_to_variant( (*it).type ) ); setPropertyValue( item ); if ( MetaDataBase::isPropertyChanged( editor->widget(), (*it).property ) ) @@ -2775,75 +2775,75 @@ void PropertyList::setupProperties() updateEditorSize(); } -bool PropertyList::addPropertyItem( PropertyItem *&item, const QCString &name, QVariant::Type t ) +bool PropertyList::addPropertyItem( PropertyItem *&item, const TQCString &name, TQVariant::Type t ) { switch ( t ) { - case QVariant::String: + case TQVariant::String: item = new PropertyTextItem( this, item, 0, name, true, - editor->widget()->inherits( "QLabel" ) || editor->widget()->inherits( "QTextView" ) ); + editor->widget()->inherits( "TQLabel" ) || editor->widget()->inherits( "TQTextView" ) ); break; - case QVariant::CString: + case TQVariant::CString: item = new PropertyTextItem( this, item, 0, name, name == "name" && editor->widget() == editor->formWindow()->mainContainer(), false, true ); break; - case QVariant::Bool: + case TQVariant::Bool: item = new PropertyBoolItem( this, item, 0, name ); break; - case QVariant::Font: + case TQVariant::Font: item = new PropertyFontItem( this, item, 0, name ); break; - case QVariant::Int: + case TQVariant::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: + case TQVariant::Double: item = new PropertyDoubleItem( this, item, 0, name ); break; - case QVariant::KeySequence: + case TQVariant::KeySequence: item = new PropertyTextItem( this, item, 0, name, false, false, false, true ); break; - case QVariant::UInt: + case TQVariant::UInt: item = new PropertyIntItem( this, item, 0, name, false ); break; - case QVariant::StringList: + case TQVariant::StringList: item = new PropertyListItem( this, item, 0, name, true ); break; - case QVariant::Rect: + case TQVariant::Rect: item = new PropertyCoordItem( this, item, 0, name, PropertyCoordItem::Rect ); break; - case QVariant::Point: + case TQVariant::Point: item = new PropertyCoordItem( this, item, 0, name, PropertyCoordItem::Point ); break; - case QVariant::Size: + case TQVariant::Size: item = new PropertyCoordItem( this, item, 0, name, PropertyCoordItem::Size ); break; - case QVariant::Color: + case TQVariant::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 ); + case TQVariant::Pixmap: + case TQVariant::IconSet: + item = new PropertyPixmapItem( this, item, 0, name, t == TQVariant::IconSet ); break; - case QVariant::SizePolicy: + case TQVariant::SizePolicy: item = new PropertySizePolicyItem( this, item, 0, name ); break; - case QVariant::Palette: + case TQVariant::Palette: item = new PropertyPaletteItem( this, item, 0, name ); break; - case QVariant::Cursor: + case TQVariant::Cursor: item = new PropertyCursorItem( this, item, 0, name ); break; - case QVariant::Date: + case TQVariant::Date: item = new PropertyDateItem( this, item, 0, name ); break; - case QVariant::Time: + case TQVariant::Time: item = new PropertyTimeItem( this, item, 0, name ); break; - case QVariant::DateTime: + case TQVariant::DateTime: item = new PropertyDateTimeItem( this, item, 0, name ); break; default: @@ -2852,19 +2852,19 @@ bool PropertyList::addPropertyItem( PropertyItem *&item, const QCString &name, Q return true; } -void PropertyList::paintEmptyArea( QPainter *p, const QRect &r ) +void PropertyList::paintEmptyArea( TQPainter *p, const TQRect &r ) { p->fillRect( r, *backColor2 ); } -void PropertyList::setCurrentItem( QListViewItem *i ) +void PropertyList::setCurrentItem( TQListViewItem *i ) { if ( !i ) return; if ( currentItem() ) ( (PropertyItem*)currentItem() )->hideEditor(); - QListView::setCurrentItem( i ); + TQListView::setCurrentItem( i ); ( (PropertyItem*)currentItem() )->showEditor(); } @@ -2882,7 +2882,7 @@ void PropertyList::valueChanged( PropertyItem *i ) { if ( !editor->widget() ) return; - QString pn( i18n("Set '%1' of '%2'" ).arg( i->name() ).arg( editor->widget()->name() ) ); + TQString 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() ), @@ -2891,7 +2891,7 @@ void PropertyList::valueChanged( PropertyItem *i ) editor->formWindow()->commandHistory()->addCommand( cmd, true ); } -void PropertyList::itemPressed( QListViewItem *i, const QPoint &p, int c ) +void PropertyList::itemPressed( TQListViewItem *i, const TQPoint &p, int c ) { if ( !i ) return; @@ -2903,7 +2903,7 @@ void PropertyList::itemPressed( QListViewItem *i, const QPoint &p, int c ) toggleOpen( i ); } -void PropertyList::toggleOpen( QListViewItem *i ) +void PropertyList::toggleOpen( TQListViewItem *i ) { if ( !i ) return; @@ -2915,21 +2915,21 @@ void PropertyList::toggleOpen( QListViewItem *i ) } } -bool PropertyList::eventFilter( QObject *o, QEvent *e ) +bool PropertyList::eventFilter( TQObject *o, TQEvent *e ) { if ( !o || !e ) return true; PropertyItem *i = (PropertyItem*)currentItem(); - if ( o != this &&e->type() == QEvent::KeyPress ) { - QKeyEvent *ke = (QKeyEvent*)e; + if ( o != this &&e->type() == TQEvent::KeyPress ) { + TQKeyEvent *ke = (TQKeyEvent*)e; if ( ( ke->key() == Key_Up || ke->key() == Key_Down ) && ( o != this || o != viewport() ) && !( ke->state() & ControlButton ) ) { - QApplication::sendEvent( this, (QKeyEvent*)e ); + TQApplication::sendEvent( this, (TQKeyEvent*)e ); return true; - } else if ( ( !o->inherits( "QLineEdit" ) || - ( o->inherits( "QLineEdit" ) && ( (QLineEdit*)o )->isReadOnly() ) ) && + } else if ( ( !o->inherits( "TQLineEdit" ) || + ( o->inherits( "TQLineEdit" ) && ( (TQLineEdit*)o )->isReadOnly() ) ) && i && i->hasSubItems() ) { if ( !i->isOpen() && ( ke->key() == Key_Plus || @@ -2939,19 +2939,19 @@ bool PropertyList::eventFilter( QObject *o, QEvent *e ) ( 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 ); + } else if ( ( ke->key() == Key_Return || ke->key() == Key_Enter ) && o->inherits( "TQComboBox" ) ) { + TQKeyEvent ke2( TQEvent::KeyPress, Key_Space, 0, 0 ); + TQApplication::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 ( e->type() == TQEvent::FocusOut && o->inherits( "TQLineEdit" ) && editor->formWindow() ) { + TQTimer::singleShot( 100, editor->formWindow()->commandHistory(), TQT_SLOT( checkCompressedCommand() ) ); } else if ( o == viewport() ) { - QMouseEvent *me; + TQMouseEvent *me; PropertyListItem* i; switch ( e->type() ) { - case QEvent::MouseButtonPress: - me = (QMouseEvent*)e; + case TQEvent::MouseButtonPress: + me = (TQMouseEvent*)e; i = (PropertyListItem*) itemAt( me->pos() ); if( i && ( i->inherits("PropertyColorItem") || i->inherits("PropertyPixmapItem") ) ) { pressItem = i; @@ -2959,20 +2959,20 @@ bool PropertyList::eventFilter( QObject *o, QEvent *e ) mousePressed = true; } break; - case QEvent::MouseMove: - me = (QMouseEvent*)e; + case TQEvent::MouseMove: + me = (TQMouseEvent*)e; if ( me && me->state() & LeftButton && mousePressed) { i = (PropertyListItem*) itemAt( me->pos() ); if( i && i == pressItem ) { - if(( pressPos - me->pos() ).manhattanLength() > QApplication::startDragDistance() ){ + if(( pressPos - me->pos() ).manhattanLength() > TQApplication::startDragDistance() ){ if ( i->inherits("PropertyColorItem") ) { - QColor col = i->value().asColor(); - QColorDrag *drg = new QColorDrag( col, this ); - QPixmap pix( 25, 25 ); + TQColor col = i->value().asColor(); + TQColorDrag *drg = new TQColorDrag( col, this ); + TQPixmap pix( 25, 25 ); pix.fill( col ); - QPainter p( &pix ); + TQPainter p( &pix ); p.drawRect( 0, 0, pix.width(), pix.height() ); p.end(); drg->setPixmap( pix ); @@ -2980,10 +2980,10 @@ bool PropertyList::eventFilter( QObject *o, QEvent *e ) drg->dragCopy(); } else if ( i->inherits("PropertyPixmapItem") ) { - QPixmap pix = i->value().asPixmap(); + TQPixmap pix = i->value().asPixmap(); if( !pix.isNull() ) { - QImage img = pix.convertToImage(); - QImageDrag *drg = new QImageDrag( img, this ); + TQImage img = pix.convertToImage(); + TQImageDrag *drg = new TQImageDrag( img, this ); drg->setPixmap( pix ); mousePressed = false; drg->dragCopy(); @@ -2997,9 +2997,9 @@ bool PropertyList::eventFilter( QObject *o, QEvent *e ) break; } } else if ( o == header() ) { - if ( e->type() == QEvent::ContextMenu ) { - ((QContextMenuEvent *)e)->accept(); - QPopupMenu menu( 0 ); + if ( e->type() == TQEvent::ContextMenu ) { + ((TQContextMenuEvent *)e)->accept(); + TQPopupMenu menu( 0 ); menu.setCheckable( true ); const int cat_id = 1; const int alpha_id = 2; @@ -3009,7 +3009,7 @@ bool PropertyList::eventFilter( QObject *o, QEvent *e ) menu.setItemChecked( alpha_id, true ); else menu.setItemChecked( cat_id, true ); - int res = menu.exec( ( (QContextMenuEvent*)e )->globalPos() ); + int res = menu.exec( ( (TQContextMenuEvent*)e )->globalPos() ); if ( res != -1 ) { bool newShowSorted = ( res == alpha ); if ( showSorted != newShowSorted ) { @@ -3022,7 +3022,7 @@ bool PropertyList::eventFilter( QObject *o, QEvent *e ) } } - return QListView::eventFilter( o, e ); + return TQListView::eventFilter( o, e ); } /*! This method re-initializes each item of the property list. @@ -3030,7 +3030,7 @@ bool PropertyList::eventFilter( QObject *o, QEvent *e ) void PropertyList::refetchData() { - QListViewItemIterator it( this ); + TQListViewItemIterator it( this ); for ( ; it.current(); ++it ) { PropertyItem *i = (PropertyItem*)it.current(); if ( !i->propertyParent() ) @@ -3044,7 +3044,7 @@ void PropertyList::refetchData() updateEditorSize(); } -static void clearAlignList( QStrList &l ) +static void clearAlignList( TQStrList &l ) { if ( l.count() == 1 ) return; @@ -3060,7 +3060,7 @@ static void clearAlignList( QStrList &l ) void PropertyList::setPropertyValue( PropertyItem *i ) { - const QMetaProperty *p = + const TQMetaProperty *p = editor->widget()->metaObject()-> property( editor->widget()->metaObject()->findProperty( i->name(), true), true ); if ( !p ) { @@ -3069,7 +3069,7 @@ void PropertyList::setPropertyValue( PropertyItem *i ) p = editor->widget()->metaObject()-> property( editor->widget()->metaObject()->findProperty( "alignment", true ), true ); align &= ~AlignVertical_Mask; - QStrList l = p->valueToKeys( align ); + TQStrList l = p->valueToKeys( align ); clearAlignList( l ); ( (PropertyListItem*)i )->setCurrentItem( l.last() ); } else if ( i->name() == "vAlign" ) { @@ -3081,13 +3081,13 @@ void PropertyList::setPropertyValue( PropertyItem *i ) } else if ( i->name() == "wordwrap" ) { int align = editor->widget()->property( "alignment" ).toInt(); if ( align & WordBreak ) - i->setValue( QVariant( true, 0 ) ); + i->setValue( TQVariant( true, 0 ) ); else - i->setValue( QVariant( false, 0 ) ); + i->setValue( TQVariant( false, 0 ) ); } else if ( i->name() == "layoutSpacing" ) { - ( (PropertyIntItem*)i )->setValue( MetaDataBase::spacing( WidgetFactory::containerOfWidget( (QWidget*)editor->widget() ) ) ); + ( (PropertyIntItem*)i )->setValue( MetaDataBase::spacing( WidgetFactory::containerOfWidget( (TQWidget*)editor->widget() ) ) ); } else if ( i->name() == "layoutMargin" ) { - ( (PropertyIntItem*)i )->setValue( MetaDataBase::margin( WidgetFactory::containerOfWidget( (QWidget*)editor->widget() ) ) ); + ( (PropertyIntItem*)i )->setValue( MetaDataBase::margin( WidgetFactory::containerOfWidget( (TQWidget*)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" ) ) { @@ -3106,14 +3106,14 @@ void PropertyList::setPropertyValue( PropertyItem *i ) i->setValue( editor->widget()->property( i->name() ) ); } -void PropertyList::setCurrentProperty( const QString &n ) +void PropertyList::setCurrentProperty( const TQString &n ) { if ( currentItem() && currentItem()->text( 0 ) == n || currentItem() && ( (PropertyItem*)currentItem() )->propertyParent() && ( (PropertyItem*)currentItem() )->propertyParent()->text( 0 ) == n ) return; - QListViewItemIterator it( this ); + TQListViewItemIterator it( this ); for ( ; it.current(); ++it ) { if ( it.current()->text( 0 ) == n ) { setCurrentItem( it.current() ); @@ -3134,7 +3134,7 @@ void PropertyList::resetProperty() 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() ) ); + TQString 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(), @@ -3147,7 +3147,7 @@ void PropertyList::resetProperty() i->initChildren(); } -void PropertyList::viewportDragEnterEvent( QDragEnterEvent *e ) +void PropertyList::viewportDragEnterEvent( TQDragEnterEvent *e ) { PropertyListItem *i = (PropertyListItem*) itemAt( e->pos() ); if( !i ) { @@ -3155,15 +3155,15 @@ void PropertyList::viewportDragEnterEvent( QDragEnterEvent *e ) return; } - if ( i->inherits("PropertyColorItem") && QColorDrag::canDecode( e ) ) + if ( i->inherits("PropertyColorItem") && TQColorDrag::canDecode( e ) ) e->accept(); - else if ( i->inherits("PropertyPixmapItem") && QImageDrag::canDecode( e ) ) + else if ( i->inherits("PropertyPixmapItem") && TQImageDrag::canDecode( e ) ) e->accept(); else e->ignore(); } -void PropertyList::viewportDragMoveEvent ( QDragMoveEvent *e ) +void PropertyList::viewportDragMoveEvent ( TQDragMoveEvent *e ) { PropertyListItem *i = (PropertyListItem*) itemAt( e->pos() ); if( !i ) { @@ -3171,15 +3171,15 @@ void PropertyList::viewportDragMoveEvent ( QDragMoveEvent *e ) return; } - if ( i->inherits("PropertyColorItem") && QColorDrag::canDecode( e ) ) + if ( i->inherits("PropertyColorItem") && TQColorDrag::canDecode( e ) ) e->accept(); - else if ( i->inherits("PropertyPixmapItem") && QImageDrag::canDecode( e ) ) + else if ( i->inherits("PropertyPixmapItem") && TQImageDrag::canDecode( e ) ) e->accept(); else e->ignore(); } -void PropertyList::viewportDropEvent ( QDropEvent *e ) +void PropertyList::viewportDropEvent ( TQDropEvent *e ) { PropertyListItem *i = (PropertyListItem*) itemAt( e->pos() ); if( !i ) { @@ -3187,19 +3187,19 @@ void PropertyList::viewportDropEvent ( QDropEvent *e ) return; } - if ( i->inherits("PropertyColorItem") && QColorDrag::canDecode( e ) ) { - QColor color; - QColorDrag::decode( e, color ); - i->setValue( QVariant( color ) ); + if ( i->inherits("PropertyColorItem") && TQColorDrag::canDecode( e ) ) { + TQColor color; + TQColorDrag::decode( e, color ); + i->setValue( TQVariant( color ) ); valueChanged( i ); e->accept(); } - else if ( i->inherits("PropertyPixmapItem") && QImageDrag::canDecode( e ) ) { - QImage img; - QImageDrag::decode( e, img ); - QPixmap pm; + else if ( i->inherits("PropertyPixmapItem") && TQImageDrag::canDecode( e ) ) { + TQImage img; + TQImageDrag::decode( e, img ); + TQPixmap pm; pm.convertFromImage( img ); - i->setValue( QVariant( pm ) ); + i->setValue( TQVariant( pm ) ); valueChanged( i ); e->accept(); } @@ -3207,7 +3207,7 @@ void PropertyList::viewportDropEvent ( QDropEvent *e ) e->ignore(); } -QString PropertyList::whatsThisAt( const QPoint &p ) +TQString PropertyList::whatsThisAt( const TQPoint &p ) { return whatsThisText( itemAt( p ) ); } @@ -3216,32 +3216,32 @@ void PropertyList::showCurrentWhatsThis() { if ( !currentItem() ) return; - QPoint p( 0, currentItem()->itemPos() ); + TQPoint p( 0, currentItem()->itemPos() ); p = viewport()->mapToGlobal( contentsToViewport( p ) ); - QWhatsThis::display( whatsThisText( currentItem() ), p, viewport() ); + TQWhatsThis::display( whatsThisText( currentItem() ), p, viewport() ); } -QString PropertyList::whatsThisText( QListViewItem *i ) +TQString PropertyList::whatsThisText( TQListViewItem *i ) { if ( !i || !editor->widget() ) - return QString::null; + return TQString::null; readPropertyDocs(); if ( ( (PropertyItem*)i )->propertyParent() ) i = ( (PropertyItem*)i )->propertyParent(); - const QMetaObject *mo = editor->widget()->metaObject(); - QString prop = ( (PropertyItem*)i )->name(); + const TQMetaObject *mo = editor->widget()->metaObject(); + TQString prop = ( (PropertyItem*)i )->name(); while ( mo ) { - QString s; - s = QString( mo->className() ) + "::" + prop; - QMap::Iterator it; + TQString s; + s = TQString( mo->className() ) + "::" + prop; + TQMap::Iterator it; if ( ( it = propertyDocs.find( s ) ) != propertyDocs.end() ) { return *it; } mo = mo->superClass(); } - return i18n("

QWidget::%1

There is no documentation available for this property.

" ).arg( prop ); + return i18n("

TQWidget::%1

There is no documentation available for this property.

" ).arg( prop ); } void PropertyList::readPropertyDocs() @@ -3249,21 +3249,21 @@ void PropertyList::readPropertyDocs() if ( !propertyDocs.isEmpty() ) return; - QString docFile = MainWindow::self->documentationPath() + "/propertydocs"; - QFile f( docFile ); + TQString docFile = MainWindow::self->documentationPath() + "/propertydocs"; + TQFile f( docFile ); if ( !f.open( IO_ReadOnly ) ) return; - QDomDocument doc; - QString errMsg; + TQDomDocument doc; + TQString errMsg; int errLine; if ( !doc.setContent( &f, &errMsg, &errLine ) ) return; - QDomElement e = doc.firstChild().toElement().firstChild().toElement(); + TQDomElement e = doc.firstChild().toElement().firstChild().toElement(); for ( ; !e.isNull(); e = e.nextSibling().toElement() ) { - QDomElement n = e.firstChild().toElement(); - QString name; - QString doc; + TQDomElement n = e.firstChild().toElement(); + TQString name; + TQString doc; for ( ; !n.isNull(); n = n.nextSibling().toElement() ) { if ( n.tagName() == "name" ) name = n.firstChild().toText().data(); @@ -3278,14 +3278,14 @@ void PropertyList::readPropertyDocs() // ------------------------------------------------------------ #ifndef KOMMANDER -EventList::EventList( QWidget *parent, FormWindow *fw, PropertyEditor *e ) +EventList::EventList( TQWidget *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 * ) ) ); + connect( this, TQT_SIGNAL( itemRenamed( TQListViewItem *, int, const TQString & ) ), + this, TQT_SLOT( renamed( TQListViewItem * ) ) ); } void EventList::setup() @@ -3297,7 +3297,7 @@ void EventList::setup() #else if ( MetaDataBase::hasEvents( "C++" ) ) { #endif - QValueList events = + TQValueList events = #ifndef KOMMANDER MetaDataBase::events( editor->widget(), formWindow->project()->language() ); #else @@ -3305,20 +3305,20 @@ void EventList::setup() #endif if ( events.isEmpty() ) return; - for ( QValueList::Iterator it = events.begin(); it != events.end(); ++it ) { + for ( TQValueList::Iterator it = events.begin(); it != events.end(); ++it ) { HierarchyItem *eventItem = new HierarchyItem( HierarchyItem::Event, this, (*it).name, - QString::null, QString::null ); + TQString::null, TQString::null ); eventItem->setOpen( true ); - QStringList funcs = MetaDataBase::eventFunctions( editor->widget(), + TQStringList 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 ) { + for ( TQStringList::Iterator fit = funcs.begin(); fit != funcs.end(); ++fit ) { HierarchyItem *item = new HierarchyItem( HierarchyItem::EventFunction, eventItem, - *fit, QString::null, QString::null ); + *fit, TQString::null, TQString::null ); item->setPixmap( 0, PixmapChooser::loadPixmap( "editslots.xpm" ) ); } #if 0 // ### for conversation from old to new @@ -3327,21 +3327,21 @@ void EventList::setup() #endif } } else { - QStrList sigs = editor->widget()->metaObject()->signalNames( true ); + TQStrList sigs = editor->widget()->metaObject()->signalNames( true ); sigs.remove( "destroyed()" ); - QStrListIterator it( sigs ); + TQStrListIterator it( sigs ); while ( it.current() ) { HierarchyItem *eventItem = new HierarchyItem( HierarchyItem::Event, this, - it.current(), QString::null, QString::null ); + it.current(), TQString::null, TQString::null ); eventItem->setOpen( true ); - QValueList conns = + TQValueList conns = MetaDataBase::connections( formWindow, editor->widget(), formWindow->mainContainer() ); - for ( QValueList::Iterator cit = conns.begin(); cit != conns.end(); ++cit ) { - if ( MetaDataBase::normalizeSlot( QString( (*cit).signal ) ) != - MetaDataBase::normalizeSlot( QString( it.current() ) ) ) + for ( TQValueList::Iterator cit = conns.begin(); cit != conns.end(); ++cit ) { + if ( MetaDataBase::normalizeSlot( TQString( (*cit).signal ) ) != + MetaDataBase::normalizeSlot( TQString( it.current() ) ) ) continue; HierarchyItem *item = new HierarchyItem( HierarchyItem::EventFunction, eventItem, - (*cit).slot, QString::null, QString::null ); + (*cit).slot, TQString::null, TQString::null ); item->setPixmap( 0, PixmapChooser::loadPixmap( "editslots.xpm" ) ); } ++it; @@ -3349,66 +3349,66 @@ void EventList::setup() } } -extern QListViewItem *newItem; +extern TQListViewItem *newItem; -void EventList::contentsMouseDoubleClickEvent( QMouseEvent *e ) +void EventList::contentsMouseDoubleClickEvent( TQMouseEvent *e ) { - QListViewItem *i = itemAt( contentsToViewport( e->pos() ) ); + TQListViewItem *i = itemAt( contentsToViewport( e->pos() ) ); if ( !i || i->parent() ) return; - QString s; + TQString s; #ifndef KOMMANDER if ( MetaDataBase::hasEvents( formWindow->project()->language() ) ) { #else if ( MetaDataBase::hasEvents( "C++" ) ) { #endif - QString s1 = i->text( 0 ); + TQString s1 = i->text( 0 ); int pt = s1.find( "(" ); if ( pt != -1 ) s1 = s1.left( pt ); - s = QString( editor->widget()->name() ) + "_" + s1; + s = TQString( editor->widget()->name() ) + "_" + s1; } else { - s = QString( editor->widget()->name() ) + "_" + i->text( 0 ); + s = TQString( editor->widget()->name() ) + "_" + i->text( 0 ); } insertEntry( i, PixmapChooser::loadPixmap( "editslots.xpm" ), s ); } -void EventList::setCurrent( QWidget * ) +void EventList::setCurrent( TQWidget * ) { } -void EventList::objectClicked( QListViewItem *i ) +void EventList::objectClicked( TQListViewItem *i ) { if ( !i || !i->parent() ) return; formWindow->mainWindow()->editFunction( i->text( 0 ) ); } -void EventList::showRMBMenu( QListViewItem *i, const QPoint &pos ) +void EventList::showRMBMenu( TQListViewItem *i, const TQPoint &pos ) { if ( !i ) return; - QPopupMenu menu; + TQPopupMenu 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; + TQString s; #ifndef KOMMANDER if ( MetaDataBase::hasEvents( formWindow->project()->language() ) ) { #else if ( MetaDataBase::hasEvents( "C++" ) ) { #endif - QString s1 = ( i->parent() ? i->parent() : i )->text( 0 ); + TQString 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; + s = TQString( editor->widget()->name() ) + "_" + s1; } else { - s = QString( editor->widget()->name() ) + "_" + ( i->parent() ? i->parent() : i )->text( 0 ); + s = TQString( 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() ) { @@ -3417,7 +3417,7 @@ void EventList::showRMBMenu( QListViewItem *i, const QPoint &pos ) #else if ( MetaDataBase::hasEvents( "C++" ) ) { #endif - QListViewItem *p = i->parent(); + TQListViewItem *p = i->parent(); delete i; save( p ); } else { @@ -3439,13 +3439,13 @@ void EventList::showRMBMenu( QListViewItem *i, const QPoint &pos ) } } -void EventList::renamed( QListViewItem *i ) +void EventList::renamed( TQListViewItem *i ) { if ( newItem == i ) newItem = 0; if ( !i->parent() ) return; - QListViewItem *itm = i->parent()->firstChild(); + TQListViewItem *itm = i->parent()->firstChild(); bool del = false; while ( itm ) { if ( itm != i && itm->text( 0 ) == i->text( 0 ) ) { @@ -3506,10 +3506,10 @@ void EventList::renamed( QListViewItem *i ) } } -void EventList::save( QListViewItem *p ) +void EventList::save( TQListViewItem *p ) { - QStringList lst; - QListViewItem *i = p->firstChild(); + TQStringList lst; + TQListViewItem *i = p->firstChild(); while ( i ) { lst << i->text( 0 ); i = i->nextSibling(); @@ -3535,8 +3535,8 @@ void EventList::save( QListViewItem *p ) listview for editing properties. */ -PropertyEditor::PropertyEditor( QWidget *parent ) - : QTabWidget( parent, 0, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | +PropertyEditor::PropertyEditor( TQWidget *parent ) + : TQTabWidget( parent, 0, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_StaysOnTop | WStyle_Tool |WStyle_MinMax | WStyle_SysMenu ) { setCaption( i18n("Property Editor" ) ); @@ -3551,20 +3551,20 @@ PropertyEditor::PropertyEditor( QWidget *parent ) #endif } -QObject *PropertyEditor::widget() const +TQObject *PropertyEditor::widget() const { return wid; } -void PropertyEditor::setWidget( QObject *w, FormWindow *fw ) +void PropertyEditor::setWidget( TQObject *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 ); + if ( wid->isWidgetType() && WidgetFactory::layoutType( (TQWidget*)wid ) != WidgetFactory::NoLayout ) { + TQListViewItemIterator it( listview ); ret = false; while ( it.current() ) { if ( it.current()->text( 0 ) == "layoutSpacing" || it.current()->text( 0 ) == "layoutMargin" ) { @@ -3643,7 +3643,7 @@ void PropertyEditor::closed( FormWindow *w ) } } -void PropertyEditor::closeEvent( QCloseEvent *e ) +void PropertyEditor::closeEvent( TQCloseEvent *e ) { emit hidden(); e->accept(); @@ -3659,32 +3659,32 @@ FormWindow *PropertyEditor::formWindow() const return formwindow; } -QString PropertyEditor::currentProperty() const +TQString PropertyEditor::currentProperty() const { if ( !wid ) - return QString::null; + return TQString::null; if ( ( (PropertyItem*)listview->currentItem() )->propertyParent() ) return ( (PropertyItem*)listview->currentItem() )->propertyParent()->name(); return ( (PropertyItem*)listview->currentItem() )->name(); } -QString PropertyEditor::classOfCurrentProperty() const +TQString PropertyEditor::classOfCurrentProperty() const { if ( !wid ) - return QString::null; - QObject *o = wid; - QString curr = currentProperty(); - QMetaObject *mo = o->metaObject(); + return TQString::null; + TQObject *o = wid; + TQString curr = currentProperty(); + TQMetaObject *mo = o->metaObject(); while ( mo ) { - QStrList props = mo->propertyNames( false ); + TQStrList props = mo->propertyNames( false ); if ( props.find( curr.latin1() ) != -1 ) return mo->className(); mo = mo->superClass(); } - return QString::null; + return TQString::null; } -QMetaObject* PropertyEditor::metaObjectOfCurrentProperty() const +TQMetaObject* PropertyEditor::metaObjectOfCurrentProperty() const { if ( !wid ) return 0; diff --git a/kommander/editor/propertyeditor.h b/kommander/editor/propertyeditor.h index 57911b7b..f34b7337 100644 --- a/kommander/editor/propertyeditor.h +++ b/kommander/editor/propertyeditor.h @@ -21,13 +21,13 @@ #ifndef PROPERTYEDITOR_H #define PROPERTYEDITOR_H -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include "hierarchyview.h" class PropertyList; @@ -51,13 +51,13 @@ class QDateTimeEdit; class PropertyItem : public QListViewItem { public: - PropertyItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const QString &propName ); + PropertyItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const TQString &propName ); ~PropertyItem(); - void paintCell( QPainter *p, const QColorGroup &cg, int column, int width, int align ); - void paintBranches( QPainter * p, const QColorGroup & cg, + void paintCell( TQPainter *p, const TQColorGroup &cg, int column, int width, int align ); + void paintBranches( TQPainter * p, const TQColorGroup & cg, int w, int y, int h ); - void paintFocus( QPainter *p, const QColorGroup &cg, const QRect &r ); + void paintFocus( TQPainter *p, const TQColorGroup &cg, const TQRect &r ); virtual bool hasSubItems() const; virtual void createChildren(); @@ -69,15 +69,15 @@ public: virtual void showEditor(); virtual void hideEditor(); - virtual void setValue( const QVariant &v ); - QVariant value() const; - QString name() const; + virtual void setValue( const TQVariant &v ); + TQVariant value() const; + TQString name() const; virtual void notifyValueChange(); virtual void setChanged( bool b, bool updateDb = TRUE ); bool isChanged() const; - virtual void placeEditor( QWidget *w ); + virtual void placeEditor( TQWidget *w ); virtual PropertyItem *propertyParent() const; virtual void childValueChanged( PropertyItem *child ); @@ -87,51 +87,51 @@ public: PropertyItem *child( int i ) const; virtual bool hasCustomContents() const; - virtual void drawCustomContents( QPainter *p, const QRect &r ); + virtual void drawCustomContents( TQPainter *p, const TQRect &r ); void updateBackColor(); - void setup() { QListViewItem::setup(); setHeight( QListViewItem::height() + 2 ); } + void setup() { TQListViewItem::setup(); setHeight( TQListViewItem::height() + 2 ); } - virtual QString currentItem() const; + virtual TQString currentItem() const; virtual int currentIntItem() const; - virtual void setCurrentItem( const QString &s ); + virtual void setCurrentItem( const TQString &s ); virtual void setCurrentItem( int i ); virtual int currentIntItemFromObject() const; - virtual QString currentItemFromObject() const; + virtual TQString currentItemFromObject() const; - void setFocus( QWidget *w ); + void setFocus( TQWidget *w ); virtual void toggle(); - void setText( int col, const QString &txt ); + void setText( int col, const TQString &txt ); protected: PropertyList *listview; - QVariant val; + TQVariant val; private: - QColor backgroundColor(); + TQColor backgroundColor(); void createResetButton(); void updateResetButtonState(); private: bool open, changed; PropertyItem *property; - QString propertyName; - QPtrList children; - QColor backColor; - QPushButton *resetButton; + TQString propertyName; + TQPtrList children; + TQColor backColor; + TQPushButton *resetButton; }; -class PropertyTextItem : public QObject, +class PropertyTextItem : public TQObject, 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 ); + const TQString &propName, bool comment, bool multiLine, bool ascii = FALSE, bool a = FALSE ); ~PropertyTextItem(); virtual void createChildren(); @@ -140,7 +140,7 @@ public: virtual void showEditor(); virtual void hideEditor(); - virtual void setValue( const QVariant &v ); + virtual void setValue( const TQVariant &v ); virtual bool hasSubItems() const; virtual void childValueChanged( PropertyItem *child ); @@ -151,129 +151,129 @@ private slots: void getText(); private: - QLineEdit *lined(); - QGuardedPtr lin; - QGuardedPtr box; - QPushButton *button; + TQLineEdit *lined(); + TQGuardedPtr lin; + TQGuardedPtr box; + TQPushButton *button; bool withComment, hasMultiLines, asciiOnly, accel; }; -class PropertyBoolItem : public QObject, +class PropertyBoolItem : public TQObject, public PropertyItem { Q_OBJECT public: - PropertyBoolItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const QString &propName ); + PropertyBoolItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const TQString &propName ); ~PropertyBoolItem(); virtual void showEditor(); virtual void hideEditor(); - virtual void setValue( const QVariant &v ); + virtual void setValue( const TQVariant &v ); virtual void toggle(); private slots: void setValue(); private: - QComboBox *combo(); - QGuardedPtr comb; + TQComboBox *combo(); + TQGuardedPtr comb; }; -class PropertyIntItem : public QObject, +class PropertyIntItem : public TQObject, public PropertyItem { Q_OBJECT public: PropertyIntItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, - const QString &propName, bool s ); + const TQString &propName, bool s ); ~PropertyIntItem(); virtual void showEditor(); virtual void hideEditor(); - virtual void setValue( const QVariant &v ); + virtual void setValue( const TQVariant &v ); private slots: void setValue(); private: - QSpinBox *spinBox(); - QGuardedPtr spinBx; + TQSpinBox *spinBox(); + TQGuardedPtr spinBx; bool signedValue; }; -class PropertyDoubleItem : public QObject, +class PropertyDoubleItem : public TQObject, public PropertyItem { Q_OBJECT public: PropertyDoubleItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, - const QString &propName ); + const TQString &propName ); ~PropertyDoubleItem(); virtual void showEditor(); virtual void hideEditor(); - virtual void setValue( const QVariant &v ); + virtual void setValue( const TQVariant &v ); private slots: void setValue(); private: - QLineEdit *lined(); - QGuardedPtr lin; + TQLineEdit *lined(); + TQGuardedPtr lin; }; -class PropertyListItem : public QObject, +class PropertyListItem : public TQObject, public PropertyItem { Q_OBJECT public: PropertyListItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, - const QString &propName, bool editable ); + const TQString &propName, bool editable ); ~PropertyListItem(); virtual void showEditor(); virtual void hideEditor(); - virtual void setValue( const QVariant &v ); + virtual void setValue( const TQVariant &v ); - QString currentItem() const; + TQString currentItem() const; int currentIntItem() const; - void setCurrentItem( const QString &s ); + void setCurrentItem( const TQString &s ); void setCurrentItem( int i ); int currentIntItemFromObject() const; - QString currentItemFromObject() const; - void addItem( const QString &s ); + TQString currentItemFromObject() const; + void addItem( const TQString &s ); private slots: void setValue(); private: - QComboBox *combo(); - QGuardedPtr comb; + TQComboBox *combo(); + TQGuardedPtr comb; int oldInt; bool editable; - QString oldString; + TQString oldString; }; -class PropertyFontItem : public QObject, +class PropertyFontItem : public TQObject, public PropertyItem { Q_OBJECT public: - PropertyFontItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const QString &propName ); + PropertyFontItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const TQString &propName ); ~PropertyFontItem(); virtual void createChildren(); @@ -282,7 +282,7 @@ public: virtual void showEditor(); virtual void hideEditor(); - virtual void setValue( const QVariant &v ); + virtual void setValue( const TQVariant &v ); virtual bool hasSubItems() const; virtual void childValueChanged( PropertyItem *child ); @@ -290,13 +290,13 @@ private slots: void getFont(); private: - QGuardedPtr lined; - QGuardedPtr button; - QGuardedPtr box; + TQGuardedPtr lined; + TQGuardedPtr button; + TQGuardedPtr box; }; -class PropertyCoordItem : public QObject, +class PropertyCoordItem : public TQObject, public PropertyItem { Q_OBJECT @@ -305,7 +305,7 @@ public: enum Type { Rect, Size, Point }; PropertyCoordItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, - const QString &propName, Type t ); + const TQString &propName, Type t ); ~PropertyCoordItem(); virtual void createChildren(); @@ -314,25 +314,25 @@ public: virtual void showEditor(); virtual void hideEditor(); - virtual void setValue( const QVariant &v ); + virtual void setValue( const TQVariant &v ); virtual bool hasSubItems() const; virtual void childValueChanged( PropertyItem *child ); private: - QLineEdit *lined(); - QGuardedPtr lin; + TQLineEdit *lined(); + TQGuardedPtr lin; Type typ; }; -class PropertyColorItem : public QObject, +class PropertyColorItem : public TQObject, public PropertyItem { Q_OBJECT public: PropertyColorItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, - const QString &propName, bool children ); + const TQString &propName, bool children ); ~PropertyColorItem(); virtual void createChildren(); @@ -341,62 +341,62 @@ public: virtual void showEditor(); virtual void hideEditor(); - virtual void setValue( const QVariant &v ); + virtual void setValue( const TQVariant &v ); virtual bool hasSubItems() const; virtual void childValueChanged( PropertyItem *child ); virtual bool hasCustomContents() const; - virtual void drawCustomContents( QPainter *p, const QRect &r ); + virtual void drawCustomContents( TQPainter *p, const TQRect &r ); private slots: void getColor(); private: - QGuardedPtr box; - QGuardedPtr colorPrev; - QGuardedPtr button; + TQGuardedPtr box; + TQGuardedPtr colorPrev; + TQGuardedPtr button; bool withChildren; }; -class PropertyPixmapItem : public QObject, +class PropertyPixmapItem : public TQObject, public PropertyItem { Q_OBJECT public: PropertyPixmapItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, - const QString &propName, bool isIconSet = FALSE ); + const TQString &propName, bool isIconSet = FALSE ); ~PropertyPixmapItem(); virtual void showEditor(); virtual void hideEditor(); - virtual void setValue( const QVariant &v ); + virtual void setValue( const TQVariant &v ); virtual bool hasCustomContents() const; - virtual void drawCustomContents( QPainter *p, const QRect &r ); + virtual void drawCustomContents( TQPainter *p, const TQRect &r ); private slots: void getPixmap(); private: - QGuardedPtr box; - QGuardedPtr pixPrev; - QPushButton *button; + TQGuardedPtr box; + TQGuardedPtr pixPrev; + TQPushButton *button; bool iconSet; }; -class PropertySizePolicyItem : public QObject, +class PropertySizePolicyItem : public TQObject, public PropertyItem { Q_OBJECT public: PropertySizePolicyItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, - const QString &propName ); + const TQString &propName ); ~PropertySizePolicyItem(); virtual void createChildren(); @@ -405,76 +405,76 @@ public: virtual void showEditor(); virtual void hideEditor(); - virtual void setValue( const QVariant &v ); + virtual void setValue( const TQVariant &v ); virtual bool hasSubItems() const; virtual void childValueChanged( PropertyItem *child ); private: - QLineEdit *lined(); - QGuardedPtr lin; + TQLineEdit *lined(); + TQGuardedPtr lin; }; -class PropertyPaletteItem : public QObject, +class PropertyPaletteItem : public TQObject, public PropertyItem { Q_OBJECT public: PropertyPaletteItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, - const QString &propName ); + const TQString &propName ); ~PropertyPaletteItem(); virtual void showEditor(); virtual void hideEditor(); - virtual void setValue( const QVariant &v ); + virtual void setValue( const TQVariant &v ); virtual bool hasCustomContents() const; - virtual void drawCustomContents( QPainter *p, const QRect &r ); + virtual void drawCustomContents( TQPainter *p, const TQRect &r ); private slots: void getPalette(); private: - QGuardedPtr box; - QGuardedPtr palettePrev; - QGuardedPtr button; + TQGuardedPtr box; + TQGuardedPtr palettePrev; + TQGuardedPtr button; }; -class PropertyCursorItem : public QObject, +class PropertyCursorItem : public TQObject, public PropertyItem { Q_OBJECT public: PropertyCursorItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, - const QString &propName ); + const TQString &propName ); ~PropertyCursorItem(); virtual void showEditor(); virtual void hideEditor(); - virtual void setValue( const QVariant &v ); + virtual void setValue( const TQVariant &v ); private slots: void setValue(); private: - QComboBox *combo(); - QGuardedPtr comb; + TQComboBox *combo(); + TQGuardedPtr comb; }; -class PropertyDatabaseItem : public QObject, +class PropertyDatabaseItem : public TQObject, public PropertyItem { Q_OBJECT public: - PropertyDatabaseItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const QString &propName, bool wField ); + PropertyDatabaseItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const TQString &propName, bool wField ); ~PropertyDatabaseItem(); virtual void createChildren(); @@ -483,14 +483,14 @@ public: virtual void showEditor(); virtual void hideEditor(); - virtual void setValue( const QVariant &v ); + virtual void setValue( const TQVariant &v ); virtual bool hasSubItems() const; virtual void childValueChanged( PropertyItem *child ); private: - QGuardedPtr lined; - QGuardedPtr button; - QGuardedPtr box; + TQGuardedPtr lined; + TQGuardedPtr button; + TQGuardedPtr box; bool withField; }; @@ -504,14 +504,14 @@ public: virtual void setupProperties(); - virtual void setCurrentItem( QListViewItem *i ); + virtual void setCurrentItem( TQListViewItem *i ); virtual void valueChanged( PropertyItem *i ); virtual void refetchData(); virtual void setPropertyValue( PropertyItem *i ); - virtual void setCurrentProperty( const QString &n ); + virtual void setCurrentProperty( const TQString &n ); PropertyEditor *propertyEditor() const; - QString whatsThisAt( const QPoint &p ); + TQString whatsThisAt( const TQPoint &p ); void showCurrentWhatsThis(); public slots: @@ -520,32 +520,32 @@ public slots: void toggleSort(); private slots: - void itemPressed( QListViewItem *i, const QPoint &p, int c ); - void toggleOpen( QListViewItem *i ); - bool eventFilter( QObject *o, QEvent *e ); + void itemPressed( TQListViewItem *i, const TQPoint &p, int c ); + void toggleOpen( TQListViewItem *i ); + bool eventFilter( TQObject *o, TQEvent *e ); protected: - void resizeEvent( QResizeEvent *e ); - void paintEmptyArea( QPainter *p, const QRect &r ); - bool addPropertyItem( PropertyItem *&item, const QCString &name, QVariant::Type t ); + void resizeEvent( TQResizeEvent *e ); + void paintEmptyArea( TQPainter *p, const TQRect &r ); + bool addPropertyItem( PropertyItem *&item, const TQCString &name, TQVariant::Type t ); - void viewportDragEnterEvent( QDragEnterEvent * ); - void viewportDragMoveEvent ( QDragMoveEvent * ); - void viewportDropEvent ( QDropEvent * ); + void viewportDragEnterEvent( TQDragEnterEvent * ); + void viewportDragMoveEvent ( TQDragMoveEvent * ); + void viewportDropEvent ( TQDropEvent * ); protected: PropertyEditor *editor; private: void readPropertyDocs(); - QString whatsThisText( QListViewItem *i ); + TQString whatsThisText( TQListViewItem *i ); private: PropertyListItem* pressItem; - QPoint pressPos; + TQPoint pressPos; bool mousePressed; bool showSorted; - QMap propertyDocs; + TQMap propertyDocs; PropertyWhatsThis *whatsThis; }; @@ -555,9 +555,9 @@ class PropertyEditor : public QTabWidget Q_OBJECT public: - PropertyEditor( QWidget *parent ); + PropertyEditor( TQWidget *parent ); - QObject *widget() const; + TQObject *widget() const; void clear(); void setup(); @@ -573,9 +573,9 @@ public: // EventList *eventList() const; #endif - QString currentProperty() const; - QString classOfCurrentProperty() const; - QMetaObject* metaObjectOfCurrentProperty() const; + TQString currentProperty() const; + TQString classOfCurrentProperty() const; + TQMetaObject* metaObjectOfCurrentProperty() const; void resetFocus(); @@ -583,13 +583,13 @@ signals: void hidden(); public slots: - void setWidget( QObject *w, FormWindow *fw ); + void setWidget( TQObject *w, FormWindow *fw ); protected: - void closeEvent( QCloseEvent *e ); + void closeEvent( TQCloseEvent *e ); private: - QObject *wid; + TQObject *wid; PropertyList *listview; #ifndef KOMMANDER EventList *eList; @@ -598,72 +598,72 @@ private: }; -class PropertyDateItem : public QObject, +class PropertyDateItem : public TQObject, public PropertyItem { Q_OBJECT public: - PropertyDateItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const QString &propName ); + PropertyDateItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const TQString &propName ); ~PropertyDateItem(); virtual void showEditor(); virtual void hideEditor(); - virtual void setValue( const QVariant &v ); + virtual void setValue( const TQVariant &v ); private slots: void setValue(); private: QDateEdit *lined(); - QGuardedPtr lin; + TQGuardedPtr lin; }; -class PropertyTimeItem : public QObject, +class PropertyTimeItem : public TQObject, public PropertyItem { Q_OBJECT public: - PropertyTimeItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const QString &propName ); + PropertyTimeItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const TQString &propName ); ~PropertyTimeItem(); virtual void showEditor(); virtual void hideEditor(); - virtual void setValue( const QVariant &v ); + virtual void setValue( const TQVariant &v ); private slots: void setValue(); private: QTimeEdit *lined(); - QGuardedPtr lin; + TQGuardedPtr lin; }; -class PropertyDateTimeItem : public QObject, +class PropertyDateTimeItem : public TQObject, public PropertyItem { Q_OBJECT public: - PropertyDateTimeItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const QString &propName ); + PropertyDateTimeItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const TQString &propName ); ~PropertyDateTimeItem(); virtual void showEditor(); virtual void hideEditor(); - virtual void setValue( const QVariant &v ); + virtual void setValue( const TQVariant &v ); private slots: void setValue(); private: QDateTimeEdit *lined(); - QGuardedPtr lin; + TQGuardedPtr lin; }; diff --git a/kommander/editor/qcompletionedit.cpp b/kommander/editor/qcompletionedit.cpp index bd4b876a..4ba5e366 100644 --- a/kommander/editor/qcompletionedit.cpp +++ b/kommander/editor/qcompletionedit.cpp @@ -1,26 +1,26 @@ #include "qcompletionedit.h" -#include -#include -#include -#include +#include +#include +#include +#include -QCompletionEdit::QCompletionEdit( QWidget *parent, const char *name ) - : QLineEdit( parent, name ), aAdd( false ), caseSensitive( false ) +QCompletionEdit::QCompletionEdit( TQWidget *parent, const char *name ) + : TQLineEdit( parent, name ), aAdd( false ), caseSensitive( false ) { - popup = new QVBox( 0, 0, WType_Popup ); - popup->setFrameStyle( QFrame::Box | QFrame::Plain ); + popup = new TQVBox( 0, 0, WType_Popup ); + popup->setFrameStyle( TQFrame::Box | TQFrame::Plain ); popup->setLineWidth( 1 ); popup->hide(); - listbox = new QListBox( popup ); - listbox->setFrameStyle( QFrame::NoFrame ); + listbox = new TQListBox( popup ); + listbox->setFrameStyle( TQFrame::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 & ) ) ); + listbox->setHScrollBarMode( TQScrollView::AlwaysOn ); + listbox->setVScrollBarMode( TQScrollView::AlwaysOn ); + listbox->setCornerWidget( new TQSizeGrip( listbox, "completion sizegrip" ) ); + connect( this, TQT_SIGNAL( textChanged( const TQString & ) ), + this, TQT_SLOT( textDidChange( const TQString & ) ) ); popup->setFocusProxy( listbox ); installEventFilter( this ); } @@ -30,12 +30,12 @@ bool QCompletionEdit::autoAdd() const return aAdd; } -QStringList QCompletionEdit::completionList() const +TQStringList QCompletionEdit::completionList() const { return compList; } -void QCompletionEdit::setCompletionList( const QStringList &l ) +void QCompletionEdit::setCompletionList( const TQStringList &l ) { compList = l; } @@ -45,7 +45,7 @@ void QCompletionEdit::setAutoAdd( bool add ) aAdd = add; } -void QCompletionEdit::textDidChange( const QString &text ) +void QCompletionEdit::textDidChange( const TQString &text ) { if ( text.isEmpty() ) { popup->close(); @@ -65,8 +65,8 @@ void QCompletionEdit::placeListBox() 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() ) + TQPoint p( mapToGlobal( TQPoint( 0, 0 ) ) ); + if ( p.y() + height() + popup->height() <= TQApplication::desktop()->height() ) popup->move( p.x(), p.y() + height() ); else popup->move( p.x(), p.y() - listbox->height() ); @@ -81,18 +81,18 @@ void QCompletionEdit::updateListBox() listbox->clear(); if ( compList.isEmpty() ) return; - for ( QStringList::Iterator it = compList.begin(); it != compList.end(); ++it ) { + for ( TQStringList::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 ) +bool QCompletionEdit::eventFilter( TQObject *o, TQEvent *e ) { if ( o == popup || o == listbox || o == listbox->viewport() ) { - if ( e->type() == QEvent::KeyPress ) { - QKeyEvent *ke = (QKeyEvent*)e; + if ( e->type() == TQEvent::KeyPress ) { + TQKeyEvent *ke = (TQKeyEvent*)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 ) { @@ -121,10 +121,10 @@ bool QCompletionEdit::eventFilter( QObject *o, QEvent *e ) popup->close(); setFocus(); } - QApplication::sendEvent( this, e ); + TQApplication::sendEvent( this, e ); return true; } - } else if ( e->type() == QEvent::MouseButtonDblClick ) { + } else if ( e->type() == TQEvent::MouseButtonDblClick ) { popup->close(); setFocus(); blockSignals( true ); @@ -134,8 +134,8 @@ bool QCompletionEdit::eventFilter( QObject *o, QEvent *e ) return true; } } else if ( o == this ) { - if ( e->type() == QEvent::KeyPress ) { - QKeyEvent *ke = (QKeyEvent*)e; + if ( e->type() == TQEvent::KeyPress ) { + TQKeyEvent *ke = (TQKeyEvent*)e; if ( ke->key() == Key_Up || ke->key() == Key_Down || ke->key() == Key_Prior || @@ -144,15 +144,15 @@ bool QCompletionEdit::eventFilter( QObject *o, QEvent *e ) ke->key() == Key_Enter || ke->key() == Key_Tab || ke->key() == Key_Escape ) { - QApplication::sendEvent( listbox, e ); + TQApplication::sendEvent( listbox, e ); return true; } } } - return QLineEdit::eventFilter( o, e ); + return TQLineEdit::eventFilter( o, e ); } -void QCompletionEdit::addCompletionEntry( const QString &entry ) +void QCompletionEdit::addCompletionEntry( const TQString &entry ) { if ( compList.find( entry ) == compList.end() ) { compList << entry; @@ -160,9 +160,9 @@ void QCompletionEdit::addCompletionEntry( const QString &entry ) } } -void QCompletionEdit::removeCompletionEntry( const QString &entry ) +void QCompletionEdit::removeCompletionEntry( const TQString &entry ) { - QStringList::Iterator it = compList.find( entry ); + TQStringList::Iterator it = compList.find( entry ); if ( it != compList.end() ) compList.remove( it ); } @@ -179,7 +179,7 @@ bool QCompletionEdit::isCaseSensitive() const void QCompletionEdit::clear() { - QLineEdit::clear(); + TQLineEdit::clear(); compList.clear(); } #include "qcompletionedit.moc" diff --git a/kommander/editor/qcompletionedit.h b/kommander/editor/qcompletionedit.h index fa7e8b23..39518c58 100644 --- a/kommander/editor/qcompletionedit.h +++ b/kommander/editor/qcompletionedit.h @@ -1,8 +1,8 @@ #ifndef QCOMPLETIONEDIT_H #define QCOMPLETIONEDIT_H -#include -#include +#include +#include class QListBox; class QVBox; @@ -14,26 +14,26 @@ class QCompletionEdit : public QLineEdit Q_PROPERTY( bool caseSensitive READ isCaseSensitive WRITE setCaseSensitive ) public: - QCompletionEdit( QWidget *parent = 0, const char *name = 0 ); + QCompletionEdit( TQWidget *parent = 0, const char *name = 0 ); bool autoAdd() const; - QStringList completionList() const; - bool eventFilter( QObject *o, QEvent *e ); + TQStringList completionList() const; + bool eventFilter( TQObject *o, TQEvent *e ); bool isCaseSensitive() const; public slots: - void setCompletionList( const QStringList &l ); + void setCompletionList( const TQStringList &l ); void setAutoAdd( bool add ); void clear(); - void addCompletionEntry( const QString &entry ); - void removeCompletionEntry( const QString &entry ); + void addCompletionEntry( const TQString &entry ); + void removeCompletionEntry( const TQString &entry ); void setCaseSensitive( bool b ); signals: - void chosen( const QString &text ); + void chosen( const TQString &text ); private slots: - void textDidChange( const QString &text ); + void textDidChange( const TQString &text ); private: void placeListBox(); @@ -41,9 +41,9 @@ private: private: bool aAdd; - QStringList compList; - QListBox *listbox; - QVBox *popup; + TQStringList compList; + TQListBox *listbox; + TQVBox *popup; bool caseSensitive; }; diff --git a/kommander/editor/resource.cpp b/kommander/editor/resource.cpp index 99fab90a..b725b7bc 100644 --- a/kommander/editor/resource.cpp +++ b/kommander/editor/resource.cpp @@ -18,13 +18,13 @@ ** **********************************************************************/ -#include +#include #include "resource.h" #include "defs.h" #include "metadatabase.h" #include "formwindow.h" #include "mainwindow.h" -#include "qdom.h" +#include "tqdom.h" #include "widgetdatabase.h" #include "widgetfactory.h" #include "layout.h" @@ -41,60 +41,60 @@ #endif #include "formfile.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include -#include +#include #ifndef QT_NO_TABLE -#include +#include #endif #include -static QString makeIndent( int indent ) +static TQString makeIndent( int indent ) { - QString s; + TQString s; s.fill( ' ', indent * 4 ); return s; } -static QString entitize( const QString &s, bool attribute = false ) +static TQString entitize( const TQString &s, bool attribute = false ) { - QString s2 = s; - s2 = s2.replace( QRegExp( "&" ), "&" ); - s2 = s2.replace( QRegExp( ">" ), ">" ); - s2 = s2.replace( QRegExp( "<" ), "<" ); + TQString s2 = s; + s2 = s2.replace( TQRegExp( "&" ), "&" ); + s2 = s2.replace( TQRegExp( ">" ), ">" ); + s2 = s2.replace( TQRegExp( "<" ), "<" ); if ( attribute ) { - s2 = s2.replace( QRegExp( "\"" ), """ ); - s2 = s2.replace( QRegExp( "'" ), "'" ); + s2 = s2.replace( TQRegExp( "\"" ), """ ); + s2 = s2.replace( TQRegExp( "'" ), "'" ); } return s2; } -static QString mkBool( bool b ) +static TQString mkBool( bool b ) { return b? "true" : "false"; } @@ -151,7 +151,7 @@ void Resource::setWidget( FormWindow *w ) toplevel = w; } -QWidget *Resource::widget() const +TQWidget *Resource::widget() const { return toplevel; } @@ -163,7 +163,7 @@ bool Resource::load( FormFile *ff ) currFileName = ff->absFileName(); mainContainerSet = false; - QFile f( ff->absFileName() ); + TQFile f( ff->absFileName() ); f.open( IO_ReadOnly ); bool b = load( ff, &f ); @@ -172,19 +172,19 @@ bool Resource::load( FormFile *ff ) return b; } -bool Resource::load( FormFile *ff, QIODevice* dev ) +bool Resource::load( FormFile *ff, TQIODevice* dev ) { - QDomDocument doc; - QString errMsg; + TQDomDocument doc; + TQString errMsg; int errLine; - QTextStream stream(dev); - QString content = stream.read(); + TQTextStream stream(dev); + TQString 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 ); + // qDebug( TQString("Parse error: ") + errMsg + TQString(" in line %d"), errLine ); return false; } @@ -205,63 +205,63 @@ bool Resource::load( FormFile *ff, QIODevice* dev ) } #endif - QDomElement e = doc.firstChild().toElement().firstChild().toElement(); + TQDomElement e = doc.firstChild().toElement().firstChild().toElement(); - QDomElement forwards = e; + TQDomElement forwards = e; while ( forwards.tagName() != "forwards" && !forwards.isNull() ) forwards = forwards.nextSibling().toElement(); - QDomElement includes = e; + TQDomElement includes = e; while ( includes.tagName() != "includes" && !includes.isNull() ) includes = includes.nextSibling().toElement(); - QDomElement variables = e; + TQDomElement variables = e; while ( variables.tagName() != "variables" && !variables.isNull() ) variables = variables.nextSibling().toElement(); - QDomElement eltSignals = e; + TQDomElement eltSignals = e; while ( eltSignals.tagName() != "signals" && !eltSignals.isNull() ) eltSignals = eltSignals.nextSibling().toElement(); - QDomElement eltSlots = e; + TQDomElement eltSlots = e; while ( eltSlots.tagName() != "slots" && !eltSlots.isNull() ) eltSlots = eltSlots.nextSibling().toElement(); - QDomElement connections = e; + TQDomElement connections = e; while ( connections.tagName() != "connections" && !connections.isNull() ) connections = connections.nextSibling().toElement(); - QDomElement imageCollection = e; + TQDomElement imageCollection = e; images.clear(); while ( imageCollection.tagName() != "images" && !imageCollection.isNull() ) imageCollection = imageCollection.nextSibling().toElement(); - QDomElement customWidgets = e; + TQDomElement customWidgets = e; while ( customWidgets.tagName() != "customwidgets" && !customWidgets.isNull() ) customWidgets = customWidgets.nextSibling().toElement(); - QDomElement tabOrder = e; + TQDomElement tabOrder = e; while ( tabOrder.tagName() != "tabstops" && !tabOrder.isNull() ) tabOrder = tabOrder.nextSibling().toElement(); - QDomElement actions = e; + TQDomElement actions = e; while ( actions.tagName() != "actions" && !actions.isNull() ) actions = actions.nextSibling().toElement(); - QDomElement toolbars = e; + TQDomElement toolbars = e; while ( toolbars.tagName() != "toolbars" && !toolbars.isNull() ) toolbars = toolbars.nextSibling().toElement(); - QDomElement menubar = e; + TQDomElement menubar = e; while ( menubar.tagName() != "menubar" && !menubar.isNull() ) menubar = menubar.nextSibling().toElement(); - QDomElement functions = e; + TQDomElement functions = e; while ( functions.tagName() != "functions" && !functions.isNull() ) functions = functions.nextSibling().toElement(); - QDomElement widget; + TQDomElement widget; while ( !e.isNull() ) { if ( e.tagName() == "widget" ) { widget = e; @@ -291,8 +291,8 @@ bool Resource::load( FormFile *ff, QIODevice* dev ) } 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() ); + formwindow->setLayoutDefaultSpacing( e.attribute( "spacing", TQString::number( formwindow->layoutDefaultSpacing() ) ).toInt() ); + formwindow->setLayoutDefaultMargin( e.attribute( "margin", TQString::number( formwindow->layoutDefaultMargin() ) ).toInt() ); } e = e.nextSibling().toElement(); @@ -305,7 +305,7 @@ bool Resource::load( FormFile *ff, QIODevice* dev ) #if defined (QT_NON_COMMERCIAL) bool previewMode = MainWindow::self->isPreviewing(); - QWidget *w = (QWidget*)createObject( widget, !previewMode ? (QWidget*)formwindow : MainWindow::self); + TQWidget *w = (TQWidget*)createObject( widget, !previewMode ? (TQWidget*)formwindow : MainWindow::self); if ( !w ) return false; if ( previewMode ) @@ -316,13 +316,13 @@ bool Resource::load( FormFile *ff, QIODevice* dev ) #endif if ( !forwards.isNull() ) { - for ( QDomElement n = forwards.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) + for ( TQDomElement 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() ) + for ( TQDomElement n = includes.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) if ( n.tagName() == "include" ) { if ( n.tagName() == "include" ) { MetaDataBase::Include inc; @@ -340,17 +340,17 @@ bool Resource::load( FormFile *ff, QIODevice* dev ) } if ( !variables.isNull() ) { - for ( QDomElement n = variables.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) + for ( TQDomElement 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() ) + for ( TQDomElement 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() ) + for ( TQDomElement n = eltSlots.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) if ( n.tagName() == "slot" ) { MetaDataBase::Slot slot; slot.specifier = n.attribute( "specifier", "virtual" ); @@ -413,13 +413,13 @@ bool Resource::load( FormFile *ff, QIODevice* dev ) return true; } -bool Resource::save( const QString& filename, bool formCodeOnly ) +bool Resource::save( const TQString& filename, bool formCodeOnly ) { if ( !formwindow || filename.isEmpty() ) return false; currFileName = filename; - QFile f( filename ); + TQFile f( filename ); if ( !f.open( IO_WriteOnly | IO_Translate ) ) return false; bool b = save( &f ); @@ -427,26 +427,26 @@ bool Resource::save( const QString& filename, bool formCodeOnly ) return b; } -bool Resource::save( QIODevice* dev ) +bool Resource::save( TQIODevice* dev ) { if ( !formwindow ) return false; - QTextStream ts( dev ); - ts.setCodec( QTextCodec::codecForName( "UTF-8" ) ); + TQTextStream ts( dev ); + ts.setCodec( TQTextCodec::codecForName( "UTF-8" ) ); if ( formwindow->mainContainer()->property("useShebang").toBool() ) ts << formwindow->mainContainer()->property("shebang").toString() << endl; ts << "" << 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 ( formwindow->mainContainer()->inherits( "TQMainWindow" ) ) { + saveMenuBar( (TQMainWindow*)formwindow->mainContainer(), ts, 0 ); + saveToolBars( (TQMainWindow*)formwindow->mainContainer(), ts, 0 ); } if ( !MetaDataBase::customWidgets()->isEmpty() && !usedCustomWidgets.isEmpty() ) saveCustomWidgets( ts, 0 ); - if ( formwindow->mainContainer()->inherits( "QMainWindow" ) ) + if ( formwindow->mainContainer()->inherits( "TQMainWindow" ) ) saveActions( formwindow->actionList(), ts, 0 ); if ( !images.isEmpty() ) saveImageCollection( ts, 0 ); @@ -460,20 +460,20 @@ bool Resource::save( QIODevice* dev ) return true; } -QString Resource::copy() +TQString Resource::copy() { if ( !formwindow ) - return QString::null; + return TQString::null; copying = true; - QString s; - QTextOStream ts( &s ); + TQString s; + TQTextOStream ts( &s ); ts << "" << endl; - QWidgetList widgets = formwindow->selectedWidgets(); - QWidgetList tmp( widgets ); - for ( QWidget *w = widgets.first(); w; w = widgets.next() ) { - QWidget *p = w->parentWidget(); + TQWidgetList widgets = formwindow->selectedWidgets(); + TQWidgetList tmp( widgets ); + for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) { + TQWidget *p = w->parentWidget(); bool save = true; while ( p ) { if ( tmp.findRef( p ) != -1 ) { @@ -495,30 +495,30 @@ QString Resource::copy() } -void Resource::paste( const QString &cb, QWidget *parent ) +void Resource::paste( const TQString &cb, TQWidget *parent ) { if ( !formwindow ) return; mainContainerSet = true; pasting = true; - QBuffer buf( QCString( cb.utf8() ) ); + TQBuffer buf( TQCString( cb.utf8() ) ); buf.open( IO_ReadOnly ); - QDomDocument doc; - QString errMsg; + TQDomDocument doc; + TQString errMsg; int errLine; if ( !doc.setContent( &buf, &errMsg, &errLine ) ) { - // qDebug( QString("Parse error: ") + errMsg + QString(" in line %d"), errLine ); + // qDebug( TQString("Parse error: ") + errMsg + TQString(" in line %d"), errLine ); } - QDomElement firstWidget = doc.firstChild().toElement().firstChild().toElement(); + TQDomElement firstWidget = doc.firstChild().toElement().firstChild().toElement(); - QDomElement imageCollection = firstWidget; + TQDomElement imageCollection = firstWidget; images.clear(); while ( imageCollection.tagName() != "images" && !imageCollection.isNull() ) imageCollection = imageCollection.nextSibling().toElement(); - QDomElement customWidgets = firstWidget; + TQDomElement customWidgets = firstWidget; while ( customWidgets.tagName() != "customwidgets" && !customWidgets.isNull() ) customWidgets = customWidgets.nextSibling().toElement(); @@ -527,13 +527,13 @@ void Resource::paste( const QString &cb, QWidget *parent ) if ( !customWidgets.isNull() ) loadCustomWidgets( customWidgets, this ); - QWidgetList widgets; + TQWidgetList widgets; formwindow->clearSelection( false ); formwindow->setPropertyShowingBlocked( true ); formwindow->clearSelection( false ); while ( !firstWidget.isNull() ) { if ( firstWidget.tagName() == "widget" ) { - QWidget *w = (QWidget*)createObject( firstWidget, parent, 0 ); + TQWidget *w = (TQWidget*)createObject( firstWidget, parent, 0 ); if ( !w ) continue; widgets.append( w ); @@ -547,7 +547,7 @@ void Resource::paste( const QString &cb, QWidget *parent ) 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 ); + TQWidget *w = createSpacer( firstWidget, parent, 0, firstWidget.tagName() == "vspacer" ? Qt::Vertical : Qt::Horizontal ); if ( !w ) continue; widgets.append( w ); @@ -571,26 +571,26 @@ void Resource::paste( const QString &cb, QWidget *parent ) formwindow->commandHistory()->addCommand( cmd ); } -void Resource::saveObject( QObject *obj, QDesignerGridLayout* grid, QTextStream &ts, int indent ) +void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStream &ts, int indent ) { - if ( obj && obj->isWidgetType() && ( (QWidget*)obj )->isHidden() && !(obj->isA("ScriptObject")) ) + if ( obj && obj->isWidgetType() && ( (TQWidget*)obj )->isHidden() && !(obj->isA("ScriptObject")) ) return; - QString closeTag; + TQString 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 ) ) + usedCustomWidgets << TQString( className ); + if ( obj != formwindow && !formwindow->widgets()->find( (TQWidget*)obj ) ) return; // we don't know anything about this thing - QString attributes; + TQString attributes; if ( grid ) { - QDesignerGridLayout::Item item = grid->items[ (QWidget*)obj ]; - attributes += QString(" row=\"") + QString::number(item.row) + "\""; - attributes += QString(" column=\"") + QString::number(item.column) + "\""; + QDesignerGridLayout::Item item = grid->items[ (TQWidget*)obj ]; + attributes += TQString(" row=\"") + TQString::number(item.row) + "\""; + attributes += TQString(" column=\"") + TQString::number(item.column) + "\""; if ( item.rowspan * item.colspan != 1 ) { - attributes += QString(" rowspan=\"") + QString::number(item.rowspan) + "\""; - attributes += QString(" colspan=\"") + QString::number(item.colspan) + "\""; + attributes += TQString(" rowspan=\"") + TQString::number(item.rowspan) + "\""; + attributes += TQString(" colspan=\"") + TQString::number(item.colspan) + "\""; } } @@ -615,16 +615,16 @@ void Resource::saveObject( QObject *obj, QDesignerGridLayout* grid, QTextStream return; } - if ( obj->inherits( "QTabWidget" ) ) { - QTabWidget* tw = (QTabWidget*) obj; - QObjectList* tmpl = tw->queryList( "QWidgetStack" ); - QWidgetStack *ws = (QWidgetStack*)tmpl->first(); - QTabBar *tb = ( (QDesignerTabWidget*)obj )->tabBar(); + if ( obj->inherits( "TQTabWidget" ) ) { + TQTabWidget* tw = (TQTabWidget*) obj; + TQObjectList* tmpl = tw->queryList( "TQWidgetStack" ); + TQWidgetStack *ws = (TQWidgetStack*)tmpl->first(); + TQTabBar *tb = ( (QDesignerTabWidget*)obj )->tabBar(); for ( int i = 0; i < tb->count(); ++i ) { - QTab *t = tb->tabAt( i ); + TQTab *t = tb->tabAt( i ); if ( !t ) continue; - QWidget *w = ws->widget( t->identifier() ); + TQWidget *w = ws->widget( t->identifier() ); if ( !w ) continue; if ( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( w ) ) == -1 ) @@ -648,10 +648,10 @@ void Resource::saveObject( QObject *obj, QDesignerGridLayout* grid, QTextStream } delete tmpl; } else - if ( ::qt_cast(obj) ) { - QToolBox* tb = (QToolBox*)obj; + if ( ::qt_cast(obj) ) { + TQToolBox* tb = (TQToolBox*)obj; for ( int i = 0; i < tb->count(); ++i ) { - QWidget *w = tb->item( i ); + TQWidget *w = tb->item( i ); if ( !w ) continue; if ( WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(w)) == -1 ) @@ -665,7 +665,7 @@ void Resource::saveObject( QObject *obj, QDesignerGridLayout* grid, QTextStream ts << makeIndent( indent ) << "
" << endl; ts << makeIndent( indent ) << "" << endl; indent++; - saveEnumProperty( w, "backgroundMode", QVariant::Invalid, ts, indent ); + saveEnumProperty( w, "backgroundMode", TQVariant::Invalid, ts, indent ); indent--; ts << makeIndent( indent ) << "" << endl; ts << makeIndent( indent ) << "" << endl; @@ -678,9 +678,9 @@ void Resource::saveObject( QObject *obj, QDesignerGridLayout* grid, QTextStream ts << makeIndent( indent ) << "
" << endl; } } - else if ( obj->inherits( "QWizard" ) ) { - QWizard* wiz = (QWizard*)obj; for ( int i = 0; i < wiz->pageCount(); ++i ) { - QWidget *w = wiz->page( i ); + else if ( obj->inherits( "TQWizard" ) ) { + TQWizard* wiz = (TQWizard*)obj; for ( int i = 0; i < wiz->pageCount(); ++i ) { + TQWidget *w = wiz->page( i ); if ( !w ) continue; if ( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( w ) ) == -1 ) @@ -702,8 +702,8 @@ void Resource::saveObject( QObject *obj, QDesignerGridLayout* grid, QTextStream --indent; ts << makeIndent( indent ) << "" << endl; } - } else if ( obj->inherits( "QMainWindow" ) ) { - saveChildrenOf( ( (QMainWindow*)obj )->centralWidget(), ts, indent ); + } else if ( obj->inherits( "TQMainWindow" ) ) { + saveChildrenOf( ( (TQMainWindow*)obj )->centralWidget(), ts, indent ); } else { saveChildrenOf( obj, ts, indent ); } @@ -712,56 +712,56 @@ void Resource::saveObject( QObject *obj, QDesignerGridLayout* grid, QTextStream ts << closeTag; } -void Resource::saveItems( QObject *obj, QTextStream &ts, int indent ) +void Resource::saveItems( TQObject *obj, TQTextStream &ts, int indent ) { - if ( obj->inherits( "QListBox" ) || obj->inherits( "QComboBox" ) ) { - QListBox *lb = 0; - if ( obj->inherits( "QListBox" ) ) - lb = (QListBox*)obj; + if ( obj->inherits( "TQListBox" ) || obj->inherits( "TQComboBox" ) ) { + TQListBox *lb = 0; + if ( obj->inherits( "TQListBox" ) ) + lb = (TQListBox*)obj; else - lb = ( (QComboBox*)obj )->listBox(); + lb = ( (TQComboBox*)obj )->listBox(); - QListBoxItem *i = lb->firstItem(); + TQListBoxItem *i = lb->firstItem(); for ( ; i; i = i->next() ) { ts << makeIndent( indent ) << "" << endl; indent++; - QStringList text; + TQStringList text; text << i->text(); - QPtrList pixmaps; + TQPtrList pixmaps; if ( i->pixmap() ) pixmaps.append( i->pixmap() ); saveItem( text, pixmaps, ts, indent ); indent--; ts << makeIndent( indent ) << "" << endl; } - } else if ( obj->inherits( "QIconView" ) ) { - QIconView *iv = (QIconView*)obj; + } else if ( obj->inherits( "TQIconView" ) ) { + TQIconView *iv = (TQIconView*)obj; - QIconViewItem *i = iv->firstItem(); + TQIconViewItem *i = iv->firstItem(); for ( ; i; i = i->nextItem() ) { ts << makeIndent( indent ) << "" << endl; indent++; - QStringList text; + TQStringList text; text << i->text(); - QPtrList pixmaps; + TQPtrList pixmaps; if ( i->pixmap() ) pixmaps.append( i->pixmap() ); saveItem( text, pixmaps, ts, indent ); indent--; ts << makeIndent( indent ) << "" << endl; } - } else if ( obj->inherits( "QListView" ) ) { - QListView *lv = (QListView*)obj; + } else if ( obj->inherits( "TQListView" ) ) { + TQListView *lv = (TQListView*)obj; int i; for ( i = 0; i < lv->header()->count(); ++i ) { ts << makeIndent( indent ) << "" << endl; indent++; - QStringList l; + TQStringList l; l << lv->header()->label( i ); - QPtrList pix; + TQPtrList pix; pix.setAutoDelete( true ); if ( lv->header()->iconSet( i ) ) - pix.append( new QPixmap( lv->header()->iconSet( i )->pixmap() ) ); + pix.append( new TQPixmap( lv->header()->iconSet( i )->pixmap() ) ); saveItem( l, pix, ts, indent ); ts << makeIndent( indent ) << "" << endl; indent++; @@ -779,11 +779,11 @@ void Resource::saveItems( QObject *obj, QTextStream &ts, int indent ) saveItem( lv->firstChild(), ts, indent - 1 ); } #ifndef QT_NO_TABLE - else if ( obj->inherits( "QTable" ) ) { - QTable *table = (QTable*)obj; + else if ( obj->inherits( "TQTable" ) ) { + TQTable *table = (TQTable*)obj; int i; - QMap columnFields = MetaDataBase::columnFields( table ); - bool isDataTable = table->inherits( "QDataTable" ); + TQMap columnFields = MetaDataBase::columnFields( table ); + bool isDataTable = table->inherits( "TQDataTable" ); for ( i = 0; i < table->horizontalHeader()->count(); ++i ) { if ( !table->horizontalHeader()->label( i ).isNull() && table->horizontalHeader()->label( i ).toInt() != i + 1 || @@ -791,14 +791,14 @@ void Resource::saveItems( QObject *obj, QTextStream &ts, int indent ) isDataTable ) { ts << makeIndent( indent ) << "" << endl; indent++; - QStringList l; + TQStringList l; l << table->horizontalHeader()->label( i ); - QPtrList pix; + TQPtrList pix; pix.setAutoDelete( true ); if ( table->horizontalHeader()->iconSet( i ) ) - pix.append( new QPixmap( table->horizontalHeader()->iconSet( i )->pixmap() ) ); + pix.append( new TQPixmap( table->horizontalHeader()->iconSet( i )->pixmap() ) ); saveItem( l, pix, ts, indent ); - if ( table->inherits( "QDataTable" ) && !columnFields.isEmpty() ) { + if ( table->inherits( "TQDataTable" ) && !columnFields.isEmpty() ) { ts << makeIndent( indent ) << "" << endl; indent++; ts << makeIndent( indent ) << "" << entitize( *columnFields.find( l[ 0 ] ) ) << "" << endl; @@ -815,12 +815,12 @@ void Resource::saveItems( QObject *obj, QTextStream &ts, int indent ) table->verticalHeader()->iconSet( i ) ) { ts << makeIndent( indent ) << "" << endl; indent++; - QStringList l; + TQStringList l; l << table->verticalHeader()->label( i ); - QPtrList pix; + TQPtrList pix; pix.setAutoDelete( true ); if ( table->verticalHeader()->iconSet( i ) ) - pix.append( new QPixmap( table->verticalHeader()->iconSet( i )->pixmap() ) ); + pix.append( new TQPixmap( table->verticalHeader()->iconSet( i )->pixmap() ) ); saveItem( l, pix, ts, indent ); indent--; ts << makeIndent( indent ) << "" << endl; @@ -830,15 +830,15 @@ void Resource::saveItems( QObject *obj, QTextStream &ts, int indent ) #endif } -void Resource::saveItem( QListViewItem *i, QTextStream &ts, int indent ) +void Resource::saveItem( TQListViewItem *i, TQTextStream &ts, int indent ) { - QListView *lv = i->listView(); + TQListView *lv = i->listView(); while ( i ) { ts << makeIndent( indent ) << "" << endl; indent++; - QPtrList pixmaps; - QStringList textes; + TQPtrList pixmaps; + TQStringList textes; for ( int c = 0; c < lv->columns(); ++c ) { pixmaps.append( i->pixmap( c ) ); textes << i->text( c ); @@ -854,7 +854,7 @@ void Resource::saveItem( QListViewItem *i, QTextStream &ts, int indent ) } } -void Resource::savePixmap( const QPixmap &p, QTextStream &ts, int indent, const QString &tagname ) +void Resource::savePixmap( const TQPixmap &p, TQTextStream &ts, int indent, const TQString &tagname ) { if ( p.isNull() ) { ts << makeIndent( indent ) << "<" + tagname + ">" << endl; @@ -873,39 +873,39 @@ void Resource::savePixmap( const QPixmap &p, QTextStream &ts, int indent, const << "" << endl; } -QPixmap Resource::loadPixmap( const QDomElement &e, const QString &/*tagname*/ ) +TQPixmap Resource::loadPixmap( const TQDomElement &e, const TQString &/*tagname*/ ) { - QString arg = e.firstChild().toText().data(); + TQString arg = e.firstChild().toText().data(); if ( formwindow && formwindow->savePixmapInline() ) { - QImage img = loadFromCollection( arg ); - QPixmap pix; + TQImage img = loadFromCollection( arg ); + TQPixmap pix; pix.convertFromImage( img ); MetaDataBase::setPixmapArgument( formwindow, pix.serialNumber(), arg ); return pix; } #ifndef KOMMANDER else if ( formwindow && formwindow->savePixmapInProject() ) { - QPixmap pix; + TQPixmap pix; if ( mainwindow && mainwindow->currProject() ) pix = mainwindow->currProject()->pixmapCollection()->pixmap( arg ); } #endif else { - QPixmap pix; + TQPixmap pix; pix = PixmapChooser::loadPixmap( "image.xpm" ); MetaDataBase::setPixmapKey( formwindow, pix.serialNumber(), arg ); return pix; } - QPixmap pix = PixmapChooser::loadPixmap( "image.xpm" ); + TQPixmap pix = PixmapChooser::loadPixmap( "image.xpm" ); MetaDataBase::setPixmapArgument( formwindow, pix.serialNumber(), arg ); return pix; } -void Resource::saveItem( const QStringList &text, const QPtrList &pixmaps, QTextStream &ts, int indent ) +void Resource::saveItem( const TQStringList &text, const TQPtrList &pixmaps, TQTextStream &ts, int indent ) { - QStringList::ConstIterator it = text.begin(); + TQStringList::ConstIterator it = text.begin(); for ( ; it != text.end(); ++it ) { ts << makeIndent( indent ) << "" << endl; indent++; @@ -915,33 +915,33 @@ void Resource::saveItem( const QStringList &text, const QPtrList &pixma } for ( int i = 0; i < (int)pixmaps.count(); ++i ) { - QPixmap *p = ( (QPtrList)pixmaps ).at( i ); + TQPixmap *p = ( (TQPtrList)pixmaps ).at( i ); ts << makeIndent( indent ) << "" << endl; indent++; if ( p ) savePixmap( *p, ts, indent ); else - savePixmap( QPixmap(), ts, indent ); + savePixmap( TQPixmap(), ts, indent ); indent--; ts << makeIndent( indent ) << "" << endl; } } -void Resource::saveChildrenOf( QObject* obj, QTextStream &ts, int indent ) +void Resource::saveChildrenOf( TQObject* obj, TQTextStream &ts, int indent ) { - const QObjectList *l = obj->children(); + const TQObjectList *l = obj->children(); if ( !l ) return; // no children to save - QString closeTag; + TQString 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; + TQLayout *layout = 0; QDesignerGridLayout* grid = 0; - if ( !obj->inherits( "QSplitter" ) && + if ( !obj->inherits( "TQSplitter" ) && WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( obj ) ) ) && obj->isWidgetType() && - WidgetFactory::layoutType( (QWidget*)obj, layout ) != WidgetFactory::NoLayout ) { - WidgetFactory::LayoutType lay = WidgetFactory::layoutType( (QWidget*)obj, layout ); + WidgetFactory::layoutType( (TQWidget*)obj, layout ) != WidgetFactory::NoLayout ) { + WidgetFactory::LayoutType lay = WidgetFactory::layoutType( (TQWidget*)obj, layout ); switch ( lay ) { case WidgetFactory::HBox: closeTag = makeIndent( indent ) + ""; @@ -969,7 +969,7 @@ void Resource::saveChildrenOf( QObject* obj, QTextStream &ts, int indent ) } - for ( QPtrListIterator it ( *l ); it.current(); ++it ) + for ( TQPtrListIterator it ( *l ); it.current(); ++it ) saveObject( it.current(), grid, ts, indent ); if ( !closeTag.isEmpty() ) { indent--; @@ -977,10 +977,10 @@ void Resource::saveChildrenOf( QObject* obj, QTextStream &ts, int indent ) } } -void Resource::saveObjectProperties( QObject *w, QTextStream &ts, int indent ) +void Resource::saveObjectProperties( TQObject *w, TQTextStream &ts, int indent ) { - QStringList saved; - QStringList changed; + TQStringList saved; + TQStringList changed; changed = MetaDataBase::changedProperties( w ); if ( w->isWidgetType() ) { if ( w->inherits( "Spacer" ) ) { @@ -989,7 +989,7 @@ void Resource::saveObjectProperties( QObject *w, QTextStream &ts, int indent ) if ( !changed.contains( "geometry" ) ) changed << "geometry"; } - } else if ( w->inherits( "QLayout" ) ) { // #### should be cleaner (RS) + } else if ( w->inherits( "TQLayout" ) ) { // #### should be cleaner (RS) changed << "margin" << "spacing"; } @@ -1003,22 +1003,22 @@ void Resource::saveObjectProperties( QObject *w, QTextStream &ts, int indent ) if ( changed.isEmpty() ) return; - bool inLayout = w != formwindow->mainContainer() && !copying && w->isWidgetType() && ( (QWidget*)w )->parentWidget() && - WidgetFactory::layoutType( ( (QWidget*)w )->parentWidget() ) != WidgetFactory::NoLayout; + bool inLayout = w != formwindow->mainContainer() && !copying && w->isWidgetType() && ( (TQWidget*)w )->parentWidget() && + WidgetFactory::layoutType( ( (TQWidget*)w )->parentWidget() ) != WidgetFactory::NoLayout; - QStrList lst = w->metaObject()->propertyNames( !w->inherits( "Spacer" ) ); - for ( QPtrListIterator it( lst ); it.current(); ++it ) { - if ( changed.find( QString::fromLatin1( it.current() ) ) == changed.end() ) + TQStrList lst = w->metaObject()->propertyNames( !w->inherits( "Spacer" ) ); + for ( TQPtrListIterator it( lst ); it.current(); ++it ) { + if ( changed.find( TQString::fromLatin1( it.current() ) ) == changed.end() ) continue; - if ( saved.find( QString::fromLatin1( it.current() ) ) != saved.end() ) + if ( saved.find( TQString::fromLatin1( it.current() ) ) != saved.end() ) continue; - saved << QString::fromLatin1( it.current() ); - const QMetaProperty* p = w->metaObject()-> + saved << TQString::fromLatin1( it.current() ); + const TQMetaProperty* 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() ) ) + if ( w->inherits( "TQLabel" ) && qstrcmp( p->name(), "pixmap" ) == 0 && + ( !( (TQLabel*)w )->pixmap() || ( (TQLabel*)w )->pixmap()->isNull() ) ) continue; if ( w->inherits( "QDesignerMenuBar" ) && ( qstrcmp( p->name(), "itemName" ) == 0 || qstrcmp( p->name(), "itemNumber" ) == 0 || @@ -1033,19 +1033,19 @@ void Resource::saveObjectProperties( QObject *w, QTextStream &ts, int indent ) ts << ">" << endl; indent++; if ( p->isSetType() ) { - saveSetProperty( w, it.current(), QVariant::nameToType( p->type() ), ts, indent ); + saveSetProperty( w, it.current(), TQVariant::nameToType( p->type() ), ts, indent ); } else if ( p->isEnumType() ) { - saveEnumProperty( w, it.current(), QVariant::nameToType( p->type() ), ts, indent ); + saveEnumProperty( w, it.current(), TQVariant::nameToType( p->type() ), ts, indent ); } else { - saveProperty( w, it.current(), w->property( p->name() ), QVariant::nameToType( p->type() ), ts, indent ); + saveProperty( w, it.current(), w->property( p->name() ), TQVariant::nameToType( p->type() ), ts, indent ); } indent--; ts << makeIndent( indent ) << "" << endl; } if ( w->isWidgetType() && MetaDataBase::fakeProperties( w ) ) { - QMap* fakeProperties = MetaDataBase::fakeProperties( w ); - for ( QMap::Iterator fake = fakeProperties->begin(); + TQMap* fakeProperties = MetaDataBase::fakeProperties( w ); + for ( TQMap::Iterator fake = fakeProperties->begin(); fake != fakeProperties->end(); ++fake ) { if ( MetaDataBase::isPropertyChanged( w, fake.key() ) ) { if ( w->inherits( "CustomWidget" ) ) { @@ -1064,11 +1064,11 @@ void Resource::saveObjectProperties( QObject *w, QTextStream &ts, int indent ) } } -void Resource::saveSetProperty( QObject *w, const QString &name, QVariant::Type, QTextStream &ts, int indent ) +void Resource::saveSetProperty( TQObject *w, const TQString &name, TQVariant::Type, TQTextStream &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; + const TQMetaProperty *p = w->metaObject()->property( w->metaObject()->findProperty( name, true ), true ); + TQStrList l( p->valueToKeys( w->property( name ).toInt() ) ); + TQString v; for ( uint i = 0; i < l.count(); ++i ) { v += l.at( i ); if ( i < l.count() - 1 ) @@ -1077,123 +1077,123 @@ void Resource::saveSetProperty( QObject *w, const QString &name, QVariant::Type, ts << makeIndent( indent ) << "" << v << "" << endl; } -void Resource::saveEnumProperty( QObject *w, const QString &name, QVariant::Type, QTextStream &ts, int indent ) +void Resource::saveEnumProperty( TQObject *w, const TQString &name, TQVariant::Type, TQTextStream &ts, int indent ) { - const QMetaProperty *p = w->metaObject()->property( w->metaObject()->findProperty( name, true ), true ); + const TQMetaProperty *p = w->metaObject()->property( w->metaObject()->findProperty( name, true ), true ); ts << makeIndent( indent ) << "" << p->valueToKey( w->property( name ).toInt() ) << "" << endl; } -void Resource::saveProperty( QObject *w, const QString &name, const QVariant &value, QVariant::Type t, QTextStream &ts, int indent ) +void Resource::saveProperty( TQObject *w, const TQString &name, const TQVariant &value, TQVariant::Type t, TQTextStream &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 ) ) + TQString comment; + if ( w && formwindow->widgets()->find( (TQWidget*)w ) ) comment = MetaDataBase::propertyComment( w, name ); switch ( t ) { - case QVariant::String: + case TQVariant::String: ts << makeIndent( indent ) << "" << entitize( value.toString() ) << "" << endl; if ( !comment.isEmpty() ) ts << makeIndent( indent ) << "" << entitize( comment ) << "" << endl; break; - case QVariant::CString: + case TQVariant::CString: ts << makeIndent( indent ) << "" << entitize( value.toCString() ).latin1() << "" << endl; break; - case QVariant::Bool: + case TQVariant::Bool: ts << makeIndent( indent ) << "" << mkBool( value.toBool() ) << "" << endl; break; - case QVariant::Int: + case TQVariant::Int: num = value.toInt(); - if ( w && w->inherits( "QLayout" ) ) { + if ( w && w->inherits( "TQLayout" ) ) { if ( name == "spacing" ) - num = MetaDataBase::spacing( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (QLayout*)w ) ) ); + num = MetaDataBase::spacing( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)w ) ) ); else if ( name == "margin" ) - num = MetaDataBase::margin( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (QLayout*)w ) ) ); + num = MetaDataBase::margin( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)w ) ) ); } - ts << makeIndent( indent ) << "" << QString::number( num ) << "" << endl; + ts << makeIndent( indent ) << "" << TQString::number( num ) << "" << endl; break; - case QVariant::Double: + case TQVariant::Double: dob = value.toDouble(); - ts << makeIndent( indent ) << "" << QString::number( dob ) << "" << endl; + ts << makeIndent( indent ) << "" << TQString::number( dob ) << "" << endl; break; - case QVariant::KeySequence: + case TQVariant::KeySequence: num = value.toInt(); - ts << makeIndent( indent ) << "" << QString::number( num ) << "" << endl; + ts << makeIndent( indent ) << "" << TQString::number( num ) << "" << endl; break; - case QVariant::UInt: + case TQVariant::UInt: unum = value.toUInt(); - if ( w && w->inherits( "QLayout" ) ) { + if ( w && w->inherits( "TQLayout" ) ) { if ( name == "spacing" ) - num = MetaDataBase::spacing( WidgetFactory::layoutParent( (QLayout*)w ) ); + num = MetaDataBase::spacing( WidgetFactory::layoutParent( (TQLayout*)w ) ); else if ( name == "margin" ) - num = MetaDataBase::margin( WidgetFactory::layoutParent( (QLayout*)w ) ); + num = MetaDataBase::margin( WidgetFactory::layoutParent( (TQLayout*)w ) ); } - ts << makeIndent( indent ) << "" << QString::number( unum ) << "" << endl; + ts << makeIndent( indent ) << "" << TQString::number( unum ) << "" << endl; break; - case QVariant::Rect: { - QVariant v( value ); + case TQVariant::Rect: { + TQVariant v( value ); ts << makeIndent( indent ) << "" << endl; indent++; - ts << makeIndent( indent ) << "" << QString::number( v.toRect().x() ) << "" << endl; - ts << makeIndent( indent ) << "" << QString::number( v.toRect().y() ) << "" << endl; - ts << makeIndent( indent ) << "" << QString::number( v.toRect().width() ) << "" << endl; - ts << makeIndent( indent ) << "" << QString::number( v.toRect().height() ) << "" << endl; + ts << makeIndent( indent ) << "" << TQString::number( v.toRect().x() ) << "" << endl; + ts << makeIndent( indent ) << "" << TQString::number( v.toRect().y() ) << "" << endl; + ts << makeIndent( indent ) << "" << TQString::number( v.toRect().width() ) << "" << endl; + ts << makeIndent( indent ) << "" << TQString::number( v.toRect().height() ) << "" << endl; indent--; ts << makeIndent( indent ) << "" << endl; } break; - case QVariant::Point: { - QVariant v( value ); + case TQVariant::Point: { + TQVariant v( value ); ts << makeIndent( indent ) << "" << endl; indent++; - ts << makeIndent( indent ) << "" << QString::number( v.toPoint().x() ) << "" << endl; - ts << makeIndent( indent ) << "" << QString::number( v.toPoint().y() ) << "" << endl; + ts << makeIndent( indent ) << "" << TQString::number( v.toPoint().x() ) << "" << endl; + ts << makeIndent( indent ) << "" << TQString::number( v.toPoint().y() ) << "" << endl; indent--; ts << makeIndent( indent ) << "" << endl; } break; - case QVariant::Size: { - QVariant v( value ); + case TQVariant::Size: { + TQVariant v( value ); ts << makeIndent( indent ) << "" << endl; indent++; - ts << makeIndent( indent ) << "" << QString::number( v.toSize().width() ) << "" << endl; - ts << makeIndent( indent ) << "" << QString::number( v.toSize().height() ) << "" << endl; + ts << makeIndent( indent ) << "" << TQString::number( v.toSize().width() ) << "" << endl; + ts << makeIndent( indent ) << "" << TQString::number( v.toSize().height() ) << "" << endl; indent--; ts << makeIndent( indent ) << "" << endl; } break; - case QVariant::Color: { - QVariant v( value ); + case TQVariant::Color: { + TQVariant v( value ); ts << makeIndent( indent ) << "" << endl; indent++; saveColor( ts, indent, v.toColor() ); indent--; ts << makeIndent( indent ) << "" << endl; } break; - case QVariant::Font: { - QVariant v( value ); + case TQVariant::Font: { + TQVariant v( value ); ts << makeIndent( indent ) << "" << endl; - QFont f( qApp->font() ); - if ( w && w->isWidgetType() && ((QWidget*)w)->parentWidget() ) - f = ((QWidget*)w)->parentWidget()->font(); - QFont f2( v.toFont() ); + TQFont f( qApp->font() ); + if ( w && w->isWidgetType() && ((TQWidget*)w)->parentWidget() ) + f = ((TQWidget*)w)->parentWidget()->font(); + TQFont f2( v.toFont() ); indent++; if ( f.family() != f2.family() ) ts << makeIndent( indent ) << "" << f2.family() << "" << endl; if ( f.pointSize() != f2.pointSize() ) - ts << makeIndent( indent ) << "" << QString::number( f2.pointSize() ) << "" << endl; + ts << makeIndent( indent ) << "" << TQString::number( f2.pointSize() ) << "" << endl; if ( f.bold() != f2.bold() ) - ts << makeIndent( indent ) << "" << QString::number( (int)f2.bold() ) << "" << endl; + ts << makeIndent( indent ) << "" << TQString::number( (int)f2.bold() ) << "" << endl; if ( f.italic() != f2.italic() ) - ts << makeIndent( indent ) << "" << QString::number( (int)f2.italic() ) << "" << endl; + ts << makeIndent( indent ) << "" << TQString::number( (int)f2.italic() ) << "" << endl; if ( f.underline() != f2.underline() ) - ts << makeIndent( indent ) << "" << QString::number( (int)f2.underline() ) << "" << endl; + ts << makeIndent( indent ) << "" << TQString::number( (int)f2.underline() ) << "" << endl; if ( f.strikeOut() != f2.strikeOut() ) - ts << makeIndent( indent ) << "" << QString::number( (int)f2.strikeOut() ) << "" << endl; + ts << makeIndent( indent ) << "" << TQString::number( (int)f2.strikeOut() ) << "" << endl; indent--; ts << makeIndent( indent ) << "" << endl; } break; - case QVariant::SizePolicy: { - QSizePolicy sp( value.toSizePolicy() ); + case TQVariant::SizePolicy: { + TQSizePolicy sp( value.toSizePolicy() ); ts << makeIndent( indent ) << "" << endl; indent++; ts << makeIndent( indent ) << "" << (int)sp.horData() << "" << endl; @@ -1204,17 +1204,17 @@ void Resource::saveProperty( QObject *w, const QString &name, const QVariant &va ts << makeIndent( indent ) << "" << endl; break; } - case QVariant::Pixmap: + case TQVariant::Pixmap: savePixmap( value.toPixmap(), ts, indent ); break; - case QVariant::IconSet: + case TQVariant::IconSet: savePixmap( value.toIconSet().pixmap(), ts, indent, "iconset" ); break; - case QVariant::Image: + case TQVariant::Image: ts << makeIndent( indent ) << "" << saveInCollection( value.toImage() ) << "" << endl; break; - case QVariant::Palette: { - QPalette p( value.toPalette() ); + case TQVariant::Palette: { + TQPalette p( value.toPalette() ); ts << makeIndent( indent ) << "" << endl; indent++; @@ -1239,11 +1239,11 @@ void Resource::saveProperty( QObject *w, const QString &name, const QVariant &va indent--; ts << makeIndent( indent ) << "" << endl; } break; - case QVariant::Cursor: + case TQVariant::Cursor: ts << makeIndent( indent ) << "" << value.toCursor().shape() << "" << endl; break; - case QVariant::StringList: { - QStringList lst = value.toStringList(); + case TQVariant::StringList: { + TQStringList lst = value.toStringList(); uint i = 0; ts << makeIndent( indent ) << "" << endl; indent++; @@ -1254,8 +1254,8 @@ void Resource::saveProperty( QObject *w, const QString &name, const QVariant &va indent--; ts << makeIndent( indent ) << "" << endl; } break; - case QVariant::Date: { - QDate d = value.toDate(); + case TQVariant::Date: { + TQDate d = value.toDate(); ts << makeIndent( indent ) << "" << endl; indent++; ts << makeIndent( indent ) << "" << d.year() << "" << endl; @@ -1265,8 +1265,8 @@ void Resource::saveProperty( QObject *w, const QString &name, const QVariant &va ts << makeIndent( indent ) << "" << endl; break; } - case QVariant::Time: { - QTime t = value.toTime(); + case TQVariant::Time: { + TQTime t = value.toTime(); ts << makeIndent( indent ) << "" << endl; break; } - case QVariant::DateTime: { - QDateTime dt = value.toDateTime(); + case TQVariant::DateTime: { + TQDateTime dt = value.toDateTime(); ts << makeIndent( indent ) << "" << endl; indent++; ts << makeIndent( indent ) << "" << dt.date().year() << "" << endl; @@ -1295,33 +1295,33 @@ void Resource::saveProperty( QObject *w, const QString &name, const QVariant &va } } -void Resource::saveColorGroup( QTextStream &ts, int indent, const QColorGroup &cg ) +void Resource::saveColorGroup( TQTextStream &ts, int indent, const TQColorGroup &cg ) { - for( int r = 0 ; r < QColorGroup::NColorRoles ; r++ ) { + for( int r = 0 ; r < TQColorGroup::NColorRoles ; r++ ) { ts << makeIndent( indent ) << "" << endl; indent++; - saveColor( ts, indent, cg.color( (QColorGroup::ColorRole)r ) ); + saveColor( ts, indent, cg.color( (TQColorGroup::ColorRole)r ) ); indent--; ts << makeIndent( indent ) << "" << endl; - QPixmap* pm = cg.brush( (QColorGroup::ColorRole)r ).pixmap(); + TQPixmap* pm = cg.brush( (TQColorGroup::ColorRole)r ).pixmap(); if ( pm && !pm->isNull() ) savePixmap( *pm, ts, indent ); } } -void Resource::saveColor( QTextStream &ts, int indent, const QColor &c ) +void Resource::saveColor( TQTextStream &ts, int indent, const TQColor &c ) { - ts << makeIndent( indent ) << "" << QString::number( c.red() ) << "" << endl; - ts << makeIndent( indent ) << "" << QString::number( c.green() ) << "" << endl; - ts << makeIndent( indent ) << "" << QString::number( c.blue() ) << "" << endl; + ts << makeIndent( indent ) << "" << TQString::number( c.red() ) << "" << endl; + ts << makeIndent( indent ) << "" << TQString::number( c.green() ) << "" << endl; + ts << makeIndent( indent ) << "" << TQString::number( c.blue() ) << "" << endl; } -QObject *Resource::createObject( const QDomElement &e, QWidget *parent, QLayout* layout ) +TQObject *Resource::createObject( const TQDomElement &e, TQWidget *parent, TQLayout* layout ) { lastItem = 0; - QDomElement n = e.firstChild().toElement(); - QWidget *w = 0; // the widget that got created - QObject *obj = 0; // gets the properties + TQDomElement n = e.firstChild().toElement(); + TQWidget *w = 0; // the widget that got created + TQObject *obj = 0; // gets the properties int row = e.attribute( "row" ).toInt(); int col = e.attribute( "column" ).toInt(); @@ -1332,7 +1332,7 @@ QObject *Resource::createObject( const QDomElement &e, QWidget *parent, QLayout* if ( colspan < 1 ) colspan = 1; - QString className = e.attribute( "class", "QWidget" ); + TQString className = e.attribute( "class", "TQWidget" ); if ( !className.isNull() ) { obj = WidgetFactory::create( WidgetDatabase::idFromClassName( className ), parent, 0, false ); @@ -1340,19 +1340,19 @@ QObject *Resource::createObject( const QDomElement &e, QWidget *parent, QLayout* return 0; if ( !mainContainerSet ) { if ( formwindow ) - formwindow->setMainContainer( (QWidget*)obj ); + formwindow->setMainContainer( (TQWidget*)obj ); mainContainerSet = true; } - w = (QWidget*)obj; - if ( w->inherits( "QMainWindow" ) ) - w = ( (QMainWindow*)w )->centralWidget(); + w = (TQWidget*)obj; + if ( w->inherits( "TQMainWindow" ) ) + w = ( (TQMainWindow*)w )->centralWidget(); if ( layout ) { switch ( WidgetFactory::layoutType( layout ) ) { case WidgetFactory::HBox: - ( (QHBoxLayout*)layout )->addWidget( w ); + ( (TQHBoxLayout*)layout )->addWidget( w ); break; case WidgetFactory::VBox: - ( (QVBoxLayout*)layout )->addWidget( w ); + ( (TQVBoxLayout*)layout )->addWidget( w ); break; case WidgetFactory::Grid: ( (QDesignerGridLayout*)layout )->addMultiCellWidget( w, row, row + rowspan - 1, @@ -1368,9 +1368,9 @@ QObject *Resource::createObject( const QDomElement &e, QWidget *parent, QLayout* layout = 0; if ( w && formwindow ) { - if ( !parent || ( !parent->inherits( "QToolBox" ) && !parent->inherits( "QTabWidget" ) && !parent->inherits( "QWizard" ) ) ) + if ( !parent || ( !parent->inherits( "TQToolBox" ) && !parent->inherits( "TQTabWidget" ) && !parent->inherits( "TQWizard" ) ) ) formwindow->insertWidget( w, pasting ); - else if ( parent && ( parent->inherits( "QToolBox" ) || parent->inherits( "QTabWidget" ) || parent->inherits( "QWizard" ) ) ) + else if ( parent && ( parent->inherits( "TQToolBox" ) || parent->inherits( "TQTabWidget" ) || parent->inherits( "TQWizard" ) ) ) MetaDataBase::addEntry( w ); if (w->inherits("Dialog")) dynamic_cast(w)->setUseInternalParser(false); @@ -1400,18 +1400,18 @@ QObject *Resource::createObject( const QDomElement &e, QWidget *parent, QLayout* } 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" ) ) { + TQString attrib = n.attribute( "name" ); + TQVariant v = DomTool::elementToVariant( n.firstChild().toElement(), TQVariant() ); + if ( parent->inherits( "TQTabWidget" ) ) { if ( attrib == "title" ) - ( (QTabWidget*)parent )->insertTab( w, v.toString() ); + ( (TQTabWidget*)parent )->insertTab( w, v.toString() ); } else - if ( parent->inherits( "QToolBox" ) ) { + if ( parent->inherits( "TQToolBox" ) ) { if ( attrib == "label" ) - ( (QToolBox*)parent )->addItem( w, v.toString() ); - } else if ( parent->inherits( "QWizard" ) ) { + ( (TQToolBox*)parent )->addItem( w, v.toString() ); + } else if ( parent->inherits( "TQWizard" ) ) { if ( attrib == "title" ) - ( (QWizard*)parent )->addPage( w, v.toString() ); + ( (TQWizard*)parent )->addPage( w, v.toString() ); } } else if ( n.tagName() == "item" ) { createItem( n, w ); @@ -1421,7 +1421,7 @@ QObject *Resource::createObject( const QDomElement &e, QWidget *parent, QLayout* // qDebug("Resource : Tag == event"); #ifndef KOMMANDER MetaDataBase::setEventFunctions( obj, formwindow, MainWindow::self->currProject()->language(), - n.attribute( "name" ), QStringList::split( ',', n.attribute( "functions" ) ), false ); + n.attribute( "name" ), TQStringList::split( ',', n.attribute( "functions" ) ), false ); #endif } @@ -1431,22 +1431,22 @@ QObject *Resource::createObject( const QDomElement &e, QWidget *parent, QLayout* return w; } -void Resource::createColumn( const QDomElement &e, QWidget *widget ) +void Resource::createColumn( const TQDomElement &e, TQWidget *widget ) { if ( !widget ) return; - if ( widget->inherits( "QListView" ) && e.tagName() == "column" ) { - QListView *lv = (QListView*)widget; - QDomElement n = e.firstChild().toElement(); - QPixmap pix; + if ( widget->inherits( "TQListView" ) && e.tagName() == "column" ) { + TQListView *lv = (TQListView*)widget; + TQDomElement n = e.firstChild().toElement(); + TQPixmap pix; bool hasPixmap = false; - QString txt; + TQString 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() ); + TQString attrib = n.attribute( "name" ); + TQVariant v = DomTool::elementToVariant( n.firstChild().toElement(), TQVariant() ); if ( attrib == "text" ) txt = v.toString(); else if ( attrib == "pixmap" ) { @@ -1470,24 +1470,24 @@ void Resource::createColumn( const QDomElement &e, QWidget *widget ) lv->header()->setResizeEnabled( resizeable, i ); } #ifndef QT_NO_TABLE - else if ( widget->inherits( "QTable" ) ) { - QTable *table = (QTable*)widget; + else if ( widget->inherits( "TQTable" ) ) { + TQTable *table = (TQTable*)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; + TQDomElement n = e.firstChild().toElement(); + TQPixmap pix; bool hasPixmap = false; - QString txt; - QString field; - QMap fieldMap = MetaDataBase::columnFields( table ); + TQString txt; + TQString field; + TQMap fieldMap = MetaDataBase::columnFields( table ); while ( !n.isNull() ) { if ( n.tagName() == "property" ) { - QString attrib = n.attribute( "name" ); - QVariant v = DomTool::elementToVariant( n.firstChild().toElement(), QVariant() ); + TQString attrib = n.attribute( "name" ); + TQVariant v = DomTool::elementToVariant( n.firstChild().toElement(), TQVariant() ); if ( attrib == "text" ) txt = v.toString(); else if ( attrib == "pixmap" ) { @@ -1501,7 +1501,7 @@ void Resource::createColumn( const QDomElement &e, QWidget *widget ) } int i = isRow ? table->numRows() - 1 : table->numCols() - 1; - QHeader *h = !isRow ? table->horizontalHeader() : table->verticalHeader(); + TQHeader *h = !isRow ? table->horizontalHeader() : table->verticalHeader(); if ( hasPixmap ) h->setLabel( i, pix, txt ); else @@ -1513,14 +1513,14 @@ void Resource::createColumn( const QDomElement &e, QWidget *widget ) #endif } -void Resource::loadItem( const QDomElement &e, QPixmap &pix, QString &txt, bool &hasPixmap ) +void Resource::loadItem( const TQDomElement &e, TQPixmap &pix, TQString &txt, bool &hasPixmap ) { - QDomElement n = e; + TQDomElement n = e; hasPixmap = false; while ( !n.isNull() ) { if ( n.tagName() == "property" ) { - QString attrib = n.attribute( "name" ); - QVariant v = DomTool::elementToVariant( n.firstChild().toElement(), QVariant() ); + TQString attrib = n.attribute( "name" ); + TQVariant v = DomTool::elementToVariant( n.firstChild().toElement(), TQVariant() ); if ( attrib == "text" ) txt = v.toString(); else if ( attrib == "pixmap" ) { @@ -1532,57 +1532,57 @@ void Resource::loadItem( const QDomElement &e, QPixmap &pix, QString &txt, bool } } -void Resource::createItem( const QDomElement &e, QWidget *widget, QListViewItem *i ) +void Resource::createItem( const TQDomElement &e, TQWidget *widget, TQListViewItem *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; + if ( widget->inherits( "TQListBox" ) || widget->inherits( "TQComboBox" ) ) { + TQDomElement n = e.firstChild().toElement(); + TQPixmap pix; bool hasPixmap = false; - QString txt; + TQString txt; loadItem( n, pix, txt, hasPixmap ); - QListBox *lb = 0; - if ( widget->inherits( "QListBox" ) ) - lb = (QListBox*)widget; + TQListBox *lb = 0; + if ( widget->inherits( "TQListBox" ) ) + lb = (TQListBox*)widget; else - lb = ( (QComboBox*)widget)->listBox(); + lb = ( (TQComboBox*)widget)->listBox(); if ( hasPixmap ) { - new QListBoxPixmap( lb, pix, txt ); + new TQListBoxPixmap( lb, pix, txt ); } else { - new QListBoxText( lb, txt ); + new TQListBoxText( lb, txt ); } - } else if ( widget->inherits( "QIconView" ) ) { - QDomElement n = e.firstChild().toElement(); - QPixmap pix; + } else if ( widget->inherits( "TQIconView" ) ) { + TQDomElement n = e.firstChild().toElement(); + TQPixmap pix; bool hasPixmap = false; - QString txt; + TQString 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 pixmaps; - QStringList textes; - QListViewItem *item = 0; - QListView *lv = (QListView*)widget; + TQIconView *iv = (TQIconView*)widget; + new TQIconViewItem( iv, txt, pix ); + } else if ( widget->inherits( "TQListView" ) ) { + TQDomElement n = e.firstChild().toElement(); + TQPixmap pix; + TQValueList pixmaps; + TQStringList textes; + TQListViewItem *item = 0; + TQListView *lv = (TQListView*)widget; if ( i ) - item = new QListViewItem( i, lastItem ); + item = new TQListViewItem( i, lastItem ); else - item = new QListViewItem( lv, lastItem ); + item = new TQListViewItem( lv, lastItem ); while ( !n.isNull() ) { if ( n.tagName() == "property" ) { - QString attrib = n.attribute( "name" ); - QVariant v = DomTool::elementToVariant( n.firstChild().toElement(), QVariant() ); + TQString attrib = n.attribute( "name" ); + TQVariant v = DomTool::elementToVariant( n.firstChild().toElement(), TQVariant() ); if ( attrib == "text" ) textes << v.toString(); else if ( attrib == "pixmap" ) { - QString s = v.toString(); + TQString s = v.toString(); if ( s.isEmpty() ) { - pixmaps << QPixmap(); + pixmaps << TQPixmap(); } else { pix = loadPixmap( n.firstChild().toElement() ); pixmaps << pix; @@ -1605,9 +1605,9 @@ void Resource::createItem( const QDomElement &e, QWidget *widget, QListViewItem } } -QWidget *Resource::createSpacer( const QDomElement &e, QWidget *parent, QLayout *layout, Qt::Orientation o ) +TQWidget *Resource::createSpacer( const TQDomElement &e, TQWidget *parent, TQLayout *layout, Qt::Orientation o ) { - QDomElement n = e.firstChild().toElement(); + TQDomElement n = e.firstChild().toElement(); int row = e.attribute( "row" ).toInt(); int col = e.attribute( "column" ).toInt(); int rowspan = e.attribute( "rowspan" ).toInt(); @@ -1630,8 +1630,8 @@ QWidget *Resource::createSpacer( const QDomElement &e, QWidget *parent, QLayout if ( formwindow ) formwindow->insertWidget( spacer, pasting ); if ( layout ) { - if ( layout->inherits( "QBoxLayout" ) ) - ( (QBoxLayout*)layout )->addWidget( spacer, 0, spacer->alignment() ); + if ( layout->inherits( "TQBoxLayout" ) ) + ( (TQBoxLayout*)layout )->addWidget( spacer, 0, spacer->alignment() ); else ( (QDesignerGridLayout*)layout )->addMultiCellWidget( spacer, row, row + rowspan - 1, col, col + colspan - 1, spacer->alignment() ); @@ -1642,11 +1642,11 @@ QWidget *Resource::createSpacer( const QDomElement &e, QWidget *parent, QLayout /*! 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 ) +void Resource::setObjectProperty( TQObject* obj, const TQString &prop, const TQDomElement &e ) { - const QMetaProperty *p = obj->metaObject()->property( obj->metaObject()->findProperty( prop, true ), true ); + const TQMetaProperty *p = obj->metaObject()->property( obj->metaObject()->findProperty( prop, true ), true ); - if ( !obj->inherits( "QLayout" ) ) {// no layouts in metadatabase... (RS) + if ( !obj->inherits( "TQLayout" ) ) {// 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" ) @@ -1655,16 +1655,16 @@ void Resource::setObjectProperty( QObject* obj, const QString &prop, const QDomE MetaDataBase::setPropertyChanged( obj, prop, true ); } - QVariant defVarient; + TQVariant defVarient; if ( e.tagName() == "font" ) { - QFont f( qApp->font() ); - if ( obj->isWidgetType() && ( (QWidget*)obj )->parentWidget() ) - f = ( (QWidget*)obj )->parentWidget()->font(); - defVarient = QVariant( f ); + TQFont f( qApp->font() ); + if ( obj->isWidgetType() && ( (TQWidget*)obj )->parentWidget() ) + f = ( (TQWidget*)obj )->parentWidget()->font(); + defVarient = TQVariant( f ); } - QString comment; - QVariant v( DomTool::elementToVariant( e, defVarient, comment ) ); + TQString comment; + TQVariant v( DomTool::elementToVariant( e, defVarient, comment ) ); if ( !comment.isEmpty() ) { MetaDataBase::addEntry( obj ); @@ -1672,24 +1672,24 @@ void Resource::setObjectProperty( QObject* obj, const QString &prop, const QDomE } if ( e.tagName() == "pixmap" ) { - QPixmap pix = loadPixmap( e ); + TQPixmap pix = loadPixmap( e ); if ( pix.isNull() ) return; - v = QVariant( pix ); + v = TQVariant( pix ); } else if ( e.tagName() == "iconset" ) { - QPixmap pix = loadPixmap( e, "iconset" ); + TQPixmap pix = loadPixmap( e, "iconset" ); if ( pix.isNull() ) return; - v = QVariant( QIconSet( pix ) ); + v = TQVariant( TQIconSet( pix ) ); } else if ( e.tagName() == "image" ) { - v = QVariant( loadFromCollection( v.toString() ) ); + v = TQVariant( 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(); + TQStringList lst = MetaDataBase::fakeProperty( obj, "database" ).toStringList(); if ( lst.count() > 2 ) dbControls.insert( obj->name(), lst[ 2 ] ); else if ( lst.count() == 2 ) @@ -1701,10 +1701,10 @@ void Resource::setObjectProperty( QObject* obj, const QString &prop, const QDomE if ( e.tagName() == "palette" ) { - QDomElement n = e.firstChild().toElement(); - QPalette p; + TQDomElement n = e.firstChild().toElement(); + TQPalette p; while ( !n.isNull() ) { - QColorGroup cg; + TQColorGroup cg; if ( n.tagName() == "active" ) { cg = loadColorGroup( n ); p.setActive( cg ); @@ -1717,22 +1717,22 @@ void Resource::setObjectProperty( QObject* obj, const QString &prop, const QDomE } n = n.nextSibling().toElement(); } - v = QPalette( p ); + v = TQPalette( p ); } else if ( e.tagName() == "enum" && p && p->isEnumType() ) { - QString key( v.toString() ); - v = QVariant( p->keyToValue( key ) ); + TQString key( v.toString() ); + v = TQVariant( 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 ) + TQString keys( v.toString() ); + TQStringList lst = TQStringList::split( '|', keys ); + TQStrList l; + for ( TQStringList::Iterator it = lst.begin(); it != lst.end(); ++it ) l.append( *it ); - v = QVariant( p->keysToValue( l ) ); + v = TQVariant( p->keysToValue( l ) ); } if ( prop == "caption" ) { - QCString s1 = v.toCString(); - QString s2 = v.toString(); + TQCString s1 = v.toCString(); + TQString s2 = v.toString(); if ( !s1.isEmpty() ) formwindow->setCaption( s1 ); else if ( !s2.isEmpty() ) @@ -1754,21 +1754,21 @@ void Resource::setObjectProperty( QObject* obj, const QString &prop, const QDomE } } - if ( obj->inherits( "QLayout" ) ) { + if ( obj->inherits( "TQLayout" ) ) { if ( prop == "spacing" ) { - MetaDataBase::setSpacing( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (QLayout*)obj ) ), v.toInt() ); + MetaDataBase::setSpacing( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)obj ) ), v.toInt() ); return; } if ( prop == "margin" ) { - MetaDataBase::setMargin( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (QLayout*)obj ) ), v.toInt() ); + MetaDataBase::setMargin( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)obj ) ), v.toInt() ); return; } } if ( prop == "name" ) { if ( pasting ) { - QString s = v.toString(); - formwindow->unify( (QWidget*)obj, s, true ); + TQString s = v.toString(); + formwindow->unify( (TQWidget*)obj, s, true ); obj->setName( s ); return; } else if ( formwindow && obj == formwindow->mainContainer() ) { @@ -1777,18 +1777,18 @@ void Resource::setObjectProperty( QObject* obj, const QString &prop, const QDomE } if ( prop == "sizePolicy" ) { - QSizePolicy sp = v.toSizePolicy(); - sp.setHeightForWidth( ( (QWidget*)obj )->sizePolicy().hasHeightForWidth() ); + TQSizePolicy sp = v.toSizePolicy(); + sp.setHeightForWidth( ( (TQWidget*)obj )->sizePolicy().hasHeightForWidth() ); } obj->setProperty( prop, v ); } -QString Resource::saveInCollection( const QImage &img ) +TQString Resource::saveInCollection( const TQImage &img ) { - QString imgName = "none"; - QValueList::Iterator it = images.begin(); + TQString imgName = "none"; + TQValueList::Iterator it = images.begin(); for ( ; it != images.end(); ++it ) { if ( img == ( *it ).img ) { imgName = ( *it ).name; @@ -1798,7 +1798,7 @@ QString Resource::saveInCollection( const QImage &img ) if ( imgName == "none" ) { Image i; - imgName = "image" + QString::number( images.count() ); + imgName = "image" + TQString::number( images.count() ); i.name = imgName; i.img = img; images.append( i ); @@ -1806,19 +1806,19 @@ QString Resource::saveInCollection( const QImage &img ) return imgName; } -void Resource::saveImageData( const QImage &img, QTextStream &ts, int indent ) +void Resource::saveImageData( const TQImage &img, TQTextStream &ts, int indent ) { - QByteArray ba; - QBuffer buf( ba ); + TQByteArray ba; + TQBuffer buf( ba ); buf.open( IO_WriteOnly | IO_Translate ); - QImageIO iio( &buf, "XPM" ); + TQImageIO iio( &buf, "XPM" ); iio.setImage( img ); iio.write(); buf.close(); ulong len = ba.size() * 2; - QByteArray bazip( len ); + TQByteArray bazip( len ); ::compress( (uchar*) bazip.data(), &len, (uchar*) ba.data(), ba.size() ); - QString res; + TQString res; ts << makeIndent( indent ) << ""; static const char hexchars[] = "0123456789abcdef"; for ( int i = 0; i < (int)len; ++i ) { @@ -1829,12 +1829,12 @@ void Resource::saveImageData( const QImage &img, QTextStream &ts, int indent ) ts << "" << endl; } -void Resource::saveImageCollection( QTextStream &ts, int indent ) +void Resource::saveImageCollection( TQTextStream &ts, int indent ) { ts << makeIndent( indent ) << "" << endl; indent++; - QValueList::Iterator it = images.begin(); + TQValueList::Iterator it = images.begin(); for ( ; it != images.end(); ++it ) { ts << makeIndent( indent ) << "" << endl; indent++; @@ -1847,10 +1847,10 @@ void Resource::saveImageCollection( QTextStream &ts, int indent ) ts << makeIndent( indent ) << "" << endl; } -static QImage loadImageData( QDomElement &n2 ) +static TQImage loadImageData( TQDomElement &n2 ) { - QImage img; - QString data = n2.firstChild().toText().data(); + TQImage img; + TQString 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(); @@ -1867,12 +1867,12 @@ static QImage loadImageData( QDomElement &n2 ) r += l - 'a' + 10; ba[ i ] = r; } - QString format = n2.attribute( "format", "PNG" ); + TQString 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 ); + TQByteArray baunzip( len ); ::uncompress( (uchar*) baunzip.data(), &len, (uchar*) ba, data.length()/2 ); img.loadFromData( (const uchar*)baunzip.data(), len, "XPM" ); } else { @@ -1883,14 +1883,14 @@ static QImage loadImageData( QDomElement &n2 ) return img; } -void Resource::loadImageCollection( const QDomElement &e ) +void Resource::loadImageCollection( const TQDomElement &e ) { - QDomElement n = e.firstChild().toElement(); + TQDomElement n = e.firstChild().toElement(); while ( !n.isNull() ) { if ( n.tagName() == "image" ) { Image img; img.name = n.attribute( "name" ); - QDomElement n2 = n.firstChild().toElement(); + TQDomElement n2 = n.firstChild().toElement(); while ( !n2.isNull() ) { if ( n2.tagName() == "data" ) img.img = loadImageData( n2 ); @@ -1902,30 +1902,30 @@ void Resource::loadImageCollection( const QDomElement &e ) } } -QImage Resource::loadFromCollection( const QString &name ) +TQImage Resource::loadFromCollection( const TQString &name ) { - QValueList::Iterator it = images.begin(); + TQValueList::Iterator it = images.begin(); for ( ; it != images.end(); ++it ) { if ( ( *it ).name == name ) return ( *it ).img; } - return QImage(); + return TQImage(); } -void Resource::saveConnections( QTextStream &ts, int indent ) +void Resource::saveConnections( TQTextStream &ts, int indent ) { ts << makeIndent( indent ) << "" << endl; indent++; - QValueList connections = MetaDataBase::connections( formwindow ); - QValueList::Iterator it = connections.begin(); + TQValueList connections = MetaDataBase::connections( formwindow ); + TQValueList::Iterator it = connections.begin(); for ( ; it != connections.end(); ++it ) { MetaDataBase::Connection conn = *it; - if ( ( knownNames.findIndex( QString( conn.sender->name() ) ) == -1 && + if ( ( knownNames.findIndex( TQString( conn.sender->name() ) ) == -1 && qstrcmp( conn.sender->name(), "this" ) != 0 ) || - ( knownNames.findIndex( QString( conn.receiver->name() ) ) == -1 && + ( knownNames.findIndex( TQString( conn.receiver->name() ) ) == -1 && qstrcmp( conn.receiver->name(), "this" ) != 0 ) ) continue; - if ( formwindow->isMainContainer( (QWidget*)(*it).receiver ) && + if ( formwindow->isMainContainer( (TQWidget*)(*it).receiver ) && !MetaDataBase::hasSlot( formwindow, MetaDataBase::normalizeSlot( (*it).slot ).latin1() ) ) continue; @@ -1952,21 +1952,21 @@ void Resource::saveConnections( QTextStream &ts, int indent ) } #ifndef KOMMANDER - QString lang = formwindow->project()->language(); + TQString lang = formwindow->project()->language(); LanguageInterface *iface = langIface; if ( iface && MetaDataBase::hasEvents( lang ) ) { - QObjectList *l = formwindow->queryList( "QWidget" ); + TQObjectList *l = formwindow->queryList( "TQWidget" ); l->append( formwindow ); - QPtrList lst = formwindow->actionList(); - for ( QAction *a = lst.first(); a; a = lst.next() ) + TQPtrList lst = formwindow->actionList(); + for ( TQAction *a = lst.first(); a; a = lst.next() ) l->append( a ); - for ( QObject *o = l->first(); o; o = l->next() ) { + for ( TQObject *o = l->first(); o; o = l->next() ) { if ( !MetaDataBase::hasObject( o ) ) continue; - QMap eventFunctions = MetaDataBase::eventFunctions( o ); - QMap::ConstIterator it = eventFunctions.begin(); + TQMap eventFunctions = MetaDataBase::eventFunctions( o ); + TQMap::ConstIterator it = eventFunctions.begin(); for ( ; it != eventFunctions.end(); ++it ) { - QString sls = (*it).join( "," ); + TQString sls = (*it).join( "," ); MetaDataBase::Connection conn; conn.sender = o; conn.signal = it.key(); @@ -1982,24 +1982,24 @@ void Resource::saveConnections( QTextStream &ts, int indent ) ts << makeIndent( indent ) << "" << endl; } -void Resource::loadConnections( const QDomElement &e ) +void Resource::loadConnections( const TQDomElement &e ) { - QDomElement n = e.firstChild().toElement(); + TQDomElement n = e.firstChild().toElement(); while ( !n.isNull() ) { if ( n.tagName() == "connection" ) { - QString lang = n.attribute( "language", "C++" ); - QDomElement n2 = n.firstChild().toElement(); + TQString lang = n.attribute( "language", "C++" ); + TQDomElement n2 = n.firstChild().toElement(); MetaDataBase::Connection conn; while ( !n2.isNull() ) { if ( n2.tagName() == "sender" ) { conn.sender = 0; - QString name = n2.firstChild().toText().data(); + TQString 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 ); + TQObjectList *l = toplevel->queryList( 0, name, false ); if ( l ) { if ( l->first() ) conn.sender = l->first(); @@ -2011,11 +2011,11 @@ void Resource::loadConnections( const QDomElement &e ) } else if ( n2.tagName() == "signal" ) { conn.signal = n2.firstChild().toText().data(); } else if ( n2.tagName() == "receiver" ) { - QString name = n2.firstChild().toText().data(); + TQString name = n2.firstChild().toText().data(); if ( name == "this" || qstrcmp( toplevel->name(), name ) == 0 ) { conn.receiver = toplevel; } else { - QObjectList *l = toplevel->queryList( 0, name, false ); + TQObjectList *l = toplevel->queryList( 0, name, false ); if ( l ) { if ( l->first() ) conn.receiver = l->first(); @@ -2041,7 +2041,7 @@ void Resource::loadConnections( const QDomElement &e ) } else if ( MetaDataBase::hasEvents( lang ) ) { MetaDataBase::setEventFunctions( conn.sender, formwindow, lang, conn.signal, - QStringList::split( ',', conn.slot ), false ); + TQStringList::split( ',', conn.slot ), false ); } #else MetaDataBase::addConnection( formwindow ? formwindow : toplevel, @@ -2073,12 +2073,12 @@ void Resource::loadConnections( const QDomElement &e ) } } -void Resource::saveCustomWidgets( QTextStream &ts, int indent ) +void Resource::saveCustomWidgets( TQTextStream &ts, int indent ) { ts << makeIndent( indent ) << "" << endl; indent++; - QPtrList *lst = MetaDataBase::customWidgets(); + TQPtrList *lst = MetaDataBase::customWidgets(); for ( MetaDataBase::CustomWidget *w = lst->first(); w; w = lst->next() ) { if ( usedCustomWidgets.findIndex( w->className ) == -1 ) continue; @@ -2105,16 +2105,16 @@ void Resource::saveCustomWidgets( QTextStream &ts, int indent ) ts << makeIndent( indent ) << "" << endl; ts << makeIndent( indent ) << "" << saveInCollection( w->pixmap->convertToImage() ) << "" << endl; if ( !w->lstSignals.isEmpty() ) { - for ( QValueList::Iterator it = w->lstSignals.begin(); it != w->lstSignals.end(); ++it ) + for ( TQValueList::Iterator it = w->lstSignals.begin(); it != w->lstSignals.end(); ++it ) ts << makeIndent( indent ) << "" << entitize( *it ) << "" << endl; } if ( !w->lstSlots.isEmpty() ) { - for ( QValueList::Iterator it = w->lstSlots.begin(); it != w->lstSlots.end(); ++it ) + for ( TQValueList::Iterator it = w->lstSlots.begin(); it != w->lstSlots.end(); ++it ) ts << makeIndent( indent ) << "" << entitize( (*it).slot ) << "" << endl; } if ( !w->lstProperties.isEmpty() ) { - for ( QValueList::Iterator it = w->lstProperties.begin(); it != w->lstProperties.end(); ++it ) + for ( TQValueList::Iterator it = w->lstProperties.begin(); it != w->lstProperties.end(); ++it ) ts << makeIndent( indent ) << "" << entitize( (*it).property ) << "" << endl; } indent--; @@ -2126,25 +2126,25 @@ void Resource::saveCustomWidgets( QTextStream &ts, int indent ) ts << makeIndent( indent ) << "" << endl; } -void Resource::loadCustomWidgets( const QDomElement &e, Resource *r ) +void Resource::loadCustomWidgets( const TQDomElement &e, Resource *r ) { - QDomElement n = e.firstChild().toElement(); + TQDomElement n = e.firstChild().toElement(); while ( !n.isNull() ) { if ( n.tagName() == "customwidget" ) { - QDomElement n2 = n.firstChild().toElement(); + TQDomElement 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" ); + TQString 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(); + TQDomElement n3 = n2.firstChild().toElement(); while ( !n3.isNull() ) { if ( n3.tagName() == "width" ) w->sizeHint.setWidth( n3.firstChild().toText().data().toInt() ); @@ -2153,12 +2153,12 @@ void Resource::loadCustomWidgets( const QDomElement &e, Resource *r ) n3 = n3.nextSibling().toElement(); } } else if ( n2.tagName() == "sizepolicy" ) { - QDomElement n3 = n2.firstChild().toElement(); + TQDomElement n3 = n2.firstChild().toElement(); while ( !n3.isNull() ) { if ( n3.tagName() == "hordata" ) - w->sizePolicy.setHorData( (QSizePolicy::SizeType)n3.firstChild().toText().data().toInt() ); + w->sizePolicy.setHorData( (TQSizePolicy::SizeType)n3.firstChild().toText().data().toInt() ); else if ( n3.tagName() == "verdata" ) - w->sizePolicy.setVerData( (QSizePolicy::SizeType)n3.firstChild().toText().data().toInt() ); + w->sizePolicy.setVerData( (TQSizePolicy::SizeType)n3.firstChild().toText().data().toInt() ); else if ( n3.tagName() == "horstretch" ) w->sizePolicy.setHorStretch( n3.firstChild().toText().data().toInt() ); else if ( n3.tagName() == "verstretch" ) @@ -2166,12 +2166,12 @@ void Resource::loadCustomWidgets( const QDomElement &e, Resource *r ) n3 = n3.nextSibling().toElement(); } } else if ( n2.tagName() == "pixmap" ) { - QPixmap pix; + TQPixmap pix; if ( r ) { pix = r->loadPixmap( n2 ); } else { - QDomElement n3 = n2.firstChild().toElement(); - QImage img; + TQDomElement n3 = n2.firstChild().toElement(); + TQImage img; while ( !n3.isNull() ) { if ( n3.tagName() == "data" ) { img = loadImageData( n3 ); @@ -2180,7 +2180,7 @@ void Resource::loadCustomWidgets( const QDomElement &e, Resource *r ) } pix.convertFromImage( img ); } - w->pixmap = new QPixmap( pix ); + w->pixmap = new TQPixmap( pix ); } else if ( n2.tagName() == "signal" ) { w->lstSignals.append( n2.firstChild().toText().data().latin1() ); } else if ( n2.tagName() == "container" ) { @@ -2204,16 +2204,16 @@ void Resource::loadCustomWidgets( const QDomElement &e, Resource *r ) } } -void Resource::saveTabOrder( QTextStream &ts, int indent ) +void Resource::saveTabOrder( TQTextStream &ts, int indent ) { - QWidgetList l = MetaDataBase::tabOrder( toplevel ); + TQWidgetList l = MetaDataBase::tabOrder( toplevel ); if ( l.isEmpty() ) return; ts << makeIndent( indent ) << "" << endl; indent++; - for ( QWidget *w = l.first(); w; w = l.next() ) { + for ( TQWidget *w = l.first(); w; w = l.next() ) { if ( w->testWState( Qt::WState_ForceHide ) || knownNames.findIndex( w->name() ) == -1 ) continue; ts << makeIndent( indent ) << "" << w->name() << "" << endl; @@ -2223,20 +2223,20 @@ void Resource::saveTabOrder( QTextStream &ts, int indent ) ts << makeIndent( indent ) << "" << endl; } -void Resource::loadTabOrder( const QDomElement &e ) +void Resource::loadTabOrder( const TQDomElement &e ) { - QWidget *last = 0; - QDomElement n = e.firstChild().toElement(); - QWidgetList widgets; + TQWidget *last = 0; + TQDomElement n = e.firstChild().toElement(); + TQWidgetList widgets; while ( !n.isNull() ) { if ( n.tagName() == "tabstop" ) { - QString name = n.firstChild().toText().data(); + TQString name = n.firstChild().toText().data(); if ( name.isEmpty() ) continue; - QObjectList *l = toplevel->queryList( 0, name, false ); + TQObjectList *l = toplevel->queryList( 0, name, false ); if ( l ) { if ( l->first() ) { - QWidget *w = (QWidget*)l->first(); + TQWidget *w = (TQWidget*)l->first(); widgets.append( w ); if ( last ) toplevel->setTabOrder( last, w ); @@ -2252,10 +2252,10 @@ void Resource::loadTabOrder( const QDomElement &e ) MetaDataBase::setTabOrder( toplevel, widgets ); } -void Resource::saveMetaInfoBefore( QTextStream &ts, int indent ) +void Resource::saveMetaInfoBefore( TQTextStream &ts, int indent ) { MetaDataBase::MetaInfo info = MetaDataBase::metaInfo(formwindow); - QString cn = formwindow->name(); + TQString cn = formwindow->name(); ts << makeIndent(indent) << "" << entitize(cn) << "" << endl; if (!info.comment.isEmpty()) ts << makeIndent(indent) << "" << entitize(info.comment) << "" << endl; @@ -2267,17 +2267,17 @@ void Resource::saveMetaInfoBefore( QTextStream &ts, int indent ) ts << makeIndent(indent) << "" << entitize(info.version) << "" << endl; } -void Resource::saveMetaInfoAfter( QTextStream &ts, int indent ) +void Resource::saveMetaInfoAfter( TQTextStream &ts, int indent ) { MetaDataBase::MetaInfo info = MetaDataBase::metaInfo( formwindow ); - QValueList includes = MetaDataBase::includes( formwindow ); - QString extensionInclude; + TQValueList includes = MetaDataBase::includes( formwindow ); + TQString extensionInclude; bool needExtensionInclude = false; if ( !includes.isEmpty() || needExtensionInclude ) { ts << makeIndent( indent ) << "" << endl; indent++; - for ( QValueList::Iterator it = includes.begin(); it != includes.end(); ++it ) { + for ( TQValueList::Iterator it = includes.begin(); it != includes.end(); ++it ) { ts << makeIndent( indent ) << "" << (*it).header << "" << endl; if ( needExtensionInclude ) @@ -2291,32 +2291,32 @@ void Resource::saveMetaInfoAfter( QTextStream &ts, int indent ) ts << makeIndent( indent ) << "" << endl; } - QStringList forwards = MetaDataBase::forwards( formwindow ); + TQStringList forwards = MetaDataBase::forwards( formwindow ); if ( !forwards.isEmpty() ) { ts << makeIndent( indent ) << "" << endl; indent++; - for ( QStringList::Iterator it2 = forwards.begin(); it2 != forwards.end(); ++it2 ) + for ( TQStringList::Iterator it2 = forwards.begin(); it2 != forwards.end(); ++it2 ) ts << makeIndent( indent ) << "" << entitize( *it2 ) << "" << endl; indent--; ts << makeIndent( indent ) << "" << endl; } - QStringList sigs = MetaDataBase::signalList( formwindow ); + TQStringList sigs = MetaDataBase::signalList( formwindow ); if ( !sigs.isEmpty() ) { ts << makeIndent( indent ) << "" << endl; indent++; - for ( QStringList::Iterator it3 = sigs.begin(); it3 != sigs.end(); ++it3 ) + for ( TQStringList::Iterator it3 = sigs.begin(); it3 != sigs.end(); ++it3 ) ts << makeIndent( indent ) << "" << entitize( *it3 ) << "" << endl; indent--; ts << makeIndent( indent ) << "" << endl; - QValueList slotList = MetaDataBase::slotList( formwindow ); + TQValueList slotList = MetaDataBase::slotList( formwindow ); if ( !slotList.isEmpty() ) { ts << makeIndent( indent ) << "" << endl; indent++; #ifndef KOMMANDER - QString lang = formwindow->project()->language(); + TQString lang = formwindow->project()->language(); #endif - QValueList::Iterator it = slotList.begin(); + TQValueList::Iterator it = slotList.begin(); for ( ; it != slotList.end(); ++it ) { MetaDataBase::Slot slot = *it; ts << makeIndent( indent ) << "layoutDefaultMargin() << "\"/>" << endl; } -QColorGroup Resource::loadColorGroup( const QDomElement &e ) +TQColorGroup Resource::loadColorGroup( const TQDomElement &e ) { - QColorGroup cg; + TQColorGroup cg; int r = -1; - QDomElement n = e.firstChild().toElement(); - QColor col; + TQDomElement n = e.firstChild().toElement(); + TQColor col; while ( !n.isNull() ) { if ( n.tagName() == "color" ) { r++; - cg.setColor( (QColorGroup::ColorRole)r, (col = DomTool::readColor( n ) ) ); + cg.setColor( (TQColorGroup::ColorRole)r, (col = DomTool::readColor( n ) ) ); } else if ( n.tagName() == "pixmap" ) { - QPixmap pix = loadPixmap( n ); - cg.setBrush( (QColorGroup::ColorRole)r, QBrush( col, pix ) ); + TQPixmap pix = loadPixmap( n ); + cg.setBrush( (TQColorGroup::ColorRole)r, TQBrush( col, pix ) ); } n = n.nextSibling().toElement(); } return cg; } -void Resource::saveChildActions( QAction *a, QTextStream &ts, int indent ) +void Resource::saveChildActions( TQAction *a, TQTextStream &ts, int indent ) { if ( !a->children() ) return; - QObjectListIt it( *a->children() ); + TQObjectListIt it( *a->children() ); while ( it.current() ) { - QObject *o = it.current(); + TQObject *o = it.current(); ++it; - if ( !o->inherits( "QAction" ) ) + if ( !o->inherits( "TQAction" ) ) continue; - QAction *ac = (QAction*)o; - bool isGroup = ac->inherits( "QActionGroup" ); + TQAction *ac = (TQAction*)o; + bool isGroup = ac->inherits( "TQActionGroup" ); if ( isGroup ) ts << makeIndent( indent ) << "" << endl; else @@ -2396,16 +2396,16 @@ void Resource::saveChildActions( QAction *a, QTextStream &ts, int indent ) } } -void Resource::saveActions( const QPtrList &actions, QTextStream &ts, int indent ) +void Resource::saveActions( const TQPtrList &actions, TQTextStream &ts, int indent ) { if ( actions.isEmpty() ) return; ts << makeIndent( indent ) << "" << endl; indent++; - QPtrListIterator it( actions ); + TQPtrListIterator it( actions ); while ( it.current() ) { - QAction *a = it.current(); - bool isGroup = a->inherits( "QActionGroup" ); + TQAction *a = it.current(); + bool isGroup = a->inherits( "TQActionGroup" ); if ( isGroup ) ts << makeIndent( indent ) << "" << endl; else @@ -2428,14 +2428,14 @@ void Resource::saveActions( const QPtrList &actions, QTextStream &ts, i ts << makeIndent( indent ) << "" << endl; } -void Resource::loadChildAction( QObject *parent, const QDomElement &e ) +void Resource::loadChildAction( TQObject *parent, const TQDomElement &e ) { - QDomElement n = e; - QAction *a = 0; + TQDomElement n = e; + TQAction *a = 0; if ( n.tagName() == "action" ) { a = new QDesignerAction( parent ); MetaDataBase::addEntry( a ); - QDomElement n2 = n.firstChild().toElement(); + TQDomElement n2 = n.firstChild().toElement(); while ( !n2.isNull() ) { if ( n2.tagName() == "property" ) { setObjectProperty( a, n2.attribute( "name" ), n2.firstChild().toElement() ); @@ -2444,17 +2444,17 @@ void Resource::loadChildAction( QObject *parent, const QDomElement &e ) #ifndef KOMMANDER MetaDataBase::setEventFunctions( a, formwindow, MainWindow::self->currProject()->language(), n2.attribute( "name" ), - QStringList::split( ',', n2.attribute( "functions" ) ), false ); + TQStringList::split( ',', n2.attribute( "functions" ) ), false ); #endif } n2 = n2.nextSibling().toElement(); } - if ( !parent->inherits( "QAction" ) ) + if ( !parent->inherits( "TQAction" ) ) formwindow->actionList().append( a ); } else if ( n.tagName() == "actiongroup" ) { a = new QDesignerActionGroup( parent ); MetaDataBase::addEntry( a ); - QDomElement n2 = n.firstChild().toElement(); + TQDomElement n2 = n.firstChild().toElement(); while ( !n2.isNull() ) { if ( n2.tagName() == "property" ) { setObjectProperty( a, n2.attribute( "name" ), n2.firstChild().toElement() ); @@ -2466,19 +2466,19 @@ void Resource::loadChildAction( QObject *parent, const QDomElement &e ) #ifndef KOMMANDER MetaDataBase::setEventFunctions( a, formwindow, MainWindow::self->currProject()->language(), n2.attribute( "name" ), - QStringList::split( ',', n2.attribute( "functions" ) ), false ); + TQStringList::split( ',', n2.attribute( "functions" ) ), false ); #endif } n2 = n2.nextSibling().toElement(); } - if ( !parent->inherits( "QAction" ) ) + if ( !parent->inherits( "TQAction" ) ) formwindow->actionList().append( a ); } } -void Resource::loadActions( const QDomElement &e ) +void Resource::loadActions( const TQDomElement &e ) { - QDomElement n = e.firstChild().toElement(); + TQDomElement n = e.firstChild().toElement(); while ( !n.isNull() ) { if ( n.tagName() == "action" ) { loadChildAction( formwindow, n ); @@ -2489,36 +2489,36 @@ void Resource::loadActions( const QDomElement &e ) } } -void Resource::saveToolBars( QMainWindow *mw, QTextStream &ts, int indent ) +void Resource::saveToolBars( TQMainWindow *mw, TQTextStream &ts, int indent ) { ts << makeIndent( indent ) << "" << endl; indent++; - QPtrList tbList; + TQPtrList 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() ) { + for ( TQToolBar *tb = tbList.first(); tb; tb = tbList.next() ) { if ( tb->isHidden() ) continue; ts << makeIndent( indent ) << "" << endl; indent++; saveObjectProperties( tb, ts, indent ); - QPtrList actionList = ( (QDesignerToolBar*)tb )->insertedActions(); - for ( QAction *a = actionList.first(); a; a = actionList.next() ) { + TQPtrList actionList = ( (QDesignerToolBar*)tb )->insertedActions(); + for ( TQAction *a = actionList.first(); a; a = actionList.next() ) { if ( a->inherits( "QSeparatorAction" ) ) { ts << makeIndent( indent ) << "" << endl; } else { if ( a->inherits( "QDesignerAction" ) && !( (QDesignerAction*)a )->supportsMenu() ) { - QWidget *w = ( (QDesignerAction*)a )->widget(); + TQWidget *w = ( (QDesignerAction*)a )->widget(); ts << makeIndent( indent ) << "" << endl; indent++; saveObjectProperties( w, ts, indent ); const char *className = WidgetFactory::classNameOf( w ); if ( w->isA( "CustomWidget" ) ) - usedCustomWidgets << QString( className ); + usedCustomWidgets << TQString( className ); if ( WidgetFactory::hasItems( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( w ) ) ) ) saveItems( w, ts, indent ); indent--; @@ -2536,9 +2536,9 @@ void Resource::saveToolBars( QMainWindow *mw, QTextStream &ts, int indent ) ts << makeIndent( indent ) << "" << endl; } -void Resource::saveMenuBar( QMainWindow *mw, QTextStream &ts, int indent ) +void Resource::saveMenuBar( TQMainWindow *mw, TQTextStream &ts, int indent ) { - if ( !mw->child( 0, "QMenuBar" ) ) + if ( !mw->child( 0, "TQMenuBar" ) ) return; ts << makeIndent( indent ) << "" << endl; indent++; @@ -2548,11 +2548,11 @@ void Resource::saveMenuBar( QMainWindow *mw, QTextStream &ts, int indent ) ts << makeIndent( indent ) << "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 ) ); + TQMenuItem *m = mw->menuBar()->findItem( mw->menuBar()->idAt( i ) ); if ( !m ) continue; - QPtrList actionList = ( (QDesignerPopupMenu*)m->popup() )->insertedActions(); - for ( QAction *a = actionList.first(); a; a = actionList.next() ) { + TQPtrList actionList = ( (QDesignerPopupMenu*)m->popup() )->insertedActions(); + for ( TQAction *a = actionList.first(); a; a = actionList.next() ) { if ( a->inherits( "QSeparatorAction" ) ) ts << makeIndent( indent ) << "" << endl; else @@ -2565,29 +2565,29 @@ void Resource::saveMenuBar( QMainWindow *mw, QTextStream &ts, int indent ) ts << makeIndent( indent ) << "" << endl; } -void Resource::loadToolBars( const QDomElement &e ) +void Resource::loadToolBars( const TQDomElement &e ) { - QDomElement n = e.firstChild().toElement(); - QMainWindow *mw = ( (QMainWindow*)formwindow->mainContainer() ); + TQDomElement n = e.firstChild().toElement(); + TQMainWindow *mw = ( (TQMainWindow*)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(); + TQDomElement n2 = n.firstChild().toElement(); while ( !n2.isNull() ) { if ( n2.tagName() == "action" ) { - QAction *a = formwindow->findAction( n2.attribute( "name" ) ); + TQAction *a = formwindow->findAction( n2.attribute( "name" ) ); if ( a ) { a->addTo( tb ); tb->addAction( a ); } } else if ( n2.tagName() == "separator" ) { - QAction *a = new QSeparatorAction( 0 ); + TQAction *a = new QSeparatorAction( 0 ); a->addTo( tb ); tb->addAction( a ); } else if ( n2.tagName() == "widget" ) { - QWidget *w = (QWidget*)createObject( n2, tb ); + TQWidget *w = (TQWidget*)createObject( n2, tb ); QDesignerAction *a = new QDesignerAction( w, tb ); a->addTo( tb ); tb->addAction( a ); @@ -2602,25 +2602,25 @@ void Resource::loadToolBars( const QDomElement &e ) } } -void Resource::loadMenuBar( const QDomElement &e ) +void Resource::loadMenuBar( const TQDomElement &e ) { - QDomElement n = e.firstChild().toElement(); - QMainWindow *mw = ( (QMainWindow*)formwindow->mainContainer() ); + TQDomElement n = e.firstChild().toElement(); + TQMainWindow *mw = ( (TQMainWindow*)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(); + TQDomElement n2 = n.firstChild().toElement(); while ( !n2.isNull() ) { if ( n2.tagName() == "action" ) { - QAction *a = formwindow->findAction( n2.attribute( "name" ) ); + TQAction *a = formwindow->findAction( n2.attribute( "name" ) ); if ( a ) { a->addTo( popup ); popup->addAction( a ); } } else if ( n2.tagName() == "separator" ) { - QAction *a = new QSeparatorAction( 0 ); + TQAction *a = new QSeparatorAction( 0 ); a->addTo( popup ); popup->addAction( a ); } @@ -2638,35 +2638,35 @@ void Resource::loadMenuBar( const QDomElement &e ) void Resource::saveFormCode() { #ifndef KOMMANDER - QString lang = formwindow->project()->language(); + TQString lang = formwindow->project()->language(); #else - QString lang = "C++"; + TQString lang = "C++"; #endif LanguageInterface *iface = langIface; if ( !iface ) return; - QMap functionBodies = MetaDataBase::functionBodies( formwindow ); + TQMap 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() ) ); + TQFile f( formwindow->project()->makeAbsolute( formwindow->formFile()->codeFile() ) ); #else - QFile f( formwindow->formFile()->codeFile() ); + TQFile f( formwindow->formFile()->codeFile() ); #endif if ( f.open( IO_WriteOnly | IO_Translate ) ) { - QTextStream ts( &f ); + TQTextStream ts( &f ); ts << formwindow->formFile()->code(); } } else { - QValueList funcs; - QValueList slotList = MetaDataBase::slotList( formwindow ); - QValueList::Iterator sit = slotList.begin(); + TQValueList funcs; + TQValueList slotList = MetaDataBase::slotList( formwindow ); + TQValueList::Iterator sit = slotList.begin(); for ( ; sit != slotList.end(); ++sit ) { MetaDataBase::Slot slot = *sit; - QMap::Iterator it = + TQMap::Iterator it = functionBodies.find( MetaDataBase::normalizeSlot( (*sit).slot ) ); LanguageInterface::Function func; func.name = slot.slot; @@ -2676,9 +2676,9 @@ void Resource::saveFormCode() funcs.append( func ); } - QValueList conns; - QValueList mconns = langConnections[ lang ]; - for ( QValueList::Iterator it = mconns.begin(); + TQValueList conns; + TQValueList mconns = langConnections[ lang ]; + for ( TQValueList::Iterator it = mconns.begin(); it != mconns.end(); ++it ) { LanguageInterface::Connection conn; conn.sender = (*it).sender->name(); @@ -2688,7 +2688,7 @@ void Resource::saveFormCode() } iface->saveFormCode( formwindow->name(), currFileName + iface->formCodeExtension(), - funcs, QStringList(), QStringList(), QStringList(), + funcs, TQStringList(), TQStringList(), TQStringList(), MetaDataBase::variables( formwindow ), conns ); } } @@ -2696,57 +2696,57 @@ void Resource::saveFormCode() // compatibility with early 3.0 betas -static QString make_function_pretty( const QString &s ) +static TQString make_function_pretty( const TQString &s ) { - QString res = s; + TQString 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.replace( TQRegExp( "[(]" ), "( " ); + res.replace( TQRegExp( "[)]" ), " )" ); + res.replace( TQRegExp( "&" ), " &" ); + res.replace( TQRegExp( "[*]" ), " *" ); + res.replace( TQRegExp( "," ), ", " ); + res.replace( TQRegExp( ":" ), " : " ); res = res.simplifyWhiteSpace(); return res; } #ifndef KOMMANDER -void Resource::loadFunctions( const QDomElement &e ) +void Resource::loadFunctions( const TQDomElement &e ) { - QDomElement n = e.firstChild().toElement(); - QMap bodies; + TQDomElement n = e.firstChild().toElement(); + TQMap bodies; while ( !n.isNull() ) { if ( n.tagName() == "function" ) { - QString name = n.attribute( "name" ); - QString body = n.firstChild().toText().data(); + TQString name = n.attribute( "name" ); + TQString body = n.firstChild().toText().data(); bodies.insert( name, body ); } n = n.nextSibling().toElement(); } - MetaDataBase::setFunctionBodies( formwindow, bodies, QString::null, QString::null ); + MetaDataBase::setFunctionBodies( formwindow, bodies, TQString::null, TQString::null ); if ( !bodies.isEmpty() ) { LanguageInterface *iface = langIface; if ( !iface ) return; - QString code; - QValueList slotList = MetaDataBase::slotList( formwindow ); - for ( QValueList::Iterator it = slotList.begin(); it != slotList.end(); ++it ) { + TQString code; + TQValueList slotList = MetaDataBase::slotList( formwindow ); + for ( TQValueList::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 ); + TQString sl( (*it).slot ); + TQString 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" ) : + TQString( "void" ) : (*it).returnType ) ); - QMap::Iterator bit = bodies.find( MetaDataBase::normalizeSlot( (*it).slot ) ); + TQMap::Iterator bit = bodies.find( MetaDataBase::normalizeSlot( (*it).slot ) ); if ( bit != bodies.end() ) code += "\n" + *bit + "\n\n"; else @@ -2763,47 +2763,47 @@ void Resource::loadFunctions( const QDomElement &e ) void Resource::loadExtraSource() { #ifndef KOMMANDER - QString lang = MainWindow::self->currProject()->language(); + TQString lang = MainWindow::self->currProject()->language(); #else - QString lang = "C++"; + TQString lang = "C++"; #endif LanguageInterface *iface = langIface; if ( hasFunctions || !iface ) return; - QValueList functions; - QStringList forwards; - QStringList includesImpl; - QStringList includesDecl; - QStringList vars; - QValueList connections; + TQValueList functions; + TQStringList forwards; + TQStringList includesImpl; + TQStringList includesDecl; + TQStringList vars; + TQValueList 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() ) ); + TQFile f( formwindow->project()->makeAbsolute( formwindow->formFile()->codeFile() ) ); #else - QFile f( formwindow->formFile()->codeFile() ); + TQFile f( formwindow->formFile()->codeFile() ); #endif - QString code; + TQString code; if ( f.open( IO_ReadOnly ) ) { - QTextStream ts( &f ); + TQTextStream ts( &f ); code = ts.read(); } formwindow->formFile()->setCode( code ); } - for ( QValueList::Iterator cit = connections.begin(); + for ( TQValueList::Iterator cit = connections.begin(); cit != connections.end(); ++cit ) { - QObject *sender = 0; - QString name = (*cit).sender; + TQObject *sender = 0; + TQString 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 ); + TQObjectList *l = toplevel->queryList( 0, name, false ); if ( l ) { if ( l->first() ) sender = l->first(); @@ -2813,12 +2813,12 @@ void Resource::loadExtraSource() sender = formwindow->findAction( name ); } MetaDataBase::setEventFunctions( sender, formwindow, lang, (*cit).signal, - QStringList::split( ',', (*cit).slot ), false ); + TQStringList::split( ',', (*cit).slot ), false ); } - QMap bodies = MetaDataBase::functionBodies( formwindow ); + TQMap bodies = MetaDataBase::functionBodies( formwindow ); - for ( QValueList::Iterator fit = functions.begin(); + for ( TQValueList::Iterator fit = functions.begin(); fit != functions.end(); ++fit ) { if ( MetaDataBase::hasSlot( formwindow, (*fit).name.latin1() ) ) MetaDataBase::changeSlot( formwindow, (*fit).name.latin1(), (*fit).name.latin1() ); @@ -2827,20 +2827,20 @@ void Resource::loadExtraSource() MetaDataBase::setFunctionComments( formwindow, (*fit).name, (*fit).comments ); bodies.insert( MetaDataBase::normalizeSlot( (*fit).name ), (*fit).body ); } - MetaDataBase::setFunctionBodies( formwindow, bodies, QString::null, QString::null ); + MetaDataBase::setFunctionBodies( formwindow, bodies, TQString::null, TQString::null ); - QStringList v = MetaDataBase::variables( formwindow ); - QStringList::Iterator vit; + TQStringList v = MetaDataBase::variables( formwindow ); + TQStringList::Iterator vit; for ( vit = vars.begin(); vit != vars.end(); ++vit ) v << *vit; MetaDataBase::setVariables( formwindow, v ); - QStringList f = MetaDataBase::forwards( formwindow ); + TQStringList f = MetaDataBase::forwards( formwindow ); for ( vit = forwards.begin(); vit != forwards.end(); ++vit ) f << *vit; MetaDataBase::setForwards( formwindow, f ); - QValueList incls = MetaDataBase::includes( formwindow ); + TQValueList incls = MetaDataBase::includes( formwindow ); for ( vit = includesImpl.begin(); vit != includesImpl.end(); ++vit ) { MetaDataBase::Include inc; inc.header = *vit; diff --git a/kommander/editor/resource.h b/kommander/editor/resource.h index 710bd34b..e41a9fd7 100644 --- a/kommander/editor/resource.h +++ b/kommander/editor/resource.h @@ -21,11 +21,11 @@ #ifndef RESOURCE_H #define RESOURCE_H -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include "actiondnd.h" #include "metadatabase.h" @@ -50,8 +50,8 @@ class Resource { public: struct Image { - QImage img; - QString name; + TQImage img; + TQString name; bool operator==( const Image &i ) const { return ( i.name == name && i.img == img ); @@ -63,92 +63,92 @@ public: ~Resource(); void setWidget( FormWindow *w ); - QWidget *widget() const; + TQWidget *widget() const; bool load( FormFile *ff ); - bool load( FormFile *ff, QIODevice* ); - QString copy(); + bool load( FormFile *ff, TQIODevice* ); + TQString copy(); - bool save( const QString& filename, bool formCodeOnly = FALSE); - bool save( QIODevice* ); - void paste( const QString &cb, QWidget *parent ); + bool save( const TQString& filename, bool formCodeOnly = FALSE); + bool save( TQIODevice* ); + void paste( const TQString &cb, TQWidget *parent ); - static void saveImageData( const QImage &img, QTextStream &ts, int indent ); - static void loadCustomWidgets( const QDomElement &e, Resource *r ); + static void saveImageData( const TQImage &img, TQTextStream &ts, int indent ); + static void loadCustomWidgets( const TQDomElement &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 &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 &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 ); + void saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStream &ts, int indent ); + void saveChildrenOf( TQObject* obj, TQTextStream &ts, int indent ); + void saveObjectProperties( TQObject *w, TQTextStream &ts, int indent ); + void saveSetProperty( TQObject *w, const TQString &name, TQVariant::Type t, TQTextStream &ts, int indent ); + void saveEnumProperty( TQObject *w, const TQString &name, TQVariant::Type t, TQTextStream &ts, int indent ); + void saveProperty( TQObject *w, const TQString &name, const TQVariant &value, TQVariant::Type t, TQTextStream &ts, int indent ); + void saveProperty( const TQVariant &value, TQTextStream &ts, int indent ); + void saveItems( TQObject *obj, TQTextStream &ts, int indent ); + void saveItem( const TQStringList &text, const TQPtrList &pixmaps, TQTextStream &ts, int indent ); + void saveItem( TQListViewItem *i, TQTextStream &ts, int indent ); + void saveConnections( TQTextStream &ts, int indent ); + void saveCustomWidgets( TQTextStream &ts, int indent ); + void saveTabOrder( TQTextStream &ts, int indent ); + void saveColorGroup( TQTextStream &ts, int indent, const TQColorGroup &cg ); + void saveColor( TQTextStream &ts, int indent, const TQColor &c ); + void saveMetaInfoBefore( TQTextStream &ts, int indent ); + void saveMetaInfoAfter( TQTextStream &ts, int indent ); + void savePixmap( const TQPixmap &p, TQTextStream &ts, int indent, const TQString &tagname = "pixmap" ); + void saveActions( const TQPtrList &actions, TQTextStream &ts, int indent ); + void saveChildActions( TQAction *a, TQTextStream &ts, int indent ); + void saveToolBars( TQMainWindow *mw, TQTextStream &ts, int indent ); + void saveMenuBar( TQMainWindow *mw, TQTextStream &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" ); + TQObject *createObject( const TQDomElement &e, TQWidget *parent, TQLayout* layout = 0 ); + TQWidget *createSpacer( const TQDomElement &e, TQWidget *parent, TQLayout *layout, Qt::Orientation o ); + void createItem( const TQDomElement &e, TQWidget *widget, TQListViewItem *i = 0 ); + void createColumn( const TQDomElement &e, TQWidget *widget ); + void setObjectProperty( TQObject* widget, const TQString &prop, const TQDomElement &e); + TQString saveInCollection( const TQImage &img ); + TQString saveInCollection( const TQPixmap &pix ) { return saveInCollection( pix.convertToImage() ); } + TQImage loadFromCollection( const TQString &name ); + void saveImageCollection( TQTextStream &ts, int indent ); + void loadImageCollection( const TQDomElement &e ); + void loadConnections( const TQDomElement &e ); + void loadTabOrder( const TQDomElement &e ); + void loadItem( const TQDomElement &n, TQPixmap &pix, TQString &txt, bool &hasPixmap ); + void loadActions( const TQDomElement &n ); + void loadChildAction( TQObject *parent, const TQDomElement &e ); + void loadToolBars( const TQDomElement &n ); + void loadMenuBar( const TQDomElement &n ); + TQColorGroup loadColorGroup( const TQDomElement &e ); + TQPixmap loadPixmap( const TQDomElement &e, const TQString &tagname = "pixmap" ); #ifndef KOMMANDER -// void loadFunctions( const QDomElement &e ); // compatibility with early 3.0 betas +// void loadFunctions( const TQDomElement &e ); // compatibility with early 3.0 betas // void loadExtraSource(); #endif private: MainWindow *mainwindow; FormWindow *formwindow; - QWidget* toplevel; - QValueList images; + TQWidget* toplevel; + TQValueList images; bool copying, pasting; bool mainContainerSet; - QStringList knownNames; - QStringList usedCustomWidgets; - QListViewItem *lastItem; - - QValueList metaIncludes; - QStringList metaForwards; - QStringList metaVariables; - QStringList metaSignals; + TQStringList knownNames; + TQStringList usedCustomWidgets; + TQListViewItem *lastItem; + + TQValueList metaIncludes; + TQStringList metaForwards; + TQStringList metaVariables; + TQStringList metaSignals; MetaDataBase::MetaInfo metaInfo; - QMap dbControls; - QMap dbTables; - QString exportMacro; + TQMap dbControls; + TQMap dbTables; + TQString exportMacro; bool hadGeometry; - QMap > langConnections; - QString currFileName; + TQMap > langConnections; + TQString currFileName; #ifndef KOMMANDER LanguageInterface *langIface; #endif diff --git a/kommander/editor/sizehandle.cpp b/kommander/editor/sizehandle.cpp index 937d33bc..a5ebe0ec 100644 --- a/kommander/editor/sizehandle.cpp +++ b/kommander/editor/sizehandle.cpp @@ -18,20 +18,20 @@ ** **********************************************************************/ -#include // HP-UX compiler needs this here +#include // HP-UX compiler needs this here #include "sizehandle.h" #include "formwindow.h" #include "widgetfactory.h" -#include -#include -#include +#include +#include +#include #include SizeHandle::SizeHandle( FormWindow *parent, Direction d, WidgetSelection *s ) - : QWidget( parent ) + : TQWidget( parent ) { active = true; setBackgroundMode( active ? PaletteText : PaletteDark ); @@ -86,37 +86,37 @@ void SizeHandle::setActive( bool a ) updateCursor(); } -void SizeHandle::setWidget( QWidget *w ) +void SizeHandle::setWidget( TQWidget *w ) { widget = w; } -void SizeHandle::paintEvent( QPaintEvent * ) +void SizeHandle::paintEvent( TQPaintEvent * ) { if ( ( (FormWindow*)parentWidget() )->currentWidget() != widget ) return; - QPainter p( this ); + TQPainter p( this ); p.setPen( blue ); p.drawRect( 0, 0, width(), height() ); } -void SizeHandle::mousePressEvent( QMouseEvent *e ) +void SizeHandle::mousePressEvent( TQMouseEvent *e ) { if ( !widget || e->button() != LeftButton || !active ) return; oldPressPos = e->pos(); - geom = origGeom = QRect( widget->pos(), widget->size() ); + geom = origGeom = TQRect( widget->pos(), widget->size() ); } -void SizeHandle::mouseMoveEvent( QMouseEvent *e ) +void SizeHandle::mouseMoveEvent( TQMouseEvent *e ) { if ( !widget || ( e->state() & LeftButton ) != LeftButton || !active ) return; - QPoint rp = mapFromGlobal( e->globalPos() ); - QPoint d = oldPressPos - rp; + TQPoint rp = mapFromGlobal( e->globalPos() ); + TQPoint d = oldPressPos - rp; oldPressPos = rp; - QPoint checkPos = widget->parentWidget()->mapFromGlobal( e->globalPos() ); - QRect pr = widget->parentWidget()->rect(); + TQPoint checkPos = widget->parentWidget()->mapFromGlobal( e->globalPos() ); + TQRect pr = widget->parentWidget()->rect(); // ##### move code around a bit to reduce duplicated code here switch ( dir ) { @@ -204,13 +204,13 @@ void SizeHandle::mouseMoveEvent( QMouseEvent *e ) } break; } - QPoint p = pos(); + TQPoint p = pos(); sel->updateGeometry(); oldPressPos += ( p - pos() ); - formWindow->sizePreview()->setText( QString( "%1/%2" ).arg( widget->width() ).arg( widget->height() ) ); + formWindow->sizePreview()->setText( TQString( "%1/%2" ).arg( widget->width() ).arg( widget->height() ) ); formWindow->sizePreview()->adjustSize(); - QRect lg( formWindow->mapFromGlobal( e->globalPos() ) + QPoint( 16, 16 ), + TQRect lg( formWindow->mapFromGlobal( e->globalPos() ) + TQPoint( 16, 16 ), formWindow->sizePreview()->size() ); formWindow->checkPreviewGeometry( lg ); formWindow->sizePreview()->setGeometry( lg ); @@ -220,7 +220,7 @@ void SizeHandle::mouseMoveEvent( QMouseEvent *e ) formWindow->updateChildSelections( widget ); } -void SizeHandle::mouseReleaseEvent( QMouseEvent *e ) +void SizeHandle::mouseReleaseEvent( TQMouseEvent *e ) { if ( e->button() != LeftButton || !active ) return; @@ -234,7 +234,7 @@ void SizeHandle::mouseReleaseEvent( QMouseEvent *e ) formWindow->emitUpdateProperties( widget ); } -void SizeHandle::trySetGeometry( QWidget *w, int x, int y, int width, int height ) +void SizeHandle::trySetGeometry( TQWidget *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() ); @@ -250,7 +250,7 @@ void SizeHandle::trySetGeometry( QWidget *w, int x, int y, int width, int height w->setGeometry( x, y, QMAX( minw, width ), QMAX( minh, height ) ); } -void SizeHandle::tryResize( QWidget *w, int width, int height ) +void SizeHandle::tryResize( TQWidget *w, int width, int height ) { int minw = QMAX( w->minimumSizeHint().width(), w->minimumSize().width() ); minw = QMAX( minw, 16 ); @@ -261,7 +261,7 @@ void SizeHandle::tryResize( QWidget *w, int width, int height ) // ------------------------------------------------------------------------ -WidgetSelection::WidgetSelection( FormWindow *parent, QPtrDict *selDict ) +WidgetSelection::WidgetSelection( FormWindow *parent, TQPtrDict *selDict ) : selectionDict( selDict ) { formWindow = parent; @@ -271,7 +271,7 @@ WidgetSelection::WidgetSelection( FormWindow *parent, QPtrDict hide(); } -void WidgetSelection::setWidget( QWidget *w, bool updateDict ) +void WidgetSelection::setWidget( TQWidget *w, bool updateDict ) { if ( !w ) { hide(); @@ -306,9 +306,9 @@ void WidgetSelection::updateGeometry() if ( !wid ) return; - QPoint p = wid->parentWidget()->mapToGlobal( wid->pos() ); + TQPoint p = wid->parentWidget()->mapToGlobal( wid->pos() ); p = formWindow->mapFromGlobal( p ); - QRect r( p, wid->size() ); + TQRect r( p, wid->size() ); int w = 6; int h = 6; @@ -377,7 +377,7 @@ void WidgetSelection::update() } } -QWidget *WidgetSelection::widget() const +TQWidget *WidgetSelection::widget() const { return wid; } diff --git a/kommander/editor/sizehandle.h b/kommander/editor/sizehandle.h index ccd6a6ef..24413602 100644 --- a/kommander/editor/sizehandle.h +++ b/kommander/editor/sizehandle.h @@ -21,9 +21,9 @@ #ifndef SIZEHANDLE_H #define SIZEHANDLE_H -#include -#include -#include +#include +#include +#include class QMouseEvent; class FormWindow; @@ -38,29 +38,29 @@ public: enum Direction { LeftTop, Top, RightTop, Right, RightBottom, Bottom, LeftBottom, Left }; SizeHandle( FormWindow *parent, Direction d, WidgetSelection *s ); - void setWidget( QWidget *w ); + void setWidget( TQWidget *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 ); + void paintEvent( TQPaintEvent *e ); + void mousePressEvent( TQMouseEvent *e ); + void mouseMoveEvent( TQMouseEvent *e ); + void mouseReleaseEvent( TQMouseEvent *e ); private: - void trySetGeometry( QWidget *w, int x, int y, int width, int height ); - void tryResize( QWidget *w, int width, int height ); + void trySetGeometry( TQWidget *w, int x, int y, int width, int height ); + void tryResize( TQWidget *w, int width, int height ); private: - QWidget *widget; + TQWidget *widget; Direction dir; - QPoint oldPressPos; + TQPoint oldPressPos; FormWindow *formWindow; WidgetSelection *sel; - QRect geom, origGeom; + TQRect geom, origGeom; bool active; }; @@ -68,9 +68,9 @@ private: class WidgetSelection { public: - WidgetSelection( FormWindow *parent, QPtrDict *selDict ); + WidgetSelection( FormWindow *parent, TQPtrDict *selDict ); - void setWidget( QWidget *w, bool updateDict = TRUE ); + void setWidget( TQWidget *w, bool updateDict = TRUE ); bool isUsed() const; void updateGeometry(); @@ -78,13 +78,13 @@ public: void show(); void update(); - QWidget *widget() const; + TQWidget *widget() const; protected: - QIntDict handles; - QWidget *wid; + TQIntDict handles; + TQWidget *wid; FormWindow *formWindow; - QPtrDict *selectionDict; + TQPtrDict *selectionDict; }; diff --git a/kommander/editor/styledbutton.cpp b/kommander/editor/styledbutton.cpp index 9b77b941..4502b2a3 100644 --- a/kommander/editor/styledbutton.cpp +++ b/kommander/editor/styledbutton.cpp @@ -18,33 +18,33 @@ ** **********************************************************************/ -#include // HP-UX compiler needs this here +#include // HP-UX compiler needs this here #include "styledbutton.h" #include "formwindow.h" #include "pixmapchooser.h" #include -#include -#include -#include -#include -#include -#include -#include -#include - -StyledButton::StyledButton(QWidget* parent, const char* name) - : QButton( parent, name ), pix( 0 ), spix( 0 ), s( 0 ), formWindow( 0 ), mousePressed( false ) +#include +#include +#include +#include +#include +#include +#include +#include + +StyledButton::StyledButton(TQWidget* parent, const char* name) + : TQButton( parent, name ), pix( 0 ), spix( 0 ), s( 0 ), formWindow( 0 ), mousePressed( false ) { setMinimumSize( minimumSizeHint() ); setAcceptDrops( true ); - connect( this, SIGNAL(clicked()), SLOT(onEditor())); + connect( this, TQT_SIGNAL(clicked()), TQT_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 ) +StyledButton::StyledButton( const TQBrush& b, TQWidget* parent, const char* name, WFlags f ) + : TQButton( parent, name, f ), spix( 0 ), s( 0 ), formWindow( 0 ) { col = b.color(); pix = b.pixmap(); @@ -69,17 +69,17 @@ StyledButton::EditorType StyledButton::editor() const return edit; } -void StyledButton::setColor( const QColor& c ) +void StyledButton::setColor( const TQColor& c ) { col = c; update(); } -void StyledButton::setPixmap( const QPixmap & pm ) +void StyledButton::setPixmap( const TQPixmap & pm ) { if ( !pm.isNull() ) { delete pix; - pix = new QPixmap( pm ); + pix = new TQPixmap( pm ); } else { delete pix; pix = 0; @@ -87,12 +87,12 @@ void StyledButton::setPixmap( const QPixmap & pm ) scalePixmap(); } -QColor StyledButton::color() const +TQColor StyledButton::color() const { return col; } -QPixmap* StyledButton::pixmap() const +TQPixmap* StyledButton::pixmap() const { return pix; } @@ -111,14 +111,14 @@ void StyledButton::setScale( bool on ) scalePixmap(); } -QSize StyledButton::sizeHint() const +TQSize StyledButton::sizeHint() const { - return QSize( 50, 25 ); + return TQSize( 50, 25 ); } -QSize StyledButton::minimumSizeHint() const +TQSize StyledButton::minimumSizeHint() const { - return QSize( 50, 25 ); + return TQSize( 50, 25 ); } void StyledButton::scalePixmap() @@ -126,8 +126,8 @@ void StyledButton::scalePixmap() delete spix; if ( pix ) { - spix = new QPixmap( 6*width()/8, 6*height()/8 ); - QImage img = pix->convertToImage(); + spix = new TQPixmap( 6*width()/8, 6*height()/8 ); + TQImage img = pix->convertToImage(); spix->convertFromImage( s? img.smoothScale( 6*width()/8, 6*height()/8 ) : img ); } else { @@ -137,39 +137,39 @@ void StyledButton::scalePixmap() update(); } -void StyledButton::resizeEvent( QResizeEvent* e ) +void StyledButton::resizeEvent( TQResizeEvent* e ) { scalePixmap(); - QButton::resizeEvent( e ); + TQButton::resizeEvent( e ); } -void StyledButton::drawButton( QPainter *paint ) +void StyledButton::drawButton( TQPainter *paint ) { - style().drawPrimitive(QStyle::PE_ButtonBevel, paint, rect(), colorGroup(), - isDown() ? QStyle::Style_Sunken : QStyle::Style_Raised); + style().drawPrimitive(TQStyle::PE_ButtonBevel, paint, rect(), colorGroup(), + isDown() ? TQStyle::Style_Sunken : TQStyle::Style_Raised); drawButtonLabel(paint); if (hasFocus()) - style().drawPrimitive(QStyle::PE_FocusRect, paint, - style().subRect(QStyle::SR_PushButtonFocusRect, this), - colorGroup(), QStyle::Style_Default); + style().drawPrimitive(TQStyle::PE_FocusRect, paint, + style().subRect(TQStyle::SR_PushButtonFocusRect, this), + colorGroup(), TQStyle::Style_Default); } -void StyledButton::drawButtonLabel( QPainter *paint ) +void StyledButton::drawButtonLabel( TQPainter *paint ) { - QColor pen = isEnabled() ? + TQColor pen = isEnabled() ? hasFocus() ? palette().active().buttonText() : palette().inactive().buttonText() : palette().disabled().buttonText(); paint->setPen( pen ); if(!isEnabled()) { - paint->setBrush( QBrush( colorGroup().button() ) ); + paint->setBrush( TQBrush( colorGroup().button() ) ); } else if ( edit == PixmapEditor && spix ) { - paint->setBrush( QBrush( col, *spix ) ); + paint->setBrush( TQBrush( col, *spix ) ); paint->setBrushOrigin( width()/8, height()/8 ); } else - paint->setBrush( QBrush( col ) ); + paint->setBrush( TQBrush( col ) ); paint->drawRect( width()/8, height()/8, 6*width()/8, 6*height()/8 ); } @@ -178,18 +178,18 @@ void StyledButton::onEditor() { switch (edit) { case ColorEditor: { - QColor c = palette().active().background(); - if ( KColorDialog::getColor( c, this ) == QDialog::Accepted ) { + TQColor c = palette().active().background(); + if ( KColorDialog::getColor( c, this ) == TQDialog::Accepted ) { setColor( c ); emit changed(); } } break; case PixmapEditor: { - QPixmap p; + TQPixmap p; if ( pixmap() ) p = qChoosePixmap( this, formWindow, *pixmap() ); else - p = qChoosePixmap( this, formWindow, QPixmap() ); + p = qChoosePixmap( this, formWindow, TQPixmap() ); if ( !p.isNull() ) { setPixmap( p ); emit changed(); @@ -200,25 +200,25 @@ void StyledButton::onEditor() } } -void StyledButton::mousePressEvent(QMouseEvent* e) +void StyledButton::mousePressEvent(TQMouseEvent* e) { - QButton::mousePressEvent(e); + TQButton::mousePressEvent(e); mousePressed = true; pressPos = e->pos(); } -void StyledButton::mouseMoveEvent(QMouseEvent* e) +void StyledButton::mouseMoveEvent(TQMouseEvent* e) { - QButton::mouseMoveEvent( e ); + TQButton::mouseMoveEvent( e ); #ifndef QT_NO_DRAGANDDROP if ( !mousePressed ) return; - if ( ( pressPos - e->pos() ).manhattanLength() > QApplication::startDragDistance() ) { + if ( ( pressPos - e->pos() ).manhattanLength() > TQApplication::startDragDistance() ) { if ( edit == ColorEditor ) { - QColorDrag *drg = new QColorDrag( col, this ); - QPixmap pix( 25, 25 ); + TQColorDrag *drg = new TQColorDrag( col, this ); + TQPixmap pix( 25, 25 ); pix.fill( col ); - QPainter p( &pix ); + TQPainter p( &pix ); p.drawRect( 0, 0, pix.width(), pix.height() ); p.end(); drg->setPixmap( pix ); @@ -226,8 +226,8 @@ void StyledButton::mouseMoveEvent(QMouseEvent* e) drg->dragCopy(); } else if ( edit == PixmapEditor && pix && !pix->isNull() ) { - QImage img = pix->convertToImage(); - QImageDrag *drg = new QImageDrag( img, this ); + TQImage img = pix->convertToImage(); + TQImageDrag *drg = new TQImageDrag( img, this ); if(spix) drg->setPixmap( *spix ); mousePressed = false; @@ -238,46 +238,46 @@ void StyledButton::mouseMoveEvent(QMouseEvent* e) } #ifndef QT_NO_DRAGANDDROP -void StyledButton::dragEnterEvent( QDragEnterEvent *e ) +void StyledButton::dragEnterEvent( TQDragEnterEvent *e ) { setFocus(); - if ( edit == ColorEditor && QColorDrag::canDecode( e ) ) + if ( edit == ColorEditor && TQColorDrag::canDecode( e ) ) e->accept(); - else if ( edit == PixmapEditor && QImageDrag::canDecode( e ) ) + else if ( edit == PixmapEditor && TQImageDrag::canDecode( e ) ) e->accept(); else e->ignore(); } -void StyledButton::dragLeaveEvent( QDragLeaveEvent * ) +void StyledButton::dragLeaveEvent( TQDragLeaveEvent * ) { if ( hasFocus() ) parentWidget()->setFocus(); } -void StyledButton::dragMoveEvent( QDragMoveEvent *e ) +void StyledButton::dragMoveEvent( TQDragMoveEvent *e ) { - if ( edit == ColorEditor && QColorDrag::canDecode( e ) ) + if ( edit == ColorEditor && TQColorDrag::canDecode( e ) ) e->accept(); - else if ( edit == PixmapEditor && QImageDrag::canDecode( e ) ) + else if ( edit == PixmapEditor && TQImageDrag::canDecode( e ) ) e->accept(); else e->ignore(); } -void StyledButton::dropEvent( QDropEvent *e ) +void StyledButton::dropEvent( TQDropEvent *e ) { - if ( edit == ColorEditor && QColorDrag::canDecode( e ) ) { - QColor color; - QColorDrag::decode( e, color ); + if ( edit == ColorEditor && TQColorDrag::canDecode( e ) ) { + TQColor color; + TQColorDrag::decode( e, color ); setColor(color); emit changed(); e->accept(); } - else if ( edit == PixmapEditor && QImageDrag::canDecode( e ) ) { - QImage img; - QImageDrag::decode( e, img ); - QPixmap pm; + else if ( edit == PixmapEditor && TQImageDrag::canDecode( e ) ) { + TQImage img; + TQImageDrag::decode( e, img ); + TQPixmap pm; pm.convertFromImage(img); setPixmap(pm); emit changed(); diff --git a/kommander/editor/styledbutton.h b/kommander/editor/styledbutton.h index a2927084..ec60c22b 100644 --- a/kommander/editor/styledbutton.h +++ b/kommander/editor/styledbutton.h @@ -21,8 +21,8 @@ #ifndef STYLEDBUTTON_H #define STYLEDBUTTON_H -#include -#include +#include +#include class QColor; class QBrush; @@ -32,8 +32,8 @@ class StyledButton : public QButton { Q_OBJECT - Q_PROPERTY( QColor color READ color WRITE setColor ) - Q_PROPERTY( QPixmap pixmap READ pixmap WRITE setPixmap ) + Q_PROPERTY( TQColor color READ color WRITE setColor ) + Q_PROPERTY( TQPixmap pixmap READ pixmap WRITE setPixmap ) Q_PROPERTY( EditorType editor READ editor WRITE setEditor ) Q_PROPERTY( bool scale READ scale WRITE setScale ) @@ -42,24 +42,24 @@ class StyledButton : public QButton 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( TQWidget* parent = 0, const char* name = 0 ); + StyledButton( const TQBrush& b, TQWidget* parent = 0, const char* name = 0, WFlags f = 0 ); ~StyledButton(); void setEditor( EditorType ); EditorType editor() const; - void setColor( const QColor& ); - void setPixmap( const QPixmap& ); + void setColor( const TQColor& ); + void setPixmap( const TQPixmap& ); - QPixmap* pixmap() const; - QColor color() const; + TQPixmap* pixmap() const; + TQColor color() const; void setScale( bool ); bool scale() const; - QSize sizeHint() const; - QSize minimumSizeHint() const; + TQSize sizeHint() const; + TQSize minimumSizeHint() const; void setFormWindow( FormWindow *fw ) { formWindow = fw; } @@ -70,27 +70,27 @@ signals: void changed(); protected: - void mousePressEvent(QMouseEvent*); - void mouseMoveEvent(QMouseEvent*); + void mousePressEvent(TQMouseEvent*); + void mouseMoveEvent(TQMouseEvent*); #ifndef QT_NO_DRAGANDDROP - void dragEnterEvent ( QDragEnterEvent * ); - void dragMoveEvent ( QDragMoveEvent * ); - void dragLeaveEvent ( QDragLeaveEvent * ); - void dropEvent ( QDropEvent * ); + void dragEnterEvent ( TQDragEnterEvent * ); + void dragMoveEvent ( TQDragMoveEvent * ); + void dragLeaveEvent ( TQDragLeaveEvent * ); + void dropEvent ( TQDropEvent * ); #endif // QT_NO_DRAGANDDROP - void drawButton( QPainter* ); - void drawButtonLabel( QPainter* ); - void resizeEvent( QResizeEvent* ); + void drawButton( TQPainter* ); + void drawButtonLabel( TQPainter* ); + void resizeEvent( TQResizeEvent* ); void scalePixmap(); private: - QPixmap* pix; - QPixmap* spix; // the pixmap scaled down to fit into the button - QColor col; + TQPixmap* pix; + TQPixmap* spix; // the pixmap scaled down to fit into the button + TQColor col; EditorType edit; bool s; FormWindow *formWindow; - QPoint pressPos; + TQPoint pressPos; bool mousePressed; }; diff --git a/kommander/editor/tableeditorimpl.cpp b/kommander/editor/tableeditorimpl.cpp index d8cfc70d..6b5ce13e 100644 --- a/kommander/editor/tableeditorimpl.cpp +++ b/kommander/editor/tableeditorimpl.cpp @@ -1,18 +1,18 @@ #include "tableeditorimpl.h" #ifndef QT_NO_TABLE -#include +#include #endif #include "formwindow.h" -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include "pixmapchooser.h" #include "command.h" -#include -#include +#include +#include #ifndef KOMMANDER #include "project.h" #endif @@ -21,26 +21,26 @@ #include -TableEditor::TableEditor( QWidget* parent, QWidget *editWidget, FormWindow *fw, const char* name, bool modal, WFlags fl ) +TableEditor::TableEditor( TQWidget* parent, TQWidget *editWidget, FormWindow *fw, const char* name, bool modal, WFlags fl ) : TableEditorBase( parent, name, modal, fl ), #ifndef QT_NO_TABLE - editTable( (QTable*)editWidget ), + editTable( (TQTable*)editWidget ), #endif formWindow( fw ) { - connect( buttonHelp, SIGNAL( clicked() ), MainWindow::self, SLOT( showDialogHelp() ) ); + connect( buttonHelp, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) ); #ifndef QT_NO_TABLE labelColumnPixmap->setText( "" ); labelRowPixmap->setText( "" ); - if ( !editTable->inherits( "QDataTable" ) ) { + if ( !editTable->inherits( "TQDataTable" ) ) { labelFields->hide(); comboFields->hide(); labelTable->hide(); labelTableValue->hide(); } #ifndef QT_NO_SQL - if ( editTable->inherits( "QDataTable" ) ) { + if ( editTable->inherits( "TQDataTable" ) ) { // ## why does this behave weird? // TabWidget->removePage( rows_tab ); // rows_tab->hide(); @@ -48,10 +48,10 @@ TableEditor::TableEditor( QWidget* parent, QWidget *editWidget, FormWindow *fw, TabWidget->setTabEnabled( rows_tab, false ); } - if ( formWindow->project() && editTable->inherits( "QDataTable" ) ) { - QStringList lst = MetaDataBase::fakeProperty( editTable, "database" ).toStringList(); + if ( formWindow->project() && editTable->inherits( "TQDataTable" ) ) { + TQStringList lst = MetaDataBase::fakeProperty( editTable, "database" ).toStringList(); if ( lst.count() == 2 && !lst[ 0 ].isEmpty() && !lst[ 1 ].isEmpty() ) { - QStringList fields; + TQStringList fields; fields << i18n( "" ); fields += formWindow->project()->databaseFieldList( lst[ 0 ], lst[ 1 ] ); comboFields->insertStringList( fields ); @@ -77,7 +77,7 @@ void TableEditor::columnDownClicked() return; saveFieldMap(); int index = listColumns->currentItem() + 1; - QListBoxItem *i = listColumns->item( listColumns->currentItem() ); + TQListBoxItem *i = listColumns->item( listColumns->currentItem() ); listColumns->takeItem( i ); listColumns->insertItem( i, index ); listColumns->setCurrentItem( i ); @@ -86,7 +86,7 @@ void TableEditor::columnDownClicked() currentColumnChanged( i ); } -void TableEditor::columnTextChanged( const QString &s ) +void TableEditor::columnTextChanged( const TQString &s ) { if ( listColumns->currentItem() == -1 ) return; @@ -109,7 +109,7 @@ void TableEditor::columnUpClicked() return; saveFieldMap(); int index = listColumns->currentItem() - 1; - QListBoxItem *i = listColumns->item( listColumns->currentItem() ); + TQListBoxItem *i = listColumns->item( listColumns->currentItem() ); listColumns->takeItem( i ); listColumns->insertItem( i, index ); listColumns->setCurrentItem( i ); @@ -118,7 +118,7 @@ void TableEditor::columnUpClicked() currentColumnChanged( i ); } -void TableEditor::currentColumnChanged( QListBoxItem *i ) +void TableEditor::currentColumnChanged( TQListBoxItem *i ) { if ( !i ) return; @@ -131,8 +131,8 @@ void TableEditor::currentColumnChanged( QListBoxItem *i ) editColumnText->blockSignals( false ); #ifndef QT_NO_TABLE - if ( editTable->inherits( "QDataTable" ) ) { - QString s = *fieldMap.find( listColumns->index( i ) ); + if ( editTable->inherits( "TQDataTable" ) ) { + TQString s = *fieldMap.find( listColumns->index( i ) ); if ( s.isEmpty() ) comboFields->setCurrentItem( 0 ); else if ( comboFields->listBox()->findItem( s ) ) @@ -143,20 +143,20 @@ void TableEditor::currentColumnChanged( QListBoxItem *i ) #endif } -void TableEditor::currentFieldChanged( const QString &s ) +void TableEditor::currentFieldChanged( const TQString &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); + TQString newColText = s.mid(0,1).upper() + s.mid(1); editColumnText->setText( newColText ); columnTextChanged( newColText ); editColumnText->blockSignals( false ); } -void TableEditor::currentRowChanged( QListBoxItem *i ) +void TableEditor::currentRowChanged( TQListBoxItem *i ) { if ( !i ) return; @@ -203,19 +203,19 @@ void TableEditor::newColumnClicked() { #ifndef QT_NO_TABLE table->setNumCols( table->numCols() + 1 ); - QMap m; + TQMap 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 ); + TQString t = TQString::number( n ); while ( m.find( t ) != m.end() ) - t = QString::number( ++n ); + t = TQString::number( ++n ); table->horizontalHeader()->setLabel( table->numCols() - 1, t ); listColumns->insertItem( t ); - QListBoxItem *item = listColumns->item( listColumns->count() - 1 ); + TQListBoxItem *item = listColumns->item( listColumns->count() - 1 ); listColumns->setCurrentItem( item ); listColumns->setSelected( item, true ); - if ( editTable->inherits( "QDataTable" ) ) { + if ( editTable->inherits( "TQDataTable" ) ) { comboFields->setFocus(); } else { editColumnText->setFocus(); @@ -228,16 +228,16 @@ void TableEditor::newRowClicked() { #ifndef QT_NO_TABLE table->setNumRows( table->numRows() + 1 ); - QMap m; + TQMap 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 ); + TQString t = TQString::number( n ); while ( m.find( t ) != m.end() ) - t = QString::number( ++n ); + t = TQString::number( ++n ); table->verticalHeader()->setLabel( table->numRows() - 1, t ); listRows->insertItem( t ); - QListBoxItem *item = listRows->item( listRows->count() - 1 ); + TQListBoxItem *item = listRows->item( listRows->count() - 1 ); listRows->setCurrentItem( item ); listRows->setSelected( item, true ); #endif @@ -256,14 +256,14 @@ void TableEditor::rowDownClicked() listRows->count() < 2 ) return; int index = listRows->currentItem() + 1; - QListBoxItem *i = listRows->item( listRows->currentItem() ); + TQListBoxItem *i = listRows->item( listRows->currentItem() ); listRows->takeItem( i ); listRows->insertItem( i, index ); listRows->setCurrentItem( i ); readRows(); } -void TableEditor::rowTextChanged( const QString &s ) +void TableEditor::rowTextChanged( const TQString &s ) { if ( listRows->currentItem() == -1 ) return; @@ -283,7 +283,7 @@ void TableEditor::rowUpClicked() listRows->count() < 2 ) return; int index = listRows->currentItem() - 1; - QListBoxItem *i = listRows->item( listRows->currentItem() ); + TQListBoxItem *i = listRows->item( listRows->currentItem() ); listRows->takeItem( i ); listRows->insertItem( i, index ); listRows->setCurrentItem( i ); @@ -292,8 +292,8 @@ void TableEditor::rowUpClicked() void TableEditor::applyClicked() { - QValueList rows; - QValueList cols; + TQValueList rows; + TQValueList cols; int i = 0; #ifndef QT_NO_TABLE @@ -323,11 +323,11 @@ void TableEditor::chooseRowPixmapClicked() { if ( listRows->currentItem() == -1 ) return; - QPixmap pix; + TQPixmap pix; if ( listRows->item( listRows->currentItem() )->pixmap() ) pix = qChoosePixmap( this, formWindow, *listRows->item( listRows->currentItem() )->pixmap() ); else - pix = qChoosePixmap( this, formWindow, QPixmap() ); + pix = qChoosePixmap( this, formWindow, TQPixmap() ); if ( pix.isNull() ) return; @@ -343,7 +343,7 @@ void TableEditor::deleteRowPixmapClicked() if ( listRows->currentItem() == -1 ) return; #ifndef QT_NO_TABLE - table->verticalHeader()->setLabel( listRows->currentItem(), QPixmap(), table->verticalHeader()->label( listRows->currentItem() ) ); + table->verticalHeader()->setLabel( listRows->currentItem(), TQPixmap(), table->verticalHeader()->label( listRows->currentItem() ) ); listRows->changeItem( listRows->currentText(), listRows->currentItem() ); #endif } @@ -352,11 +352,11 @@ void TableEditor::chooseColPixmapClicked() { if ( listColumns->currentItem() == -1 ) return; - QPixmap pix; + TQPixmap pix; if ( listColumns->item( listColumns->currentItem() )->pixmap() ) pix = qChoosePixmap( this, formWindow, *listColumns->item( listColumns->currentItem() )->pixmap() ); else - pix = qChoosePixmap( this, formWindow, QPixmap() ); + pix = qChoosePixmap( this, formWindow, TQPixmap() ); if ( pix.isNull() ) return; @@ -371,7 +371,7 @@ void TableEditor::deleteColPixmapClicked() if ( listColumns->currentItem() == -1 ) return; #ifndef QT_NO_TABLE - table->horizontalHeader()->setLabel( listColumns->currentItem(), QPixmap(), table->horizontalHeader()->label( listColumns->currentItem() ) ); + table->horizontalHeader()->setLabel( listColumns->currentItem(), TQPixmap(), table->horizontalHeader()->label( listColumns->currentItem() ) ); listColumns->changeItem( listColumns->currentText(), listColumns->currentItem() ); #endif } @@ -379,9 +379,9 @@ void TableEditor::deleteColPixmapClicked() void TableEditor::readFromTable() { #ifndef QT_NO_TABLE - QHeader *cols = editTable->horizontalHeader(); + TQHeader *cols = editTable->horizontalHeader(); table->setNumCols( cols->count() ); - QMap columnFields = MetaDataBase::columnFields( editTable ); + TQMap 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 ), @@ -392,7 +392,7 @@ void TableEditor::readFromTable() table->horizontalHeader()->setLabel( i, editTable->horizontalHeader()->label( i ) ); listColumns->insertItem( editTable->horizontalHeader()->label( i ) ); } - QString cf = *columnFields.find( editTable->horizontalHeader()->label( i ) ); + TQString cf = *columnFields.find( editTable->horizontalHeader()->label( i ) ); fieldMap.insert( i, cf ); } @@ -401,7 +401,7 @@ void TableEditor::readFromTable() listColumns->setSelected( listColumns->firstItem(), true ); } - QHeader *rows = editTable->verticalHeader(); + TQHeader *rows = editTable->verticalHeader(); table->setNumRows( rows->count() ); for ( int j = 0; j < rows->count(); ++j ) { if ( editTable->verticalHeader()->iconSet( j ) ) { @@ -426,7 +426,7 @@ void TableEditor::readColumns() { int j = 0; #ifndef QT_NO_TABLE - for ( QListBoxItem *i = listColumns->firstItem(); i; i = i->next(), ++j ) { + for ( TQListBoxItem *i = listColumns->firstItem(); i; i = i->next(), ++j ) { if ( i->pixmap() ) table->horizontalHeader()->setLabel( j, *i->pixmap(), i->text() ); else @@ -439,7 +439,7 @@ void TableEditor::readRows() { int j = 0; #ifndef QT_NO_TABLE - for ( QListBoxItem *i = listRows->firstItem(); i; i = i->next(), ++j ) { + for ( TQListBoxItem *i = listRows->firstItem(); i; i = i->next(), ++j ) { if ( i->pixmap() ) table->verticalHeader()->setLabel( j, *i->pixmap(), i->text() ); else @@ -451,14 +451,14 @@ void TableEditor::readRows() void TableEditor::saveFieldMap() { tmpFieldMap.clear(); - for ( QMap::Iterator it = fieldMap.begin(); it != fieldMap.end(); ++it ) + for ( TQMap::Iterator it = fieldMap.begin(); it != fieldMap.end(); ++it ) tmpFieldMap.insert( listColumns->item( it.key() ), *it ); } void TableEditor::restoreFieldMap() { fieldMap.clear(); - for ( QMap::Iterator it = tmpFieldMap.begin(); it != tmpFieldMap.end(); ++it ) + for ( TQMap::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 index 8018bf92..9d2909c9 100644 --- a/kommander/editor/tableeditorimpl.h +++ b/kommander/editor/tableeditorimpl.h @@ -2,7 +2,7 @@ #define TABLEEDITOR_H #include "tableeditor.h" -#include +#include class QListBoxItem; class QTable; @@ -13,24 +13,24 @@ class TableEditor : public TableEditorBase Q_OBJECT public: - TableEditor( QWidget* parent = 0, QWidget *editWidget = 0, FormWindow *fw = 0, + TableEditor( TQWidget* parent = 0, TQWidget *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 columnTextChanged( const TQString & ); void columnUpClicked(); - void currentColumnChanged( QListBoxItem * ); - void currentFieldChanged( const QString & ); - void currentRowChanged( QListBoxItem * ); + void currentColumnChanged( TQListBoxItem * ); + void currentFieldChanged( const TQString & ); + void currentRowChanged( TQListBoxItem * ); void deleteColumnClicked(); void deleteRowClicked(); void newColumnClicked(); void newRowClicked(); void okClicked(); void rowDownClicked(); - void rowTextChanged( const QString & ); + void rowTextChanged( const TQString & ); void rowUpClicked(); void applyClicked(); void chooseRowPixmapClicked(); @@ -46,10 +46,10 @@ private: void restoreFieldMap(); private: - QTable *editTable; + TQTable *editTable; FormWindow *formWindow; - QMap fieldMap; - QMap tmpFieldMap; + TQMap fieldMap; + TQMap tmpFieldMap; }; diff --git a/kommander/editor/timestamp.cpp b/kommander/editor/timestamp.cpp index b0d42e03..659cfcec 100644 --- a/kommander/editor/timestamp.cpp +++ b/kommander/editor/timestamp.cpp @@ -19,26 +19,26 @@ **********************************************************************/ #include "timestamp.h" -#include -#include +#include +#include class QTimer; -TimeStamp::TimeStamp( QObject *parent, const QString &f ) - : QObject( parent ), filename( f ), autoCheck( false ) +TimeStamp::TimeStamp( TQObject *parent, const TQString &f ) + : TQObject( parent ), filename( f ), autoCheck( false ) { - timer = new QTimer( this ); - connect( timer, SIGNAL( timeout() ), this, SLOT( autoCheckTimeStamp() ) ); + timer = new TQTimer( this ); + connect( timer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( autoCheckTimeStamp() ) ); update(); } -void TimeStamp::setFileName( const QString &f ) +void TimeStamp::setFileName( const TQString &f ) { filename = f; update(); } -QString TimeStamp::fileName() const +TQString TimeStamp::fileName() const { return filename; } @@ -54,18 +54,18 @@ void TimeStamp::setAutoCheckEnabled( bool a ) void TimeStamp::update() { - QFile f( filename ); + TQFile f( filename ); if ( !f.exists() ) return; - lastTimeStamp = QFileInfo( f ).lastModified(); + lastTimeStamp = TQFileInfo( f ).lastModified(); } bool TimeStamp::isUpToDate() const { - QFile f( filename ); + TQFile f( filename ); if ( !f.exists() ) return true; - return lastTimeStamp == QFileInfo( f ).lastModified(); + return lastTimeStamp == TQFileInfo( f ).lastModified(); } bool TimeStamp::isAutoCheckEnabled() const diff --git a/kommander/editor/timestamp.h b/kommander/editor/timestamp.h index 06d50507..d3e061f9 100644 --- a/kommander/editor/timestamp.h +++ b/kommander/editor/timestamp.h @@ -21,19 +21,19 @@ #ifndef TIMESTAMP_H #define TIMESTAMP_H -#include -#include -#include +#include +#include +#include class TimeStamp : public QObject { Q_OBJECT public: - TimeStamp( QObject *parent, const QString &f ); + TimeStamp( TQObject *parent, const TQString &f ); - void setFileName( const QString &f ); - QString fileName() const; + void setFileName( const TQString &f ); + TQString fileName() const; void setAutoCheckEnabled( bool a ); void update(); @@ -47,10 +47,10 @@ private slots: void autoCheckTimeStamp(); private: - QDateTime lastTimeStamp; - QString filename; + TQDateTime lastTimeStamp; + TQString filename; bool autoCheck; - QTimer *timer; + TQTimer *timer; }; diff --git a/kommander/editor/widgetdatabase.cpp b/kommander/editor/widgetdatabase.cpp index 4de615d0..940176c1 100644 --- a/kommander/editor/widgetdatabase.cpp +++ b/kommander/editor/widgetdatabase.cpp @@ -26,16 +26,16 @@ #endif #include "widgetdatabase.h" -#include +#include //#define NO_STATIC_COLORS #include "globaldefs.h" -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include -#include +#include #include @@ -46,11 +46,11 @@ const int dbsize = 300; const int dbcustom = 200; const int dbdictsize = 211; static WidgetDatabaseRecord* widget_db[ dbsize ]; -static QDict *className2Id = 0; +static TQDict *className2Id = 0; static int dbcount = 0; static int dbcustomcount = 200; -static QStrList *wGroups; -static QStrList *invisibleGroups; +static TQStrList *wGroups; +static TQStrList *invisibleGroups; static bool whatsThisLoaded = false; #ifndef KOMMANDER static QPluginManager *widgetPluginManager = 0; @@ -59,7 +59,7 @@ static bool plugins_set_up = false; static bool was_in_setup = false; #ifndef KOMMANDER -QCleanupHandler > cleanup_manager; +TQCleanupHandler > cleanup_manager; #endif WidgetDatabaseRecord::WidgetDatabaseRecord() @@ -126,7 +126,7 @@ void WidgetDatabase::setupDataBase( int id ) invisibleGroups = new QStrList; invisibleGroups->append("Forms"); invisibleGroups->append("Temp"); - className2Id = new QDict < int >(dbdictsize); + className2Id = new TQDict < int >(dbdictsize); className2Id->setAutoDelete(true); WidgetDatabaseRecord *r = 0; @@ -134,35 +134,35 @@ void WidgetDatabase::setupDataBase( int id ) /* Designer widgets */ r = new WidgetDatabaseRecord; r->iconName = "pushbutton.xpm"; - r->name = "QPushButton"; + r->name = "TQPushButton"; r->group = widgetGroup("Buttons"); r->toolTip = i18n("Push Button"); append(r); r = new WidgetDatabaseRecord; r->iconName = "toolbutton.xpm"; - r->name = "QToolButton"; + r->name = "TQToolButton"; r->group = widgetGroup("Buttons"); r->toolTip = i18n("Tool Button"); append(r); r = new WidgetDatabaseRecord; r->iconName = "radiobutton.xpm"; - r->name = "QRadioButton"; + r->name = "TQRadioButton"; r->group = widgetGroup("Buttons"); r->toolTip = i18n("Radio Button"); append(r); r = new WidgetDatabaseRecord; r->iconName = "checkbox.xpm"; - r->name = "QCheckBox"; + r->name = "TQCheckBox"; r->group = widgetGroup("Buttons"); r->toolTip = i18n("Check Box"); append(r); r = new WidgetDatabaseRecord; r->iconName = "groupbox.xpm"; - r->name = "QGroupBox"; + r->name = "TQGroupBox"; r->group = widgetGroup("Containers"); r->toolTip = i18n("Group Box"); r->isContainer = true; @@ -170,7 +170,7 @@ void WidgetDatabase::setupDataBase( int id ) r = new WidgetDatabaseRecord; r->iconName = "buttongroup.xpm"; - r->name = "QButtonGroup"; + r->name = "TQButtonGroup"; r->group = widgetGroup("Containers"); r->toolTip = i18n("Button Group"); r->isContainer = true; @@ -178,7 +178,7 @@ void WidgetDatabase::setupDataBase( int id ) r = new WidgetDatabaseRecord; r->iconName = "frame.xpm"; - r->name = "QFrame"; + r->name = "TQFrame"; r->group = widgetGroup("Containers"); r->toolTip = i18n("Frame"); r->isContainer = true; @@ -186,7 +186,7 @@ void WidgetDatabase::setupDataBase( int id ) r = new WidgetDatabaseRecord; r->iconName = "tabwidget.xpm"; - r->name = "QTabWidget"; + r->name = "TQTabWidget"; r->group = widgetGroup("Containers"); r->toolTip = i18n("Tabwidget"); r->isContainer = true; @@ -194,14 +194,14 @@ void WidgetDatabase::setupDataBase( int id ) r = new WidgetDatabaseRecord; r->iconName = "listbox.xpm"; - r->name = "QListBox"; + r->name = "TQListBox"; r->group = widgetGroup("Views"); r->toolTip = i18n("List Box"); append(r); r = new WidgetDatabaseRecord; r->iconName = "listview.xpm"; - r->name = "QListView"; + r->name = "TQListView"; r->group = widgetGroup("Views"); r->toolTip = i18n("List View"); append(r); @@ -209,7 +209,7 @@ void WidgetDatabase::setupDataBase( int id ) #if !defined(QT_NO_ICONVIEW) || defined(UIC) r = new WidgetDatabaseRecord; r->iconName = "iconview.xpm"; - r->name = "QIconView"; + r->name = "TQIconView"; r->group = widgetGroup("Views"); r->toolTip = i18n("Icon View"); append(r); @@ -218,7 +218,7 @@ void WidgetDatabase::setupDataBase( int id ) #if !defined(QT_NO_TABLE) r = new WidgetDatabaseRecord; r->iconName = "table.xpm"; - r->name = "QTable"; + r->name = "TQTable"; r->group = widgetGroup("Views"); r->toolTip = i18n("Table"); append(r); @@ -227,8 +227,8 @@ void WidgetDatabase::setupDataBase( int id ) #if !defined(QT_NO_SQL) r = new WidgetDatabaseRecord; r->iconName = "datatable.xpm"; - r->includeFile = "qdatatable.h"; - r->name = "QDataTable"; + r->includeFile = "tqdatatable.h"; + r->name = "TQDataTable"; r->group = widgetGroup("Database"); r->toolTip = i18n("Data Table"); append(r); @@ -236,14 +236,14 @@ void WidgetDatabase::setupDataBase( int id ) r = new WidgetDatabaseRecord; r->iconName = "lineedit.xpm"; - r->name = "QLineEdit"; + r->name = "TQLineEdit"; r->group = widgetGroup("Input"); r->toolTip = i18n("Line Edit"); append(r); r = new WidgetDatabaseRecord; r->iconName = "spinbox.xpm"; - r->name = "QSpinBox"; + r->name = "TQSpinBox"; r->group = widgetGroup("Input"); r->toolTip = i18n("Spin Box"); append(r); @@ -253,7 +253,7 @@ void WidgetDatabase::setupDataBase( int id ) r->name = "QDateEdit"; r->group = widgetGroup("Input"); r->toolTip = i18n("Date Edit"); - r->includeFile = "qdatetimeedit.h"; + r->includeFile = "tqdatetimeedit.h"; append(r); r = new WidgetDatabaseRecord; @@ -261,7 +261,7 @@ void WidgetDatabase::setupDataBase( int id ) r->name = "QTimeEdit"; r->group = widgetGroup("Input"); r->toolTip = i18n("Time Edit"); - r->includeFile = "qdatetimeedit.h"; + r->includeFile = "tqdatetimeedit.h"; append(r); r = new WidgetDatabaseRecord; @@ -269,82 +269,82 @@ void WidgetDatabase::setupDataBase( int id ) r->name = "QDateTimeEdit"; r->group = widgetGroup("Input"); r->toolTip = i18n("Date-Time Edit"); - r->includeFile = "qdatetimeedit.h"; + r->includeFile = "tqdatetimeedit.h"; append(r); r = new WidgetDatabaseRecord; r->iconName = "multilineedit.xpm"; - r->name = "QMultiLineEdit"; + r->name = "TQMultiLineEdit"; r->group = widgetGroup("Temp"); r->toolTip = i18n("Multi Line Edit"); append(r); r = new WidgetDatabaseRecord; r->iconName = "richtextedit.xpm"; - r->name = "QTextEdit"; + r->name = "TQTextEdit"; r->group = widgetGroup("Input"); r->toolTip = i18n("Rich Text Edit"); append(r); r = new WidgetDatabaseRecord; r->iconName = "combobox.xpm"; - r->name = "QComboBox"; + r->name = "TQComboBox"; r->group = widgetGroup("Input"); r->toolTip = i18n("Combo Box"); append(r); r = new WidgetDatabaseRecord; r->iconName = "slider.xpm"; - r->name = "QSlider"; + r->name = "TQSlider"; r->group = widgetGroup("Input"); r->toolTip = i18n("Slider"); append(r); r = new WidgetDatabaseRecord; r->iconName = "scrollbar.xpm"; - r->name = "QScrollBar"; + r->name = "TQScrollBar"; r->group = widgetGroup("Input"); r->toolTip = i18n("Scrollbar"); append(r); r = new WidgetDatabaseRecord; r->iconName = "dial.xpm"; - r->name = "QDial"; + r->name = "TQDial"; r->group = widgetGroup("Input"); r->toolTip = i18n("Dial"); append(r); r = new WidgetDatabaseRecord; r->iconName = "label.xpm"; - r->name = "QLabel"; + r->name = "TQLabel"; r->group = widgetGroup("Temp"); r->toolTip = i18n("Label"); append(r); r = new WidgetDatabaseRecord; r->iconName = "lcdnumber.xpm"; - r->name = "QLCDNumber"; + r->name = "TQLCDNumber"; r->group = widgetGroup("Display"); r->toolTip = i18n("LCD Number"); append(r); r = new WidgetDatabaseRecord; r->iconName = "progress.xpm"; - r->name = "QProgressBar"; + r->name = "TQProgressBar"; r->group = widgetGroup("Display"); r->toolTip = i18n("Progress Bar"); append(r); r = new WidgetDatabaseRecord; r->iconName = "textview.xpm"; - r->name = "QTextView"; + r->name = "TQTextView"; r->group = widgetGroup("Temp"); r->toolTip = i18n("Text View"); append(r); r = new WidgetDatabaseRecord; r->iconName = "textbrowser.xpm"; - r->name = "QTextBrowser"; + r->name = "TQTextBrowser"; r->group = widgetGroup("Display"); r->toolTip = i18n("Text Browser"); append(r); @@ -359,19 +359,19 @@ void WidgetDatabase::setupDataBase( int id ) append(r); r = new WidgetDatabaseRecord; - r->name = "QWidget"; + r->name = "TQWidget"; r->isForm = true; r->group = widgetGroup("Forms"); append(r); r = new WidgetDatabaseRecord; - r->name = "QDialog"; + r->name = "TQDialog"; r->group = widgetGroup("Forms"); r->isForm = true; append(r); r = new WidgetDatabaseRecord; - r->name = "QWizard"; + r->name = "TQWizard"; r->group = widgetGroup("Forms"); r->isContainer = true; append(r); @@ -390,9 +390,9 @@ void WidgetDatabase::setupDataBase( int id ) append(r); r = new WidgetDatabaseRecord; - r->name = "QSplitter"; + r->name = "TQSplitter"; r->group = widgetGroup("Temp"); - r->includeFile = "qsplitter.h"; + r->includeFile = "tqsplitter.h"; r->isContainer = true; append(r); @@ -419,16 +419,16 @@ void WidgetDatabase::setupDataBase( int id ) r = new WidgetDatabaseRecord; r->iconName = ""; - r->name = "QMainWindow"; - r->includeFile = "qmainwindow.h"; + r->name = "TQMainWindow"; + r->includeFile = "tqmainwindow.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->name = "TQDataBrowser"; + r->includeFile = "tqdatabrowser.h"; r->group = widgetGroup("Database"); r->toolTip = "Data Browser"; r->iconName = "databrowser.xpm"; @@ -436,8 +436,8 @@ void WidgetDatabase::setupDataBase( int id ) append(r); r = new WidgetDatabaseRecord; - r->name = "QDataView"; - r->includeFile = "qdataview.h"; + r->name = "TQDataView"; + r->includeFile = "tqdataview.h"; r->group = widgetGroup("Database"); r->toolTip = "Data View"; r->iconName = "dataview.xpm"; @@ -702,7 +702,7 @@ void WidgetDatabase::setupPlugins() continue; WidgetDatabaseRecord *r = new WidgetDatabaseRecord; - QString grp = (*it).group; + TQString grp = (*it).group; if (grp.isEmpty()) grp = "Kommander"; r->group = widgetGroup(grp); @@ -739,19 +739,19 @@ int WidgetDatabase::startCustom() Returns the iconset which represents the class registered as \a id. */ -QIconSet WidgetDatabase::iconSet( int id ) +TQIconSet WidgetDatabase::iconSet( int id ) { setupDataBase( id ); WidgetDatabaseRecord *r = at( id ); if ( !r ) - return QIconSet(); + return TQIconSet(); #if !defined(UIC) && !defined(RESOURCE) if ( !r->iconSet ) - r->iconSet = new QIconSet( PixmapChooser::loadPixmap( r->iconName, PixmapChooser::Small ), + r->iconSet = new TQIconSet( PixmapChooser::loadPixmap( r->iconName, PixmapChooser::Small ), PixmapChooser::loadPixmap( r->iconName, PixmapChooser::Large ) ); return *r->iconSet; #else - return QIconSet(); + return TQIconSet(); #endif } @@ -759,12 +759,12 @@ QIconSet WidgetDatabase::iconSet( int id ) Returns the classname of the widget which is registered as \a id. */ -QString WidgetDatabase::className( int id ) +TQString WidgetDatabase::className( int id ) { setupDataBase( id ); WidgetDatabaseRecord *r = at( id ); if ( !r ) - return QString::null; + return TQString::null; return r->name; } @@ -772,12 +772,12 @@ QString WidgetDatabase::className( int id ) Returns the group the widget registered as \a id belongs to. */ -QString WidgetDatabase::group( int id ) +TQString WidgetDatabase::group( int id ) { setupDataBase( id ); WidgetDatabaseRecord *r = at( id ); if ( !r ) - return QString::null; + return TQString::null; return r->group; } @@ -785,12 +785,12 @@ QString WidgetDatabase::group( int id ) Returns the tooltip text of the widget which is registered as \a id. */ -QString WidgetDatabase::toolTip( int id ) +TQString WidgetDatabase::toolTip( int id ) { setupDataBase( id ); WidgetDatabaseRecord *r = at( id ); if ( !r ) - return QString::null; + return TQString::null; return r->toolTip; } @@ -798,12 +798,12 @@ QString WidgetDatabase::toolTip( int id ) Returns the what's this? text of the widget which is registered as \a id. */ -QString WidgetDatabase::whatsThis( int id ) +TQString WidgetDatabase::whatsThis( int id ) { setupDataBase( id ); WidgetDatabaseRecord *r = at( id ); if ( !r ) - return QString::null; + return TQString::null; return r->whatsThis; } @@ -811,12 +811,12 @@ QString WidgetDatabase::whatsThis( int id ) Returns the include file if the widget which is registered as \a id. */ -QString WidgetDatabase::includeFile( int id ) +TQString WidgetDatabase::includeFile( int id ) { setupDataBase( id ); WidgetDatabaseRecord *r = at( id ); if ( !r ) - return QString::null; + return TQString::null; if ( r->includeFile.isNull() ) return r->name.lower() + ".h"; return r->includeFile; @@ -845,10 +845,10 @@ bool WidgetDatabase::isContainer( int id ) return r->isContainer || r->isForm; } -QString WidgetDatabase::createWidgetName( int id ) +TQString WidgetDatabase::createWidgetName( int id ) { setupDataBase( id ); - QString n = className( id ); + TQString n = className( id ); if ( n == "QLayoutWidget" ) n = "Layout"; if ( n[ 0 ] == 'Q' ) @@ -856,13 +856,13 @@ QString WidgetDatabase::createWidgetName( int id ) WidgetDatabaseRecord *r = at( id ); if ( !r ) return n; - n += QString::number( ++r->nameCounter ); + n += TQString::number( ++r->nameCounter ); return n; } /*! Returns the id for \a name or -1 if \a name is unknown. */ -int WidgetDatabase::idFromClassName( const QString &name ) +int WidgetDatabase::idFromClassName( const TQString &name ) { setupDataBase( -1 ); if ( name.isEmpty() ) @@ -881,7 +881,7 @@ int WidgetDatabase::idFromClassName( const QString &name ) return -1; } -bool WidgetDatabase::hasWidget( const QString &name ) +bool WidgetDatabase::hasWidget( const TQString &name ) { return className2Id->find( name ) != 0; } @@ -914,14 +914,14 @@ void WidgetDatabase::append( WidgetDatabaseRecord *r ) insert( dbcount++, r ); } -QString WidgetDatabase::widgetGroup( const QString &g ) +TQString WidgetDatabase::widgetGroup( const TQString &g ) { if ( wGroups->find( g ) == -1 ) wGroups->append( g ); return g; } -bool WidgetDatabase::isGroupEmpty( const QString &grp ) +bool WidgetDatabase::isGroupEmpty( const TQString &grp ) { WidgetDatabaseRecord *r = 0; for ( int i = 0; i < dbcount; ++i ) { @@ -940,12 +940,12 @@ bool WidgetDatabase::isGroupEmpty( const QString &grp ) return true; } -QString WidgetDatabase::widgetGroup( int i ) +TQString WidgetDatabase::widgetGroup( int i ) { setupDataBase( -1 ); if ( i >= 0 && i < (int)wGroups->count() ) return wGroups->at( i ); - return QString::null; + return TQString::null; } int WidgetDatabase::numWidgetGroups() @@ -954,7 +954,7 @@ int WidgetDatabase::numWidgetGroups() return wGroups->count(); } -bool WidgetDatabase::isGroupVisible( const QString &g ) +bool WidgetDatabase::isGroupVisible( const TQString &g ) { setupDataBase( -1 ); return invisibleGroups->find( g ) == -1; @@ -978,16 +978,16 @@ bool WidgetDatabase::isWhatsThisLoaded() return whatsThisLoaded; } -void WidgetDatabase::loadWhatsThis( const QString &docPath ) +void WidgetDatabase::loadWhatsThis( const TQString &docPath ) { - QString whatsthisFile = docPath + "/whatsthis"; - QFile f( whatsthisFile ); + TQString whatsthisFile = docPath + "/whatsthis"; + TQFile f( whatsthisFile ); if ( !f.open( IO_ReadOnly ) ) return; - QTextStream ts( &f ); + TQTextStream ts( &f ); while ( !ts.atEnd() ) { - QString s = ts.readLine(); - QStringList l = QStringList::split( " | ", s ); + TQString s = ts.readLine(); + TQStringList l = TQStringList::split( " | ", s ); int id = idFromClassName( l[ 1 ] ); WidgetDatabaseRecord *r = at( id ); if ( r ) @@ -1001,16 +1001,16 @@ void WidgetDatabase::loadWhatsThis( const QString &docPath ) #ifndef KOMMANDER #if defined(UIC) bool dbnounload = false; -QStringList *dbpaths = 0; +TQStringList *dbpaths = 0; #endif QPluginManager *widgetManager() { if ( !widgetPluginManager ) { #ifndef KOMMANDER - widgetPluginManager = new QPluginManager( IID_Widget, QApplication::libraryPaths(), "/designer" ); + widgetPluginManager = new QPluginManager( IID_Widget, TQApplication::libraryPaths(), "/designer" ); #else - widgetPluginManager = new QPluginManager( IID_Widget, QApplication::libraryPaths(), "" ); + widgetPluginManager = new QPluginManager( IID_Widget, TQApplication::libraryPaths(), "" ); #endif cleanup_manager.add( &widgetPluginManager ); @@ -1018,7 +1018,7 @@ QPluginManager *widgetManager() if ( dbnounload ) widgetPluginManager->setAutoUnload( false ); if ( dbpaths ) { - QStringList::ConstIterator it = dbpaths->begin(); + TQStringList::ConstIterator it = dbpaths->begin(); for ( ; it != dbpaths->end(); ++it ) widgetPluginManager->addLibraryPath( *it ); } diff --git a/kommander/editor/widgetdatabase.h b/kommander/editor/widgetdatabase.h index ad1f123c..3e4078c5 100644 --- a/kommander/editor/widgetdatabase.h +++ b/kommander/editor/widgetdatabase.h @@ -21,8 +21,8 @@ #ifndef WIDGETDATABASE_H #define WIDGETDATABASE_H -#include -#include +#include +#include #ifndef KOMMANDER #include "widgetinterface.h" // up here for GCC 2.7.* compatibility #include @@ -35,10 +35,10 @@ struct WidgetDatabaseRecord { WidgetDatabaseRecord(); ~WidgetDatabaseRecord(); - QString iconName, name, group, toolTip, whatsThis, includeFile; + TQString iconName, name, group, toolTip, whatsThis, includeFile; uint isContainer : 1; uint isForm : 1; - QIconSet *iconSet; + TQIconSet *iconSet; int nameCounter; }; @@ -52,35 +52,35 @@ public: 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 TQIconSet iconSet( int id ); + static TQString className( int id ); + static TQString group( int id ); + static TQString toolTip( int id ); + static TQString whatsThis( int id ); + static TQString 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 int idFromClassName( const TQString &name ); + static TQString 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 TQString widgetGroup( const TQString &g ); + static TQString widgetGroup( int i ); static int numWidgetGroups(); - static bool isGroupVisible( const QString &g ); - static bool isGroupEmpty( const QString &grp ); + static bool isGroupVisible( const TQString &g ); + static bool isGroupEmpty( const TQString &grp ); static int addCustomWidget( WidgetDatabaseRecord *r ); static bool isCustomWidget( int id ); static bool isWhatsThisLoaded(); - static void loadWhatsThis( const QString &docPath ); + static void loadWhatsThis( const TQString &docPath ); - static bool hasWidget( const QString &name ); + static bool hasWidget( const TQString &name ); }; diff --git a/kommander/editor/widgetfactory.cpp b/kommander/editor/widgetfactory.cpp index 0dbab517..34cd0514 100644 --- a/kommander/editor/widgetfactory.cpp +++ b/kommander/editor/widgetfactory.cpp @@ -22,7 +22,7 @@ #include #include "kmdrmainwindow.h" -#include // HP-UX compiler need this here +#include // HP-UX compiler need this here #include "widgetfactory.h" #include "widgetdatabase.h" #include "metadatabase.h" @@ -41,46 +41,46 @@ #include "tableeditorimpl.h" #endif -#include +#include -#include -#include -#include +#include +#include +#include #ifndef QT_NO_TABLE -#include +#include #endif #ifndef QT_NO_SQL -#include +#include #endif -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #ifndef QT_NO_SQL #include "database.h" #endif @@ -116,7 +116,7 @@ #include "fontdialog.h" #include "aboutdialog.h" -FormWindow *find_formwindow( QWidget *w ) +FormWindow *find_formwindow( TQWidget *w ) { if ( !w ) return 0; @@ -129,16 +129,16 @@ FormWindow *find_formwindow( QWidget *w ) } } -void QLayoutWidget::paintEvent( QPaintEvent* ) +void QLayoutWidget::paintEvent( TQPaintEvent* ) { - QPainter p ( this ); + TQPainter p ( this ); p.setPen( red ); p.drawRect( rect() ); } -QDesignerTabWidget::QDesignerTabWidget( QWidget *parent, const char *name ) - : QTabWidget( parent, name ), dropIndicator( 0 ), dragPage( 0 ), mousePressed( false ) +QDesignerTabWidget::QDesignerTabWidget( TQWidget *parent, const char *name ) + : TQTabWidget( parent, name ), dropIndicator( 0 ), dragPage( 0 ), mousePressed( false ) { tabBar()->setAcceptDrops( true ); tabBar()->installEventFilter( this ); @@ -154,27 +154,27 @@ void QDesignerTabWidget::setCurrentPage( int i ) tabBar()->setCurrentTab( i ); } -QString QDesignerTabWidget::pageTitle() const +TQString QDesignerTabWidget::pageTitle() const { - return ((QTabWidget*)this)->tabLabel( QTabWidget::currentPage() ); + return ((TQTabWidget*)this)->tabLabel( TQTabWidget::currentPage() ); } -void QDesignerTabWidget::setPageTitle( const QString& title ) +void QDesignerTabWidget::setPageTitle( const TQString& title ) { - changeTab( QTabWidget::currentPage(), title ); + changeTab( TQTabWidget::currentPage(), title ); } -void QDesignerTabWidget::setPageName( const QCString& name ) +void QDesignerTabWidget::setPageName( const TQCString& name ) { - if ( QTabWidget::currentPage() ) - QTabWidget::currentPage()->setName( name ); + if ( TQTabWidget::currentPage() ) + TQTabWidget::currentPage()->setName( name ); } -QCString QDesignerTabWidget::pageName() const +TQCString QDesignerTabWidget::pageName() const { - if ( !QTabWidget::currentPage() ) + if ( !TQTabWidget::currentPage() ) return 0; - return QTabWidget::currentPage()->name(); + return TQTabWidget::currentPage()->name(); } int QDesignerTabWidget::count() const @@ -182,24 +182,24 @@ int QDesignerTabWidget::count() const return tabBar()->count(); } -bool QDesignerTabWidget::eventFilter( QObject *o, QEvent *e ) +bool QDesignerTabWidget::eventFilter( TQObject *o, TQEvent *e ) { if ( o != tabBar() ) return false; switch ( e->type() ) { - case QEvent::MouseButtonPress: { + case TQEvent::MouseButtonPress: { mousePressed = true; - QMouseEvent *me = (QMouseEvent*)e; + TQMouseEvent *me = (TQMouseEvent*)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 ); + case TQEvent::MouseMove: { + TQMouseEvent *me = (TQMouseEvent*)e; + if ( mousePressed && ( pressPoint - me->pos()).manhattanLength() > TQApplication::startDragDistance() ) { + TQTextDrag *drg = new TQTextDrag( TQString::number( (long) this ) , this ); mousePressed = false; - dragPage = QTabWidget::currentPage(); - dragLabel = QTabWidget::tabLabel( dragPage ); + dragPage = TQTabWidget::currentPage(); + dragLabel = TQTabWidget::tabLabel( dragPage ); int index = indexOf( dragPage ); @@ -213,24 +213,24 @@ bool QDesignerTabWidget::eventFilter( QObject *o, QEvent *e ) } } break; - case QEvent::DragLeave: { + case TQEvent::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 ) ) + case TQEvent::DragMove: { + TQDragEnterEvent *de = (TQDragEnterEvent*) e; + if ( TQTextDrag::canDecode( de ) ) { + TQString text; + TQTextDrag::decode( de, text ); + if ( text == TQString::number( (long)this ) ) de->accept(); else return false; } int index = 0; - QRect rect; + TQRect rect; for ( ; index < tabBar()->count(); index++ ) { if ( tabBar()->tabAt( index )->rect().contains( de->pos() ) ) { rect = tabBar()->tabAt( index )->rect(); @@ -239,33 +239,33 @@ bool QDesignerTabWidget::eventFilter( QObject *o, QEvent *e ) } if ( index == tabBar()->count() -1 ) { - QRect rect2 = rect; + TQRect rect2 = rect; rect2.setLeft( rect2.left() + rect2.width() / 2 ); if ( rect2.contains( de->pos() ) ) index++; } if ( ! dropIndicator ) { - dropIndicator = new QWidget( this ); + dropIndicator = new TQWidget( this ); dropIndicator->setBackgroundColor( red ); } - QPoint pos; + TQPoint pos; if ( index == tabBar()->count() ) - pos = tabBar()->mapToParent( QPoint( rect.x() + rect.width(), rect.y() ) ); + pos = tabBar()->mapToParent( TQPoint( rect.x() + rect.width(), rect.y() ) ); else - pos = tabBar()->mapToParent( QPoint( rect.x(), rect.y() ) ); + pos = tabBar()->mapToParent( TQPoint( 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 ) ) { + case TQEvent::Drop: { + TQDragEnterEvent *de = (TQDragEnterEvent*) e; + if ( TQTextDrag::canDecode( de ) ) { + TQString text; + TQTextDrag::decode( de, text ); + if ( text == TQString::number( (long)this ) ) { int newIndex = 0; for ( ; newIndex < tabBar()->count(); newIndex++ ) { @@ -274,7 +274,7 @@ bool QDesignerTabWidget::eventFilter( QObject *o, QEvent *e ) } if ( newIndex == tabBar()->count() -1 ) { - QRect rect2 = tabBar()->tabAt( newIndex )->rect(); + TQRect rect2 = tabBar()->tabAt( newIndex )->rect(); rect2.setLeft( rect2.left() + rect2.width() / 2 ); if ( rect2.contains( de->pos() ) ) newIndex++; @@ -330,30 +330,30 @@ void QDesignerWizard::setCurrentPage( int i ) } } -QString QDesignerWizard::pageTitle() const +TQString QDesignerWizard::pageTitle() const { return title( currentPage() ); } -void QDesignerWizard::setPageTitle( const QString& title ) +void QDesignerWizard::setPageTitle( const TQString& title ) { setTitle( currentPage(), title ); } -void QDesignerWizard::setPageName( const QCString& name ) +void QDesignerWizard::setPageName( const TQCString& name ) { - if ( QWizard::currentPage() ) - QWizard::currentPage()->setName( name ); + if ( TQWizard::currentPage() ) + TQWizard::currentPage()->setName( name ); } -QCString QDesignerWizard::pageName() const +TQCString QDesignerWizard::pageName() const { - if ( !QWizard::currentPage() ) + if ( !TQWizard::currentPage() ) return 0; - return QWizard::currentPage()->name(); + return TQWizard::currentPage()->name(); } -int QDesignerWizard::pageNum( QWidget *p ) +int QDesignerWizard::pageNum( TQWidget *p ) { for ( int i = 0; i < pageCount(); ++i ) { if ( page( i ) == p ) @@ -362,28 +362,28 @@ int QDesignerWizard::pageNum( QWidget *p ) return -1; } -void QDesignerWizard::addPage( QWidget *p, const QString &t ) +void QDesignerWizard::addPage( TQWidget *p, const TQString &t ) { - QWizard::addPage( p, t ); + TQWizard::addPage( p, t ); if ( removedPages.find( p ) ) removedPages.remove( p ); } -void QDesignerWizard::removePage( QWidget *p ) +void QDesignerWizard::removePage( TQWidget *p ) { - QWizard::removePage( p ); + TQWizard::removePage( p ); removedPages.insert( p, p ); } -void QDesignerWizard::insertPage( QWidget *p, const QString &t, int index ) +void QDesignerWizard::insertPage( TQWidget *p, const TQString &t, int index ) { - QWizard::insertPage( p, t, index ); + TQWizard::insertPage( p, t, index ); if ( removedPages.find( p ) ) removedPages.remove( p ); } -QMap< int, QMap< QString, QVariant> > *defaultProperties = 0; -QMap< int, QStringList > *changedProperties = 0; +TQMap< int, TQMap< TQString, TQVariant> > *defaultProperties = 0; +TQMap< int, TQStringList > *changedProperties = 0; /*! \class WidgetFactory widgetfactory.h @@ -396,28 +396,28 @@ QMap< int, QStringList > *changedProperties = 0; */ -void WidgetFactory::saveDefaultProperties( QWidget *w, int id ) +void WidgetFactory::saveDefaultProperties( TQWidget *w, int id ) { - QMap< QString, QVariant> propMap; - QStrList lst = w->metaObject()->propertyNames( true ); + TQMap< TQString, TQVariant> propMap; + TQStrList lst = w->metaObject()->propertyNames( true ); for ( uint i = 0; i < lst.count(); ++i ) { - QVariant var = w->property( lst.at( i ) ); + TQVariant var = w->property( lst.at( i ) ); if ( !var.isValid() && qstrcmp( "pixmap", lst.at( i ) ) == 0 ) - var = QVariant( QPixmap() ); + var = TQVariant( TQPixmap() ); else if ( !var.isValid() && qstrcmp( "iconSet", lst.at( i ) ) == 0 ) - var = QVariant( QIconSet() ); + var = TQVariant( TQIconSet() ); propMap.replace( lst.at( i ), var ); } defaultProperties->replace( id, propMap ); } -static void saveChangedProperties( QWidget *w, int id ) +static void saveChangedProperties( TQWidget *w, int id ) { - QStringList l = MetaDataBase::changedProperties( w ); + TQStringList l = MetaDataBase::changedProperties( w ); changedProperties->insert( id, l ); } -EditorTabWidget::EditorTabWidget( QWidget *parent, const char *name ) +EditorTabWidget::EditorTabWidget( TQWidget *parent, const char *name ) : TabWidget( parent, name ), dropIndicator( 0 ), dragPage( 0 ), mousePressed( false ) { tabBar()->setAcceptDrops( true ); @@ -434,27 +434,27 @@ void EditorTabWidget::setCurrentPage( int i ) tabBar()->setCurrentTab( i ); } -QString EditorTabWidget::pageTitle() const +TQString EditorTabWidget::pageTitle() const { - return ((QTabWidget*)this)->tabLabel( QTabWidget::currentPage() ); + return ((TQTabWidget*)this)->tabLabel( TQTabWidget::currentPage() ); } -void EditorTabWidget::setPageTitle( const QString& title ) +void EditorTabWidget::setPageTitle( const TQString& title ) { - changeTab( QTabWidget::currentPage(), title ); + changeTab( TQTabWidget::currentPage(), title ); } -void EditorTabWidget::setPageName( const QCString& name ) +void EditorTabWidget::setPageName( const TQCString& name ) { - if ( QTabWidget::currentPage() ) - QTabWidget::currentPage()->setName( name ); + if ( TQTabWidget::currentPage() ) + TQTabWidget::currentPage()->setName( name ); } -QCString EditorTabWidget::pageName() const +TQCString EditorTabWidget::pageName() const { - if ( !QTabWidget::currentPage() ) + if ( !TQTabWidget::currentPage() ) return 0; - return QTabWidget::currentPage()->name(); + return TQTabWidget::currentPage()->name(); } int EditorTabWidget::count() const @@ -462,24 +462,24 @@ int EditorTabWidget::count() const return tabBar()->count(); } -bool EditorTabWidget::eventFilter( QObject *o, QEvent *e ) +bool EditorTabWidget::eventFilter( TQObject *o, TQEvent *e ) { if ( o != tabBar() ) return false; switch ( e->type() ) { - case QEvent::MouseButtonPress: { + case TQEvent::MouseButtonPress: { mousePressed = true; - QMouseEvent *me = (QMouseEvent*)e; + TQMouseEvent *me = (TQMouseEvent*)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 ); + case TQEvent::MouseMove: { + TQMouseEvent *me = (TQMouseEvent*)e; + if ( mousePressed && ( pressPoint - me->pos()).manhattanLength() > TQApplication::startDragDistance() ) { + TQTextDrag *drg = new TQTextDrag( TQString::number( (long) this ) , this ); mousePressed = false; - dragPage = QTabWidget::currentPage(); - dragLabel = QTabWidget::tabLabel( dragPage ); + dragPage = TQTabWidget::currentPage(); + dragLabel = TQTabWidget::tabLabel( dragPage ); int index = indexOf( dragPage ); @@ -493,24 +493,24 @@ bool EditorTabWidget::eventFilter( QObject *o, QEvent *e ) } } break; - case QEvent::DragLeave: { + case TQEvent::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 ) ) + case TQEvent::DragMove: { + TQDragEnterEvent *de = (TQDragEnterEvent*) e; + if ( TQTextDrag::canDecode( de ) ) { + TQString text; + TQTextDrag::decode( de, text ); + if ( text == TQString::number( (long)this ) ) de->accept(); else return false; } int index = 0; - QRect rect; + TQRect rect; for ( ; index < tabBar()->count(); index++ ) { if ( tabBar()->tabAt( index )->rect().contains( de->pos() ) ) { rect = tabBar()->tabAt( index )->rect(); @@ -519,33 +519,33 @@ bool EditorTabWidget::eventFilter( QObject *o, QEvent *e ) } if ( index == tabBar()->count() -1 ) { - QRect rect2 = rect; + TQRect rect2 = rect; rect2.setLeft( rect2.left() + rect2.width() / 2 ); if ( rect2.contains( de->pos() ) ) index++; } if ( ! dropIndicator ) { - dropIndicator = new QWidget( this ); + dropIndicator = new TQWidget( this ); dropIndicator->setBackgroundColor( red ); } - QPoint pos; + TQPoint pos; if ( index == tabBar()->count() ) - pos = tabBar()->mapToParent( QPoint( rect.x() + rect.width(), rect.y() ) ); + pos = tabBar()->mapToParent( TQPoint( rect.x() + rect.width(), rect.y() ) ); else - pos = tabBar()->mapToParent( QPoint( rect.x(), rect.y() ) ); + pos = tabBar()->mapToParent( TQPoint( 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 ) ) { + case TQEvent::Drop: { + TQDragEnterEvent *de = (TQDragEnterEvent*) e; + if ( TQTextDrag::canDecode( de ) ) { + TQString text; + TQTextDrag::decode( de, text ); + if ( text == TQString::number( (long)this ) ) { int newIndex = 0; for ( ; newIndex < tabBar()->count(); newIndex++ ) { @@ -554,7 +554,7 @@ bool EditorTabWidget::eventFilter( QObject *o, QEvent *e ) } if ( newIndex == tabBar()->count() -1 ) { - QRect rect2 = tabBar()->tabAt( newIndex )->rect(); + TQRect rect2 = tabBar()->tabAt( newIndex )->rect(); rect2.setLeft( rect2.left() + rect2.width() / 2 ); if ( rect2.contains( de->pos() ) ) newIndex++; @@ -584,7 +584,7 @@ bool EditorTabWidget::eventFilter( QObject *o, QEvent *e ) } -EditorToolBox::EditorToolBox( QWidget *parent, const char *name ) +EditorToolBox::EditorToolBox( TQWidget *parent, const char *name ) : ToolBox( parent, name ) { setAcceptDrops( true ); @@ -600,23 +600,23 @@ void EditorToolBox::setCurrentPage( int i ) setCurrentItem( item( i ) ); } -QString EditorToolBox::pageTitle() const +TQString EditorToolBox::pageTitle() const { return itemLabel( currentIndex() ); } -void EditorToolBox::setPageTitle( const QString& title ) +void EditorToolBox::setPageTitle( const TQString& title ) { setItemLabel( currentIndex(), title ); } -void EditorToolBox::setPageName( const QCString& name ) +void EditorToolBox::setPageName( const TQCString& name ) { if ( currentItem() ) currentItem()->setName( name ); } -QCString EditorToolBox::pageName() const +TQCString EditorToolBox::pageName() const { if ( !currentItem() ) return 0; @@ -625,7 +625,7 @@ QCString EditorToolBox::pageName() const int EditorToolBox::count() const { - return QToolBox::count(); + return TQToolBox::count(); } @@ -636,21 +636,21 @@ int EditorToolBox::count() const created. */ -QWidget *WidgetFactory::create( int id, QWidget *parent, const char *name, bool init, const QRect *r, Qt::Orientation orient ) +TQWidget *WidgetFactory::create( int id, TQWidget *parent, const char *name, bool init, const TQRect *r, Qt::Orientation orient ) { - QString n = WidgetDatabase::className(id); + TQString 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 > (); + defaultProperties = new TQMap < int, TQMap < TQString, TQVariant > >(); + changedProperties = new TQMap < int, TQStringList > (); } - QWidget *w = 0; - QString str = WidgetDatabase::createWidgetName(id); + TQWidget *w = 0; + TQString 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"); @@ -672,7 +672,7 @@ QWidget *WidgetFactory::create( int id, QWidget *parent, const char *name, bool which can be \c HBox, \c VBox or \c Grid. */ -QLayout *WidgetFactory::createLayout( QWidget *widget, QLayout *layout, LayoutType type ) +TQLayout *WidgetFactory::createLayout( TQWidget *widget, TQLayout *layout, LayoutType type ) { int spacing = MainWindow::self->currentLayoutDefaultSpacing(); int margin = 0; @@ -682,39 +682,39 @@ QLayout *WidgetFactory::createLayout( QWidget *widget, QLayout *layout, LayoutTy 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( "TQTabWidget" ) ) + widget = ((TQTabWidget*)widget)->currentPage(); - if ( !layout && widget && widget->inherits( "QToolBox" ) ) - widget = ((QToolBox*)widget)->currentItem(); + if ( !layout && widget && widget->inherits( "TQToolBox" ) ) + widget = ((TQToolBox*)widget)->currentItem(); - if ( !layout && widget && widget->inherits( "QWizard" ) ) - widget = ((QWizard*)widget)->currentPage(); + if ( !layout && widget && widget->inherits( "TQWizard" ) ) + widget = ((TQWizard*)widget)->currentPage(); - if ( !layout && widget && widget->inherits( "QMainWindow" ) ) - widget = ((QMainWindow*)widget)->centralWidget(); + if ( !layout && widget && widget->inherits( "TQMainWindow" ) ) + widget = ((TQMainWindow*)widget)->centralWidget(); - if ( !layout && widget && widget->inherits( "QWidgetStack" ) ) - widget = ((QWidgetStack*)widget)->visibleWidget(); + if ( !layout && widget && widget->inherits( "TQWidgetStack" ) ) + widget = ((TQWidgetStack*)widget)->visibleWidget(); MetaDataBase::addEntry( widget ); - if ( !layout && widget && widget->inherits( "QGroupBox" ) ) { - QGroupBox *gb = (QGroupBox*)widget; + if ( !layout && widget && widget->inherits( "TQGroupBox" ) ) { + TQGroupBox *gb = (TQGroupBox*)widget; gb->setColumnLayout( 0, Qt::Vertical ); gb->layout()->setMargin( 0 ); gb->layout()->setSpacing( 0 ); - QLayout *l; + TQLayout *l; switch ( type ) { case HBox: - l = new QHBoxLayout( gb->layout() ); + l = new TQHBoxLayout( 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 ); + l = new TQVBoxLayout( gb->layout(), spacing ); MetaDataBase::setMargin( gb, margin ); MetaDataBase::setSpacing( gb, spacing ); l->setAlignment( AlignTop ); @@ -732,17 +732,17 @@ QLayout *WidgetFactory::createLayout( QWidget *widget, QLayout *layout, LayoutTy } } else { if ( layout ) { - QLayout *l; + TQLayout *l; switch ( type ) { case HBox: - l = new QHBoxLayout( layout ); + l = new TQHBoxLayout( layout ); MetaDataBase::addEntry( l ); l->setSpacing( spacing ); l->setMargin( margin ); MetaDataBase::addEntry( l ); return l; case VBox: - l = new QVBoxLayout( layout ); + l = new TQVBoxLayout( layout ); MetaDataBase::addEntry( l ); l->setSpacing( spacing ); l->setMargin( margin ); @@ -760,10 +760,10 @@ QLayout *WidgetFactory::createLayout( QWidget *widget, QLayout *layout, LayoutTy return 0; } } else { - QLayout *l; + TQLayout *l; switch ( type ) { case HBox: - l = new QHBoxLayout( widget ); + l = new TQHBoxLayout( widget ); MetaDataBase::addEntry( l ); if ( widget ) { MetaDataBase::setMargin( widget, margin ); @@ -775,7 +775,7 @@ QLayout *WidgetFactory::createLayout( QWidget *widget, QLayout *layout, LayoutTy MetaDataBase::addEntry( l ); return l; case VBox: - l = new QVBoxLayout( widget ); + l = new TQVBoxLayout( widget ); MetaDataBase::addEntry( l ); if ( widget ) { MetaDataBase::setMargin( widget, margin ); @@ -806,19 +806,19 @@ QLayout *WidgetFactory::createLayout( QWidget *widget, QLayout *layout, LayoutTy } } -void WidgetFactory::deleteLayout( QWidget *widget ) +void WidgetFactory::deleteLayout( TQWidget *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(); + if ( widget->inherits( "TQTabWidget" ) ) + widget = ((TQTabWidget*)widget)->currentPage(); + if ( widget->inherits( "TQWizard" ) ) + widget = ((TQWizard*)widget)->currentPage(); + if ( widget->inherits( "TQMainWindow" ) ) + widget = ((TQMainWindow*)widget)->centralWidget(); + if ( widget->inherits( "TQWidgetStack" ) ) + widget = ((TQWidgetStack*)widget)->visibleWidget(); delete widget->layout(); } @@ -829,24 +829,24 @@ void WidgetFactory::deleteLayout( QWidget *widget ) 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 ) +TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *parent, const char *name, bool init, + const TQRect *r, Qt::Orientation orient ) { - if (className == "QPushButton") + if (className == "TQPushButton") { - QPushButton *b = 0; + TQPushButton *b = 0; if (init) { b = new QDesignerPushButton(parent, name); - b->setText(QString::fromLatin1(name)); + b->setText(TQString::fromLatin1(name)); } else { b = new QDesignerPushButton(parent, name); } - QWidget *w = find_formwindow(b); - b->setAutoDefault(w && ((FormWindow *) w)->mainContainer()->inherits("QDialog")); + TQWidget *w = find_formwindow(b); + b->setAutoDefault(w && ((FormWindow *) w)->mainContainer()->inherits("TQDialog")); return b; - } else if (className == "QToolButton") + } else if (className == "TQToolButton") { if (init) { @@ -855,57 +855,57 @@ QWidget *WidgetFactory::createWidget( const QString &className, QWidget *parent, return tb; } return new QDesignerToolButton(parent, name); - } else if (className == "QCheckBox") + } else if (className == "TQCheckBox") { if (init) { QDesignerCheckBox *cb = new QDesignerCheckBox(parent, name); - cb->setText(QString::fromLatin1(name)); + cb->setText(TQString::fromLatin1(name)); return cb; } return new QDesignerCheckBox(parent, name); - } else if (className == "QRadioButton") + } else if (className == "TQRadioButton") { if (init) { QDesignerRadioButton *rb = new QDesignerRadioButton(parent, name); - rb->setText(QString::fromLatin1(name)); + rb->setText(TQString::fromLatin1(name)); return rb; } return new QDesignerRadioButton(parent, name); - } else if (className == "QGroupBox") + } else if (className == "TQGroupBox") { if (init) - return new QGroupBox(QString::fromLatin1(name), parent, name); - return new QGroupBox(parent, name); - } else if (className == "QButtonGroup") + return new TQGroupBox(TQString::fromLatin1(name), parent, name); + return new TQGroupBox(parent, name); + } else if (className == "TQButtonGroup") { if (init) - return new QButtonGroup(QString::fromLatin1(name), parent, name); - return new QButtonGroup(parent, name); - } else if (className == "QIconView") + return new TQButtonGroup(TQString::fromLatin1(name), parent, name); + return new TQButtonGroup(parent, name); + } else if (className == "TQIconView") { #if !defined(QT_NO_ICONVIEW) - QIconView *iv = new QIconView(parent, name); + TQIconView *iv = new TQIconView(parent, name); if (init) - (void) new QIconViewItem(iv, i18n("New Item")); + (void) new TQIconViewItem(iv, i18n("New Item")); return iv; #else return 0; #endif - } else if (className == "QTable") + } else if (className == "TQTable") { #if !defined(QT_NO_TABLE) if (init) - return new QTable(3, 3, parent, name); - return new QTable(parent, name); + return new TQTable(3, 3, parent, name); + return new TQTable(parent, name); #else return 0; #endif #ifndef QT_NO_SQL - } else if (className == "QDataTable") + } else if (className == "TQDataTable") { - return new QDataTable(parent, name); + return new TQDataTable(parent, name); #endif //QT_NO_SQL } else if (className == "QDateEdit") { @@ -916,70 +916,70 @@ QWidget *WidgetFactory::createWidget( const QString &className, QWidget *parent, } else if (className == "QDateTimeEdit") { return new QDateTimeEdit(parent, name); - } else if (className == "QListBox") + } else if (className == "TQListBox") { - QListBox *lb = new QListBox(parent, name); + TQListBox *lb = new TQListBox(parent, name); if (init) { lb->insertItem(i18n("New Item")); lb->setCurrentItem(0); } return lb; - } else if (className == "QListView") + } else if (className == "TQListView") { - QListView *lv = new QListView(parent, name); + TQListView *lv = new TQListView(parent, name); lv->setSorting(-1); if (init) { lv->addColumn(i18n("Column 1")); - lv->setCurrentItem(new QListViewItem(lv, i18n("New Item"))); + lv->setCurrentItem(new TQListViewItem(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") + } else if (className == "TQLineEdit") + return new TQLineEdit(parent, name); + else if (className == "TQSpinBox") + return new TQSpinBox(parent, name); + else if (className == "TQSplitter") + return new TQSplitter(parent, name); + else if (className == "TQMultiLineEdit") + return new TQMultiLineEdit(parent, name); + else if (className == "TQTextEdit") + return new TQTextEdit(parent, name); + else if (className == "TQLabel") { QDesignerLabel *l = new QDesignerLabel(parent, name); if (init) { - l->setText(QString::fromLatin1(name)); + l->setText(TQString::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") + else if (className == "TQTabWidget") { - QTabWidget *tw = new QDesignerTabWidget(parent, name); + TQTabWidget *tw = new QDesignerTabWidget(parent, name); if (init) { FormWindow *fw = find_formwindow(parent); - QWidget *w = fw ? new QDesignerWidget(fw, tw, "tab") : new QWidget(tw, "tab"); + TQWidget *w = fw ? new QDesignerWidget(fw, tw, "tab") : new TQWidget(tw, "tab"); tw->addTab(w, i18n("Tab 1")); MetaDataBase::addEntry(w); - w = fw ? new QDesignerWidget(fw, tw, "tab") : new QWidget(tw, "tab"); + w = fw ? new QDesignerWidget(fw, tw, "tab") : new TQWidget(tw, "tab"); tw->addTab(w, i18n("Tab 2")); MetaDataBase::addEntry(tw); MetaDataBase::addEntry(w); } return tw; - } else if (className == "QComboBox") + } else if (className == "TQComboBox") { - return new QComboBox(false, parent, name); - } else if (className == "QWidget") + return new TQComboBox(false, parent, name); + } else if (className == "TQWidget") { if (parent && - (parent->inherits("FormWindow") || parent->inherits("QWizard") - || parent->inherits("QTabWidget") || parent->inherits("QToolBox") || parent->inherits("QMainWindow"))) + (parent->inherits("FormWindow") || parent->inherits("TQWizard") + || parent->inherits("TQTabWidget") || parent->inherits("TQToolBox") || parent->inherits("TQMainWindow"))) { FormWindow *fw = find_formwindow(parent); if (fw) @@ -989,30 +989,30 @@ QWidget *WidgetFactory::createWidget( const QString &className, QWidget *parent, return dw; } } - return new QWidget(parent, name); - } else if (className == "QDialog") + return new TQWidget(parent, name); + } else if (className == "TQDialog") { - QDialog *dia = 0; + TQDialog *dia = 0; if (parent && parent->inherits("FormWindow")) dia = new QDesignerDialog((FormWindow *) parent, parent, name); else - dia = new QDialog(parent, name); + dia = new TQDialog(parent, name); if (parent && !parent->inherits("MainWindow")) - dia->reparent(parent, QPoint(0, 0), true); + dia->reparent(parent, TQPoint(0, 0), true); return dia; - } else if (className == "QWizard") + } else if (className == "TQWizard") { - QWizard *wiz = new QDesignerWizard(parent, name); + TQWizard *wiz = new QDesignerWizard(parent, name); if (parent && !parent->inherits("MainWindow")) { - wiz->reparent(parent, QPoint(0, 0), true); + wiz->reparent(parent, TQPoint(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())); + TQTimer::singleShot(0, wiz, TQT_SLOT(next())); } return wiz; } else if (className == "Spacer") @@ -1030,19 +1030,19 @@ QWidget *WidgetFactory::createWidget( const QString &className, QWidget *parent, 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") + } else if (className == "TQLCDNumber") + return new TQLCDNumber(parent, name); + else if (className == "TQProgressBar") + return new TQProgressBar(parent, name); + else if (className == "TQTextView") + return new TQTextView(parent, name); + else if (className == "TQTextBrowser") + return new TQTextBrowser(parent, name); + else if (className == "TQDial") + return new TQDial(parent, name); + else if (className == "TQSlider") { - QSlider *s = new QSlider(parent, name); + TQSlider *s = new TQSlider(parent, name); if (!r) return s; if (!r->isValid() || r->width() < 2 && r->height() < 2) @@ -1052,9 +1052,9 @@ QWidget *WidgetFactory::createWidget( const QString &className, QWidget *parent, MetaDataBase::addEntry(s); MetaDataBase::setPropertyChanged(s, "orientation", true); return s; - } else if (className == "QScrollBar") + } else if (className == "TQScrollBar") { - QScrollBar *s = new QScrollBar(parent, name); + TQScrollBar *s = new TQScrollBar(parent, name); if (!r) return s; if (!r->isValid() || r->width() < 2 && r->height() < 2) @@ -1064,12 +1064,12 @@ QWidget *WidgetFactory::createWidget( const QString &className, QWidget *parent, MetaDataBase::addEntry(s); MetaDataBase::setPropertyChanged(s, "orientation", true); return s; - } else if (className == "QFrame") + } else if (className == "TQFrame") { if (!init) - return new QFrame(parent, name); - QFrame *f = new QFrame(parent, name); - f->setFrameStyle(QFrame::StyledPanel | QFrame::Raised); + return new TQFrame(parent, name); + TQFrame *f = new TQFrame(parent, name); + f->setFrameStyle(TQFrame::StyledPanel | TQFrame::Raised); return f; } else if (className == "Line") { @@ -1085,9 +1085,9 @@ QWidget *WidgetFactory::createWidget( const QString &className, QWidget *parent, else if (r->width() < r->height()) l->setOrientation(Qt::Vertical); return l; - } else if (className == "QMainWindow") + } else if (className == "TQMainWindow") { - QMainWindow *mw = new KmdrMainWindow(parent, name, 0); + TQMainWindow *mw = new KmdrMainWindow(parent, name, 0); mw->setDockEnabled(Qt::DockMinimized, false); QDesignerWidget *dw = new QDesignerWidget((FormWindow *) parent, mw, "central widget"); mw->setDockMenuEnabled(false); @@ -1098,17 +1098,17 @@ QWidget *WidgetFactory::createWidget( const QString &className, QWidget *parent, return mw; } #ifndef QT_NO_SQL - else if (className == "QDataBrowser") + else if (className == "TQDataBrowser") { - QWidget *w = new QDesignerDataBrowser(parent, name); + TQWidget *w = new QDesignerDataBrowser(parent, name); if (parent) - w->reparent(parent, QPoint(0, 0), true); + w->reparent(parent, TQPoint(0, 0), true); return w; - } else if (className == "QDataView") + } else if (className == "TQDataView") { - QWidget *w = new QDesignerDataView(parent, name); + TQWidget *w = new QDesignerDataView(parent, name); if (parent) - w->reparent(parent, QPoint(0, 0), true); + w->reparent(parent, TQPoint(0, 0), true); return w; } #endif @@ -1118,57 +1118,57 @@ QWidget *WidgetFactory::createWidget( const QString &className, QWidget *parent, return new LineEdit(parent, name); else if (className == "ListView") { - QListView *lv = new QListView(parent, name); + TQListView *lv = new TQListView(parent, name); lv->setSorting(-1); if (init) { lv->addColumn(i18n("Column 1")); - lv->setCurrentItem(new QListViewItem(lv, i18n("New Item"))); + lv->setCurrentItem(new TQListViewItem(lv, i18n("New Item"))); } return lv; } else if (className == "Dialog") { - QDialog *dia = 0; + TQDialog *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); + dia->reparent(parent, TQPoint(0, 0), true); return dia; } else if (className == "Wizard") { //qDebug("Creating Wizard..."); - QWizard *wiz; + TQWizard *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); + wiz->reparent(parent, TQPoint(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())); + TQTimer::singleShot(0, wiz, TQT_SLOT(next())); } return wiz; } else if (className == "TabWidget") { - QTabWidget *tw = new EditorTabWidget(parent, name); + TQTabWidget *tw = new EditorTabWidget(parent, name); if (init) { FormWindow *fw = find_formwindow(parent); - QWidget *w = fw ? new QDesignerWidget(fw, tw, "tab") : new QWidget(tw, "tab"); + TQWidget *w = fw ? new QDesignerWidget(fw, tw, "tab") : new TQWidget(tw, "tab"); tw->addTab(w, i18n("Tab 1")); MetaDataBase::addEntry(w); - w = fw ? new QDesignerWidget(fw, tw, "tab") : new QWidget(tw, "tab"); + w = fw ? new QDesignerWidget(fw, tw, "tab") : new TQWidget(tw, "tab"); tw->addTab(w, i18n("Tab 2")); MetaDataBase::addEntry(tw); MetaDataBase::addEntry(w); @@ -1176,14 +1176,14 @@ QWidget *WidgetFactory::createWidget( const QString &className, QWidget *parent, return tw; } else if (className == "ToolBox") { - QToolBox *tw = new EditorToolBox(parent, name); + TQToolBox *tw = new EditorToolBox(parent, name); if (init) { FormWindow *fw = find_formwindow(parent); - QWidget *w = fw ? new QDesignerWidget(fw, tw, "toolbox") : new QWidget(tw, "toolbox"); + TQWidget *w = fw ? new QDesignerWidget(fw, tw, "toolbox") : new TQWidget(tw, "toolbox"); tw->addItem(w, i18n("Page 1")); MetaDataBase::addEntry(w); - w = fw ? new QDesignerWidget(fw, tw, "toolbox") : new QWidget(tw, "toolbox"); + w = fw ? new QDesignerWidget(fw, tw, "toolbox") : new TQWidget(tw, "toolbox"); tw->addItem(w, i18n("Page 2")); MetaDataBase::addEntry(tw); MetaDataBase::addEntry(w); @@ -1228,12 +1228,12 @@ QWidget *WidgetFactory::createWidget( const QString &className, QWidget *parent, return new AboutDialog(parent, name); else if (className == "TreeWidget") { - QListView *lv = new TreeWidget(parent, name); + TQListView *lv = new TreeWidget(parent, name); lv->setSorting(-1); if (init) { lv->addColumn(i18n("Column 1")); - lv->setCurrentItem(new QListViewItem(lv, i18n("New Item"))); + lv->setCurrentItem(new TQListViewItem(lv, i18n("New Item"))); } return lv; } else if (className == "Slider") @@ -1251,7 +1251,7 @@ QWidget *WidgetFactory::createWidget( const QString &className, QWidget *parent, } #endif - QWidget *w = KommanderFactory::createWidget(className, parent, name); + TQWidget *w = KommanderFactory::createWidget(className, parent, name); return w; } @@ -1259,44 +1259,44 @@ QWidget *WidgetFactory::createWidget( const QString &className, QWidget *parent, /*! 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. + TQWidget::layout() of \a w or to 0 after the function call. */ -WidgetFactory::LayoutType WidgetFactory::layoutType( QWidget *w, QLayout *&layout ) +WidgetFactory::LayoutType WidgetFactory::layoutType( TQWidget *w, TQLayout *&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( "TQTabWidget" ) ) + w = ((TQTabWidget*)w)->currentPage(); + if ( w->inherits( "TQToolBox" ) ) + w = ((TQToolBox*)w)->currentItem(); + if ( w && w->inherits( "TQWizard" ) ) + w = ((TQWizard*)w)->currentPage(); + if ( w && w->inherits( "TQMainWindow" ) ) + w = ((TQMainWindow*)w)->centralWidget(); + if ( w && w->inherits( "TQWidgetStack" ) ) + w = ((TQWidgetStack*)w)->visibleWidget(); - if ( w && w->inherits( "QSplitter" ) ) - return ( (QSplitter*)w )->orientation() == Horizontal ? HBox : VBox; + if ( w && w->inherits( "TQSplitter" ) ) + return ( (TQSplitter*)w )->orientation() == Horizontal ? HBox : VBox; if ( !w || !w->layout() ) return NoLayout; - QLayout *lay = w->layout(); + TQLayout *lay = w->layout(); - if ( w->inherits( "QGroupBox" ) ) { - QObjectList *l = lay->queryList( "QLayout" ); + if ( w->inherits( "TQGroupBox" ) ) { + TQObjectList *l = lay->queryList( "TQLayout" ); if ( l && l->first() ) - lay = (QLayout*)l->first(); + lay = (TQLayout*)l->first(); delete l; } layout = lay; - if ( lay->inherits( "QHBoxLayout" ) ) + if ( lay->inherits( "TQHBoxLayout" ) ) return HBox; - else if ( lay->inherits( "QVBoxLayout" ) ) + else if ( lay->inherits( "TQVBoxLayout" ) ) return VBox; - else if ( lay->inherits( "QGridLayout" ) ) + else if ( lay->inherits( "TQGridLayout" ) ) return Grid; return NoLayout; } @@ -1304,13 +1304,13 @@ WidgetFactory::LayoutType WidgetFactory::layoutType( QWidget *w, QLayout *&layou /*! \overload */ -WidgetFactory::LayoutType WidgetFactory::layoutType( QLayout *layout ) +WidgetFactory::LayoutType WidgetFactory::layoutType( TQLayout *layout ) { - if ( layout->inherits( "QHBoxLayout" ) ) + if ( layout->inherits( "TQHBoxLayout" ) ) return HBox; - else if ( layout->inherits( "QVBoxLayout" ) ) + else if ( layout->inherits( "TQVBoxLayout" ) ) return VBox; - else if ( layout->inherits( "QGridLayout" ) ) + else if ( layout->inherits( "TQGridLayout" ) ) return Grid; return NoLayout; } @@ -1318,19 +1318,19 @@ WidgetFactory::LayoutType WidgetFactory::layoutType( QLayout *layout ) /*! \overload */ -WidgetFactory::LayoutType WidgetFactory::layoutType( QWidget *w ) +WidgetFactory::LayoutType WidgetFactory::layoutType( TQWidget *w ) { - QLayout *l = 0; + TQLayout *l = 0; return layoutType( w, l ); } -QWidget *WidgetFactory::layoutParent( QLayout *layout ) +TQWidget *WidgetFactory::layoutParent( TQLayout *layout ) { - QObject *o = layout; + TQObject *o = layout; while ( o ) { if ( o->isWidgetType() ) - return (QWidget*)o; + return (TQWidget*)o; o = o->parent(); } return 0; @@ -1345,20 +1345,20 @@ QWidget *WidgetFactory::layoutParent( QLayout *layout ) tabwidget. So in this case this function returns the current page of the tabwidget.) */ -QWidget* WidgetFactory::containerOfWidget( QWidget *w ) +TQWidget* WidgetFactory::containerOfWidget( TQWidget *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(); + if ( w->inherits( "TQTabWidget" ) ) + return ((TQTabWidget*)w)->currentPage(); + if ( w->inherits( "TQToolBox" ) ) + return ((TQToolBox*)w)->currentItem(); + if ( w->inherits( "TQWizard" ) ) + return ((TQWizard*)w)->currentPage(); + if ( w->inherits( "TQWidgetStack" ) ) + return ((TQWidgetStack*)w)->visibleWidget(); + if ( w->inherits( "TQMainWindow" ) ) + return ((TQMainWindow*)w)->centralWidget(); return w; } @@ -1370,9 +1370,9 @@ QWidget* WidgetFactory::containerOfWidget( QWidget *w ) function returns the tabwidget then.) */ -QWidget* WidgetFactory::widgetOfContainer( QWidget *w ) +TQWidget* WidgetFactory::widgetOfContainer( TQWidget *w ) { - if ( w->parentWidget() && w->parentWidget()->inherits( "QWidgetStack" ) ) + if ( w->parentWidget() && w->parentWidget()->inherits( "TQWidgetStack" ) ) w = w->parentWidget(); while ( w ) { if ( WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( w ) ) ) || @@ -1386,20 +1386,20 @@ QWidget* WidgetFactory::widgetOfContainer( QWidget *w ) /*! Returns whether \a o is a passive interactor or not. */ -bool WidgetFactory::isPassiveInteractor( QObject* o ) +bool WidgetFactory::isPassiveInteractor( TQObject* 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 + if ( TQApplication::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(o->parent()) ) + if ( o->inherits( "TQTabBar" ) || ::qt_cast(o->parent()) ) return true; - else if ( o->inherits( "QSizeGrip" ) ) + else if ( o->inherits( "TQSizeGrip" ) ) return true; - else if ( o->inherits( "QToolButton" ) && o->parent() && o->parent()->inherits( "QTabBar" ) ) + else if ( o->inherits( "TQToolButton" ) && o->parent() && o->parent()->inherits( "TQTabBar" ) ) return true; - else if ( o->parent() && o->parent()->inherits( "QWizard" ) && o->inherits( "QPushButton" ) ) + else if ( o->parent() && o->parent()->inherits( "TQWizard" ) && o->inherits( "TQPushButton" ) ) return true; - else if ( o->parent() && o->parent()->inherits( "QMainWindow" ) && o->inherits( "QMenuBar" ) ) + else if ( o->parent() && o->parent()->inherits( "TQMainWindow" ) && o->inherits( "TQMenuBar" ) ) return true; else if ( o->inherits( "QDockWindowHandle" ) ) return true; @@ -1413,10 +1413,10 @@ bool WidgetFactory::isPassiveInteractor( QObject* o ) /*! Returns the class name of object \a o that should be used for externally (i.e. for saving) */ -const char* WidgetFactory::classNameOf( QObject* o ) +const char* WidgetFactory::classNameOf( TQObject* o ) { if (o->inherits("QDesignerTabWidget")) - return "QTabWidget"; + return "TQTabWidget"; #ifdef KOMMANDER else if (o->inherits("EditorTabWidget")) return "TabWidget"; @@ -1424,34 +1424,34 @@ const char* WidgetFactory::classNameOf( QObject* o ) return "ToolBox"; #endif else if (o->inherits("QDesignerDialog")) - return "QDialog"; + return "TQDialog"; else if (o->inherits("QDesignerWidget")) - return "QWidget"; + return "TQWidget"; else if (o->inherits("CustomWidget")) return ((CustomWidget *) o)->realClassName().latin1(); else if (o->inherits("QDesignerLabel")) - return "QLabel"; + return "TQLabel"; else if (o->inherits("QDesignerWizard")) - return "QWizard"; + return "TQWizard"; else if (o->inherits("EditorWizard")) return "Wizard"; else if (o->inherits("QDesignerPushButton")) - return "QPushButton"; + return "TQPushButton"; else if (o->inherits("QDesignerToolButton")) - return "QToolButton"; + return "TQToolButton"; else if (o->inherits("QDesignerRadioButton")) - return "QRadioButton"; + return "TQRadioButton"; else if (o->inherits("QDesignerCheckBox")) - return "QCheckBox"; + return "TQCheckBox"; else if (o->inherits("QDesignerMenuBar")) - return "QMenuBar"; + return "TQMenuBar"; else if (o->inherits("QDesignerToolBar")) - return "QToolBar"; + return "TQToolBar"; #ifndef QT_NO_SQL else if (o->inherits("QDesignerDataBrowser")) - return "QDataBrowser"; + return "TQDataBrowser"; else if (o->inherits("QDesignerDataView")) - return "QDataView"; + return "TQDataView"; #endif else if (o->inherits("EditorDialog")) return "Dialog"; @@ -1463,45 +1463,45 @@ const char* WidgetFactory::classNameOf( QObject* o ) createWidget()! */ -void WidgetFactory::initChangedProperties( QObject *o ) +void WidgetFactory::initChangedProperties( TQObject *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" ) ) + if ( o->inherits( "TQPushButton" ) || o->inherits("TQRadioButton") || o->inherits( "TQCheckBox" ) || o->inherits( "TQToolButton" ) ) MetaDataBase::setPropertyChanged( o, "text", true ); - else if (::qt_cast(o) && ::qt_cast(widgetOfContainer((QWidget*)o->parent()))) { + else if (::qt_cast(o) && ::qt_cast(widgetOfContainer((TQWidget*)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" ) ) + } else if ( o->inherits( "TQGroupBox" ) ) MetaDataBase::setPropertyChanged( o, "title", true ); - else if ( o->isA( "QFrame" ) ) { + else if ( o->isA( "TQFrame" ) ) { MetaDataBase::setPropertyChanged( o, "frameShadow", true ); MetaDataBase::setPropertyChanged( o, "frameShape", true ); - } else if ( o->inherits( "QTabWidget" ) || o->inherits( "QWizard" ) ) { + } else if ( o->inherits( "TQTabWidget" ) || o->inherits( "TQWizard" ) ) { MetaDataBase::setPropertyChanged( o, "pageTitle", true ); MetaDataBase::setPropertyChanged( o, "pageName", true ); #ifndef QT_NO_TABLE - } else if ( o->inherits( "QTable" ) && !o->inherits( "QDataTable" ) ) { + } else if ( o->inherits( "TQTable" ) && !o->inherits( "TQDataTable" ) ) { MetaDataBase::setPropertyChanged( o, "numRows", true ); MetaDataBase::setPropertyChanged( o, "numCols", true ); - QTable *t = (QTable*)o; + TQTable *t = (TQTable*)o; for ( int i = 0; i < 3; ++i ) { - t->horizontalHeader()->setLabel( i, QString::number( i + 1 ) ); - t->verticalHeader()->setLabel( i, QString::number( i + 1 ) ); + t->horizontalHeader()->setLabel( i, TQString::number( i + 1 ) ); + t->verticalHeader()->setLabel( i, TQString::number( i + 1 ) ); } #endif - } else if ( ::qt_cast(o) ) { + } else if ( ::qt_cast(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" ) ) { + } else if ( o->inherits( "TQSplitter" ) ) { MetaDataBase::setPropertyChanged( o, "orientation", true ); } else if ( o->inherits( "QDesignerToolBar" ) ) { MetaDataBase::setPropertyChanged( o, "label", true ); @@ -1514,7 +1514,7 @@ void WidgetFactory::initChangedProperties( QObject *o ) bool WidgetFactory::hasSpecialEditor( int id ) { - QString className = WidgetDatabase::className(id); + TQString className = WidgetDatabase::className(id); if (className == "TextEdit" || className == "ComboBox" || className == "ListBox" || className == "TreeWidget" || className == "TextBrowser") @@ -1528,7 +1528,7 @@ bool WidgetFactory::hasSpecialEditor( int id ) return true; if (className.mid(1) == "IconView") return true; - if (className == "QTextEdit" || className == "QMultiLineEdit") + if (className == "TQTextEdit" || className == "TQMultiLineEdit") return true; if (className.contains("Table")) return true; @@ -1538,7 +1538,7 @@ bool WidgetFactory::hasSpecialEditor( int id ) bool WidgetFactory::hasItems( int id ) { - QString className = WidgetDatabase::className(id); + TQString className = WidgetDatabase::className(id); if (className == "ComboBox" || className == "ListBox" || className == "TreeWidget") return true; @@ -1550,17 +1550,17 @@ bool WidgetFactory::hasItems( int id ) return false; } -void WidgetFactory::editWidget( int id, QWidget *parent, QWidget *editWidget, FormWindow *fw ) +void WidgetFactory::editWidget( int id, TQWidget *parent, TQWidget *editWidget, FormWindow *fw ) { - QString className = WidgetDatabase::className(id); + TQString className = WidgetDatabase::className(id); #ifdef KOMMANDER if (className == "ComboBox") { - if (!editWidget->inherits("QComboBox")) + if (!editWidget->inherits("TQComboBox")) return; - QComboBox *cb = (QComboBox *) editWidget; + TQComboBox *cb = (TQComboBox *) editWidget; ListBoxEditor *e = new ListBoxEditor(parent, cb->listBox(), fw); e->exec(); @@ -1579,9 +1579,9 @@ void WidgetFactory::editWidget( int id, QWidget *parent, QWidget *editWidget, Fo } if (className == "TreeWidget") { - if (!editWidget->inherits("QListView")) + if (!editWidget->inherits("TQListView")) return; - QListView *lv = (QListView *) editWidget; + TQListView *lv = (TQListView *) editWidget; ListViewEditor *e = new ListViewEditor(parent, lv, fw); e->exec(); delete e; @@ -1589,7 +1589,7 @@ void WidgetFactory::editWidget( int id, QWidget *parent, QWidget *editWidget, Fo } if (className == "ListBox") { - if (!editWidget->inherits("QListBox")) + if (!editWidget->inherits("TQListBox")) return; ListBoxEditor *e = new ListBoxEditor(parent, editWidget, fw); e->exec(); @@ -1599,7 +1599,7 @@ void WidgetFactory::editWidget( int id, QWidget *parent, QWidget *editWidget, Fo #endif if (className.mid(1) == "ListBox") { - if (!editWidget->inherits("QListBox")) + if (!editWidget->inherits("TQListBox")) return; ListBoxEditor *e = new ListBoxEditor(parent, editWidget, fw); e->exec(); @@ -1609,9 +1609,9 @@ void WidgetFactory::editWidget( int id, QWidget *parent, QWidget *editWidget, Fo if (className.mid(1) == "ComboBox") { - if (!editWidget->inherits("QComboBox")) + if (!editWidget->inherits("TQComboBox")) return; - QComboBox *cb = (QComboBox *) editWidget; + TQComboBox *cb = (TQComboBox *) editWidget; ListBoxEditor *e = new ListBoxEditor(parent, cb->listBox(), fw); e->exec(); delete e; @@ -1621,9 +1621,9 @@ void WidgetFactory::editWidget( int id, QWidget *parent, QWidget *editWidget, Fo if (className.mid(1) == "ListView") { - if (!editWidget->inherits("QListView")) + if (!editWidget->inherits("TQListView")) return; - QListView *lv = (QListView *) editWidget; + TQListView *lv = (TQListView *) editWidget; ListViewEditor *e = new ListViewEditor(parent, lv, fw); e->exec(); delete e; @@ -1632,7 +1632,7 @@ void WidgetFactory::editWidget( int id, QWidget *parent, QWidget *editWidget, Fo if (className.mid(1) == "IconView") { - if (!editWidget->inherits("QIconView")) + if (!editWidget->inherits("TQIconView")) return; IconViewEditor *e = new IconViewEditor(parent, editWidget, fw); e->exec(); @@ -1640,7 +1640,7 @@ void WidgetFactory::editWidget( int id, QWidget *parent, QWidget *editWidget, Fo return; } - if (className == "QMultiLineEdit" || className == "QTextEdit") + if (className == "TQMultiLineEdit" || className == "TQTextEdit") { MultiLineEditor *e = new MultiLineEditor(parent, editWidget, fw); e->exec(); @@ -1658,50 +1658,50 @@ void WidgetFactory::editWidget( int id, QWidget *parent, QWidget *editWidget, Fo #endif } -bool WidgetFactory::canResetProperty( QObject *w, const QString &propName ) +bool WidgetFactory::canResetProperty( TQObject *w, const TQString &propName ) { if ( propName == "name" || propName == "geometry" ) return false; - QStringList l = *changedProperties->find( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( w ) ) ); + TQStringList l = *changedProperties->find( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( w ) ) ); return l.findIndex( propName ) == -1; } -bool WidgetFactory::resetProperty( QObject *w, const QString &propName ) +bool WidgetFactory::resetProperty( TQObject *w, const TQString &propName ) { - const QMetaProperty *p = w->metaObject()->property( w->metaObject()-> + const TQMetaProperty *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 ) +TQVariant WidgetFactory::defaultValue( TQObject *w, const TQString &propName ) { if ( propName == "wordwrap" ) { int v = defaultValue( w, "alignment" ).toInt(); - return QVariant( ( v & WordBreak ) == WordBreak, 0 ); + return TQVariant( ( v & WordBreak ) == WordBreak, 0 ); } else if ( propName == "toolTip" || propName == "whatsThis" ) { - return QVariant( QString::fromLatin1( "" ) ); + return TQVariant( TQString::fromLatin1( "" ) ); } else if ( w->inherits( "CustomWidget" ) ) { - return QVariant(); + return TQVariant(); } else if ( propName == "frameworkCode" ) { - return QVariant( true, 0 ); + return TQVariant( true, 0 ); } else if ( propName == "layoutMargin" ) { if ( w->inherits( "QLayoutWidget" ) ) - return QVariant( 0 ); + return TQVariant( 0 ); else if ( MainWindow::self->formWindow() ) - return QVariant( MainWindow::self->formWindow()->layoutDefaultMargin() ); + return TQVariant( MainWindow::self->formWindow()->layoutDefaultMargin() ); } else if ( propName == "layoutSpacing" ) { if ( MainWindow::self->formWindow() ) - return QVariant( MainWindow::self->formWindow()->layoutDefaultSpacing() ); + return TQVariant( MainWindow::self->formWindow()->layoutDefaultSpacing() ); } return *( *defaultProperties->find( WidgetDatabase::idFromClassName( classNameOf( w ) ) ) ).find( propName ); } -QString WidgetFactory::defaultCurrentItem( QObject *w, const QString &propName ) +TQString WidgetFactory::defaultCurrentItem( TQObject *w, const TQString &propName ) { - const QMetaProperty *p = w->metaObject()-> + const TQMetaProperty *p = w->metaObject()-> property( w->metaObject()->findProperty( propName, true ), true ); if ( !p ) { int v = defaultValue( w, "alignment" ).toInt(); @@ -1724,22 +1724,22 @@ QString WidgetFactory::defaultCurrentItem( QObject *w, const QString &propName ) if ( ( v & AlignBottom ) == AlignBottom ) return "AlignBottom"; } - return QString::null; + return TQString::null; } return p->valueToKey( defaultValue( w, propName ).toInt() ); } -QWidget *WidgetFactory::createCustomWidget( QWidget *parent, const char *name, MetaDataBase::CustomWidget *w ) +TQWidget *WidgetFactory::createCustomWidget( TQWidget *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 ) +TQVariant WidgetFactory::property( TQObject *w, const char *name ) { - QVariant v = w->property( name ); + TQVariant v = w->property( name ); if ( v.isValid() ) return v; return MetaDataBase::fakeProperty( w, name ); @@ -1751,60 +1751,60 @@ void QDesignerLabel::updateBuddy() if ( myBuddy.isEmpty() ) return; - QObjectList *l = topLevelWidget()->queryList( "QWidget", myBuddy, false, true ); + TQObjectList *l = topLevelWidget()->queryList( "TQWidget", myBuddy, false, true ); if ( !l || !l->first() ) { delete l; return; } - QLabel::setBuddy( (QWidget*)l->first() ); + TQLabel::setBuddy( (TQWidget*)l->first() ); delete l; } -void QDesignerWidget::paintEvent( QPaintEvent *e ) +void QDesignerWidget::paintEvent( TQPaintEvent *e ) { formwindow->paintGrid( this, e ); } -void QDesignerDialog::paintEvent( QPaintEvent *e ) +void QDesignerDialog::paintEvent( TQPaintEvent *e ) { formwindow->paintGrid( this, e ); } -void EditorDialog::paintEvent( QPaintEvent *e ) +void EditorDialog::paintEvent( TQPaintEvent *e ) { formwindow->paintGrid( this, e ); } -QSizePolicy QLayoutWidget::sizePolicy() const +TQSizePolicy QLayoutWidget::sizePolicy() const { return sp; } -bool QLayoutWidget::event( QEvent *e ) +bool QLayoutWidget::event( TQEvent *e ) { - if ( e && ( e->type() == QEvent::ChildInserted || - e->type() == QEvent::ChildRemoved || - e->type() == QEvent::LayoutHint || - e->type() == QEvent::Reparent ) ) + if ( e && ( e->type() == TQEvent::ChildInserted || + e->type() == TQEvent::ChildRemoved || + e->type() == TQEvent::LayoutHint || + e->type() == TQEvent::Reparent ) ) updateSizePolicy(); - return QWidget::event( e ); + return TQWidget::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. + to a TQVBoxLayout), because of the (illogical) way layouting works. */ void QLayoutWidget::updateSizePolicy() { if ( !children() || children()->count() == 0 ) { - sp = QWidget::sizePolicy(); + sp = TQWidget::sizePolicy(); return; } /* - QSizePolicy::MayShrink & friends are private. Here we assume the + TQSizePolicy::MayShrink & friends are private. Here we assume the following: Fixed = 0 @@ -1813,110 +1813,110 @@ void QLayoutWidget::updateSizePolicy() Preferred = MayShrink | MayGrow */ - int ht = (int) QSizePolicy::Preferred; - int vt = (int) QSizePolicy::Preferred; + int ht = (int) TQSizePolicy::Preferred; + int vt = (int) TQSizePolicy::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; + TQLayout *parentLayout = 0; if ( parent() && parent()->isWidgetType() ) { - parentLayout = ((QWidget *)parent())->layout(); + parentLayout = ((TQWidget *)parent())->layout(); if ( parentLayout && parentLayout->mainWidget()->inherits("QLayoutWidget") ) parentLayout = 0; } - QObjectListIt it( *children() ); - QObject *o; + TQObjectListIt it( *children() ); + TQObject *o; - if ( layout()->inherits("QVBoxLayout") ) { - if ( parentLayout && parentLayout->inherits("QHBoxLayout") ) - vt = QSizePolicy::Minimum; + if ( layout()->inherits("TQVBoxLayout") ) { + if ( parentLayout && parentLayout->inherits("TQHBoxLayout") ) + vt = TQSizePolicy::Minimum; else - vt = QSizePolicy::Fixed; + vt = TQSizePolicy::Fixed; while ( ( o = it.current() ) ) { ++it; - if ( !o->isWidgetType() || ( (QWidget*)o )->testWState( WState_ForceHide ) ) + if ( !o->isWidgetType() || ( (TQWidget*)o )->testWState( WState_ForceHide ) ) continue; - QWidget *w = (QWidget*)o; + TQWidget *w = (TQWidget*)o; if ( !w->sizePolicy().mayGrowHorizontally() ) - ht &= ~QSizePolicy::Minimum; + ht &= ~TQSizePolicy::Minimum; if ( !w->sizePolicy().mayShrinkHorizontally() ) - ht &= ~QSizePolicy::Maximum; + ht &= ~TQSizePolicy::Maximum; if ( w->sizePolicy().mayGrowVertically() ) - vt |= QSizePolicy::Minimum; + vt |= TQSizePolicy::Minimum; if ( w->sizePolicy().mayShrinkVertically() ) - vt |= QSizePolicy::Maximum; + vt |= TQSizePolicy::Maximum; } - } else if ( layout()->inherits("QHBoxLayout") ) { - if ( parentLayout && parentLayout->inherits("QVBoxLayout") ) - ht = QSizePolicy::Minimum; + } else if ( layout()->inherits("TQHBoxLayout") ) { + if ( parentLayout && parentLayout->inherits("TQVBoxLayout") ) + ht = TQSizePolicy::Minimum; else - ht = QSizePolicy::Fixed; + ht = TQSizePolicy::Fixed; while ( ( o = it.current() ) ) { ++it; - if ( !o->isWidgetType() || ( (QWidget*)o )->testWState( WState_ForceHide ) ) + if ( !o->isWidgetType() || ( (TQWidget*)o )->testWState( WState_ForceHide ) ) continue; - QWidget *w = (QWidget*)o; + TQWidget *w = (TQWidget*)o; if ( w->sizePolicy().mayGrowHorizontally() ) - ht |= QSizePolicy::Minimum; + ht |= TQSizePolicy::Minimum; if ( w->sizePolicy().mayShrinkHorizontally() ) - ht |= QSizePolicy::Maximum; + ht |= TQSizePolicy::Maximum; if ( !w->sizePolicy().mayGrowVertically() ) - vt &= ~QSizePolicy::Minimum; + vt &= ~TQSizePolicy::Minimum; if ( !w->sizePolicy().mayShrinkVertically() ) - vt &= ~QSizePolicy::Maximum; + vt &= ~TQSizePolicy::Maximum; } - } else if ( layout()->inherits("QGridLayout") ) { - ht = QSizePolicy::Fixed; - vt = QSizePolicy::Fixed; + } else if ( layout()->inherits("TQGridLayout") ) { + ht = TQSizePolicy::Fixed; + vt = TQSizePolicy::Fixed; if ( parentLayout ) { - if ( parentLayout->inherits("QVBoxLayout") ) - ht = QSizePolicy::Minimum; - else if ( parentLayout->inherits("QHBoxLayout") ) - vt = QSizePolicy::Minimum; + if ( parentLayout->inherits("TQVBoxLayout") ) + ht = TQSizePolicy::Minimum; + else if ( parentLayout->inherits("TQHBoxLayout") ) + vt = TQSizePolicy::Minimum; } while ( ( o = it.current() ) ) { ++it; - if ( !o->isWidgetType() || ( (QWidget*)o )->testWState( WState_ForceHide ) ) + if ( !o->isWidgetType() || ( (TQWidget*)o )->testWState( WState_ForceHide ) ) continue; - QWidget *w = (QWidget*)o; + TQWidget *w = (TQWidget*)o; if ( w->sizePolicy().mayGrowHorizontally() ) - ht |= QSizePolicy::Minimum; + ht |= TQSizePolicy::Minimum; if ( w->sizePolicy().mayShrinkHorizontally() ) - ht |= QSizePolicy::Maximum; + ht |= TQSizePolicy::Maximum; if ( w->sizePolicy().mayGrowVertically() ) - vt |= QSizePolicy::Minimum; + vt |= TQSizePolicy::Minimum; if ( w->sizePolicy().mayShrinkVertically() ) - vt |= QSizePolicy::Maximum; + vt |= TQSizePolicy::Maximum; } } - if ( layout()->expanding() & QSizePolicy::Horizontally ) - ht = QSizePolicy::Expanding; - if ( layout()->expanding() & QSizePolicy::Vertically ) - vt = QSizePolicy::Expanding; + if ( layout()->expanding() & TQSizePolicy::Horizontally ) + ht = TQSizePolicy::Expanding; + if ( layout()->expanding() & TQSizePolicy::Vertically ) + vt = TQSizePolicy::Expanding; layout()->invalidate(); } - sp = QSizePolicy( (QSizePolicy::SizeType) ht, (QSizePolicy::SizeType) vt ); + sp = TQSizePolicy( (TQSizePolicy::SizeType) ht, (TQSizePolicy::SizeType) vt ); updateGeometry(); } -void CustomWidget::paintEvent( QPaintEvent *e ) +void CustomWidget::paintEvent( TQPaintEvent *e ) { if ( parentWidget() && parentWidget()->inherits( "FormWindow" ) ) { ( (FormWindow*)parentWidget() )->paintGrid( this, e ); } else { - QPainter p( this ); + TQPainter p( this ); p.fillRect( rect(), colorGroup().dark() ); p.drawPixmap( ( width() - cusw->pixmap->width() ) / 2, ( height() - cusw->pixmap->height() ) / 2, diff --git a/kommander/editor/widgetfactory.h b/kommander/editor/widgetfactory.h index 03d2b2f1..68fcc9ea 100644 --- a/kommander/editor/widgetfactory.h +++ b/kommander/editor/widgetfactory.h @@ -21,28 +21,28 @@ #ifndef WIDGETFACTORY_H #define WIDGETFACTORY_H -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include "metadatabase.h" #ifndef KOMMANDER -#include "qwidgetfactory.h" +#include "tqwidgetfactory.h" #include "ewidgetfactory.h" #else #include "kommanderfactory.h" @@ -70,40 +70,40 @@ public: 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 TQWidget *create( int id, TQWidget *parent, const char *name = 0, bool init = TRUE, + const TQRect *rect = 0, Qt::Orientation orient = Qt::Horizontal ); + static TQLayout *createLayout( TQWidget *widget, TQLayout* layout, LayoutType type ); + static void deleteLayout( TQWidget *widget ); - static LayoutType layoutType( QWidget *w ); - static LayoutType layoutType( QWidget *w, QLayout *&layout ); - static LayoutType layoutType( QLayout *layout ); - static QWidget *layoutParent( QLayout *layout ); + static LayoutType layoutType( TQWidget *w ); + static LayoutType layoutType( TQWidget *w, TQLayout *&layout ); + static LayoutType layoutType( TQLayout *layout ); + static TQWidget *layoutParent( TQLayout *layout ); - static QWidget* containerOfWidget( QWidget *w ); - static QWidget* widgetOfContainer( QWidget *w ); + static TQWidget* containerOfWidget( TQWidget *w ); + static TQWidget* widgetOfContainer( TQWidget *w ); - static bool isPassiveInteractor( QObject* o ); - static const char* classNameOf( QObject* o ); + static bool isPassiveInteractor( TQObject* o ); + static const char* classNameOf( TQObject* o ); - static void initChangedProperties( QObject *o ); + static void initChangedProperties( TQObject *o ); static bool hasSpecialEditor( int id ); static bool hasItems( int id ); - static void editWidget( int id, QWidget *parent, QWidget *editWidget, FormWindow *fw ); + static void editWidget( int id, TQWidget *parent, TQWidget *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 bool canResetProperty( TQObject *w, const TQString &propName ); + static bool resetProperty( TQObject *w, const TQString &propName ); + static TQVariant defaultValue( TQObject *w, const TQString &propName ); + static TQString defaultCurrentItem( TQObject *w, const TQString &propName ); - static QVariant property( QObject *w, const char *name ); - static void saveDefaultProperties( QWidget *w, int id ); + static TQVariant property( TQObject *w, const char *name ); + static void saveDefaultProperties( TQWidget *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 ); + static TQWidget *createWidget( const TQString &className, TQWidget *parent, const char *name, bool init, + const TQRect *r = 0, Qt::Orientation orient = Qt::Horizontal ); + static TQWidget *createCustomWidget( TQWidget *parent, const char *name, MetaDataBase::CustomWidget *w ); }; @@ -112,28 +112,28 @@ 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 ) + Q_PROPERTY( TQString pageTitle READ pageTitle WRITE setPageTitle STORED false DESIGNABLE true ) + Q_PROPERTY( TQCString pageName READ pageName WRITE setPageName STORED false DESIGNABLE true ) public: - QDesignerTabWidget( QWidget *parent, const char *name ); + QDesignerTabWidget( TQWidget *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 ); + TQString pageTitle() const; + void setPageTitle( const TQString& title ); + TQCString pageName() const; + void setPageName( const TQCString& name ); int count() const; - QTabBar *tabBar() const { return QTabWidget::tabBar(); } + TQTabBar *tabBar() const { return TQTabWidget::tabBar(); } - bool eventFilter( QObject*, QEvent* ); + bool eventFilter( TQObject*, TQEvent* ); private: - QPoint pressPoint; - QWidget *dropIndicator; - QWidget *dragPage; - QString dragLabel; + TQPoint pressPoint; + TQWidget *dropIndicator; + TQWidget *dragPage; + TQString dragLabel; bool mousePressed; }; @@ -141,28 +141,28 @@ 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 ) + Q_PROPERTY( TQString pageTitle READ pageTitle WRITE setPageTitle STORED false DESIGNABLE true ) + Q_PROPERTY( TQCString pageName READ pageName WRITE setPageName STORED false DESIGNABLE true ) public: - EditorTabWidget( QWidget *parent, const char *name ); + EditorTabWidget( TQWidget *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 ); + TQString pageTitle() const; + void setPageTitle( const TQString& title ); + TQCString pageName() const; + void setPageName( const TQCString& name ); int count() const; - QTabBar *tabBar() const { return QTabWidget::tabBar(); } + TQTabBar *tabBar() const { return TQTabWidget::tabBar(); } - bool eventFilter( QObject*, QEvent* ); + bool eventFilter( TQObject*, TQEvent* ); private: - QPoint pressPoint; - QWidget *dropIndicator; - QWidget *dragPage; - QString dragLabel; + TQPoint pressPoint; + TQWidget *dropIndicator; + TQWidget *dragPage; + TQString dragLabel; bool mousePressed; }; @@ -170,17 +170,17 @@ 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 ) + Q_PROPERTY( TQString pageTitle READ pageTitle WRITE setPageTitle STORED false DESIGNABLE true ) + Q_PROPERTY( TQCString pageName READ pageName WRITE setPageName STORED false DESIGNABLE true ) public: - EditorToolBox( QWidget *parent, const char *name ); + EditorToolBox( TQWidget *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 ); + TQString pageTitle() const; + void setPageTitle( const TQString& title ); + TQCString pageName() const; + void setPageName( const TQCString& name ); int count() const; }; @@ -189,34 +189,34 @@ 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 ) + Q_PROPERTY( TQString pageTitle READ pageTitle WRITE setPageTitle STORED false DESIGNABLE true ) + Q_PROPERTY( TQCString pageName READ pageName WRITE setPageName STORED false DESIGNABLE true ) public: - QDesignerWizard( QWidget *parent, const char *name ) : QWizard( parent, name ) {} + QDesignerWizard( TQWidget *parent, const char *name ) : TQWizard( 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); } + TQString pageTitle() const; + void setPageTitle( const TQString& title ); + TQCString pageName() const; + void setPageName( const TQCString& name ); + int pageNum( TQWidget *page ); + void addPage( TQWidget *p, const TQString & ); + void removePage( TQWidget *p ); + void insertPage( TQWidget *p, const TQString &t, int index ); + bool isPageRemoved( TQWidget *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; + Page( TQWidget *a, const TQString &b ) : p( a ), t( b ) {} + Page() : p( 0 ), t( TQString::null ) {} + TQWidget *p; + TQString t; }; - QPtrDict removedPages; + TQPtrDict removedPages; }; @@ -225,15 +225,15 @@ class QLayoutWidget : public QWidget Q_OBJECT public: - QLayoutWidget( QWidget *parent, const char *name ) : QWidget( parent, name ), sp( QWidget::sizePolicy() ) {} + QLayoutWidget( TQWidget *parent, const char *name ) : TQWidget( parent, name ), sp( TQWidget::sizePolicy() ) {} - QSizePolicy sizePolicy() const; + TQSizePolicy sizePolicy() const; void updateSizePolicy(); protected: - void paintEvent( QPaintEvent * ); - bool event( QEvent * ); - QSizePolicy sp; + void paintEvent( TQPaintEvent * ); + bool event( TQEvent * ); + TQSizePolicy sp; }; @@ -243,26 +243,26 @@ class CustomWidget : public QWidget Q_OBJECT public: - CustomWidget( QWidget *parent, const char *name, MetaDataBase::CustomWidget *cw ) - : QWidget( parent, name ), cusw( cw ) { + CustomWidget( TQWidget *parent, const char *name, MetaDataBase::CustomWidget *cw ) + : TQWidget( parent, name ), cusw( cw ) { alwaysExpand = parentWidget() && parentWidget()->inherits( "FormWindow" ); setSizePolicy( cw->sizePolicy ); if ( !alwaysExpand ) setBackgroundMode( PaletteDark ); } - QSize sizeHint() const { - QSize sh = cusw->sizeHint; + TQSize sizeHint() const { + TQSize sh = cusw->sizeHint; if ( sh.isValid() ) return sh; - return QWidget::sizeHint(); + return TQWidget::sizeHint(); } - QString realClassName() { return cusw->className; } + TQString realClassName() { return cusw->className; } MetaDataBase::CustomWidget *customWidget() const { return cusw; } protected: - void paintEvent( QPaintEvent *e ); + void paintEvent( TQPaintEvent *e ); MetaDataBase::CustomWidget *cusw; bool alwaysExpand; @@ -277,11 +277,11 @@ class Line : public QFrame 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 ) + Q_OVERRIDE( TQRect frameRect DESIGNABLE false ) + Q_OVERRIDE( TQRect contentsRect DESIGNABLE false ) public: - Line( QWidget *parent, const char *name ) - : QFrame( parent, name, WMouseNoMask ) { + Line( TQWidget *parent, const char *name ) + : TQFrame( parent, name, WMouseNoMask ) { setFrameStyle( HLine | Sunken ); } @@ -300,23 +300,23 @@ class QDesignerLabel : public QLabel { Q_OBJECT - Q_PROPERTY( QCString buddy READ buddyWidget WRITE setBuddyWidget ) + Q_PROPERTY( TQCString buddy READ buddyWidget WRITE setBuddyWidget ) public: - QDesignerLabel( QWidget *parent = 0, const char *name = 0 ) - : QLabel( parent, name ) { myBuddy = 0; } + QDesignerLabel( TQWidget *parent = 0, const char *name = 0 ) + : TQLabel( parent, name ) { myBuddy = 0; } - void setBuddyWidget( const QCString &b ) { + void setBuddyWidget( const TQCString &b ) { myBuddy = b; updateBuddy(); } - QCString buddyWidget() const { + TQCString buddyWidget() const { return myBuddy; }; protected: - void showEvent( QShowEvent *e ) { - QLabel::showEvent( e ); + void showEvent( TQShowEvent *e ) { + TQLabel::showEvent( e ); updateBuddy(); } @@ -324,7 +324,7 @@ protected: private: void updateBuddy(); - QCString myBuddy; + TQCString myBuddy; }; @@ -333,11 +333,11 @@ class QDesignerWidget : public QWidget Q_OBJECT public: - QDesignerWidget( FormWindow *fw, QWidget *parent, const char *name ) - : QWidget( parent, name, WResizeNoErase ), formwindow( fw ) {} + QDesignerWidget( FormWindow *fw, TQWidget *parent, const char *name ) + : TQWidget( parent, name, WResizeNoErase ), formwindow( fw ) {} protected: - void paintEvent( QPaintEvent *e ); + void paintEvent( TQPaintEvent *e ); private: FormWindow *formwindow; @@ -349,11 +349,11 @@ class QDesignerDialog : public QDialog Q_OBJECT public: - QDesignerDialog( FormWindow *fw, QWidget *parent, const char *name ) - : QDialog( parent, name, FALSE, WResizeNoErase ), formwindow( fw ) {} + QDesignerDialog( FormWindow *fw, TQWidget *parent, const char *name ) + : TQDialog( parent, name, FALSE, WResizeNoErase ), formwindow( fw ) {} protected: - void paintEvent( QPaintEvent *e ); + void paintEvent( TQPaintEvent *e ); private: FormWindow *formwindow; @@ -366,19 +366,19 @@ class QDesignerToolButton : public QToolButton Q_PROPERTY( int buttonGroupId READ buttonGroupId WRITE setButtonGroupId ) public: - QDesignerToolButton( QWidget *parent, const char *name ) - : QToolButton( parent, name ) {} + QDesignerToolButton( TQWidget *parent, const char *name ) + : TQToolButton( parent, name ) {} bool isInButtonGroup() const { - return parentWidget() && parentWidget()->inherits( "QButtonGroup" ); + return parentWidget() && parentWidget()->inherits( "TQButtonGroup" ); } int buttonGroupId() const { - return parentWidget() && parentWidget()->inherits( "QButtonGroup" ) ? ( (QButtonGroup*)parentWidget() )->id( (QButton*)this ) : -1; + return parentWidget() && parentWidget()->inherits( "TQButtonGroup" ) ? ( (TQButtonGroup*)parentWidget() )->id( (TQButton*)this ) : -1; } void setButtonGroupId( int id ) { - if ( parentWidget() && parentWidget()->inherits( "QButtonGroup" ) ) { - ( (QButtonGroup*)parentWidget() )->remove( this ); - ( (QButtonGroup*)parentWidget() )->insert( this, id ); + if ( parentWidget() && parentWidget()->inherits( "TQButtonGroup" ) ) { + ( (TQButtonGroup*)parentWidget() )->remove( this ); + ( (TQButtonGroup*)parentWidget() )->insert( this, id ); } } }; @@ -389,19 +389,19 @@ class QDesignerRadioButton : public QRadioButton Q_PROPERTY( int buttonGroupId READ buttonGroupId WRITE setButtonGroupId ) public: - QDesignerRadioButton( QWidget *parent, const char *name ) - : QRadioButton( parent, name ) {} + QDesignerRadioButton( TQWidget *parent, const char *name ) + : TQRadioButton( parent, name ) {} bool isInButtonGroup() const { - return parentWidget() && parentWidget()->inherits( "QButtonGroup" ); + return parentWidget() && parentWidget()->inherits( "TQButtonGroup" ); } int buttonGroupId() const { - return parentWidget() && parentWidget()->inherits( "QButtonGroup" ) ? ( (QButtonGroup*)parentWidget() )->id( (QButton*)this ) : -1; + return parentWidget() && parentWidget()->inherits( "TQButtonGroup" ) ? ( (TQButtonGroup*)parentWidget() )->id( (TQButton*)this ) : -1; } void setButtonGroupId( int id ) { - if ( parentWidget() && parentWidget()->inherits( "QButtonGroup" ) ) { - ( (QButtonGroup*)parentWidget() )->remove( this ); - ( (QButtonGroup*)parentWidget() )->insert( this, id ); + if ( parentWidget() && parentWidget()->inherits( "TQButtonGroup" ) ) { + ( (TQButtonGroup*)parentWidget() )->remove( this ); + ( (TQButtonGroup*)parentWidget() )->insert( this, id ); } } @@ -413,19 +413,19 @@ class QDesignerPushButton : public QPushButton Q_PROPERTY( int buttonGroupId READ buttonGroupId WRITE setButtonGroupId ) public: - QDesignerPushButton( QWidget *parent, const char *name ) - : QPushButton( parent, name ) {} + QDesignerPushButton( TQWidget *parent, const char *name ) + : TQPushButton( parent, name ) {} bool isInButtonGroup() const { - return parentWidget() && parentWidget()->inherits( "QButtonGroup" ); + return parentWidget() && parentWidget()->inherits( "TQButtonGroup" ); } int buttonGroupId() const { - return parentWidget() && parentWidget()->inherits( "QButtonGroup" ) ? ( (QButtonGroup*)parentWidget() )->id( (QButton*)this ) : -1; + return parentWidget() && parentWidget()->inherits( "TQButtonGroup" ) ? ( (TQButtonGroup*)parentWidget() )->id( (TQButton*)this ) : -1; } void setButtonGroupId( int id ) { - if ( parentWidget() && parentWidget()->inherits( "QButtonGroup" ) ) { - ( (QButtonGroup*)parentWidget() )->remove( this ); - ( (QButtonGroup*)parentWidget() )->insert( this, id ); + if ( parentWidget() && parentWidget()->inherits( "TQButtonGroup" ) ) { + ( (TQButtonGroup*)parentWidget() )->remove( this ); + ( (TQButtonGroup*)parentWidget() )->insert( this, id ); } } @@ -437,19 +437,19 @@ class QDesignerCheckBox : public QCheckBox Q_PROPERTY( int buttonGroupId READ buttonGroupId WRITE setButtonGroupId ) public: - QDesignerCheckBox( QWidget *parent, const char *name ) - : QCheckBox( parent, name ) {} + QDesignerCheckBox( TQWidget *parent, const char *name ) + : TQCheckBox( parent, name ) {} bool isInButtonGroup() const { - return parentWidget() && parentWidget()->inherits( "QButtonGroup" ); + return parentWidget() && parentWidget()->inherits( "TQButtonGroup" ); } int buttonGroupId() const { - return parentWidget() && parentWidget()->inherits( "QButtonGroup" ) ? ( (QButtonGroup*)parentWidget() )->id( (QButton*)this ) : -1; + return parentWidget() && parentWidget()->inherits( "TQButtonGroup" ) ? ( (TQButtonGroup*)parentWidget() )->id( (TQButton*)this ) : -1; } void setButtonGroupId( int id ) { - if ( parentWidget() && parentWidget()->inherits( "QButtonGroup" ) ) { - ( (QButtonGroup*)parentWidget() )->remove( this ); - ( (QButtonGroup*)parentWidget() )->insert( this, id ); + if ( parentWidget() && parentWidget()->inherits( "TQButtonGroup" ) ) { + ( (TQButtonGroup*)parentWidget() )->remove( this ); + ( (TQButtonGroup*)parentWidget() )->insert( this, id ); } } @@ -460,11 +460,11 @@ class EditorDialog : public Dialog Q_OBJECT public: - EditorDialog( FormWindow *fw, QWidget *parent, const char *name ) + EditorDialog( FormWindow *fw, TQWidget *parent, const char *name ) : Dialog( parent, name, FALSE, WResizeNoErase ), formwindow( fw ) { } protected: - void paintEvent( QPaintEvent *e ); + void paintEvent( TQPaintEvent *e ); private: FormWindow *formwindow; diff --git a/kommander/editor/wizardeditorimpl.cpp b/kommander/editor/wizardeditorimpl.cpp index 12f8d33f..dfed9a2f 100644 --- a/kommander/editor/wizardeditorimpl.cpp +++ b/kommander/editor/wizardeditorimpl.cpp @@ -24,17 +24,17 @@ #include "pixmapchooser.h" #include "command.h" -#include -#include -#include +#include +#include +#include #include #include -WizardEditor::WizardEditor( QWidget *parent, QWizard *w, FormWindow *fw ) +WizardEditor::WizardEditor( TQWidget *parent, TQWizard *w, FormWindow *fw ) : WizardEditorBase( parent, 0 ), formwindow( fw ), wizard( w ) { - connect( buttonHelp, SIGNAL( clicked() ), MainWindow::self, SLOT( showDialogHelp() ) ); + connect( buttonHelp, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) ); fillListBox(); } @@ -69,7 +69,7 @@ void WizardEditor::applyClicked() // fix wizard buttons for ( int i = 0; i < wizard->pageCount(); i++ ) { - QWidget * page = wizard->page( i ); + TQWidget * page = wizard->page( i ); if ( i == 0 ) { // first page wizard->setBackEnabled( page, false ); @@ -142,7 +142,7 @@ void WizardEditor::upClicked() int index2 = index1 - 1; // swap listbox items - QString item1 = listBox->text( index1 ); + TQString item1 = listBox->text( index1 ); listBox->removeItem( index1 ); listBox->insertItem( item1, index2 ); listBox->setCurrentItem( index2 ); @@ -162,7 +162,7 @@ void WizardEditor::downClicked() int index2 = index1 + 1; // swap listbox items - QString item1 = listBox->text( index1 ); + TQString item1 = listBox->text( index1 ); listBox->removeItem( index1 ); listBox->insertItem( item1, index2 ); listBox->setCurrentItem( index2 ); @@ -197,9 +197,9 @@ 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 ); + TQString 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() ) ); + TQString 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 ); diff --git a/kommander/editor/wizardeditorimpl.h b/kommander/editor/wizardeditorimpl.h index 3a9f909e..8fdf4cce 100644 --- a/kommander/editor/wizardeditorimpl.h +++ b/kommander/editor/wizardeditorimpl.h @@ -24,7 +24,7 @@ class QWizard; class FormWindow; -#include +#include #include "wizardeditor.h" #include "command.h" @@ -34,7 +34,7 @@ class WizardEditor : public WizardEditorBase Q_OBJECT public: - WizardEditor( QWidget *parent, QWizard *wizard, FormWindow *fw ); + WizardEditor( TQWidget *parent, TQWizard *wizard, FormWindow *fw ); ~WizardEditor(); protected slots: @@ -57,8 +57,8 @@ private: private: FormWindow *formwindow; - QWizard *wizard; - QPtrList commands; + TQWizard *wizard; + TQPtrList commands; }; #endif diff --git a/kommander/editor/workspace.cpp b/kommander/editor/workspace.cpp index c5c6420e..90f0891d 100644 --- a/kommander/editor/workspace.cpp +++ b/kommander/editor/workspace.cpp @@ -18,8 +18,8 @@ ** **********************************************************************/ -#include // HP-UX compiler needs this here -#include +#include // HP-UX compiler needs this here +#include #include "workspace.h" #include "formwindow.h" #include "mainwindow.h" @@ -34,15 +34,15 @@ #endif #include "formfile.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include "qcompletionedit.h" #include @@ -97,16 +97,16 @@ static const char * const file_xpm[]={ ".bbbbbbbbbbbc###", "ccccccccccccc###"}; -static QPixmap *folderPixmap = 0; -static QPixmap *filePixmap = 0; -static QPixmap* formPixmap = 0; +static TQPixmap *folderPixmap = 0; +static TQPixmap *filePixmap = 0; +static TQPixmap* formPixmap = 0; #ifndef KOMMANDER -WorkspaceItem::WorkspaceItem( QListView *parent, Project* p ) +WorkspaceItem::WorkspaceItem( TQListView *parent, Project* p ) #else -WorkspaceItem::WorkspaceItem( QListView *parent ) +WorkspaceItem::WorkspaceItem( TQListView *parent ) #endif - : QListViewItem( parent ) + : TQListViewItem( parent ) { init(); #ifndef KOMMANDER @@ -118,8 +118,8 @@ WorkspaceItem::WorkspaceItem( QListView *parent ) } #ifndef KOMMANDER -WorkspaceItem::WorkspaceItem( QListViewItem *parent, SourceFile* sf ) - : QListViewItem( parent ) +WorkspaceItem::WorkspaceItem( TQListViewItem *parent, SourceFile* sf ) + : TQListViewItem( parent ) { init(); sourceFile = sf; @@ -128,15 +128,15 @@ WorkspaceItem::WorkspaceItem( QListViewItem *parent, SourceFile* sf ) } #endif -WorkspaceItem::WorkspaceItem( QListViewItem *parent, FormFile* ff, Type type ) - : QListViewItem( parent ) +WorkspaceItem::WorkspaceItem( TQListViewItem *parent, FormFile* ff, Type type ) + : TQListViewItem( parent ) { init(); formFile = ff; t = type; if ( type == FormFileType ) { setPixmap( 0, *formPixmap ); - QObject::connect( ff, SIGNAL( somethingChanged(FormFile*) ), listView(), SLOT( update(FormFile*) ) ); + TQObject::connect( ff, TQT_SIGNAL( somethingChanged(FormFile*) ), listView(), TQT_SLOT( update(FormFile*) ) ); #ifndef KOMMANDER if ( formFile->supportsCodeFile() ) (void) new WorkspaceItem( this, formFile, FormSourceType ); @@ -146,15 +146,15 @@ WorkspaceItem::WorkspaceItem( QListViewItem *parent, FormFile* ff, Type type ) } } -WorkspaceItem::WorkspaceItem( QListView *parent, FormFile* ff, Type type ) - : QListViewItem( parent ) +WorkspaceItem::WorkspaceItem( TQListView *parent, FormFile* ff, Type type ) + : TQListViewItem( parent ) { init(); formFile = ff; t = type; if ( type == FormFileType ) { setPixmap( 0, *formPixmap ); - QObject::connect( ff, SIGNAL( somethingChanged(FormFile*) ), listView(), SLOT( update(FormFile*) ) ); + TQObject::connect( ff, TQT_SIGNAL( somethingChanged(FormFile*) ), listView(), TQT_SLOT( update(FormFile*) ) ); #ifndef KOMMANDER if ( formFile->supportsCodeFile() ) (void) new WorkspaceItem( this, formFile, FormSourceType ); @@ -176,32 +176,32 @@ void WorkspaceItem::init() formFile = 0; } -void WorkspaceItem::paintCell( QPainter *p, const QColorGroup &cg, int column, int width, int align ) +void WorkspaceItem::paintCell( TQPainter *p, const TQColorGroup &cg, int column, int width, int align ) { - QColorGroup g( cg ); - g.setColor( QColorGroup::Base, backgroundColor() ); - g.setColor( QColorGroup::Foreground, Qt::black ); + TQColorGroup g( cg ); + g.setColor( TQColorGroup::Base, backgroundColor() ); + g.setColor( TQColorGroup::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) ); + g.setColor( TQColorGroup::Text, listView()->palette().disabled().color( TQColorGroup::Text) ); + g.setColor( TQColorGroup::HighlightedText, listView()->palette().disabled().color( TQColorGroup::Text) ); } else { #endif - g.setColor( QColorGroup::Text, Qt::black ); + g.setColor( TQColorGroup::Text, Qt::black ); #ifndef KOMMANDER } #endif p->save(); if ( isModified() ) { - QFont f = p->font(); + TQFont f = p->font(); f.setBold( true ); p->setFont( f ); } - QListViewItem::paintCell( p, g, column, width, align ); - p->setPen( QPen( cg.dark(), 1 ) ); + TQListViewItem::paintCell( p, g, column, width, align ); + p->setPen( TQPen( cg.dark(), 1 ) ); if ( column == 0 ) p->drawLine( 0, 0, 0, height() - 1 ); if ( listView()->firstChild() != this ) { @@ -215,10 +215,10 @@ void WorkspaceItem::paintCell( QPainter *p, const QColorGroup &cg, int column, i p->restore(); } -QString WorkspaceItem::text( int column ) const +TQString WorkspaceItem::text( int column ) const { if ( column != 0 ) - return QListViewItem::text( column ); + return TQListViewItem::text( column ); switch( t ) { #ifndef KOMMANDER case ProjectType: @@ -236,10 +236,10 @@ QString WorkspaceItem::text( int column ) const #endif } - return QString::null; // shut up compiler + return TQString::null; // shut up compiler } -void WorkspaceItem::fillCompletionList( QStringList& completion ) +void WorkspaceItem::fillCompletionList( TQStringList& completion ) { switch( t ) { case ProjectType: @@ -259,7 +259,7 @@ void WorkspaceItem::fillCompletionList( QStringList& completion ) } } -bool WorkspaceItem::checkCompletion( const QString& completion ) +bool WorkspaceItem::checkCompletion( const TQString& completion ) { switch( t ) { case ProjectType: @@ -297,9 +297,9 @@ bool WorkspaceItem::isModified() const #endif } -QString WorkspaceItem::key( int column, bool ) const +TQString WorkspaceItem::key( int column, bool ) const { - QString key = text( column ); + TQString key = text( column ); if ( t == FormFileType ) key.prepend( "0" ); else @@ -307,7 +307,7 @@ QString WorkspaceItem::key( int column, bool ) const return key; } -QColor WorkspaceItem::backgroundColor() +TQColor WorkspaceItem::backgroundColor() { bool b = useOddColor; if ( t == FormSourceType && parent() ) @@ -318,18 +318,18 @@ QColor WorkspaceItem::backgroundColor() void WorkspaceItem::setOpen( bool b ) { - QListViewItem::setOpen( b ); + TQListViewItem::setOpen( b ); autoOpen = false; } void WorkspaceItem::setAutoOpen( bool b ) { - QListViewItem::setOpen( b ); + TQListViewItem::setOpen( b ); autoOpen = b; } -Workspace::Workspace( QWidget *parent, MainWindow *mw ) - : QListView( parent, 0, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | +Workspace::Workspace( TQWidget *parent, MainWindow *mw ) + : TQListView( parent, 0, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_Tool | WStyle_MinMax | WStyle_SysMenu ), mainWindow( mw ), #ifndef KOMMANDER project( 0 ), completionDirty( false ) @@ -345,22 +345,22 @@ Workspace::Workspace( QWidget *parent, MainWindow *mw ) header()->setStretchEnabled( true ); header()->hide(); setSorting( 0 ); - setResizePolicy( QScrollView::Manual ); + setResizePolicy( TQScrollView::Manual ); #ifndef KOMMANDER setIcon( PixmapChooser::loadPixmap( "logo" ) ); #endif - QPalette p( palette() ); - p.setColor( QColorGroup::Base, QColor( *backColor2 ) ); + TQPalette p( palette() ); + p.setColor( TQColorGroup::Base, TQColor( *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& ) ) ), + connect( this, TQT_SIGNAL( mouseButtonClicked( int, TQListViewItem *, const TQPoint &, int ) ), + this, TQT_SLOT( itemClicked( int, TQListViewItem *, const TQPoint& ) ) ), + connect( this, TQT_SIGNAL( doubleClicked( TQListViewItem * ) ), + this, TQT_SLOT( itemDoubleClicked( TQListViewItem * ) ) ), + connect( this, TQT_SIGNAL( contextMenuRequested( TQListViewItem *, const TQPoint &, int ) ), + this, TQT_SLOT( rmbClicked( TQListViewItem *, const TQPoint& ) ) ), setHScrollBarMode( AlwaysOff ); setVScrollBarMode( AlwaysOn ); viewport()->setAcceptDrops( true ); @@ -368,9 +368,9 @@ Workspace::Workspace( QWidget *parent, MainWindow *mw ) setColumnWidthMode( 1, Manual ); if ( !folderPixmap ) { - folderPixmap = new QPixmap( folderxpm ); - filePixmap = new QPixmap( file_xpm ); - formPixmap = new QPixmap( PixmapChooser::loadPixmap( "form.xpm", PixmapChooser::Mini ) ); + folderPixmap = new TQPixmap( folderxpm ); + filePixmap = new TQPixmap( file_xpm ); + formPixmap = new TQPixmap( PixmapChooser::loadPixmap( "form.xpm", PixmapChooser::Mini ) ); } #ifdef KOMMANDER @@ -380,7 +380,7 @@ Workspace::Workspace( QWidget *parent, MainWindow *mw ) #ifndef KOMMANDER -void Workspace::projectDestroyed( QObject* o ) +void Workspace::projectDestroyed( TQObject* o ) { if ( o == project ) { project = 0; @@ -395,19 +395,19 @@ 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() ) ); + disconnect( project, TQT_SIGNAL( sourceFileAdded(SourceFile*) ), this, TQT_SLOT( sourceFileAdded(SourceFile*) ) ); + disconnect( project, TQT_SIGNAL( sourceFileRemoved(SourceFile*) ), this, TQT_SLOT( sourceFileRemoved(SourceFile*) ) ); + disconnect( project, TQT_SIGNAL( formFileAdded(FormFile*) ), this, TQT_SLOT( formFileAdded(FormFile*) ) ); + disconnect( project, TQT_SIGNAL( formFileRemoved(FormFile*) ), this, TQT_SLOT( formFileRemoved(FormFile*) ) ); + disconnect( project, TQT_SIGNAL( projectModified() ), this, TQT_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() ) ); + connect( project, TQT_SIGNAL( sourceFileAdded(SourceFile*) ), this, TQT_SLOT( sourceFileAdded(SourceFile*) ) ); + connect( project, TQT_SIGNAL( sourceFileRemoved(SourceFile*) ), this, TQT_SLOT( sourceFileRemoved(SourceFile*) ) ); + connect( project, TQT_SIGNAL( formFileAdded(FormFile*) ), this, TQT_SLOT( formFileAdded(FormFile*) ) ); + connect( project, TQT_SIGNAL( formFileRemoved(FormFile*) ), this, TQT_SLOT( formFileRemoved(FormFile*) ) ); + connect( project, TQT_SIGNAL( destroyed(TQObject*) ), this, TQT_SLOT( projectDestroyed(TQObject*) ) ); + connect( project, TQT_SIGNAL( projectModified() ), this, TQT_SLOT( update() ) ); clear(); if ( bufferEdit ) @@ -417,13 +417,13 @@ void Workspace::setCurrentProject( Project *pro ) projectItem->setOpen( true ); - for ( QPtrListIterator sources = project->sourceFiles(); + for ( TQPtrListIterator sources = project->sourceFiles(); sources.current(); ++sources ) { SourceFile* f = sources.current(); (void) new WorkspaceItem( projectItem, f ); } - for ( QPtrListIterator forms = project->formFiles(); + for ( TQPtrListIterator forms = project->formFiles(); forms.current(); ++forms ) { FormFile* f = forms.current(); (void) new WorkspaceItem( projectItem, f ); @@ -483,7 +483,7 @@ void Workspace::update() void Workspace::update( FormFile* ff ) { - QListViewItem* i = findItem( ff ); + TQListViewItem* i = findItem( ff ); if ( i ) { i->repaint(); if ( (i = i->firstChild()) ) @@ -534,7 +534,7 @@ void Workspace::activeEditorChanged( SourceEditor *se ) WorkspaceItem *Workspace::findItem( FormFile* ff) { - QListViewItemIterator it( this ); + TQListViewItemIterator it( this ); for ( ; it.current(); ++it ) { if ( ( (WorkspaceItem*)it.current() )->formFile == ff ) return (WorkspaceItem*)it.current(); @@ -545,7 +545,7 @@ WorkspaceItem *Workspace::findItem( FormFile* ff) #ifndef KOMMANDER WorkspaceItem *Workspace::findItem( SourceFile *sf ) { - QListViewItemIterator it( this ); + TQListViewItemIterator it( this ); for ( ; it.current(); ++it ) { if ( ( (WorkspaceItem*)it.current() )->sourceFile == sf ) return (WorkspaceItem*)it.current(); @@ -556,7 +556,7 @@ WorkspaceItem *Workspace::findItem( SourceFile *sf ) void Workspace::closeAutoOpenItems() { - QListViewItemIterator it( this ); + TQListViewItemIterator it( this ); for ( ; it.current(); ++it ) { WorkspaceItem* i = (WorkspaceItem*) it.current(); WorkspaceItem* ip = (WorkspaceItem*) i->parent(); @@ -570,18 +570,18 @@ void Workspace::closeAutoOpenItems() } -void Workspace::closeEvent( QCloseEvent *e ) +void Workspace::closeEvent( TQCloseEvent *e ) { e->accept(); } -void Workspace::itemDoubleClicked( QListViewItem *i ) +void Workspace::itemDoubleClicked( TQListViewItem *i ) { if ( ( (WorkspaceItem*)i)->type()== WorkspaceItem::ProjectType ) i->setOpen( true ); } -void Workspace::itemClicked( int button, QListViewItem *i, const QPoint& ) +void Workspace::itemClicked( int button, TQListViewItem *i, const TQPoint& ) { if ( !i || button != LeftButton ) return; @@ -610,7 +610,7 @@ void Workspace::itemClicked( int button, QListViewItem *i, const QPoint& ) #endif } -void Workspace::contentsDropEvent( QDropEvent *e ) +void Workspace::contentsDropEvent( TQDropEvent *e ) { if (!KURLDrag::canDecode(e)) { @@ -627,12 +627,12 @@ void Workspace::contentsDropEvent( QDropEvent *e ) { if (!(*it).isLocalFile()) continue; - QString fn = (*it).path(); + TQString fn = (*it).path(); mainWindow->fileOpen(fn); } } -void Workspace::contentsDragEnterEvent( QDragEnterEvent *e ) +void Workspace::contentsDragEnterEvent( TQDragEnterEvent *e ) { if ( !KURLDrag::canDecode( e ) ) e->ignore(); @@ -640,7 +640,7 @@ void Workspace::contentsDragEnterEvent( QDragEnterEvent *e ) e->accept(); } -void Workspace::contentsDragMoveEvent( QDragMoveEvent *e ) +void Workspace::contentsDragMoveEvent( TQDragMoveEvent *e ) { if ( !KURLDrag::canDecode( e ) ) e->ignore(); @@ -648,13 +648,13 @@ void Workspace::contentsDragMoveEvent( QDragMoveEvent *e ) e->accept(); } -void Workspace::rmbClicked( QListViewItem *i, const QPoint& pos ) +void Workspace::rmbClicked( TQListViewItem *i, const TQPoint& pos ) { if ( !i ) return; WorkspaceItem* wi = (WorkspaceItem*)i; enum { OPEN_SOURCE, REMOVE_SOURCE, OPEN_FORM, REMOVE_FORM, OPEN_FORM_SOURCE }; - QPopupMenu menu( this ); + TQPopupMenu menu( this ); switch ( wi->type() ) { #ifndef KOMMANDER case WorkspaceItem::SourceFileType: @@ -717,19 +717,19 @@ void Workspace::rmbClicked( QListViewItem *i, const QPoint& pos ) } } -bool Workspace::eventFilter( QObject *o, QEvent * e ) +bool Workspace::eventFilter( TQObject *o, TQEvent * e ) { // Reggie, on what type of events do we have to execute updateBufferEdit() - if ( o ==bufferEdit && e->type() != QEvent::ChildRemoved ) + if ( o ==bufferEdit && e->type() != TQEvent::ChildRemoved ) updateBufferEdit(); - return QListView::eventFilter( o, e ); + return TQListView::eventFilter( o, e ); } void Workspace::setBufferEdit( QCompletionEdit *edit ) { bufferEdit = edit; - connect( bufferEdit, SIGNAL( chosen( const QString & ) ), - this, SLOT( bufferChosen( const QString & ) ) ); + connect( bufferEdit, TQT_SIGNAL( chosen( const TQString & ) ), + this, TQT_SLOT( bufferChosen( const TQString & ) ) ); bufferEdit->installEventFilter( this ); } @@ -739,7 +739,7 @@ void Workspace::updateBufferEdit() return; completionDirty = false; #ifndef KOMMANDER - QStringList completion = MainWindow::self->projectFileNames(); + TQStringList completion = MainWindow::self->projectFileNames(); while ( it.current() ) { ( (WorkspaceItem*)it.current())->fillCompletionList( completion ); ++it; @@ -749,7 +749,7 @@ void Workspace::updateBufferEdit() #endif } -void Workspace::bufferChosen( const QString &buffer ) +void Workspace::bufferChosen( const TQString &buffer ) { if ( bufferEdit ) bufferEdit->setText( "" ); @@ -761,10 +761,10 @@ void Workspace::bufferChosen( const QString &buffer ) } #endif - QListViewItemIterator it( this ); + TQListViewItemIterator it( this ); while ( it.current() ) { if ( ( (WorkspaceItem*)it.current())->checkCompletion( buffer ) ) { - itemClicked( LeftButton, it.current(), QPoint() ); + itemClicked( LeftButton, it.current(), TQPoint() ); break; } ++it; @@ -773,7 +773,7 @@ void Workspace::bufferChosen( const QString &buffer ) void Workspace::updateColors() { - QListViewItem* i = firstChild(); + TQListViewItem* i = firstChild(); if ( i ) i = i->firstChild(); bool b = true; diff --git a/kommander/editor/workspace.h b/kommander/editor/workspace.h index e1c0ae8e..4058fc93 100644 --- a/kommander/editor/workspace.h +++ b/kommander/editor/workspace.h @@ -21,7 +21,7 @@ #ifndef WORKSPACE_H #define WORKSPACE_H -#include +#include class FormWindow; class QResizeEvent; @@ -46,28 +46,28 @@ public: enum Type { ProjectType, FormFileType, FormSourceType, SourceFileType }; #ifndef KOMMANDER - //WorkspaceItem( QListView *parent, Project* p ); + //WorkspaceItem( TQListView *parent, Project* p ); #else - WorkspaceItem(QListView *parent); + WorkspaceItem(TQListView *parent); #endif #ifndef KOMMANDER -// WorkspaceItem( QListViewItem *parent, SourceFile* sf ); +// WorkspaceItem( TQListViewItem *parent, SourceFile* sf ); #endif - WorkspaceItem( QListViewItem *parent, FormFile* ff, Type t = FormFileType ); - WorkspaceItem( QListView *parent, FormFile* ff, Type t = FormFileType ); + WorkspaceItem( TQListViewItem *parent, FormFile* ff, Type t = FormFileType ); + WorkspaceItem( TQListView *parent, FormFile* ff, Type t = FormFileType ); - void paintCell( QPainter *p, const QColorGroup &cg, int column, int width, int align ); + void paintCell( TQPainter *p, const TQColorGroup &cg, int column, int width, int align ); Type type() const { return t; } bool isModified() const; - QString text( int ) const; + TQString text( int ) const; - void fillCompletionList( QStringList& completion ); - bool checkCompletion( const QString& completion ); + void fillCompletionList( TQStringList& completion ); + bool checkCompletion( const TQString& completion ); - QString key( int, bool ) const; // column sorting key + TQString key( int, bool ) const; // column sorting key #ifndef KOMMANDER Project* project; @@ -87,7 +87,7 @@ public: private: void init(); bool autoOpen; - QColor backgroundColor(); + TQColor backgroundColor(); Type t; }; @@ -96,7 +96,7 @@ class Workspace : public QListView Q_OBJECT public: - Workspace( QWidget *parent , MainWindow *mw ); + Workspace( TQWidget *parent , MainWindow *mw ); #ifndef KOMMANDER void setCurrentProject( Project *pro ); @@ -104,9 +104,9 @@ public: #ifdef KOMMANDER void makeConnections(MainWindow *); #endif - void contentsDropEvent( QDropEvent *e ); - void contentsDragEnterEvent( QDragEnterEvent *e ); - void contentsDragMoveEvent( QDragMoveEvent *e ); + void contentsDropEvent( TQDropEvent *e ); + void contentsDragEnterEvent( TQDragEnterEvent *e ); + void contentsDragMoveEvent( TQDragMoveEvent *e ); void setBufferEdit( QCompletionEdit *edit ); @@ -121,18 +121,18 @@ public slots: #endif protected: - void closeEvent( QCloseEvent *e ); - bool eventFilter( QObject *, QEvent * ); + void closeEvent( TQCloseEvent *e ); + bool eventFilter( TQObject *, TQEvent * ); 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 ); + void itemClicked( int, TQListViewItem *i, const TQPoint& pos ); + void itemDoubleClicked( TQListViewItem *i ); + void rmbClicked( TQListViewItem *i, const TQPoint& pos ); + void bufferChosen( const TQString &buffer ); #ifndef KOMMANDER -// void projectDestroyed( QObject* ); +// void projectDestroyed( TQObject* ); #endif #ifndef KOMMANDER diff --git a/kommander/executor/dcopkommanderif.h b/kommander/executor/dcopkommanderif.h index 3ee8a552..1ba67cbb 100644 --- a/kommander/executor/dcopkommanderif.h +++ b/kommander/executor/dcopkommanderif.h @@ -17,7 +17,7 @@ #define DCOPKOMMANDERIF_H #include -#include +#include /* See widgets/specials.cpp for description. Deprecated methods are replaced by methods above. */ @@ -26,55 +26,55 @@ 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 void setEnabled(const TQString& widgetName, bool enable) = 0; +virtual void enableWidget(const TQString& widgetName, bool enable) = 0; /* DEPRECATED */ +virtual void setVisible(const TQString& widgetName, bool enable) = 0; +virtual void setText(const TQString& widgetName, const TQString& text) = 0; +virtual void changeWidgetText(const TQString& widgetName, const TQString& text) = 0; /* DEPRECATED */ +virtual TQString text(const TQString& widgetName) = 0; +virtual void setSelection(const TQString& widgetName, const TQString& text) = 0; +virtual void setCurrentListItem(const TQString& widgetName, const TQString& text) = 0; /* DEPRECATED */ +virtual TQString selection(const TQString& widgetName) = 0; +virtual int currentItem(const TQString &widgetName) = 0; +virtual TQString item(const TQString &widgetName, int index) = 0; +virtual int itemDepth(const TQString &widgetName, int index) = 0; +virtual TQString itemPath(const TQString &widgetName, int index) = 0; +virtual void removeItem(const TQString &widgetName, int index) = 0; +virtual void removeListItem(const TQString &widgetName, int index) = 0; /* DEPRECATED */ +virtual void insertItem(const TQString &widgetName, const TQString &item, int index) = 0; +virtual void addListItem(const TQString &widgetName, const TQString &item, int index) = 0; /* DEPRECATED */ +virtual void setPixmap(const TQString &widgetName, const TQString &iconName, int index) = 0; +virtual void insertItems(const TQString &widgetName, const TQStringList &items, int index) = 0; +virtual void addListItems(const TQString &widgetName, const TQStringList &items, int index) = 0;/*DEPRECATED*/ +virtual void addUniqueItem(const TQString &widgetName, const TQString &item) = 0; +virtual int findItem(const TQString &widgetName, const TQString &item) = 0; +virtual void clear(const TQString &widgetName) = 0; +virtual void clearList(const TQString &widgetName) = 0; /* DEPRECATED */ +virtual void setCurrentItem(const TQString &widgetName, int index) = 0; +virtual void setCurrentTab(const TQString &widgetName, int index) = 0; /* DEPRECATED */ +virtual void insertTab(const TQString &widgetName, const TQString &label, int index) = 0; +virtual bool checked(const TQString &widgetName) = 0; +virtual void setChecked(const TQString &widgetName, bool checked) = 0; +virtual void setAssociatedText(const TQString &widgetName, const TQString &text) = 0; +virtual TQStringList associatedText(const TQString &widgetName) = 0; +virtual TQString type(const TQString& widget) = 0; +virtual TQStringList children(const TQString& parent, bool recursive) = 0; +virtual TQString global(const TQString& variableName) = 0; +virtual void setGlobal(const TQString& variableName, const TQString& value) = 0; +virtual void setMaximum(const TQString &widgetName, int value) = 0; +virtual TQString execute(const TQString &widgetName) = 0; +virtual void cancel(const TQString &widgetName) = 0; +virtual int count(const TQString &widgetName) = 0; +virtual int currentColumn(const TQString &widgetName) = 0; +virtual int currentRow(const TQString &widgetName) = 0; +virtual void insertRow(const TQString &widgetName, int row, int count) = 0; +virtual void insertColumn(const TQString &widgetName, int column, int count) = 0; +virtual void setCellText(const TQString &widgetName, int row, int column, const TQString& text) = 0; +virtual TQString cellText(const TQString &widgetName, int row, int column) = 0; +virtual void removeRow(const TQString &widgetName, int row, int count) = 0; +virtual void removeColumn(const TQString &widgetName, int column, int count) = 0; +virtual void setRowCaption(const TQString &widgetName, int row, const TQString& text) = 0; +virtual void setColumnCaption(const TQString &widgetName, int column, const TQString& text) = 0; virtual int getWinID() = 0; virtual void setBusyCursor(bool busy) = 0; }; diff --git a/kommander/executor/instance.cpp b/kommander/executor/instance.cpp index 2ff4edfd..7676f12d 100644 --- a/kommander/executor/instance.cpp +++ b/kommander/executor/instance.cpp @@ -24,17 +24,17 @@ #include /* QT INCLUDES */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include /* OTHER INCLUDES */ #include "instance.h" @@ -52,20 +52,20 @@ Instance::Instance() SpecialInformation::registerSpecials(); } -Instance::Instance(QWidget *a_parent) +Instance::Instance(TQWidget *a_parent) : DCOPObject("KommanderIf"), m_instance(0), m_textInstance(0), m_parent(a_parent) { SpecialInformation::registerSpecials(); } -void Instance::addCmdlineArguments(const QStringList& args) +void Instance::addCmdlineArguments(const TQStringList& args) { if (!m_textInstance) return; // Filter out variable arguments ('var=value') - QStringList stdArgs; - for (QStringList::ConstIterator it = args.begin(); it != args.end(); ++it) + TQStringList stdArgs; + for (TQStringList::ConstIterator it = args.begin(); it != args.end(); ++it) { int pos = (*it).find('='); if (pos != -1) @@ -74,10 +74,10 @@ void Instance::addCmdlineArguments(const QStringList& args) 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); + for (TQStringList::ConstIterator it = stdArgs.begin(); it != stdArgs.end(); ++it) + m_textInstance->setGlobal(TQString("_ARG%1").arg(++i), *it); m_textInstance->setGlobal("_ARGS", stdArgs.join(" ")); - m_textInstance->setGlobal("_ARGCOUNT", QString::number(stdArgs.count())); + m_textInstance->setGlobal("_ARGCOUNT", TQString::number(stdArgs.count())); } @@ -101,10 +101,10 @@ bool Instance::build(const KURL& fname) KommanderFactory::loadPlugins(); if (fname.isValid()) - m_instance = KommanderFactory::create(fname.path(), 0L, dynamic_cast(parent())); + m_instance = KommanderFactory::create(fname.path(), 0L, dynamic_cast(parent())); else { - QFile inputFile; + TQFile inputFile; inputFile.open(IO_ReadOnly, stdin); m_instance = KommanderFactory::create(&inputFile); } @@ -116,7 +116,7 @@ bool Instance::build(const KURL& fname) return false; } - KommanderWindow* window = dynamic_cast((QWidget*)m_instance); + KommanderWindow* window = dynamic_cast((TQWidget*)m_instance); if (window) window->setFileName(fname.path().local8Bit()); @@ -127,8 +127,8 @@ bool Instance::build(const KURL& fname) { if (m_instance) { - QObjectList* widgets = m_instance->queryList(); - for (QObject* w = widgets->first(); w; w = widgets->next()) + TQObjectList* widgets = m_instance->queryList(); + for (TQObject* w = widgets->first(); w; w = widgets->next()) if (kommanderWidget(w)) { m_textInstance = kommanderWidget(w); @@ -146,7 +146,7 @@ bool Instance::build(const KURL& fname) { m_textInstance->setGlobal("KDDIR", fname.directory()); m_textInstance->setGlobal("NAME", fname.fileName()); - m_textInstance->setGlobal("_PID", QString().setNum(getpid())); + m_textInstance->setGlobal("_PID", TQString().setNum(getpid())); m_textInstance->setGlobal("VERSION", KOMMANDER_VERSION); } return true; @@ -158,12 +158,12 @@ bool Instance::run() return false; // Handle both dialogs and main windows - if (m_instance->inherits("QDialog")) - dynamic_cast((QWidget*)m_instance)->exec(); - else if (m_instance->inherits("QMainWindow")) + if (m_instance->inherits("TQDialog")) + dynamic_cast((TQWidget*)m_instance)->exec(); + else if (m_instance->inherits("TQMainWindow")) { kapp->setMainWidget(m_instance); - dynamic_cast((QWidget*)m_instance)->show(); + dynamic_cast((TQWidget*)m_instance)->show(); kapp->exec(); } else return false; @@ -175,14 +175,14 @@ bool Instance::isBuilt() const return m_instance; } -void Instance::setParent(QWidget *a_parent) +void Instance::setParent(TQWidget *a_parent) { m_parent = a_parent; } bool Instance::isFileValid(const KURL& fname) const { - if (!QFileInfo(fname.path()).exists()) + if (!TQFileInfo(fname.path()).exists()) { KMessageBox::sorry(0, i18n("Kommander file
%1
does not " "exist.
").arg(fname.path())); @@ -199,13 +199,13 @@ bool Instance::isFileValid(const KURL& fname) const } // Check whether file is not in some temporary directory. - QStringList tmpDirs = KGlobal::dirs()->resourceDirs("tmp"); + TQStringList 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) + for (TQStringList::ConstIterator I = tmpDirs.begin(); I != tmpDirs.end(); ++I) if (fname.directory(false).startsWith(*I)) inTemp = true; @@ -215,12 +215,12 @@ bool Instance::isFileValid(const KURL& fname) const " This may mean that it was run from a KMail attachment or from a webpage. " "

Any script contained in this dialog will have write access to all of your home directory; " "running such dialogs may be dangerous: " - "

are you sure you want to continue?"), QString(), i18n("Run Nevertheless")) == KMessageBox::Cancel) + "

are you sure you want to continue?"), TQString(), i18n("Run Nevertheless")) == KMessageBox::Cancel) return false; } - if (!QFileInfo(fname.path()).isExecutable()) + if (!TQFileInfo(fname.path()).isExecutable()) { - if (KMessageBox::warningContinueCancel(0, i18n("The Kommander file %1 does not have the executable attribute set and could possibly contain dangerous exploits.

If you trust the scripting (viewable in kmdr-editor) in this program, make it executable to get rid of this warning.

Are you sure you want to continue?").arg(fname.pathOrURL()), QString(), i18n("Run Nevertheless")) == KMessageBox::Cancel) + if (KMessageBox::warningContinueCancel(0, i18n("The Kommander file %1 does not have the executable attribute set and could possibly contain dangerous exploits.

If you trust the scripting (viewable in kmdr-editor) in this program, make it executable to get rid of this warning.

Are you sure you want to continue?").arg(fname.pathOrURL()), TQString(), i18n("Run Nevertheless")) == KMessageBox::Cancel) return false; } return true; @@ -231,31 +231,31 @@ bool Instance::isFileValid(const KURL& fname) const // Widget functions -void Instance::setEnabled(const QString& widgetName, bool enable) +void Instance::setEnabled(const TQString& widgetName, bool enable) { - QObject* child = stringToWidget(widgetName); - if (child && child->inherits("QWidget")) - ((QWidget*)child)->setEnabled(enable); + TQObject* child = stringToWidget(widgetName); + if (child && child->inherits("TQWidget")) + ((TQWidget*)child)->setEnabled(enable); } -void Instance::setVisible(const QString& widgetName, bool visible) +void Instance::setVisible(const TQString& widgetName, bool visible) { - QObject* child = stringToWidget(widgetName); - if (child && child->inherits("QWidget")) - ((QWidget*)child)->setShown(visible); + TQObject* child = stringToWidget(widgetName); + if (child && child->inherits("TQWidget")) + ((TQWidget*)child)->setShown(visible); } -void Instance::setText(const QString& widgetName, const QString& text) +void Instance::setText(const TQString& widgetName, const TQString& text) { - QObject* child = stringToWidget(widgetName); + TQObject* child = stringToWidget(widgetName); if (kommanderWidget(child)) kommanderWidget(child)->handleDCOP(DCOP::setText, text); - else if (child && child->inherits("QLabel")) + else if (child && child->inherits("TQLabel")) { - QLabel* label = (QLabel*)child; + TQLabel* label = (TQLabel*)child; if (label->pixmap()) { - QPixmap pixmap; + TQPixmap pixmap; if (pixmap.load(text)) label->setPixmap(pixmap); } @@ -264,321 +264,321 @@ void Instance::setText(const QString& widgetName, const QString& text) } } -QString Instance::text(const QString& widgetName) +TQString Instance::text(const TQString& widgetName) { - QObject* child = stringToWidget(widgetName); + TQObject* child = stringToWidget(widgetName); if (kommanderWidget(child)) return kommanderWidget(child)->handleDCOP(DCOP::text); - else if (child && child->inherits("QLabel")) - return ((QLabel*)child)->text(); - return QString(); + else if (child && child->inherits("TQLabel")) + return ((TQLabel*)child)->text(); + return TQString(); } -void Instance::setSelection(const QString& widgetName, const QString& text) +void Instance::setSelection(const TQString& widgetName, const TQString& text) { - QObject* child = stringToWidget(widgetName); + TQObject* child = stringToWidget(widgetName); if (kommanderWidget(child)) kommanderWidget(child)->handleDCOP(DCOP::setSelection, text); - else if (child && child->inherits("QLabel")) - ((QLabel*)child)->setText(text); + else if (child && child->inherits("TQLabel")) + ((TQLabel*)child)->setText(text); } -QString Instance::selection(const QString& widgetName) +TQString Instance::selection(const TQString& widgetName) { - QObject* child = stringToWidget(widgetName); + TQObject* child = stringToWidget(widgetName); if (kommanderWidget(child)) return kommanderWidget(child)->handleDCOP(DCOP::selection); - return QString(); + return TQString(); } -int Instance::currentItem(const QString &widgetName) +int Instance::currentItem(const TQString &widgetName) { - QObject* child = stringToWidget(widgetName); + TQObject* child = stringToWidget(widgetName); if (kommanderWidget(child)) return kommanderWidget(child)->handleDCOP(DCOP::currentItem).toInt(); return -1; } -QString Instance::item(const QString &widgetName, int i) +TQString Instance::item(const TQString &widgetName, int i) { - QObject* child = stringToWidget(widgetName); + TQObject* child = stringToWidget(widgetName); if (kommanderWidget(child)) - return kommanderWidget(child)->handleDCOP(DCOP::item, QString::number(i)); - return QString(); + return kommanderWidget(child)->handleDCOP(DCOP::item, TQString::number(i)); + return TQString(); } -void Instance::removeItem(const QString &widgetName, int index) +void Instance::removeItem(const TQString &widgetName, int index) { - QObject* child = stringToWidget(widgetName); + TQObject* child = stringToWidget(widgetName); if (kommanderWidget(child)) - kommanderWidget(child)->handleDCOP(DCOP::removeItem, QString::number(index)); + kommanderWidget(child)->handleDCOP(DCOP::removeItem, TQString::number(index)); } -void Instance::insertItem(const QString &widgetName, const QString &item, int index) +void Instance::insertItem(const TQString &widgetName, const TQString &item, int index) { - QObject* child = stringToWidget(widgetName); + TQObject* child = stringToWidget(widgetName); if (kommanderWidget(child)) { - QStringList args(item); - args += QString::number(index); + TQStringList args(item); + args += TQString::number(index); kommanderWidget(child)->handleDCOP(DCOP::insertItem, args); } } -void Instance::insertItems(const QString &widgetName, const QStringList &items, int index) +void Instance::insertItems(const TQString &widgetName, const TQStringList &items, int index) { - QObject* child = stringToWidget(widgetName); + TQObject* child = stringToWidget(widgetName); if (kommanderWidget(child)) { - QStringList args(items.join("\n")); - args += QString::number(index); + TQStringList args(items.join("\n")); + args += TQString::number(index); kommanderWidget(child)->handleDCOP(DCOP::insertItems, args); } } -int Instance::findItem(const QString &widgetName, const QString& item) +int Instance::findItem(const TQString &widgetName, const TQString& item) { - QObject* child = stringToWidget(widgetName); + TQObject* 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) +void Instance::addUniqueItem(const TQString &widgetName, const TQString &item) { - QObject* child = stringToWidget(widgetName); + TQObject* child = stringToWidget(widgetName); if (kommanderWidget(child)) kommanderWidget(child)->handleDCOP(DCOP::addUniqueItem, item); } -int Instance::itemDepth(const QString &widgetName, int index) +int Instance::itemDepth(const TQString &widgetName, int index) { - QObject* child = stringToWidget(widgetName); + TQObject* child = stringToWidget(widgetName); if (kommanderWidget(child)) - return kommanderWidget(child)->handleDCOP(DCOP::itemDepth, QString::number(index)).toInt(); + return kommanderWidget(child)->handleDCOP(DCOP::itemDepth, TQString::number(index)).toInt(); return -1; } -QString Instance::itemPath(const QString &widgetName, int index) +TQString Instance::itemPath(const TQString &widgetName, int index) { - QObject* child = stringToWidget(widgetName); + TQObject* child = stringToWidget(widgetName); if (kommanderWidget(child)) - return kommanderWidget(child)->handleDCOP(DCOP::itemPath, QString::number(index)); - return QString(); + return kommanderWidget(child)->handleDCOP(DCOP::itemPath, TQString::number(index)); + return TQString(); } -void Instance::setPixmap(const QString &widgetName, const QString& iconName, int index) +void Instance::setPixmap(const TQString &widgetName, const TQString& iconName, int index) { - QObject* child = stringToWidget(widgetName); + TQObject* child = stringToWidget(widgetName); if (kommanderWidget(child)) { - QStringList args(iconName); - args += QString::number(index); + TQStringList args(iconName); + args += TQString::number(index); kommanderWidget(child)->handleDCOP(DCOP::setPixmap, args); } } -void Instance::clear(const QString &widgetName) +void Instance::clear(const TQString &widgetName) { - QObject* child = stringToWidget(widgetName); + TQObject* child = stringToWidget(widgetName); if (kommanderWidget(child)) kommanderWidget(child)->handleDCOP(DCOP::clear); } -void Instance::setCurrentItem(const QString &widgetName, int index) +void Instance::setCurrentItem(const TQString &widgetName, int index) { - QObject* child = stringToWidget(widgetName); + TQObject* child = stringToWidget(widgetName); if (kommanderWidget(child)) - kommanderWidget(child)->handleDCOP(DCOP::setCurrentItem, QString::number(index)); + kommanderWidget(child)->handleDCOP(DCOP::setCurrentItem, TQString::number(index)); } -void Instance::setChecked(const QString &widgetName, bool checked) +void Instance::setChecked(const TQString &widgetName, bool checked) { - QObject* child = stringToWidget(widgetName); + TQObject* child = stringToWidget(widgetName); if (kommanderWidget(child)) kommanderWidget(child)->handleDCOP(DCOP::setChecked, checked ? "true" : "false"); } -bool Instance::checked(const QString &widgetName) +bool Instance::checked(const TQString &widgetName) { - QObject* child = stringToWidget(widgetName); + TQObject* 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) +void Instance::setAssociatedText(const TQString &widgetName, const TQString& text) { - QObject* child = stringToWidget(widgetName); + TQObject* child = stringToWidget(widgetName); if (kommanderWidget(child)) - kommanderWidget(child)->setAssociatedText(QStringList::split('\n', text, true)); + kommanderWidget(child)->setAssociatedText(TQStringList::split('\n', text, true)); } -QStringList Instance::associatedText(const QString &widgetName) +TQStringList Instance::associatedText(const TQString &widgetName) { - QObject* child = stringToWidget(widgetName); + TQObject* child = stringToWidget(widgetName); if (kommanderWidget(child)) kommanderWidget(child)->associatedText(); - return QString(); + return TQString(); } -QString Instance::type(const QString& widget) +TQString Instance::type(const TQString& widget) { - QObject* child = stringToWidget(widget); - if (child && child->inherits("QWidget")) + TQObject* child = stringToWidget(widget); + if (child && child->inherits("TQWidget")) return child->className(); - return QString(); + return TQString(); } -QStringList Instance::children(const QString& parent, bool recursive) +TQStringList Instance::children(const TQString& parent, bool recursive) { - QStringList matching; - QObject* child = stringToWidget(parent); - QObjectList* widgets; + TQStringList matching; + TQObject* child = stringToWidget(parent); + TQObjectList* widgets; if (!child) child = m_instance; - if (child->inherits("QWidget")) + if (child->inherits("TQWidget")) { - widgets = child->queryList("QWidget", 0, false, recursive); - for (QObject* w = widgets->first(); w; w = widgets->next()) + widgets = child->queryList("TQWidget", 0, false, recursive); + for (TQObject* 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) +void Instance::setMaximum(const TQString &widgetName, int value) { - QObject* child = stringToWidget(widgetName); + TQObject* child = stringToWidget(widgetName); if (kommanderWidget(child)) - kommanderWidget(child)->handleDCOP(DCOP::setMaximum, QString::number(value)); + kommanderWidget(child)->handleDCOP(DCOP::setMaximum, TQString::number(value)); } -QString Instance::execute(const QString &widgetName) +TQString Instance::execute(const TQString &widgetName) { - QObject* child = stringToWidget(widgetName); + TQObject* child = stringToWidget(widgetName); if (kommanderWidget(child)) return kommanderWidget(child)->handleDCOP(DCOP::execute); return ""; } -void Instance::cancel(const QString &widgetName) +void Instance::cancel(const TQString &widgetName) { - QObject* child = stringToWidget(widgetName); + TQObject* child = stringToWidget(widgetName); if (kommanderWidget(child)) kommanderWidget(child)->handleDCOP(DCOP::cancel); } -int Instance::count(const QString &widgetName) +int Instance::count(const TQString &widgetName) { - QObject* child = stringToWidget(widgetName); + TQObject* child = stringToWidget(widgetName); if (kommanderWidget(child)) return kommanderWidget(child)->handleDCOP(DCOP::count).toInt(); return -1; } -int Instance::currentColumn(const QString &widgetName) +int Instance::currentColumn(const TQString &widgetName) { - QObject* child = stringToWidget(widgetName); + TQObject* child = stringToWidget(widgetName); if (kommanderWidget(child)) return kommanderWidget(child)->handleDCOP(DCOP::currentColumn).toInt(); return -1; } -int Instance::currentRow(const QString &widgetName) +int Instance::currentRow(const TQString &widgetName) { - QObject* child = stringToWidget(widgetName); + TQObject* 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) +void Instance::insertRow(const TQString &widgetName, int row, int count) { - QObject* child = stringToWidget(widgetName); + TQObject* child = stringToWidget(widgetName); if (kommanderWidget(child)) { - QStringList args(QString::number(row)); - args += QString::number(count); + TQStringList args(TQString::number(row)); + args += TQString::number(count); kommanderWidget(child)->handleDCOP(DCOP::insertRow, args); } } -void Instance::insertColumn(const QString &widgetName, int column, int count) +void Instance::insertColumn(const TQString &widgetName, int column, int count) { - QObject* child = stringToWidget(widgetName); + TQObject* child = stringToWidget(widgetName); if (kommanderWidget(child)) { - QStringList args(QString::number(column)); - args += QString::number(count); + TQStringList args(TQString::number(column)); + args += TQString::number(count); kommanderWidget(child)->handleDCOP(DCOP::insertColumn, args); } } -void Instance::setCellText(const QString &widgetName, int row, int column, const QString& text) +void Instance::setCellText(const TQString &widgetName, int row, int column, const TQString& text) { - QObject* child = stringToWidget(widgetName); + TQObject* child = stringToWidget(widgetName); if (kommanderWidget(child)) { - QStringList args(QString::number(row)); - args += QString::number(column); + TQStringList args(TQString::number(row)); + args += TQString::number(column); args += text; kommanderWidget(child)->handleDCOP(DCOP::setCellText, args); } } -QString Instance::cellText(const QString &widgetName, int row, int column) +TQString Instance::cellText(const TQString &widgetName, int row, int column) { - QObject* child = stringToWidget(widgetName); + TQObject* child = stringToWidget(widgetName); if (kommanderWidget(child)) { - QStringList args(QString::number(row)); - args += QString::number(column); + TQStringList args(TQString::number(row)); + args += TQString::number(column); return kommanderWidget(child)->handleDCOP(DCOP::cellText, args); } - else return QString(); + else return TQString(); } -void Instance::removeRow(const QString &widgetName, int row, int count) +void Instance::removeRow(const TQString &widgetName, int row, int count) { - QObject* child = stringToWidget(widgetName); + TQObject* child = stringToWidget(widgetName); if (kommanderWidget(child)) { - QStringList args(QString::number(row)); - args += QString::number(count); + TQStringList args(TQString::number(row)); + args += TQString::number(count); kommanderWidget(child)->handleDCOP(DCOP::removeRow, args); } } -void Instance::removeColumn(const QString &widgetName, int column, int count) +void Instance::removeColumn(const TQString &widgetName, int column, int count) { - QObject* child = stringToWidget(widgetName); + TQObject* child = stringToWidget(widgetName); if (kommanderWidget(child)) { - QStringList args(QString::number(column)); - args += QString::number(count); + TQStringList args(TQString::number(column)); + args += TQString::number(count); kommanderWidget(child)->handleDCOP(DCOP::removeColumn, args); } } -void Instance::setRowCaption(const QString &widgetName, int row, const QString& text) +void Instance::setRowCaption(const TQString &widgetName, int row, const TQString& text) { - QObject* child = stringToWidget(widgetName); + TQObject* child = stringToWidget(widgetName); if (kommanderWidget(child)) { - QStringList args(QString::number(row)); + TQStringList args(TQString::number(row)); args += text; kommanderWidget(child)->handleDCOP(DCOP::setRowCaption, args); } } -void Instance::setColumnCaption(const QString &widgetName, int column, const QString& text) +void Instance::setColumnCaption(const TQString &widgetName, int column, const TQString& text) { - QObject* child = stringToWidget(widgetName); + TQObject* child = stringToWidget(widgetName); if (kommanderWidget(child)) { - QStringList args(QString::number(column)); + TQStringList args(TQString::number(column)); args += text; kommanderWidget(child)->handleDCOP(DCOP::setColumnCaption, args); } @@ -593,75 +593,75 @@ void Instance::setColumnCaption(const QString &widgetName, int column, const QSt -QString Instance::global(const QString& variableName) +TQString Instance::global(const TQString& variableName) { - return m_textInstance ? m_textInstance->global(variableName) : QString(); + return m_textInstance ? m_textInstance->global(variableName) : TQString(); } -void Instance::setGlobal(const QString& variableName, const QString& value) +void Instance::setGlobal(const TQString& variableName, const TQString& value) { if (m_textInstance) m_textInstance->setGlobal(variableName, value); } -QObject* Instance::stringToWidget(const QString& name) +TQObject* Instance::stringToWidget(const TQString& name) { return m_instance->child(name); } -KommanderWidget* Instance::kommanderWidget(QObject* object) +KommanderWidget* Instance::kommanderWidget(TQObject* object) { return dynamic_cast(object); } /*** Deprecated methods: just call appropriate method ***/ -void Instance::changeWidgetText(const QString& widgetName, const QString& text) +void Instance::changeWidgetText(const TQString& widgetName, const TQString& text) { setText(widgetName, text); } -void Instance::clearList(const QString &widgetName) +void Instance::clearList(const TQString &widgetName) { clear(widgetName); } -void Instance::setCurrentListItem(const QString& widgetName, const QString& item) +void Instance::setCurrentListItem(const TQString& widgetName, const TQString& item) { setSelection(widgetName, item); } -void Instance::setCurrentTab(const QString &widgetName, int index) +void Instance::setCurrentTab(const TQString &widgetName, int index) { setCurrentItem(widgetName, index); } -void Instance::insertTab(const QString &widgetName, const QString &label, int index) +void Instance::insertTab(const TQString &widgetName, const TQString &label, int index) { - QObject* child = stringToWidget(widgetName); - QStringList l; + TQObject* child = stringToWidget(widgetName); + TQStringList l; l << label; - l << QString::number(index); + l << TQString::number(index); if (kommanderWidget(child)) kommanderWidget(child)->handleDCOP(DCOP::insertTab, l); } -void Instance::addListItems(const QString &widgetName, const QStringList &items, int index) +void Instance::addListItems(const TQString &widgetName, const TQStringList &items, int index) { insertItems(widgetName, items, index); } -void Instance::enableWidget(const QString& widgetName, bool enable) +void Instance::enableWidget(const TQString& widgetName, bool enable) { setEnabled(widgetName, enable); } -void Instance::removeListItem(const QString &widgetName, int index) +void Instance::removeListItem(const TQString &widgetName, int index) { removeItem(widgetName, index); } -void Instance::addListItem(const QString & widgetName, const QString & item, int index) +void Instance::addListItem(const TQString & widgetName, const TQString & item, int index) { insertItem(widgetName, item, index); } @@ -674,9 +674,9 @@ int Instance::getWinID() void Instance::setBusyCursor(bool busy) { if (busy) - m_instance->setCursor(QCursor(Qt::WaitCursor)); + m_instance->setCursor(TQCursor(Qt::WaitCursor)); else - m_instance->setCursor(QCursor(Qt::ArrowCursor)); + m_instance->setCursor(TQCursor(Qt::ArrowCursor)); } diff --git a/kommander/executor/instance.h b/kommander/executor/instance.h index 66b97455..443e8db5 100644 --- a/kommander/executor/instance.h +++ b/kommander/executor/instance.h @@ -20,11 +20,11 @@ #define INSTANCE_H /* QT INCLUDES */ -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include /* KDE INCLUDES */ #include @@ -40,13 +40,13 @@ class KommanderWidget; -class Instance : public QObject, virtual public DCOPKommanderIf +class Instance : public TQObject, virtual public DCOPKommanderIf { Q_OBJECT public: Instance(); - Instance(QWidget*); + Instance(TQWidget*); ~Instance(); /* passing global variables: two forms are accepted. kdmr-executor file.kmdr COUNT=45 PATH=/tmp - this adds global variables 45 and PATH @@ -54,65 +54,65 @@ public: 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); + virtual void addCmdlineArguments(const TQStringList& 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 void setEnabled(const TQString& widgetName, bool enable); + virtual void enableWidget(const TQString& widgetName, bool enable); /* DEPRECATED */ + virtual void setVisible(const TQString& widgetName, bool enable); + virtual void setText(const TQString& widgetName, const TQString& text); + virtual void changeWidgetText(const TQString& widgetName, const TQString& text); /* DEPRECATED */ + virtual TQString text(const TQString& widgetName); + virtual void setSelection(const TQString& widgetName, const TQString& text); + virtual void setCurrentListItem(const TQString& widgetName, const TQString& text); /* DEPRECATED */ + virtual TQString selection(const TQString& widgetName); + virtual int currentItem(const TQString &widgetName); + virtual TQString item(const TQString &widgetName, int index); + virtual int itemDepth(const TQString &widgetName, int index); + virtual TQString itemPath(const TQString &widgetName, int index); + virtual void removeItem(const TQString &widgetName, int index); + virtual void removeListItem(const TQString &widgetName, int index); /* DEPRECATED */ + virtual void insertItem(const TQString &widgetName, const TQString &item, int index); + virtual void addListItem(const TQString &widgetName, const TQString &item, int index); /* DEPRECATED */ + virtual void setPixmap(const TQString &widgetName, const TQString &iconName, int index); + virtual void insertItems(const TQString &widgetName, const TQStringList &items, int index); + virtual void addListItems(const TQString &widgetName, const TQStringList &items, int index);/*DEPRECATED*/ + virtual void addUniqueItem(const TQString &widgetName, const TQString &item); + virtual int findItem(const TQString &widgetName, const TQString &item); + virtual void clear(const TQString &widgetName); + virtual void clearList(const TQString &widgetName); /* DEPRECATED */ + virtual void setCurrentItem(const TQString &widgetName, int index); + virtual void setCurrentTab(const TQString &widgetName, int index); /* DEPRECATED */ + virtual void insertTab(const TQString &widgetName, const TQString &label, int index); + virtual void setChecked(const TQString &widgetName, bool checked); + virtual bool checked(const TQString &widgetName); + virtual void setAssociatedText(const TQString &widgetName, const TQString &text); + virtual TQStringList associatedText(const TQString &widgetName); + virtual TQString type(const TQString& widget); + virtual TQStringList children(const TQString& parent, bool recursive); + virtual TQString global(const TQString& variableName); + virtual void setGlobal(const TQString& variableName, const TQString& value); + virtual void setMaximum(const TQString &widgetName, int value); + virtual TQString execute(const TQString &widgetName); + virtual void cancel(const TQString &widgetName); + virtual int count(const TQString &widgetName); + virtual int currentColumn(const TQString &widgetName); + virtual int currentRow(const TQString &widgetName); + virtual void insertRow(const TQString &widgetName, int row, int count); + virtual void insertColumn(const TQString &widgetName, int column, int count); + virtual void setCellText(const TQString &widgetName, int row, int column, const TQString& text); + virtual TQString cellText(const TQString &widgetName, int row, int column); + virtual void removeRow(const TQString &widgetName, int row, int count); + virtual void removeColumn(const TQString &widgetName, int column, int count); + virtual void setRowCaption(const TQString &widgetName, int row, const TQString& text); + virtual void setColumnCaption(const TQString &widgetName, int column, const TQString& text); virtual int getWinID(); virtual void setBusyCursor(bool busy); - QWidget *widget() { return m_instance;} + TQWidget *widget() { return m_instance;} public slots: /** Sets the instance's parent */ - void setParent(QWidget*); + void setParent(TQWidget*); /** Returns whether the instance is built */ bool isBuilt() const; /** Builds the instance. Uses stdin if no filename is given */ @@ -123,15 +123,15 @@ 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 m_instance; + TQGuardedPtr m_instance; /* Associated Text Instance */ KommanderWidget *m_textInstance; /** The parent widget */ - QWidget *m_parent; + TQWidget *m_parent; /* Get object by name */ - QObject* stringToWidget(const QString& name); + TQObject* stringToWidget(const TQString& name); /* Cast to Kommander widget if possible */ - KommanderWidget* kommanderWidget(QObject* object); + KommanderWidget* kommanderWidget(TQObject* object); }; #endif diff --git a/kommander/executor/main.cpp b/kommander/executor/main.cpp index 589ec1cd..00d7e509 100644 --- a/kommander/executor/main.cpp +++ b/kommander/executor/main.cpp @@ -25,9 +25,9 @@ #include /* QT INCLUDES */ -#include -#include -#include +#include +#include +#include /* OTHER INCLUDES */ #include @@ -70,7 +70,7 @@ int main(int argc, char *argv[]) else if (args->count()) { char buf[200]; - QString baseFile = args->url(0).fileName(); + TQString baseFile = args->url(0).fileName(); int ext = baseFile.findRev('.'); if (ext != -1) baseFile = baseFile.left(ext); @@ -81,18 +81,18 @@ int main(int argc, char *argv[]) KLocale::setMainCatalogue("kommander"); KApplication app; - QObject::connect(&app, SIGNAL(lastWindowClosed()), &app, SLOT(quit())); + TQObject::connect(&app, TQT_SIGNAL(lastWindowClosed()), &app, TQT_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))) + if (!instance.build(args->isSet("stdin") ? TQString() : args->url(0))) return -1; // Read command-line variables - QStringList cmdargs; + TQStringList cmdargs; for (int i = !args->isSet("stdin"); icount(); i++) cmdargs.append(args->arg(i)); instance.addCmdlineArguments(cmdargs); diff --git a/kommander/executor/register.cpp b/kommander/executor/register.cpp index e6c41b7f..db794e25 100644 --- a/kommander/executor/register.cpp +++ b/kommander/executor/register.cpp @@ -21,24 +21,24 @@ 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)"); + DCOPInformation::insert("enableWidget(TQString,bool)"); + DCOPInformation::insert("changeWidgetText(TQString,TQString)"); + DCOPInformation::insert("currentItem(TQString)"); + DCOPInformation::insert("item(TQString,int)"); + DCOPInformation::insert("removeListItem(TQString,int)"); + DCOPInformation::insert("addListItem(TQString,TQString,int)"); + DCOPInformation::insert("addListItems(TQString,TQStringList,int)"); + DCOPInformation::insert("addUniqueItem(TQString,TQString)"); + DCOPInformation::insert("findItem(TQString,TQString)"); + DCOPInformation::insert("clearList(TQString)"); + DCOPInformation::insert("setCurrentListItem(TQString,TQString)"); + DCOPInformation::insert("setCurrentTab(TQString,int)"); + DCOPInformation::insert("insertTab(TQString,TQString,int)"); + DCOPInformation::insert("setChecked(TQString, bool)"); + DCOPInformation::insert("setAssociatedText(TQString,TQString)"); + DCOPInformation::insert("associatedText(TQString)"); + DCOPInformation::insert("global(TQString)"); + DCOPInformation::insert("setGlobal(TQString,TQString)"); } void Instance::registerSpecials() diff --git a/kommander/factory/domtool.cpp b/kommander/factory/domtool.cpp index d8c9fcd3..0bd7088c 100644 --- a/kommander/factory/domtool.cpp +++ b/kommander/factory/domtool.cpp @@ -20,14 +20,14 @@ #include "domtool.h" -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include /*! \class DomTool domtool.h @@ -46,9 +46,9 @@ \sa hasProperty() */ -QVariant DomTool::readProperty( const QDomElement& e, const QString& name, const QVariant& defValue ) +TQVariant DomTool::readProperty( const TQDomElement& e, const TQString& name, const TQVariant& defValue ) { - QDomElement n; + TQDomElement n; for ( n = e.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) { if ( n.tagName() == "property" ) { if ( n.attribute( "name" ) != name ) @@ -64,9 +64,9 @@ QVariant DomTool::readProperty( const QDomElement& e, const QString& name, const \sa readProperty() */ -bool DomTool::hasProperty( const QDomElement& e, const QString& name ) +bool DomTool::hasProperty( const TQDomElement& e, const TQString& name ) { - QDomElement n; + TQDomElement n; for ( n = e.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) { if ( n.tagName() == "property" ) { if ( n.attribute( "name" ) != name ) @@ -77,13 +77,13 @@ bool DomTool::hasProperty( const QDomElement& e, const QString& name ) return false; } -QStringList DomTool::propertiesOfType( const QDomElement& e, const QString& type ) +TQStringList DomTool::propertiesOfType( const TQDomElement& e, const TQString& type ) { - QStringList result; - QDomElement n; + TQStringList result; + TQDomElement n; for ( n = e.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) { if ( n.tagName() == "property" ) { - QDomElement n2 = n.firstChild().toElement(); + TQDomElement n2 = n.firstChild().toElement(); if ( n2.tagName() == type ) result += n.attribute( "name" ); } @@ -92,20 +92,20 @@ QStringList DomTool::propertiesOfType( const QDomElement& e, const QString& type } -QVariant DomTool::elementToVariant( const QDomElement& e, const QVariant& defValue ) +TQVariant DomTool::elementToVariant( const TQDomElement& e, const TQVariant& defValue ) { - QString dummy; + TQString 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 ) +TQVariant DomTool::elementToVariant( const TQDomElement& e, const TQVariant& defValue, TQString &comment ) { - QVariant v; + TQVariant v; if ( e.tagName() == "rect" ) { - QDomElement n3 = e.firstChild().toElement(); + TQDomElement n3 = e.firstChild().toElement(); int x = 0, y = 0, w = 0, h = 0; while ( !n3.isNull() ) { if ( n3.tagName() == "x" ) @@ -118,9 +118,9 @@ QVariant DomTool::elementToVariant( const QDomElement& e, const QVariant& defVal h = n3.firstChild().toText().data().toInt(); n3 = n3.nextSibling().toElement(); } - v = QVariant( QRect( x, y, w, h ) ); + v = TQVariant( TQRect( x, y, w, h ) ); } else if ( e.tagName() == "point" ) { - QDomElement n3 = e.firstChild().toElement(); + TQDomElement n3 = e.firstChild().toElement(); int x = 0, y = 0; while ( !n3.isNull() ) { if ( n3.tagName() == "x" ) @@ -129,9 +129,9 @@ QVariant DomTool::elementToVariant( const QDomElement& e, const QVariant& defVal y = n3.firstChild().toText().data().toInt(); n3 = n3.nextSibling().toElement(); } - v = QVariant( QPoint( x, y ) ); + v = TQVariant( TQPoint( x, y ) ); } else if ( e.tagName() == "size" ) { - QDomElement n3 = e.firstChild().toElement(); + TQDomElement n3 = e.firstChild().toElement(); int w = 0, h = 0; while ( !n3.isNull() ) { if ( n3.tagName() == "width" ) @@ -140,12 +140,12 @@ QVariant DomTool::elementToVariant( const QDomElement& e, const QVariant& defVal h = n3.firstChild().toText().data().toInt(); n3 = n3.nextSibling().toElement(); } - v = QVariant( QSize( w, h ) ); + v = TQVariant( TQSize( w, h ) ); } else if ( e.tagName() == "color" ) { - v = QVariant( readColor( e ) ); + v = TQVariant( readColor( e ) ); } else if ( e.tagName() == "font" ) { - QDomElement n3 = e.firstChild().toElement(); - QFont f( defValue.toFont() ); + TQDomElement n3 = e.firstChild().toElement(); + TQFont f( defValue.toFont() ); while ( !n3.isNull() ) { if ( n3.tagName() == "family" ) f.setFamily( n3.firstChild().toText().data() ); @@ -161,58 +161,58 @@ QVariant DomTool::elementToVariant( const QDomElement& e, const QVariant& defVal f.setStrikeOut( n3.firstChild().toText().data().toInt() ); n3 = n3.nextSibling().toElement(); } - v = QVariant( f ); + v = TQVariant( f ); } else if ( e.tagName() == "string" ) { - v = QVariant( e.firstChild().toText().data() ); - QDomElement n = e; + v = TQVariant( e.firstChild().toText().data() ); + TQDomElement 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() ) ); + v = TQVariant( TQCString( e.firstChild().toText().data() ) ); } else if ( e.tagName() == "number" ) { bool ok = true; - v = QVariant( e.firstChild().toText().data().toInt( &ok ) ); + v = TQVariant( e.firstChild().toText().data().toInt( &ok ) ); if ( !ok ) - v = QVariant( e.firstChild().toText().data().toDouble() ); + v = TQVariant( e.firstChild().toText().data().toDouble() ); } else if ( e.tagName() == "bool" ) { - QString t = e.firstChild().toText().data(); - v = QVariant( t == "true" || t == "1", 0 ); + TQString t = e.firstChild().toText().data(); + v = TQVariant( t == "true" || t == "1", 0 ); } else if ( e.tagName() == "pixmap" ) { - v = QVariant( e.firstChild().toText().data() ); + v = TQVariant( e.firstChild().toText().data() ); } else if ( e.tagName() == "iconset" ) { - v = QVariant( e.firstChild().toText().data() ); + v = TQVariant( e.firstChild().toText().data() ); } else if ( e.tagName() == "image" ) { - v = QVariant( e.firstChild().toText().data() ); + v = TQVariant( e.firstChild().toText().data() ); } else if ( e.tagName() == "enum" ) { - v = QVariant( e.firstChild().toText().data() ); + v = TQVariant( e.firstChild().toText().data() ); } else if ( e.tagName() == "set" ) { - v = QVariant( e.firstChild().toText().data() ); + v = TQVariant( e.firstChild().toText().data() ); } else if ( e.tagName() == "sizepolicy" ) { - QDomElement n3 = e.firstChild().toElement(); - QSizePolicy sp; + TQDomElement n3 = e.firstChild().toElement(); + TQSizePolicy sp; while ( !n3.isNull() ) { if ( n3.tagName() == "hsizetype" ) - sp.setHorData( (QSizePolicy::SizeType)n3.firstChild().toText().data().toInt() ); + sp.setHorData( (TQSizePolicy::SizeType)n3.firstChild().toText().data().toInt() ); else if ( n3.tagName() == "vsizetype" ) - sp.setVerData( (QSizePolicy::SizeType)n3.firstChild().toText().data().toInt() ); + sp.setVerData( (TQSizePolicy::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 ); + v = TQVariant( sp ); } else if ( e.tagName() == "cursor" ) { - v = QVariant( QCursor( e.firstChild().toText().data().toInt() ) ); + v = TQVariant( TQCursor( e.firstChild().toText().data().toInt() ) ); } else if ( e.tagName() == "stringlist" ) { - QStringList lst; - QDomElement n; + TQStringList lst; + TQDomElement n; for ( n = e.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) lst << n.firstChild().toText().data(); - v = QVariant( lst ); + v = TQVariant( lst ); } else if ( e.tagName() == "date" ) { - QDomElement n3 = e.firstChild().toElement(); + TQDomElement n3 = e.firstChild().toElement(); int y, m, d; y = m = d = 0; while ( !n3.isNull() ) { @@ -224,9 +224,9 @@ QVariant DomTool::elementToVariant( const QDomElement& e, const QVariant& defVal d = n3.firstChild().toText().data().toInt(); n3 = n3.nextSibling().toElement(); } - v = QVariant( QDate( y, m, d ) ); + v = TQVariant( TQDate( y, m, d ) ); } else if ( e.tagName() == "time" ) { - QDomElement n3 = e.firstChild().toElement(); + TQDomElement n3 = e.firstChild().toElement(); int h, m, s; h = m = s = 0; while ( !n3.isNull() ) { @@ -238,9 +238,9 @@ QVariant DomTool::elementToVariant( const QDomElement& e, const QVariant& defVal s = n3.firstChild().toText().data().toInt(); n3 = n3.nextSibling().toElement(); } - v = QVariant( QTime( h, m, s ) ); + v = TQVariant( TQTime( h, m, s ) ); } else if ( e.tagName() == "datetime" ) { - QDomElement n3 = e.firstChild().toElement(); + TQDomElement n3 = e.firstChild().toElement(); int h, mi, s, y, mo, d ; h = mi = s = y = mo = d = 0; while ( !n3.isNull() ) { @@ -258,7 +258,7 @@ QVariant DomTool::elementToVariant( const QDomElement& e, const QVariant& defVal d = n3.firstChild().toText().data().toInt(); n3 = n3.nextSibling().toElement(); } - v = QVariant( QDateTime( QDate( y, mo, d ), QTime( h, mi, s ) ) ); + v = TQVariant( TQDateTime( TQDate( y, mo, d ), TQTime( h, mi, s ) ) ); } return v; } @@ -267,9 +267,9 @@ QVariant DomTool::elementToVariant( const QDomElement& e, const QVariant& defVal /*! Returns the color which is returned in the dom element \a e. */ -QColor DomTool::readColor( const QDomElement &e ) +TQColor DomTool::readColor( const TQDomElement &e ) { - QDomElement n = e.firstChild().toElement(); + TQDomElement n = e.firstChild().toElement(); int r= 0, g = 0, b = 0; while ( !n.isNull() ) { if ( n.tagName() == "red" ) @@ -281,7 +281,7 @@ QColor DomTool::readColor( const QDomElement &e ) n = n.nextSibling().toElement(); } - return QColor( r, g, b ); + return TQColor( r, g, b ); } /*! @@ -291,9 +291,9 @@ QColor DomTool::readColor( const QDomElement &e ) \sa hasAttribute() */ -QVariant DomTool::readAttribute( const QDomElement& e, const QString& name, const QVariant& defValue ) +TQVariant DomTool::readAttribute( const TQDomElement& e, const TQString& name, const TQVariant& defValue ) { - QDomElement n; + TQDomElement n; for ( n = e.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) { if ( n.tagName() == "attribute" ) { if ( n.attribute( "name" ) != name ) @@ -309,9 +309,9 @@ QVariant DomTool::readAttribute( const QDomElement& e, const QString& name, cons \sa readAttribute() */ -bool DomTool::hasAttribute( const QDomElement& e, const QString& name ) +bool DomTool::hasAttribute( const TQDomElement& e, const TQString& name ) { - QDomElement n; + TQDomElement n; for ( n = e.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) { if ( n.tagName() == "attribute" ) { if ( n.attribute( "name" ) != name ) @@ -322,7 +322,7 @@ bool DomTool::hasAttribute( const QDomElement& e, const QString& name ) return false; } -static bool toBool( const QString& s ) +static bool toBool( const TQString& s ) { return s == "true" || s.toInt() != 0; } @@ -330,11 +330,11 @@ static bool toBool( const QString& s ) /*! Convert Qt 2.x format to Qt 3.0 format if necessary */ -void DomTool::fixDocument( QDomDocument& doc ) +void DomTool::fixDocument( TQDomDocument& doc ) { - QDomElement e; - QDomNode n; - QDomNodeList nl; + TQDomElement e; + TQDomNode n; + TQDomNodeList nl; uint i = 0; e = doc.firstChild().toElement(); @@ -350,8 +350,8 @@ void DomTool::fixDocument( QDomDocument& doc ) uint nllen = nl.length(); for ( i = 0; i < nllen; i++ ) { e = nl.item(i).toElement(); - QString name; - QDomElement n2 = e.firstChild().toElement(); + TQString name; + TQDomElement n2 = e.firstChild().toElement(); if ( n2.tagName() == "name" ) { name = n2.firstChild().toText().data(); e.setAttribute( "name", name ); @@ -373,8 +373,8 @@ void DomTool::fixDocument( QDomDocument& doc ) nllen = nl.length(); for ( i = 0; i < nllen; i++ ) { e = nl.item(i).toElement(); - QString name; - QDomElement n2 = e.firstChild().toElement(); + TQString name; + TQDomElement n2 = e.firstChild().toElement(); if ( n2.tagName() == "name" ) { name = n2.firstChild().toText().data(); e.setAttribute( "name", name ); @@ -386,8 +386,8 @@ void DomTool::fixDocument( QDomDocument& doc ) nllen = nl.length(); for ( i = 0; i < nllen; i++ ) { e = nl.item(i).toElement(); - QString name; - QDomElement n2 = e.firstChild().toElement(); + TQString name; + TQDomElement n2 = e.firstChild().toElement(); if ( n2.tagName() == "name" ) { name = n2.firstChild().toText().data(); e.setAttribute( "name", name ); @@ -399,8 +399,8 @@ void DomTool::fixDocument( QDomDocument& doc ) nllen = nl.length(); for ( i = 0; i < nllen; i++ ) { e = nl.item(i).toElement(); - QString name; - QDomElement n2 = e.firstChild().toElement(); + TQString name; + TQDomElement n2 = e.firstChild().toElement(); if ( n2.tagName() == "class" ) { name = n2.firstChild().toText().data(); e.setAttribute( "class", name ); diff --git a/kommander/factory/domtool.h b/kommander/factory/domtool.h index fac628a4..98e299a2 100644 --- a/kommander/factory/domtool.h +++ b/kommander/factory/domtool.h @@ -21,8 +21,8 @@ #ifndef DOMTOOL_H #define DOMTOOL_H -#include -#include +#include +#include class QDomElement; class QDomDocument; @@ -30,15 +30,15 @@ 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& ); + static TQVariant readProperty( const TQDomElement& e, const TQString& name, const TQVariant& defValue ); + static bool hasProperty( const TQDomElement& e, const TQString& name ); + static TQStringList propertiesOfType( const TQDomElement& e, const TQString& type ); + static TQVariant elementToVariant( const TQDomElement& e, const TQVariant& defValue ); + static TQVariant elementToVariant( const TQDomElement& e, const TQVariant& defValue, TQString &comment ); + static TQVariant readAttribute( const TQDomElement& e, const TQString& name, const TQVariant& defValue ); + static bool hasAttribute( const TQDomElement& e, const TQString& name ); + static TQColor readColor( const TQDomElement &e ); + static void fixDocument( TQDomDocument& ); }; diff --git a/kommander/factory/kommanderfactory.cpp b/kommander/factory/kommanderfactory.cpp index f3078830..3add83ae 100644 --- a/kommander/factory/kommanderfactory.cpp +++ b/kommander/factory/kommanderfactory.cpp @@ -26,71 +26,71 @@ #include -#include +#include #include "config.h" #ifndef QT_NO_SQL #include "database2.h" #endif -#include -#include -#include -#include +#include +#include +#include +#include #include "domtool.h" -#include -#include -#include -#include +#include +#include +#include +#include #include -#include -#include +#include +#include #include #ifndef QT_NO_SQL -#include -#include -#include +#include +#include +#include #endif // include all Qt widgets we support -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include #ifndef QT_NO_TABLE -#include +#include #endif -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -98,14 +98,14 @@ #include "kmdrmainwindow.h" -QPtrList widgetPlugins; +TQPtrList widgetPlugins; -QMap *qwf_functions = 0; -QMap *qwf_forms = 0; -QString *qwf_language = 0; +TQMap *qwf_functions = 0; +TQMap *qwf_forms = 0; +TQString *qwf_language = 0; bool qwf_execute_code = true; bool qwf_stays_on_top = false; -QString *qwf_currFileName = 0L; //is this really used? +TQString *qwf_currFileName = 0L; //is this really used? KommanderFactory::KommanderFactory() : dbControls( 0 ), usePixmapCollection( false ) @@ -114,7 +114,7 @@ KommanderFactory::KommanderFactory() defSpacing = 6; defMargin = 11; if (!qwf_currFileName) - qwf_currFileName = new QString(); + qwf_currFileName = new TQString(); } KommanderFactory::~KommanderFactory() @@ -123,33 +123,33 @@ KommanderFactory::~KommanderFactory() qwf_currFileName = 0L; } -QWidget *KommanderFactory::create( const QString &uiFile, QObject *connector, QWidget *parent, const char *name ) +TQWidget *KommanderFactory::create( const TQString &uiFile, TQObject *connector, TQWidget *parent, const char *name ) { - QFile f( uiFile ); + TQFile f( uiFile ); if ( !f.open( IO_ReadOnly ) ) return 0; if (!qwf_currFileName) - qwf_currFileName = new QString(); + qwf_currFileName = new TQString(); *qwf_currFileName = uiFile; - QWidget *w = KommanderFactory::create( &f, connector, parent, name ); + TQWidget *w = KommanderFactory::create( &f, connector, parent, name ); if ( !qwf_forms ) - qwf_forms = new QMap; + qwf_forms = new TQMap; qwf_forms->insert( w, uiFile ); return w; } -QWidget *KommanderFactory::create( QIODevice *dev, QObject *connector, QWidget *parent, const char *name ) +TQWidget *KommanderFactory::create( TQIODevice *dev, TQObject *connector, TQWidget *parent, const char *name ) { - QDomDocument doc; - QString errMsg; + TQDomDocument doc; + TQString errMsg; int errLine; - QTextStream stream(dev); - QString content = stream.read(); + TQTextStream stream(dev); + TQString 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 ); +// qDebug( TQString("Parse error: ") + errMsg + TQString(" in line %d"), errLine ); return 0; } @@ -158,45 +158,45 @@ QWidget *KommanderFactory::create( QIODevice *dev, QObject *connector, QWidget * KommanderFactory *widgetFactory = new KommanderFactory; widgetFactory->toplevel = 0; - QDomElement e = doc.firstChild().toElement().firstChild().toElement(); + TQDomElement e = doc.firstChild().toElement().firstChild().toElement(); - QDomElement variables = e; + TQDomElement variables = e; while ( variables.tagName() != "variables" && !variables.isNull() ) variables = variables.nextSibling().toElement(); - QDomElement eltSlots = e; + TQDomElement eltSlots = e; while ( eltSlots.tagName() != "slots" && !eltSlots.isNull() ) eltSlots = eltSlots.nextSibling().toElement(); - QDomElement connections = e; + TQDomElement connections = e; while ( connections.tagName() != "connections" && !connections.isNull() ) connections = connections.nextSibling().toElement(); - QDomElement imageCollection = e; + TQDomElement imageCollection = e; while ( imageCollection.tagName() != "images" && !imageCollection.isNull() ) imageCollection = imageCollection.nextSibling().toElement(); - QDomElement tabOrder = e; + TQDomElement tabOrder = e; while ( tabOrder.tagName() != "tabstops" && !tabOrder.isNull() ) tabOrder = tabOrder.nextSibling().toElement(); - QDomElement actions = e; + TQDomElement actions = e; while ( actions.tagName() != "actions" && !actions.isNull() ) actions = actions.nextSibling().toElement(); - QDomElement toolbars = e; + TQDomElement toolbars = e; while ( toolbars.tagName() != "toolbars" && !toolbars.isNull() ) toolbars = toolbars.nextSibling().toElement(); - QDomElement menubar = e; + TQDomElement menubar = e; while ( menubar.tagName() != "menubar" && !menubar.isNull() ) menubar = menubar.nextSibling().toElement(); - QDomElement functions = e; + TQDomElement functions = e; while ( functions.tagName() != "functions" && !functions.isNull() ) functions = functions.nextSibling().toElement(); - QDomElement widget; + TQDomElement widget; while ( !e.isNull() ) { if ( e.tagName() == "widget" ) { widget = e; @@ -205,8 +205,8 @@ QWidget *KommanderFactory::create( QIODevice *dev, QObject *connector, QWidget * } 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(); + widgetFactory->defSpacing = e.attribute( "spacing", TQString::number( widgetFactory->defSpacing ) ).toInt(); + widgetFactory->defMargin = e.attribute( "margin", TQString::number( widgetFactory->defMargin ) ).toInt(); } e = e.nextSibling().toElement(); } @@ -214,22 +214,22 @@ QWidget *KommanderFactory::create( QIODevice *dev, QObject *connector, QWidget * if ( !imageCollection.isNull() ) widgetFactory->loadImageCollection( imageCollection ); - widgetFactory->createWidgetInternal( widget, parent, 0, widget.attribute("class", "QWidget") ); - QWidget *w = widgetFactory->toplevel; + widgetFactory->createWidgetInternal( widget, parent, 0, widget.attribute("class", "TQWidget") ); + TQWidget *w = widgetFactory->toplevel; if ( !w ) { delete widgetFactory; return 0; } if ( !variables.isNull() ) { - for ( QDomElement n = variables.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) + for ( TQDomElement 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() ) + for ( TQDomElement n = eltSlots.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) if ( n.tagName() == "slot" ) { - QString s = n.firstChild().toText().data(); + TQString s = n.firstChild().toText().data(); widgetFactory->languageSlots.insert( s.left( s.find( "(" ) ) , n.attribute( "language", "C++" ) ); } } @@ -252,7 +252,7 @@ QWidget *KommanderFactory::create( QIODevice *dev, QObject *connector, QWidget * if ( widgetFactory->toplevel ) { #ifndef QT_NO_SQL - QMap::Iterator cit = widgetFactory->sqlWidgetConnections.begin(); + TQMap::Iterator cit = widgetFactory->sqlWidgetConnections.begin(); for( ; cit != widgetFactory->sqlWidgetConnections.end(); ++cit ) { if ( widgetFactory->noDatabaseWidgets.find( cit.key()->name() ) != widgetFactory->noDatabaseWidgets.end() ) continue; @@ -262,42 +262,42 @@ QWidget *KommanderFactory::create( QIODevice *dev, QObject *connector, QWidget * ( (QDesignerDataView2*)cit.key() )->initPreview( (*cit).conn, (*cit).table, cit.key(), *(*cit).dbControls ); } - for ( QMap::Iterator it = widgetFactory->dbTables.begin(); it != widgetFactory->dbTables.end(); ++it ) { - QDataTable *table = (QDataTable*)widgetFactory->toplevel->child( it.key(), "QDataTable" ); + for ( TQMap::Iterator it = widgetFactory->dbTables.begin(); it != widgetFactory->dbTables.end(); ++it ) { + TQDataTable *table = (TQDataTable*)widgetFactory->toplevel->child( it.key(), "TQDataTable" ); if ( !table ) continue; if ( widgetFactory->noDatabaseWidgets.find( table->name() ) != widgetFactory->noDatabaseWidgets.end() ) continue; - QValueList fieldMap = *widgetFactory->fieldMaps.find( table ); - QString conn = (*it)[ 0 ]; - QSqlCursor* c = 0; - QSqlDatabase *db = 0; + TQValueList fieldMap = *widgetFactory->fieldMaps.find( table ); + TQString conn = (*it)[ 0 ]; + TQSqlCursor* c = 0; + TQSqlDatabase *db = 0; if ( conn.isEmpty() || conn == "(default)" ) { - db = QSqlDatabase::database(); - c = new QSqlCursor( (*it)[ 1 ] ); + db = TQSqlDatabase::database(); + c = new TQSqlCursor( (*it)[ 1 ] ); } else { - db = QSqlDatabase::database( conn ); - c = new QSqlCursor( (*it)[ 1 ], true, db ); + db = TQSqlDatabase::database( conn ); + c = new TQSqlCursor( (*it)[ 1 ], true, db ); } if ( db ) { table->setSqlCursor( c, fieldMap.isEmpty(), true ); - table->refresh( QDataTable::RefreshAll ); + table->refresh( TQDataTable::RefreshAll ); } } #endif } - for ( QMap::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" ); + for ( TQMap::Iterator it = widgetFactory->buddies.begin(); it != widgetFactory->buddies.end(); ++it ) { + TQLabel *label = (TQLabel*)widgetFactory->toplevel->child( it.key(), "TQLabel" ); + TQWidget *buddy = (TQWidget*)widgetFactory->toplevel->child( *it, "TQWidget" ); if ( label && buddy ) label->setBuddy( buddy ); } delete widgetFactory; - QApplication::sendPostedEvents(); + TQApplication::sendPostedEvents(); return w; } @@ -307,121 +307,121 @@ void KommanderFactory::addPlugin( KommanderPlugin *plugin ) widgetPlugins.append( plugin ); } -QWidget *KommanderFactory::createWidget( const QString &literalClassName, QWidget *parent, const char *name ) +TQWidget *KommanderFactory::createWidget( const TQString &literalClassName, TQWidget *parent, const char *name ) { - QString className = literalClassName; + TQString 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 (className == "TQPushButton") + return new TQPushButton(parent, name); + else if (className == "TQToolButton") + return new TQToolButton(parent, name); + else if (className == "TQCheckBox") + return new TQCheckBox(parent, name); + else if (className == "TQRadioButton") + return new TQRadioButton(parent, name); + else if (className == "TQGroupBox") + return new TQGroupBox(parent, name); + else if (className == "TQButtonGroup") + return new TQButtonGroup(parent, name); + else if (className == "TQIconView") { #if !defined(QT_NO_ICONVIEW) - return new QIconView(parent, name); + return new TQIconView(parent, name); #endif } - else if (className == "QTable") + else if (className == "TQTable") { #if !defined(QT_NO_TABLE) - return new QTable(parent, name); + return new TQTable(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 == "TQListBox") + return new TQListBox(parent, name); + else if (className == "TQListView") + return new TQListView(parent, name); + else if (className == "TQLineEdit") + return new TQLineEdit(parent, name); + else if (className == "TQSpinBox") + return new TQSpinBox(parent, name); + else if (className == "TQMultiLineEdit") + return new TQMultiLineEdit(parent, name); + else if (className == "TQLabel") + return new TQLabel(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") + return new TQWidget(parent, name); + else if (className == "TQTabWidget") + return new TQTabWidget(parent, name); + else if (className == "TQComboBox") + return new TQComboBox(false, parent, name); + else if (className == "TQWidget") { if (!qwf_stays_on_top) - return new QWidget(parent, name); - return new QWidget(parent, name, Qt::WStyle_StaysOnTop); + return new TQWidget(parent, name); + return new TQWidget(parent, name, Qt::WStyle_StaysOnTop); } - else if (className == "QDialog") + else if (className == "TQDialog") { if (!qwf_stays_on_top) - return new QDialog(parent, name); - return new QDialog(parent, name, false, Qt::WStyle_StaysOnTop); + return new TQDialog(parent, name); + return new TQDialog(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 == "TQWizard") + return new TQWizard(parent, name); + else if (className == "TQLCDNumber") + return new TQLCDNumber(parent, name); + else if (className == "TQProgressBar") + return new TQProgressBar(parent, name); + else if (className == "TQTextView") + return new TQTextView(parent, name); + else if (className == "TQTextBrowser") + return new TQTextBrowser(parent, name); + else if (className == "TQDial") + return new TQDial(parent, name); + else if (className == "TQSlider") + return new TQSlider(parent, name); + else if (className == "TQFrame") + return new TQFrame(parent, name); + else if (className == "TQSplitter") + return new TQSplitter(parent, name); else if (className == "Line") { - QFrame *f = new QFrame(parent, name); - f->setFrameStyle(QFrame::HLine | QFrame::Sunken); + TQFrame *f = new TQFrame(parent, name); + f->setFrameStyle(TQFrame::HLine | TQFrame::Sunken); return f; } - else if (className == "QTextEdit") - return new QTextEdit(parent, name); + else if (className == "TQTextEdit") + return new TQTextEdit(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") + else if (className == "TQScrollBar") + return new TQScrollBar(parent, name); + else if (className == "TQPopupMenu") + return new TQPopupMenu(parent, name); + else if (className == "TQWidgetStack") + return new TQWidgetStack(parent, name); + else if (className == "TQMainWindow") { - QMainWindow *mw = 0; + TQMainWindow *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->setCentralWidget(new TQWidget(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") + else if (className == "TQDataTable") + return new TQDataTable(parent, name); + else if (className == "TQDataBrowser") return new QDesignerDataBrowser2(parent, name); - else if (className == "QDataView") + else if (className == "TQDataView") return new QDesignerDataView2(parent, name); #endif @@ -429,7 +429,7 @@ QWidget *KommanderFactory::createWidget( const QString &literalClassName, QWidge //find the widget plugin which can create className for (KommanderPlugin * p = widgetPlugins.first(); p; p = widgetPlugins.next()) { - QWidget *w = p->create(className, parent, name); + TQWidget *w = p->create(className, parent, name); if (w) return w; } @@ -447,9 +447,9 @@ int KommanderFactory::loadPlugins(bool force) num_plugins_loaded = 0; KConfig cfg("kommanderrc", true); - QStringList plugins = "libkommanderwidgets"; + TQStringList plugins = "libkommanderwidgets"; plugins += cfg.readListEntry("plugins"); - QStringList::Iterator it; + TQStringList::Iterator it; KLibLoader *f = KLibLoader::self(); for (it = plugins.begin(); it != plugins.end(); ++it) { @@ -482,11 +482,11 @@ FeatureList KommanderFactory::featureList() FeatureList features; for ( KommanderPlugin *p = widgetPlugins.first(); p ; p = widgetPlugins.next() ) { - QStringList widgets = p->widgets(); - QStringList::Iterator it; + TQStringList widgets = p->widgets(); + TQStringList::Iterator it; for( it = widgets.begin() ; it != widgets.end() ; ++it ) { - QString wn = *it; + TQString wn = *it; features[wn] = KommanderWidgetInfo( p->group(wn), p->toolTip(wn),p->iconSet(wn), p->whatsThis(wn), p->isContainer(wn) ); } } @@ -494,14 +494,14 @@ FeatureList KommanderFactory::featureList() //iterate through widgetPlugins, appending KommanderPlugin::widgets() to features } -QWidget *KommanderFactory::createWidgetInternal( const QDomElement &e, QWidget *parent, QLayout* layout, const QString &classNameArg ) +TQWidget *KommanderFactory::createWidgetInternal( const TQDomElement &e, TQWidget *parent, TQLayout* layout, const TQString &classNameArg ) { lastItem = 0; - QDomElement n = e.firstChild().toElement(); - QWidget *w = 0; // the widget that got created - QObject *obj = 0; // gets the properties + TQDomElement n = e.firstChild().toElement(); + TQWidget *w = 0; // the widget that got created + TQObject *obj = 0; // gets the properties - QString className = classNameArg; + TQString className = classNameArg; int row = e.attribute( "row" ).toInt(); int col = e.attribute( "column" ).toInt(); @@ -513,7 +513,7 @@ QWidget *KommanderFactory::createWidgetInternal( const QDomElement &e, QWidget * colspan = 1; if ( !className.isEmpty() ) { if ( !layout && className == "QLayoutWidget" ) - className = "QWidget"; + className = "TQWidget"; if ( layout && className == "QLayoutWidget" ) { // hide layout widgets w = parent; @@ -523,21 +523,21 @@ QWidget *KommanderFactory::createWidgetInternal( const QDomElement &e, QWidget * { return 0; } - w = (QWidget*)obj; + w = (TQWidget*)obj; if ( !toplevel ) toplevel = w; - if ( w->inherits( "QMainWindow" ) ) - w = ( (QMainWindow*)w )->centralWidget(); + if ( w->inherits( "TQMainWindow" ) ) + w = ( (TQMainWindow*)w )->centralWidget(); if ( layout ) { switch( layoutType( layout ) ) { case HBox: - ( (QHBoxLayout*)layout )->addWidget( w ); + ( (TQHBoxLayout*)layout )->addWidget( w ); break; case VBox: - ( (QVBoxLayout*)layout )->addWidget( w ); + ( (TQVBoxLayout*)layout )->addWidget( w ); break; case Grid: - ( (QGridLayout*)layout )->addMultiCellWidget( w, row, row + rowspan - 1, + ( (TQGridLayout*)layout )->addMultiCellWidget( w, row, row + rowspan - 1, col, col + colspan - 1 ); break; default: @@ -555,57 +555,57 @@ QWidget *KommanderFactory::createWidgetInternal( const QDomElement &e, QWidget * 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" ) ); + TQMap< TQString, TQString> *oldDbControls = dbControls; + createWidgetInternal( n, w, layout, n.attribute( "class", "TQWidget" ) ); dbControls = oldDbControls; } else if ( n.tagName() == "hbox" ) { - QLayout *parentLayout = layout; - if ( layout && layout->inherits( "QGridLayout" ) ) + TQLayout *parentLayout = layout; + if ( layout && layout->inherits( "TQGridLayout" ) ) 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 ); + if ( parentLayout && parentLayout->inherits( "TQGridLayout" ) ) + ( (TQGridLayout*)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" ) ) + TQLayout *parentLayout = layout; + if ( layout && layout->inherits( "TQGridLayout" ) ) 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 ); + if ( parentLayout && parentLayout->inherits( "TQGridLayout" ) ) + ( (TQGridLayout*)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" ) ) + TQLayout *parentLayout = layout; + if ( layout && layout->inherits( "TQGridLayout" ) ) 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 ); + if ( parentLayout && parentLayout->inherits( "TQGridLayout" ) ) + ( (TQGridLayout*)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" ) ) { + TQString attrib = n.attribute( "name" ); + TQVariant v = DomTool::elementToVariant( n.firstChild().toElement(), TQVariant() ); + if ( parent->inherits( "TQTabWidget" ) ) { if ( attrib == "title" ) - ( (QTabWidget*)parent )->insertTab( w, translate(v.toString()) ); + ( (TQTabWidget*)parent )->insertTab( w, translate(v.toString()) ); } else - if ( parent->inherits( "QToolBox" ) ) { + if ( parent->inherits( "TQToolBox" ) ) { if ( attrib == "label" ) - ( (QToolBox*)parent )->addItem( w, translate(v.toString()) ); - }else if ( parent->inherits( "QWizard" ) ) { + ( (TQToolBox*)parent )->addItem( w, translate(v.toString()) ); + }else if ( parent->inherits( "TQWizard" ) ) { if ( attrib == "title" ) - ( (QWizard*)parent )->addPage( w, translate(v.toString()) ); + ( (TQWizard*)parent )->addPage( w, translate(v.toString()) ); } } else if ( n.tagName() == "item" ) { createItem( n, w ); @@ -619,39 +619,39 @@ QWidget *KommanderFactory::createWidgetInternal( const QDomElement &e, QWidget * return w; } -QLayout *KommanderFactory::createLayout( QWidget *widget, QLayout* layout, LayoutType type ) +TQLayout *KommanderFactory::createLayout( TQWidget *widget, TQLayout* 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( "TQTabWidget" ) ) + widget = ((TQTabWidget*)widget)->currentPage(); + if ( !layout && widget && widget->inherits( "TQToolBox" ) ) + widget = ((TQToolBox*)widget)->currentItem(); - if ( !layout && widget && widget->inherits( "QWizard" ) ) - widget = ((QWizard*)widget)->currentPage(); + if ( !layout && widget && widget->inherits( "TQWizard" ) ) + widget = ((TQWizard*)widget)->currentPage(); - if ( !layout && widget && widget->inherits( "QWidgetStack" ) ) - widget = ((QWidgetStack*)widget)->visibleWidget(); + if ( !layout && widget && widget->inherits( "TQWidgetStack" ) ) + widget = ((TQWidgetStack*)widget)->visibleWidget(); - if ( !layout && widget && widget->inherits( "QGroupBox" ) ) { - QGroupBox *gb = (QGroupBox*)widget; + if ( !layout && widget && widget->inherits( "TQGroupBox" ) ) { + TQGroupBox *gb = (TQGroupBox*)widget; gb->setColumnLayout( 0, Qt::Vertical ); gb->layout()->setMargin( 0 ); gb->layout()->setSpacing( 0 ); - QLayout *l; + TQLayout *l; switch ( type ) { case HBox: - l = new QHBoxLayout( gb->layout() ); + l = new TQHBoxLayout( gb->layout() ); l->setAlignment( Qt::AlignTop ); return l; case VBox: - l = new QVBoxLayout( gb->layout(), spacing ); + l = new TQVBoxLayout( gb->layout(), spacing ); l->setAlignment( Qt::AlignTop ); return l; case Grid: - l = new QGridLayout( gb->layout() ); + l = new TQGridLayout( gb->layout() ); l->setAlignment( Qt::AlignTop ); return l; default: @@ -659,20 +659,20 @@ QLayout *KommanderFactory::createLayout( QWidget *widget, QLayout* layout, Layo } } else { if ( layout ) { - QLayout *l; + TQLayout *l; switch ( type ) { case HBox: - l = new QHBoxLayout( layout ); + l = new TQHBoxLayout( layout ); l->setSpacing( spacing ); l->setMargin( margin ); return l; case VBox: - l = new QVBoxLayout( layout ); + l = new TQVBoxLayout( layout ); l->setSpacing( spacing ); l->setMargin( margin ); return l; case Grid: { - l = new QGridLayout( layout ); + l = new TQGridLayout( layout ); l->setSpacing( spacing ); l->setMargin( margin ); return l; @@ -681,24 +681,24 @@ QLayout *KommanderFactory::createLayout( QWidget *widget, QLayout* layout, Layo return 0; } } else { - QLayout *l; + TQLayout *l; switch ( type ) { case HBox: - l = new QHBoxLayout( widget ); + l = new TQHBoxLayout( widget ); if ( !widget ) { l->setMargin( margin ); l->setSpacing( spacing ); } return l; case VBox: - l = new QVBoxLayout( widget ); + l = new TQVBoxLayout( widget ); if ( !widget ) { l->setMargin( margin ); l->setSpacing( spacing ); } return l; case Grid: { - l = new QGridLayout( widget ); + l = new TQGridLayout( widget ); if ( !widget ) { l->setMargin( margin ); l->setSpacing( spacing ); @@ -712,61 +712,61 @@ QLayout *KommanderFactory::createLayout( QWidget *widget, QLayout* layout, Layo } } -KommanderFactory::LayoutType KommanderFactory::layoutType( QLayout *layout ) const +KommanderFactory::LayoutType KommanderFactory::layoutType( TQLayout *layout ) const { - if ( layout->inherits( "QHBoxLayout" ) ) + if ( layout->inherits( "TQHBoxLayout" ) ) return HBox; - else if ( layout->inherits( "QVBoxLayout" ) ) + else if ( layout->inherits( "TQVBoxLayout" ) ) return VBox; - else if ( layout->inherits( "QGridLayout" ) ) + else if ( layout->inherits( "TQGridLayout" ) ) return Grid; return NoLayout; } -void KommanderFactory::setProperty( QObject* obj, const QString &prop, const QDomElement &e ) +void KommanderFactory::setProperty( TQObject* obj, const TQString &prop, const TQDomElement &e ) { - const QMetaProperty *p = obj->metaObject()->property( obj->metaObject()->findProperty( prop, true ), true ); + const TQMetaProperty *p = obj->metaObject()->property( obj->metaObject()->findProperty( prop, true ), true ); - QVariant defVariant; + TQVariant defVariant; if ( e.tagName() == "font" ) { - QFont f( qApp->font() ); - if ( obj->isWidgetType() && ( (QWidget*)obj )->parentWidget() ) - f = ( (QWidget*)obj )->parentWidget()->font(); - defVariant = QVariant( f ); + TQFont f( qApp->font() ); + if ( obj->isWidgetType() && ( (TQWidget*)obj )->parentWidget() ) + f = ( (TQWidget*)obj )->parentWidget()->font(); + defVariant = TQVariant( f ); } - QString comment; - QVariant v( DomTool::elementToVariant( e, defVariant, comment ) ); + TQString comment; + TQVariant v( DomTool::elementToVariant( e, defVariant, comment ) ); if ( e.tagName() == "pixmap" ) { - QPixmap pix = loadPixmap( e ); + TQPixmap pix = loadPixmap( e ); if ( pix.isNull() ) return; - v = QVariant( pix ); + v = TQVariant( pix ); } else if ( e.tagName() == "iconset" ) { - QPixmap pix = loadPixmap( e ); + TQPixmap pix = loadPixmap( e ); if ( pix.isNull() ) return; - v = QVariant( QIconSet( pix ) ); + v = TQVariant( TQIconSet( pix ) ); } else if ( e.tagName() == "image" ) { - v = QVariant( loadFromCollection( v.toString() ) ); + v = TQVariant( loadFromCollection( v.toString() ) ); } else if ( e.tagName() == "string" ) { - v = QVariant( translate( v.asString(), comment ) ); + v = TQVariant( translate( v.asString(), comment ) ); } if ( !p ) { if ( obj->isWidgetType() ) { if ( prop == "toolTip" ) { if ( !v.toString().isEmpty() ) - QToolTip::add( (QWidget*)obj, translate(v.toString()) ); + TQToolTip::add( (TQWidget*)obj, translate(v.toString()) ); } else if ( prop == "whatsThis" ) { if ( !v.toString().isEmpty() ) - QWhatsThis::add( (QWidget*)obj, translate(v.toString()) ); + TQWhatsThis::add( (TQWidget*)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 ( prop == "database" && !obj->inherits( "TQDataView" ) + && !obj->inherits( "TQDataBrowser" ) ) { + TQStringList lst = DomTool::elementToVariant( e, TQVariant( TQStringList() ) ).toStringList(); if ( lst.count() > 2 ) { if ( dbControls ) dbControls->insert( obj->name(), lst[ 2 ] ); @@ -774,10 +774,10 @@ void KommanderFactory::setProperty( QObject* obj, const QString &prop, const QDo dbTables.insert( obj->name(), lst ); } } else if ( prop == "database" ) { - QStringList lst = DomTool::elementToVariant( e, QVariant( QStringList() ) ).toStringList(); - if ( lst.count() == 2 && obj->inherits( "QWidget" ) ) { + TQStringList lst = DomTool::elementToVariant( e, TQVariant( TQStringList() ) ).toStringList(); + if ( lst.count() == 2 && obj->inherits( "TQWidget" ) ) { SqlWidgetConnection conn( lst[ 0 ], lst[ 1 ] ); - sqlWidgetConnections.insert( (QWidget*)obj, conn ); + sqlWidgetConnections.insert( (TQWidget*)obj, conn ); dbControls = conn.dbControls; } } else @@ -785,12 +785,12 @@ void KommanderFactory::setProperty( QObject* obj, const QString &prop, const QDo if ( prop == "buddy" ) { buddies.insert( obj->name(), v.toCString() ); } else if ( prop == "frameworkCode" ) { - if ( !DomTool::elementToVariant( e, QVariant( true, 0 ) ).toBool() ) { + if ( !DomTool::elementToVariant( e, TQVariant( 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() ); + if ( obj->inherits( "TQButton" ) && obj->parent()->inherits( "TQButtonGroup" ) ) + ( (TQButtonGroup*)obj->parent() )->insert( (TQButton*)obj, v.toInt() ); } return; @@ -798,10 +798,10 @@ void KommanderFactory::setProperty( QObject* obj, const QString &prop, const QDo } if ( e.tagName() == "palette" ) { - QDomElement n = e.firstChild().toElement(); - QPalette p; + TQDomElement n = e.firstChild().toElement(); + TQPalette p; while ( !n.isNull() ) { - QColorGroup cg; + TQColorGroup cg; if ( n.tagName() == "active" ) { cg = loadColorGroup( n ); p.setActive( cg ); @@ -814,17 +814,17 @@ void KommanderFactory::setProperty( QObject* obj, const QString &prop, const QDo } n = n.nextSibling().toElement(); } - v = QPalette( p ); + v = TQPalette( p ); } else if ( e.tagName() == "enum" && p && p->isEnumType() ) { - QString key( v.toString() ); - v = QVariant( p->keyToValue( key ) ); + TQString key( v.toString() ); + v = TQVariant( 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 ) + TQString keys( v.toString() ); + TQStringList lst = TQStringList::split( '|', keys ); + TQStrList l; + for ( TQStringList::Iterator it = lst.begin(); it != lst.end(); ++it ) l.append( *it ); - v = QVariant( p->keysToValue( l ) ); + v = TQVariant( p->keysToValue( l ) ); } if ( prop == "geometry" ) { @@ -837,9 +837,9 @@ void KommanderFactory::setProperty( QObject* obj, const QString &prop, const QDo obj->setProperty( prop, v ); } -void KommanderFactory::createSpacer( const QDomElement &e, QLayout *layout ) +void KommanderFactory::createSpacer( const TQDomElement &e, TQLayout *layout ) { - QDomElement n = e.firstChild().toElement(); + TQDomElement n = e.firstChild().toElement(); int row = e.attribute( "row" ).toInt(); int col = e.attribute( "column" ).toInt(); int rowspan = e.attribute( "rowspan" ).toInt(); @@ -847,10 +847,10 @@ void KommanderFactory::createSpacer( const QDomElement &e, QLayout *layout ) Qt::Orientation orient = Qt::Horizontal; int w = 0, h = 0; - QSizePolicy::SizeType sizeType = QSizePolicy::Preferred; + TQSizePolicy::SizeType sizeType = TQSizePolicy::Preferred; while ( !n.isNull() ) { if ( n.tagName() == "property" ) { - QString prop = n.attribute( "name" ); + TQString prop = n.attribute( "name" ); if ( prop == "orientation" ) { if ( n.firstChild().firstChild().toText().data() == "Horizontal" ) orient = Qt::Horizontal; @@ -858,17 +858,17 @@ void KommanderFactory::createSpacer( const QDomElement &e, QLayout *layout ) orient = Qt::Vertical; } else if ( prop == "sizeType" ) { if ( n.firstChild().firstChild().toText().data() == "Fixed" ) - sizeType = QSizePolicy::Fixed; + sizeType = TQSizePolicy::Fixed; else if ( n.firstChild().firstChild().toText().data() == "Minimum" ) - sizeType = QSizePolicy::Minimum; + sizeType = TQSizePolicy::Minimum; else if ( n.firstChild().firstChild().toText().data() == "Maximum" ) - sizeType = QSizePolicy::Maximum; + sizeType = TQSizePolicy::Maximum; else if ( n.firstChild().firstChild().toText().data() == "Preferred" ) - sizeType = QSizePolicy::Preferred; + sizeType = TQSizePolicy::Preferred; else if ( n.firstChild().firstChild().toText().data() == "MinimumExpanding" ) - sizeType = QSizePolicy::MinimumExpanding; + sizeType = TQSizePolicy::MinimumExpanding; else if ( n.firstChild().firstChild().toText().data() == "Expanding" ) - sizeType = QSizePolicy::Expanding; + sizeType = TQSizePolicy::Expanding; } else if ( prop == "sizeHint" ) { w = n.firstChild().firstChild().firstChild().toText().data().toInt(); h = n.firstChild().firstChild().nextSibling().firstChild().toText().data().toInt(); @@ -881,21 +881,21 @@ void KommanderFactory::createSpacer( const QDomElement &e, QLayout *layout ) 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 ); + TQSpacerItem *item = new TQSpacerItem( w, h, orient == Qt::Horizontal ? sizeType : TQSizePolicy::Minimum, + orient == Qt::Vertical ? sizeType : TQSizePolicy::Minimum ); if ( layout ) { - if ( layout->inherits( "QBoxLayout" ) ) - ( (QBoxLayout*)layout )->addItem( item ); + if ( layout->inherits( "TQBoxLayout" ) ) + ( (TQBoxLayout*)layout )->addItem( item ); else - ( (QGridLayout*)layout )->addMultiCell( item, row, row + rowspan - 1, col, col + colspan - 1, + ( (TQGridLayout*)layout )->addMultiCell( item, row, row + rowspan - 1, col, col + colspan - 1, orient == Qt::Horizontal ? Qt::AlignVCenter : Qt::AlignHCenter ); } } -static QImage loadImageData( QDomElement &n2 ) +static TQImage loadImageData( TQDomElement &n2 ) { - QImage img; - QString data = n2.firstChild().toText().data(); + TQImage img; + TQString 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(); @@ -912,12 +912,12 @@ static QImage loadImageData( QDomElement &n2 ) r += l - 'a' + 10; ba[ i ] = r; } - QString format = n2.attribute( "format", "PNG" ); + TQString 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 ); + TQByteArray baunzip( len ); ::uncompress( (uchar*) baunzip.data(), &len, (uchar*) ba, data.length()/2 ); img.loadFromData( (const uchar*)baunzip.data(), len, "XPM" ); } else { @@ -928,14 +928,14 @@ static QImage loadImageData( QDomElement &n2 ) return img; } -void KommanderFactory::loadImageCollection( const QDomElement &e ) +void KommanderFactory::loadImageCollection( const TQDomElement &e ) { - QDomElement n = e.firstChild().toElement(); + TQDomElement n = e.firstChild().toElement(); while ( !n.isNull() ) { if ( n.tagName() == "image" ) { Image img; img.name = n.attribute( "name" ); - QDomElement n2 = n.firstChild().toElement(); + TQDomElement n2 = n.firstChild().toElement(); while ( !n2.isNull() ) { if ( n2.tagName() == "data" ) img.img = loadImageData( n2 ); @@ -947,47 +947,47 @@ void KommanderFactory::loadImageCollection( const QDomElement &e ) } } -QImage KommanderFactory::loadFromCollection( const QString &name ) +TQImage KommanderFactory::loadFromCollection( const TQString &name ) { - QValueList::Iterator it = images.begin(); + TQValueList::Iterator it = images.begin(); for ( ; it != images.end(); ++it ) { if ( ( *it ).name == name ) return ( *it ).img; } - return QImage(); + return TQImage(); } -QPixmap KommanderFactory::loadPixmap( const QDomElement &e ) +TQPixmap KommanderFactory::loadPixmap( const TQDomElement &e ) { - QString arg = e.firstChild().toText().data(); + TQString arg = e.firstChild().toText().data(); if ( usePixmapCollection ) { - const QMimeSource *m = QMimeSourceFactory::defaultFactory()->data( arg ); + const TQMimeSource *m = TQMimeSourceFactory::defaultFactory()->data( arg ); if ( !m ) - return QPixmap(); - QPixmap pix; - QImageDrag::decode( m, pix ); + return TQPixmap(); + TQPixmap pix; + TQImageDrag::decode( m, pix ); return pix; } - QImage img = loadFromCollection( arg ); - QPixmap pix; + TQImage img = loadFromCollection( arg ); + TQPixmap pix; pix.convertFromImage( img ); return pix; } -QColorGroup KommanderFactory::loadColorGroup( const QDomElement &e ) +TQColorGroup KommanderFactory::loadColorGroup( const TQDomElement &e ) { - QColorGroup cg; + TQColorGroup cg; int r = -1; - QDomElement n = e.firstChild().toElement(); - QColor col; + TQDomElement n = e.firstChild().toElement(); + TQColor col; while ( !n.isNull() ) { if ( n.tagName() == "color" ) { r++; - cg.setColor( (QColorGroup::ColorRole)r, (col = DomTool::readColor( n ) ) ); + cg.setColor( (TQColorGroup::ColorRole)r, (col = DomTool::readColor( n ) ) ); } else if ( n.tagName() == "pixmap" ) { - QPixmap pix = loadPixmap( n ); - cg.setBrush( (QColorGroup::ColorRole)r, QBrush( col, pix ) ); + TQPixmap pix = loadPixmap( n ); + cg.setBrush( (TQColorGroup::ColorRole)r, TQBrush( col, pix ) ); } n = n.nextSibling().toElement(); } @@ -996,8 +996,8 @@ QColorGroup KommanderFactory::loadColorGroup( const QDomElement &e ) struct Connection { - QObject *sender, *receiver; - QCString signal, slot; + TQObject *sender, *receiver; + TQCString signal, slot; bool operator==( const Connection &c ) const { return sender == c.sender && receiver == c.receiver && signal == c.signal && slot == c.slot ; @@ -1007,27 +1007,27 @@ struct Connection class NormalizeObject : public QObject { public: - NormalizeObject() : QObject() {} - static QCString normalizeSignalSlot( const char *signalSlot ) { return QObject::normalizeSignalSlot( signalSlot ); } + NormalizeObject() : TQObject() {} + static TQCString normalizeSignalSlot( const char *signalSlot ) { return TQObject::normalizeSignalSlot( signalSlot ); } }; -void KommanderFactory::loadConnections( const QDomElement &e, QObject *connector ) +void KommanderFactory::loadConnections( const TQDomElement &e, TQObject *connector ) { - QDomElement n = e.firstChild().toElement(); + TQDomElement n = e.firstChild().toElement(); while ( !n.isNull() ) { if ( n.tagName() == "connection" ) { - QString lang = n.attribute( "language", "C++" ); - QDomElement n2 = n.firstChild().toElement(); + TQString lang = n.attribute( "language", "C++" ); + TQDomElement n2 = n.firstChild().toElement(); Connection conn; while ( !n2.isNull() ) { if ( n2.tagName() == "sender" ) { - QString name = n2.firstChild().toText().data(); + TQString 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 ); + TQObjectList *l = toplevel->queryList( 0, name, false ); if ( l ) { if ( l->first() ) conn.sender = l->first(); @@ -1039,11 +1039,11 @@ void KommanderFactory::loadConnections( const QDomElement &e, QObject *connector } else if ( n2.tagName() == "signal" ) { conn.signal = n2.firstChild().toText().data(); } else if ( n2.tagName() == "receiver" ) { - QString name = n2.firstChild().toText().data(); + TQString name = n2.firstChild().toText().data(); if ( name == "this" || qstrcmp( toplevel->name(), name ) == 0 ) { conn.receiver = toplevel; } else { - QObjectList *l = toplevel->queryList( 0, name, false ); + TQObjectList *l = toplevel->queryList( 0, name, false ); if ( l ) { if ( l->first() ) conn.receiver = l->first(); @@ -1059,8 +1059,8 @@ void KommanderFactory::loadConnections( const QDomElement &e, QObject *connector 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 ); + TQObject *sender = 0, *receiver = 0; + TQObjectList *l = toplevel->queryList( 0, conn.sender->name(), false ); if ( qstrcmp( conn.sender->name(), toplevel->name() ) == 0 ) { sender = toplevel; } else { @@ -1089,13 +1089,13 @@ void KommanderFactory::loadConnections( const QDomElement &e, QObject *connector } if ( lang == "C++" ) { - QString s = "2""%1"; + TQString s = "2""%1"; s = s.arg( conn.signal ); - QString s2 = "1""%1"; + TQString s2 = "1""%1"; s2 = s2.arg( conn.slot ); - QStrList signalList = sender->metaObject()->signalNames( true ); - QStrList slotList = receiver->metaObject()->slotNames( true ); + TQStrList signalList = sender->metaObject()->signalNames( true ); + TQStrList 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 ) { @@ -1109,32 +1109,32 @@ void KommanderFactory::loadConnections( const QDomElement &e, QObject *connector n = n.nextSibling().toElement(); continue; } - QObject::connect( sender, s, receiver, s2 ); + TQObject::connect( sender, s, receiver, s2 ); } else { EventFunction ef = eventMap[ conn.sender ]; ef.events.append( conn.signal ); - ef.functions.append( QStringList::split( ',', conn.slot ) ); + ef.functions.append( TQStringList::split( ',', conn.slot ) ); eventMap.replace( conn.sender, ef ); } } else if ( n.tagName() == "slot" ) { - QString s = n.firstChild().toText().data(); + TQString s = n.firstChild().toText().data(); languageSlots.insert( s.left( s.find( "(" ) ) , n.attribute( "language" ) ); } n = n.nextSibling().toElement(); } } -void KommanderFactory::loadTabOrder( const QDomElement &e ) +void KommanderFactory::loadTabOrder( const TQDomElement &e ) { - QWidget *last = 0; - QDomElement n = e.firstChild().toElement(); + TQWidget *last = 0; + TQDomElement n = e.firstChild().toElement(); while ( !n.isNull() ) { if ( n.tagName() == "tabstop" ) { - QString name = n.firstChild().toText().data(); - QObjectList *l = toplevel->queryList( 0, name, false ); + TQString name = n.firstChild().toText().data(); + TQObjectList *l = toplevel->queryList( 0, name, false ); if ( l ) { if ( l->first() ) { - QWidget *w = (QWidget*)l->first(); + TQWidget *w = (TQWidget*)l->first(); if ( last ) toplevel->setTabOrder( last, w ); last = w; @@ -1146,19 +1146,19 @@ void KommanderFactory::loadTabOrder( const QDomElement &e ) } } -void KommanderFactory::createColumn( const QDomElement &e, QWidget *widget ) +void KommanderFactory::createColumn( const TQDomElement &e, TQWidget *widget ) { - if ( widget->inherits( "QListView" ) && e.tagName() == "column" ) { - QListView *lv = (QListView*)widget; - QDomElement n = e.firstChild().toElement(); - QPixmap pix; + if ( widget->inherits( "TQListView" ) && e.tagName() == "column" ) { + TQListView *lv = (TQListView*)widget; + TQDomElement n = e.firstChild().toElement(); + TQPixmap pix; bool hasPixmap = false; - QString txt; + TQString 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() ); + TQString attrib = n.attribute( "name" ); + TQVariant v = DomTool::elementToVariant( n.firstChild().toElement(), TQVariant() ); if ( attrib == "text" ) txt = translate(v.toString()); else if ( attrib == "pixmap" ) { @@ -1182,10 +1182,10 @@ void KommanderFactory::createColumn( const QDomElement &e, QWidget *widget ) lv->header()->setResizeEnabled( resizeable, i ); } #ifndef QT_NO_TABLE - else if ( widget->inherits( "QTable" ) ) { - QTable *table = (QTable*)widget; + else if ( widget->inherits( "TQTable" ) ) { + TQTable *table = (TQTable*)widget; #ifndef QT_NO_SQL - bool isSql = (widget->inherits( "QDataTable" )); + bool isSql = (widget->inherits( "TQDataTable" )); #endif bool isRow; if ( ( isRow = e.tagName() == "row" ) ) @@ -1197,20 +1197,20 @@ void KommanderFactory::createColumn( const QDomElement &e, QWidget *widget ) table->setNumCols( table->numCols() + 1 ); } - QDomElement n = e.firstChild().toElement(); - QPixmap pix; + TQDomElement n = e.firstChild().toElement(); + TQPixmap pix; bool hasPixmap = false; - QString txt; - QString field; - QValueList fieldMap; + TQString txt; + TQString field; + TQValueList 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() ); + TQString attrib = n.attribute( "name" ); + TQVariant v = DomTool::elementToVariant( n.firstChild().toElement(), TQVariant() ); if ( attrib == "text" ) txt = translate(v.toString()); else if ( attrib == "pixmap" ) { @@ -1224,39 +1224,39 @@ void KommanderFactory::createColumn( const QDomElement &e, QWidget *widget ) } int i = isRow ? table->numRows() - 1 : table->numCols() - 1; - QHeader *h = !isRow ? table->horizontalHeader() : table->verticalHeader(); + TQHeader *h = !isRow ? table->horizontalHeader() : table->verticalHeader(); if ( hasPixmap ) { #ifndef QT_NO_SQL if ( isSql ) - ((QDataTable*)table)->addColumn( field, txt, -1, pix ); + ((TQDataTable*)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 ); + ((TQDataTable*)table)->addColumn( field, txt ); } else #endif h->setLabel( i, txt ); } if ( !isRow && !field.isEmpty() ) { - fieldMap.append( Field( txt, (hasPixmap ? pix : QPixmap()), field ) ); + fieldMap.append( Field( txt, (hasPixmap ? pix : TQPixmap()), field ) ); fieldMaps.insert( table, fieldMap ); } } #endif } -void KommanderFactory::loadItem( const QDomElement &e, QPixmap &pix, QString &txt, bool &hasPixmap ) +void KommanderFactory::loadItem( const TQDomElement &e, TQPixmap &pix, TQString &txt, bool &hasPixmap ) { - QDomElement n = e; + TQDomElement n = e; hasPixmap = false; while ( !n.isNull() ) { if ( n.tagName() == "property" ) { - QString attrib = n.attribute( "name" ); - QVariant v = DomTool::elementToVariant( n.firstChild().toElement(), QVariant() ); + TQString attrib = n.attribute( "name" ); + TQVariant v = DomTool::elementToVariant( n.firstChild().toElement(), TQVariant() ); if ( attrib == "text" ) txt = translate(v.toString()); else if ( attrib == "pixmap" ) { @@ -1268,56 +1268,56 @@ void KommanderFactory::loadItem( const QDomElement &e, QPixmap &pix, QString &tx } } -void KommanderFactory::createItem( const QDomElement &e, QWidget *widget, QListViewItem *i ) +void KommanderFactory::createItem( const TQDomElement &e, TQWidget *widget, TQListViewItem *i ) { - if ( widget->inherits( "QListBox" ) || widget->inherits( "QComboBox" ) ) { - QDomElement n = e.firstChild().toElement(); - QPixmap pix; + if ( widget->inherits( "TQListBox" ) || widget->inherits( "TQComboBox" ) ) { + TQDomElement n = e.firstChild().toElement(); + TQPixmap pix; bool hasPixmap = false; - QString txt; + TQString txt; loadItem( n, pix, txt, hasPixmap ); - QListBox *lb = 0; - if ( widget->inherits( "QListBox" ) ) - lb = (QListBox*)widget; + TQListBox *lb = 0; + if ( widget->inherits( "TQListBox" ) ) + lb = (TQListBox*)widget; else - lb = ( (QComboBox*)widget)->listBox(); + lb = ( (TQComboBox*)widget)->listBox(); if ( hasPixmap ) { - new QListBoxPixmap( lb, pix, txt ); + new TQListBoxPixmap( lb, pix, txt ); } else { - new QListBoxText( lb, txt ); + new TQListBoxText( lb, txt ); } #ifndef QT_NO_ICONVIEW - } else if ( widget->inherits( "QIconView" ) ) { - QDomElement n = e.firstChild().toElement(); - QPixmap pix; + } else if ( widget->inherits( "TQIconView" ) ) { + TQDomElement n = e.firstChild().toElement(); + TQPixmap pix; bool hasPixmap = false; - QString txt; + TQString txt; loadItem( n, pix, txt, hasPixmap ); - QIconView *iv = (QIconView*)widget; - new QIconViewItem( iv, txt, pix ); + TQIconView *iv = (TQIconView*)widget; + new TQIconViewItem( iv, txt, pix ); #endif - } else if ( widget->inherits( "QListView" ) ) { - QDomElement n = e.firstChild().toElement(); - QPixmap pix; - QValueList pixmaps; - QStringList textes; - QListViewItem *item = 0; - QListView *lv = (QListView*)widget; + } else if ( widget->inherits( "TQListView" ) ) { + TQDomElement n = e.firstChild().toElement(); + TQPixmap pix; + TQValueList pixmaps; + TQStringList textes; + TQListViewItem *item = 0; + TQListView *lv = (TQListView*)widget; if ( i ) - item = new QListViewItem( i, lastItem ); + item = new TQListViewItem( i, lastItem ); else - item = new QListViewItem( lv, lastItem ); + item = new TQListViewItem( lv, lastItem ); while ( !n.isNull() ) { if ( n.tagName() == "property" ) { - QString attrib = n.attribute( "name" ); - QVariant v = DomTool::elementToVariant( n.firstChild().toElement(), QVariant() ); + TQString attrib = n.attribute( "name" ); + TQVariant v = DomTool::elementToVariant( n.firstChild().toElement(), TQVariant() ); if ( attrib == "text" ) textes << translate(v.toString()); else if ( attrib == "pixmap" ) { - QString s = v.toString(); + TQString s = v.toString(); if ( s.isEmpty() ) { - pixmaps << QPixmap(); + pixmaps << TQPixmap(); } else { pix = loadPixmap( n.firstChild().toElement() ); pixmaps << pix; @@ -1341,28 +1341,28 @@ void KommanderFactory::createItem( const QDomElement &e, QWidget *widget, QListV -void KommanderFactory::loadChildAction( QObject *parent, const QDomElement &e ) +void KommanderFactory::loadChildAction( TQObject *parent, const TQDomElement &e ) { - QDomElement n = e; - QAction *a = 0; + TQDomElement n = e; + TQAction *a = 0; EventFunction ef; if ( n.tagName() == "action" ) { - a = new QAction( parent ); - QDomElement n2 = n.firstChild().toElement(); + a = new TQAction( parent ); + TQDomElement 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" ) ) ); + ef.functions.append( TQStringList::split( ',', n2.attribute( "functions" ) ) ); } n2 = n2.nextSibling().toElement(); } - if ( !parent->inherits( "QAction" ) ) + if ( !parent->inherits( "TQAction" ) ) actionList.append( a ); } else if ( n.tagName() == "actiongroup" ) { - a = new QActionGroup( parent ); - QDomElement n2 = n.firstChild().toElement(); + a = new TQActionGroup( parent ); + TQDomElement n2 = n.firstChild().toElement(); while ( !n2.isNull() ) { if ( n2.tagName() == "property" ) { setProperty( a, n2.attribute( "name" ), n2.firstChild().toElement() ); @@ -1371,20 +1371,20 @@ void KommanderFactory::loadChildAction( QObject *parent, const QDomElement &e ) loadChildAction( a, n2 ); } else if ( n2.tagName() == "event" ) { ef.events.append( n2.attribute( "name" ) ); - ef.functions.append( QStringList::split( ',', n2.attribute( "functions" ) ) ); + ef.functions.append( TQStringList::split( ',', n2.attribute( "functions" ) ) ); } n2 = n2.nextSibling().toElement(); } - if ( !parent->inherits( "QAction" ) ) + if ( !parent->inherits( "TQAction" ) ) actionList.append( a ); } if ( a ) eventMap.insert( a, ef ); } -void KommanderFactory::loadActions( const QDomElement &e ) +void KommanderFactory::loadActions( const TQDomElement &e ) { - QDomElement n = e.firstChild().toElement(); + TQDomElement n = e.firstChild().toElement(); while ( !n.isNull() ) { if ( n.tagName() == "action" ) { loadChildAction( toplevel, n ); @@ -1395,27 +1395,27 @@ void KommanderFactory::loadActions( const QDomElement &e ) } } -void KommanderFactory::loadToolBars( const QDomElement &e ) +void KommanderFactory::loadToolBars( const TQDomElement &e ) { - QDomElement n = e.firstChild().toElement(); - QMainWindow *mw = ( (QMainWindow*)toplevel ); - QToolBar *tb = 0; + TQDomElement n = e.firstChild().toElement(); + TQMainWindow *mw = ( (TQMainWindow*)toplevel ); + TQToolBar *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 = new TQToolBar( TQString::null, mw, dock ); tb->setLabel( n.attribute( "label" ) ); tb->setName( n.attribute( "name" ) ); - QDomElement n2 = n.firstChild().toElement(); + TQDomElement n2 = n.firstChild().toElement(); while ( !n2.isNull() ) { if ( n2.tagName() == "action" ) { - QAction *a = findAction( n2.attribute( "name" ) ); + TQAction *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" ) ); + (void)createWidgetInternal( n2, tb, 0, n2.attribute( "class", "TQWidget" ) ); } else if ( n2.tagName() == "property" ) { setProperty( tb, n2.attribute( "name" ), n2.firstChild().toElement() ); } @@ -1426,19 +1426,19 @@ void KommanderFactory::loadToolBars( const QDomElement &e ) } } -void KommanderFactory::loadMenuBar( const QDomElement &e ) +void KommanderFactory::loadMenuBar( const TQDomElement &e ) { - QDomElement n = e.firstChild().toElement(); - QMainWindow *mw = ( (QMainWindow*)toplevel ); - QMenuBar *mb = mw->menuBar(); + TQDomElement n = e.firstChild().toElement(); + TQMainWindow *mw = ( (TQMainWindow*)toplevel ); + TQMenuBar *mb = mw->menuBar(); while ( !n.isNull() ) { if ( n.tagName() == "item" ) { - QPopupMenu *popup = new QPopupMenu( mw ); + TQPopupMenu *popup = new TQPopupMenu( mw ); popup->setName( n.attribute( "name" ) ); - QDomElement n2 = n.firstChild().toElement(); + TQDomElement n2 = n.firstChild().toElement(); while ( !n2.isNull() ) { if ( n2.tagName() == "action" ) { - QAction *a = findAction( n2.attribute( "name" ) ); + TQAction *a = findAction( n2.attribute( "name" ) ); if ( a ) a->addTo( popup ); } else if ( n2.tagName() == "separator" ) { @@ -1455,27 +1455,27 @@ void KommanderFactory::loadMenuBar( const QDomElement &e ) } -QAction *KommanderFactory::findAction( const QString &name ) +TQAction *KommanderFactory::findAction( const TQString &name ) { - for ( QAction *a = actionList.first(); a; a = actionList.next() ) { - if ( QString( a->name() ) == name ) + for ( TQAction *a = actionList.first(); a; a = actionList.next() ) { + if ( TQString( a->name() ) == name ) return a; - QAction *ac = (QAction*)a->child( name.latin1(), "QAction" ); + TQAction *ac = (TQAction*)a->child( name.latin1(), "TQAction" ); if ( ac ) return ac; } return 0; } -void KommanderFactory::loadImages( const QString &dir ) +void KommanderFactory::loadImages( const TQString &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")); + TQDir d(dir); + TQStringList l = d.entryList(TQDir::Files); + for (TQStringList::Iterator it = l.begin(); it != l.end(); ++it) + TQMimeSourceFactory::defaultFactory()->setPixmap(*it, TQPixmap(d.path() + "/" + *it, "PNG")); } -QString KommanderFactory::translate( const QString& sourceText, const QString& comment ) +TQString KommanderFactory::translate( const TQString& sourceText, const TQString& comment ) { if (!sourceText.isEmpty() && !comment.isEmpty()) return KGlobal::locale()->translate(comment.utf8(), sourceText.utf8()); diff --git a/kommander/factory/kommanderfactory.h b/kommander/factory/kommanderfactory.h index 0b9a7eab..03861c85 100644 --- a/kommander/factory/kommanderfactory.h +++ b/kommander/factory/kommanderfactory.h @@ -22,13 +22,13 @@ #ifndef _HAVE_KOMMANDERFACTORY_H_ #define _HAVE_KOMMANDERFACTORY_H_ -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include "kommander_export.h" class QWidget; @@ -42,17 +42,17 @@ class KommanderPlugin; struct KommanderWidgetInfo { KommanderWidgetInfo() {} - KommanderWidgetInfo( const QString &g, const QString &t, QIconSet *i, const QString &w = QString::null, bool c = FALSE ) + KommanderWidgetInfo( const TQString &g, const TQString &t, TQIconSet *i, const TQString &w = TQString::null, bool c = FALSE ) : group( g ), toolTip( t ), iconSet(i), whatsThis( w ), isContainer( c ) { } - QString group; - QString toolTip; - QIconSet *iconSet; - QString whatsThis; + TQString group; + TQString toolTip; + TQIconSet *iconSet; + TQString whatsThis; bool isContainer; }; -typedef QMap FeatureList; +typedef TQMap FeatureList; class KOMMANDER_EXPORT KommanderFactory { @@ -60,42 +60,42 @@ 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 TQWidget *create( const TQString &uiFile, TQObject *connector = 0, TQWidget *parent = 0, const char *name = 0 ); + static TQWidget *create( TQIODevice *dev, TQObject *connector = 0, TQWidget *parent = 0, const char *name = 0 ); static int loadPlugins( bool force = FALSE ); static void addPlugin( KommanderPlugin *plugin ); - static void loadImages( const QString &dir ); + static void loadImages( const TQString &dir ); - static QWidget *createWidget( const QString &className, QWidget *parent, const char *name ); + static TQWidget *createWidget( const TQString &className, TQWidget *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 = "" ); + void loadImageCollection( const TQDomElement &e ); + void loadConnections( const TQDomElement &e, TQObject *connector ); + void loadTabOrder( const TQDomElement &e ); + TQWidget *createWidgetInternal( const TQDomElement &e, TQWidget *parent, TQLayout* layout, const TQString &classNameArg ); + TQLayout *createLayout( TQWidget *widget, TQLayout* layout, LayoutType type ); + LayoutType layoutType( TQLayout *l ) const; + void setProperty( TQObject* widget, const TQString &prop, const TQDomElement &e ); + void createSpacer( const TQDomElement &e, TQLayout *layout ); + TQImage loadFromCollection( const TQString &name ); + TQPixmap loadPixmap( const TQDomElement &e ); + TQColorGroup loadColorGroup( const TQDomElement &e ); + void createColumn( const TQDomElement &e, TQWidget *widget ); + void loadItem( const TQDomElement &e, TQPixmap &pix, TQString &txt, bool &hasPixmap ); + void createItem( const TQDomElement &e, TQWidget *widget, TQListViewItem *i = 0 ); + void loadChildAction( TQObject *parent, const TQDomElement &e ); + void loadActions( const TQDomElement &e ); + void loadToolBars( const TQDomElement &e ); + void loadMenuBar( const TQDomElement &e ); + TQAction *findAction( const TQString &name ); + TQString translate( const TQString& sourceText, const TQString& comment = "" ); private: struct Image { - QImage img; - QString name; + TQImage img; + TQString name; bool operator==( const Image &i ) const { return ( i.name == name && i.img == img ); @@ -105,10 +105,10 @@ private: 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; + Field( const TQString &s1, const TQPixmap &p, const TQString &s2 ) : name( s1 ), pix( p ), field( s2 ) {} + TQString name; + TQPixmap pix; + TQString field; #if defined(Q_FULL_TEMPLATE_INSTANTIATION) bool operator==( const Field& ) const { return FALSE; } #endif @@ -117,41 +117,41 @@ private: struct EventFunction { EventFunction() {} - EventFunction( const QString &e, const QStringList &f ) + EventFunction( const TQString &e, const TQStringList &f ) : events( e ) { functions.append( f ); } - QStringList events; - QValueList functions; + TQStringList events; + TQValueList functions; }; struct SqlWidgetConnection { SqlWidgetConnection() {} - SqlWidgetConnection( const QString &c, const QString &t ) - : conn( c ), table( t ), dbControls( new QMap() ) {} - QString conn; - QString table; - QMap *dbControls; + SqlWidgetConnection( const TQString &c, const TQString &t ) + : conn( c ), table( t ), dbControls( new TQMap() ) {} + TQString conn; + TQString table; + TQMap *dbControls; }; struct Functions { - QString functions; + TQString functions; }; - QValueList images; - QWidget *toplevel; - QListViewItem *lastItem; - QMap *dbControls; - QMap dbTables; - QMap sqlWidgetConnections; - QMap buddies; - QMap > fieldMaps; - QPtrList actionList; - QMap eventMap; - QMap languageSlots; - QMap languageFunctions; - QStringList variables; - QStringList noDatabaseWidgets; + TQValueList images; + TQWidget *toplevel; + TQListViewItem *lastItem; + TQMap *dbControls; + TQMap dbTables; + TQMap sqlWidgetConnections; + TQMap buddies; + TQMap > fieldMaps; + TQPtrList actionList; + TQMap eventMap; + TQMap languageSlots; + TQMap languageFunctions; + TQStringList variables; + TQStringList noDatabaseWidgets; bool usePixmapCollection; int defMargin, defSpacing; diff --git a/kommander/part/kommander_part.cpp b/kommander/part/kommander_part.cpp index ef8ab5e1..d8645bc9 100644 --- a/kommander/part/kommander_part.cpp +++ b/kommander/part/kommander_part.cpp @@ -19,9 +19,9 @@ #include #include -#include -#include -#include +#include +#include +#include #include "instance.h" #include "kommanderversion.h" @@ -33,15 +33,15 @@ typedef KParts::GenericFactory KommanderPartFactory; K_EXPORT_COMPONENT_FACTORY( libkommander_part, KommanderPartFactory ) -KommanderPart::KommanderPart( QWidget *parentWidget, const char * /*widgetName*/, - QObject *parent, const char *name, const QStringList & /*args*/ ) +KommanderPart::KommanderPart( TQWidget *parentWidget, const char * /*widgetName*/, + TQObject *parent, const char *name, const TQStringList & /*args*/ ) : KParts::ReadOnlyPart(parent, name) { setInstance( KommanderPartFactory::instance() ); m_instance = 0L; - m_widget = new QWidget(parentWidget); + m_widget = new TQWidget(parentWidget); setWidget(m_widget); - m_layout = new QGridLayout(m_widget); + m_layout = new TQGridLayout(m_widget); } KommanderPart::~KommanderPart() @@ -66,7 +66,7 @@ bool KommanderPart::openFile() delete m_instance; m_instance = new Instance(0L); m_instance->build(m_url); - QTimer::singleShot(0, this, SLOT(slotRun())); + TQTimer::singleShot(0, this, TQT_SLOT(slotRun())); emit setStatusBarText( m_url.prettyURL() ); return true; @@ -74,10 +74,10 @@ bool KommanderPart::openFile() void KommanderPart::slotRun() { - QWidget *w = m_instance->widget(); + TQWidget *w = m_instance->widget(); if (w) { - w->reparent(m_widget, 0, QPoint(0,0)); + w->reparent(m_widget, 0, TQPoint(0,0)); m_layout->addWidget(w, 0, 0); w->show(); //show, not execute, so it doesn't block the parent } diff --git a/kommander/part/kommander_part.h b/kommander/part/kommander_part.h index fc9b876c..7b417a24 100644 --- a/kommander/part/kommander_part.h +++ b/kommander/part/kommander_part.h @@ -25,8 +25,8 @@ class KommanderPart : public KParts::ReadOnlyPart { Q_OBJECT public: - KommanderPart(QWidget *parentWidget, const char *widgetName, - QObject *parent, const char *name, const QStringList &args); + KommanderPart(TQWidget *parentWidget, const char *widgetName, + TQObject *parent, const char *name, const TQStringList &args); virtual ~KommanderPart(); @@ -40,8 +40,8 @@ protected slots: private: Instance *m_instance; - QWidget *m_widget; - QGridLayout *m_layout; + TQWidget *m_widget; + TQGridLayout *m_layout; }; diff --git a/kommander/plugin/kommanderplugin.cpp b/kommander/plugin/kommanderplugin.cpp index 9be1c2d5..f0d94faf 100644 --- a/kommander/plugin/kommanderplugin.cpp +++ b/kommander/plugin/kommanderplugin.cpp @@ -25,46 +25,46 @@ KommanderPlugin::~KommanderPlugin() { } -void KommanderPlugin::addWidget( const QString &name, const QString &group, const QString &toolTip, QIconSet *iconSet, const QString &whatsThis, bool isContainer) +void KommanderPlugin::addWidget( const TQString &name, const TQString &group, const TQString &toolTip, TQIconSet *iconSet, const TQString &whatsThis, bool isContainer) { m_widgets[name] = WidgetInfo( group, toolTip, iconSet, whatsThis, isContainer ); } -void KommanderPlugin::removeWidget( const QString &name ) +void KommanderPlugin::removeWidget( const TQString &name ) { m_widgets.remove( name ); } -QStringList KommanderPlugin::widgets() const +TQStringList KommanderPlugin::widgets() const { - QStringList ws; + TQStringList 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 +TQString KommanderPlugin::group( const TQString &name ) const { return m_widgets[name].group; } -QString KommanderPlugin::toolTip( const QString &name ) const +TQString KommanderPlugin::toolTip( const TQString &name ) const { return m_widgets[name].toolTip; } -QString KommanderPlugin::whatsThis( const QString &name ) const +TQString KommanderPlugin::whatsThis( const TQString &name ) const { return m_widgets[name].whatsThis; } -bool KommanderPlugin::isContainer( const QString &name ) const +bool KommanderPlugin::isContainer( const TQString &name ) const { return m_widgets[name].isContainer; } -QIconSet* KommanderPlugin::iconSet( const QString &name ) const +TQIconSet* KommanderPlugin::iconSet( const TQString &name ) const { return m_widgets[name].iconSet; } @@ -74,7 +74,7 @@ void KommanderPlugin::setDefaultGroup( int id ) SpecialInformation::setDefaultGroup(id); } -bool KommanderPlugin::registerFunction(int id, const QString& function, const QString description , int minArgs, int maxArgs) +bool KommanderPlugin::registerFunction(int id, const TQString& function, const TQString description , int minArgs, int maxArgs) { return SpecialInformation::insert(id, function, description, minArgs, maxArgs); } diff --git a/kommander/plugin/kommanderplugin.h b/kommander/plugin/kommanderplugin.h index ecba3384..b22af6ac 100644 --- a/kommander/plugin/kommanderplugin.h +++ b/kommander/plugin/kommanderplugin.h @@ -34,31 +34,31 @@ #ifndef _HAVE_KOMMANDERPLUGIN_H_ #define _HAVE_KOMMANDERPLUGIN_H_ -#include -#include -#include +#include +#include +#include #include "kommander_export.h" class QWidget; class QIconSet; -class KOMMANDER_EXPORT KommanderPlugin : public QObject +class KOMMANDER_EXPORT KommanderPlugin : public TQObject { 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 void addWidget( const TQString &name, const TQString &group, const TQString &toolTip, TQIconSet *iconSet, const TQString &whatsThis = TQString::null, bool isContainer = false); + virtual void removeWidget( const TQString &name ); + virtual TQStringList 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; + virtual TQWidget *create( const TQString &key, TQWidget *parent = 0, const char *name = 0 ) = 0; + virtual TQString group( const TQString &key ) const; + virtual TQString toolTip( const TQString &key ) const; + virtual TQString whatsThis( const TQString &key ) const; + virtual bool isContainer( const TQString &key ) const; + virtual TQIconSet *iconSet( const TQString &key ) const; /** * Sets the default group for functions. Must be called before registerFunction. @@ -75,7 +75,7 @@ class KOMMANDER_EXPORT KommanderPlugin : public QObject * @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, + static bool registerFunction(int id, const TQString& function, const TQString description = TQString::null, int minArgs = -1, int maxArgs = -1); @@ -84,17 +84,17 @@ private: struct WidgetInfo { WidgetInfo() { } - WidgetInfo( const QString &g, const QString &t, QIconSet *i, const QString &w = QString::null, bool c = false) + WidgetInfo( const TQString &g, const TQString &t, TQIconSet *i, const TQString &w = TQString::null, bool c = false) : group( g ), toolTip( t ), iconSet(i), whatsThis( w ), isContainer( c ) {} - QString group; - QString toolTip; - QIconSet *iconSet; - QString whatsThis; + TQString group; + TQString toolTip; + TQIconSet *iconSet; + TQString whatsThis; bool isContainer; }; - typedef QMap WidgetInfos; + typedef TQMap WidgetInfos; WidgetInfos m_widgets; }; diff --git a/kommander/plugin/specialinformation.cpp b/kommander/plugin/specialinformation.cpp index 5e86eb16..d6ed318b 100644 --- a/kommander/plugin/specialinformation.cpp +++ b/kommander/plugin/specialinformation.cpp @@ -18,7 +18,7 @@ #include -SpecialFunction::SpecialFunction(const QString& name, const QString& description, +SpecialFunction::SpecialFunction(const TQString& name, const TQString& description, int minArgs, int maxArgs) { m_parserTypes = AllParsers; @@ -28,8 +28,8 @@ SpecialFunction::SpecialFunction(const QString& name, const QString& description m_description = description; if (lbracket != -1 && rbracket != -1) { - QString part = name.mid(lbracket+1, rbracket - lbracket - 1); - QStringList args = QStringList::split(",", part); + TQString part = name.mid(lbracket+1, rbracket - lbracket - 1); + TQStringList args = TQStringList::split(",", part); for (uint i=0; i fgroup = m_specials[gid]; - for(QMap::ConstIterator it = fgroup.begin(); it != fgroup.end(); ++it) + TQStringList list; + const TQMap fgroup = m_specials[gid]; + for(TQMap::ConstIterator it = fgroup.begin(); it != fgroup.end(); ++it) list.append(it.data().name()); return list; } @@ -282,108 +282,108 @@ bool SpecialFunction::isSupported(ParserType p) const void SpecialInformation::registerSpecials() { insertGroup(Group::DCOP, "DCOP", ""); - insert(DCOP::addUniqueItem, "addUniqueItem(QString widget, QString item)", + insert(DCOP::addUniqueItem, "addUniqueItem(TQString widget, TQString item)", i18n("Inserts the item if it will not create a duplicate."), 2); - insert(DCOP::associatedText, "associatedText(QString widget)", + insert(DCOP::associatedText, "associatedText(TQString 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)", + insert(DCOP::cancel, "cancel(TQString widget)", i18n("Stops execution of the script associated with the widget."), 1); + insert(DCOP::cellText, "cellText(TQString widget, int row, int column)", i18n("Returns text of a cell in a table."), 3); - insert(DCOP::checked, "checked(QString widget)", + insert(DCOP::checked, "checked(TQString widget)", i18n("Returns 1 for checked boxes, 0 for unchecked."), 1); - insert(DCOP::children, "children(QString widget, bool recursive)", + insert(DCOP::children, "children(TQString widget, bool recursive)", i18n("Returns the list of child widgets contained in the parent widget. Set the recursive parameter to true to include widgets contained by child widgets."), 2); - insert(DCOP::clear, "clear(QString widget)", + insert(DCOP::clear, "clear(TQString widget)", i18n("Removes all content from the widget."), 1); insertAlias(DCOP::clear, "clearList"); - insertInternal(DCOP::columnCount, "columnCount(QString widget)", + insertInternal(DCOP::columnCount, "columnCount(TQString widget)", i18n("Get the column count"), 1); - insert(DCOP::count, "count(QString widget)", + insert(DCOP::count, "count(TQString widget)", i18n("Returns number of items in a widget such as combobox or listbox."), 1); - insert(DCOP::currentColumn, "currentColumn(QString widget)", + insert(DCOP::currentColumn, "currentColumn(TQString widget)", i18n("Returns index of current column."), 1); - insert(DCOP::currentItem, "currentItem(QString widget)", + insert(DCOP::currentItem, "currentItem(TQString widget)", i18n("Returns index of current item."), 1); - insert(DCOP::currentRow, "currentRow(QString widget)", + insert(DCOP::currentRow, "currentRow(TQString widget)", i18n("Returns index of current row."), 1); - insert(DCOP::execute, "execute(QString widget)", + insert(DCOP::execute, "execute(TQString 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)", + insert(DCOP::findItem, "findItem(TQString widget, TQString 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)", + insert(DCOP::insertColumn, "insertColumn(TQString widget, int column, int count)", i18n("Inserts new column (or count columns) at column position."), 2); - insert(DCOP::insertItem, "insertItem(QString widget, QString item, int index)", + insert(DCOP::insertItem, "insertItem(TQString widget, TQString item, int index)", i18n("Inserts item at index position."), 3); insertAlias(DCOP::insertItem, "addListItem"); - insert(DCOP::insertItems, "insertItems(QString widget, QStringList items, int index)", + insert(DCOP::insertItems, "insertItems(TQString widget, TQStringList items, int index)", i18n("Inserts multiple items (EOL-separated) at index position."), 3); insertAlias(DCOP::insertItems, "addListItems"); - insert(DCOP::insertRow, "insertRow(QString widget, int row, int count)", + insert(DCOP::insertRow, "insertRow(TQString widget, int row, int count)", i18n("Inserts new row (or count rows) at row position."), 2); - insert(DCOP::item, "item(QString widget, int index)", + insert(DCOP::item, "item(TQString widget, int index)", i18n("Returns the text of the item at the given index."), 2); - insert(DCOP::itemDepth, "itemDepth(QString widget, int index)", + insert(DCOP::itemDepth, "itemDepth(TQString 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)", + insert(DCOP::itemPath, "itemPath(TQString 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)", + insert(DCOP::removeColumn, "removeColumn(TQString widget, int column, int count)", i18n("Removes the column (or count consecutive columns) with the given index."), 2, 3); - insert(DCOP::removeItem, "removeItem(QString widget, int index)", + insert(DCOP::removeItem, "removeItem(TQString 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)", + insert(DCOP::removeRow, "removeRow(TQString widget, int row, int count)", i18n("Removes the row (or count consecutive rows) with the given index."), 3); insertAlias(DCOP::removeItem, "removeListItem"); - insert(DCOP::selection, "selection(QString widget)", + insert(DCOP::selection, "selection(TQString 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)", + insert(DCOP::setAssociatedText, "setAssociatedText(TQString widget, TQString 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)", + insert(DCOP::setEnabled, "setEnabled(TQString 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)", + insert(DCOP::setCellText, "setCellText(TQString widget, int row, int col, TQString text)", i18n("Sets text of a cell in a table."), 4); - insert(DCOP::setCellWidget, "setCellWidget(QString widget, int row, int col, QString cellWidget)", + insert(DCOP::setCellWidget, "setCellWidget(TQString widget, int row, int col, TQString cellWidget)", i18n("Inserts a widget into a cell of a table."), 4); - insert(DCOP::cellWidget, "cellWidget(QString widget, int row, int col)", + insert(DCOP::cellWidget, "cellWidget(TQString 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)", + insert(DCOP::setChecked, "setChecked(TQString widget, bool checked)", i18n("Sets/unsets checkbox."), 2); - insert(DCOP::setColumnCaption, "setColumnCaption(QString widget, int column, QString text)", + insert(DCOP::setColumnCaption, "setColumnCaption(TQString widget, int column, TQString text)", i18n("Sets caption of the column column."), 3); - insert(DCOP::setCurrentItem, "setCurrentItem(QString widget, int index)", + insert(DCOP::setCurrentItem, "setCurrentItem(TQString 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)", + insert(DCOP::insertTab, "insertTab(TQString widget, TQString 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)", + insert(DCOP::setMaximum, "setMaximum(TQString widget, int value)", i18n("Sets maximum numeric value"), 2); - insert(DCOP::setPixmap, "setPixmap(QString widget, QString iconName, int index)", + insert(DCOP::setPixmap, "setPixmap(TQString widget, TQString iconName, int index)", i18n("Sets pixmap at the given index to the specified icon. Use index = -1 to set the pixmap for all items."), 3); - insert(DCOP::setRowCaption, "setRowCaption(QString widget, int row, QString text)", + insert(DCOP::setRowCaption, "setRowCaption(TQString widget, int row, TQString text)", i18n("Sets caption of the row row."), 3); - insert(DCOP::setSelection, "setSelection(QString widget, QString text)", + insert(DCOP::setSelection, "setSelection(TQString widget, TQString text)", i18n("Selects given text or select item containing given text."), 2); insertAlias(DCOP::setSelection, "setCurrentListItem"); - insert(DCOP::setText, "setText(QString widget, QString text)", + insert(DCOP::setText, "setText(TQString widget, TQString text)", i18n("Sets widget's content."), 2); insertAlias(DCOP::setText, "changeWidgetText"); - insert(DCOP::setVisible, "setVisible(QString widget, bool visible)", + insert(DCOP::setVisible, "setVisible(TQString 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)", + insert(DCOP::text, "text(TQString widget)", i18n("Returns content of widget."), 1); + insert(DCOP::type, "type(TQString widget)", i18n("Returns type(class) of widget."), 1); - insert(DCOP::setEditable, "setEditable(QString widget, bool editable)", + insert(DCOP::setEditable, "setEditable(TQString widget, bool editable)", i18n("Makes the widget editable or read only, depending on the editable argument."), 2); - insertInternal(DCOP::geometry, "geometry(QString widget)", + insertInternal(DCOP::geometry, "geometry(TQString widget)", i18n("Return the widget's geometry as x y w h. This is useful for positioning a created widget."), 1); - insertInternal(DCOP::hasFocus, "hasFocus(QString widget)", + insertInternal(DCOP::hasFocus, "hasFocus(TQString widget)", i18n("Returns true if the widget has focus."), 1); - insertInternal(DCOP::getBackgroundColor, "getBackgroundColor(QString widget)", + insertInternal(DCOP::getBackgroundColor, "getBackgroundColor(TQString widget)", i18n("Gets the widget's background color."), 1); - insertInternal(DCOP::setBackgroundColor, "setBackgroundColor(QString widget, QString Color)", + insertInternal(DCOP::setBackgroundColor, "setBackgroundColor(TQString widget, TQString 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)", + insertInternal(DCOP::isModified, "isModified(TQString widget)", i18n("See if widget has been modified."), 1); insertGroup(Group::Slots, i18n("Slots"), ""); @@ -402,53 +402,53 @@ void SpecialInformation::registerSpecials() 0); insert(Kommander::parentPid, "parentPid", i18n("Returns the pid of the parent Kommander window."), 0); - insert(Kommander::debug, "debug(QString text)", + insert(Kommander::debug, "debug(TQString text)", i18n("Writes text on stderr."), 1); - insert(Kommander::echo, "echo(QString text)", + insert(Kommander::echo, "echo(TQString text)", i18n("Writes text on standard output."), 1); - insertMacro(Kommander::execBegin, "execBegin(QString shell)", + insertMacro(Kommander::execBegin, "execBegin(TQString 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.

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."), 0); - insert(Kommander::env, "env(QString variable)", + insert(Kommander::env, "env(TQString variable)", i18n("Returns value of an environment (shell) variable. Do not use $ in the name. For example, @env(PATH)."), 1); - insert(Kommander::exec, "exec(QString command)", + insert(Kommander::exec, "exec(TQString command)", i18n("Executes an external shell command."), 1); - insertInternal(Kommander::execBackground, "execBackground(QString command)", + insertInternal(Kommander::execBackground, "execBackground(TQString command)", i18n("Executes an external shell command."), 1); - insertMacro(Kommander::expr, "expr(QString expression)", + insertMacro(Kommander::expr, "expr(TQString expression)", i18n("Parses an expression and returns computed value."), 1); - insert(Kommander::forEachBlock, "forEach(QString variable, QString items)", + insert(Kommander::forEachBlock, "forEach(TQString variable, TQString items)", i18n("Executes loop: values from items list (passed as EOL-separated string) are assigned to the variable.
Old
@forEach(i,A\\nB\\nC\\n)
@# @i=A
@end

New
foreach i in MyArray do
//i = key, MyArray[i] = val
end "), 2); - insert(Kommander::forBlock, "for(QString variable, int start, int end, int step)", + insert(Kommander::forBlock, "for(TQString variable, int start, int end, int step)", i18n("Executes loop: variable is set to start and is increased by step each time loop is executed. Execution stops when variable becomes larger then end.
Old
@for(i,1,10,1)
@# @i=1
@endif

New
for i=0 to 20 step 5 do
debug(i)
end
."), 3); - insertMacro(Kommander::global, "global(QString variable)", + insertMacro(Kommander::global, "global(TQString variable)", i18n("Returns the value of a global variable."), 1); - insert(Kommander::i18n, "i18n(QString variable)", + insert(Kommander::i18n, "i18n(TQString 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)", + insert(Kommander::ifBlock, "if(TQString expression)", i18n("Executes block if expression is true (non-zero number or non-empty string.)

OldClose with @endif

New
if val == true then
// do op
elseif cond
// second chance
else
// cond failed
endif

"), 1); - insert(Kommander::dialog, "dialog(QString file, QString args)", + insert(Kommander::dialog, "dialog(TQString file, TQString 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: var=val"), 1); - insert(Kommander::readSetting, "readSetting(QString key, QString default)", + insert(Kommander::readSetting, "readSetting(TQString key, TQString default)", i18n("Reads setting from configration file for this dialog."), 2); - insert(Kommander::setGlobal, "setGlobal(QString variable, QString value)", + insert(Kommander::setGlobal, "setGlobal(TQString variable, TQString 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)", + insert(Kommander::writeSetting, "writeSetting(TQString key, TQString value)", i18n("Stores setting in configuration file for this dialog."), 2); - insertMacro(Kommander::switchBlock, "switch(QString expresion)", + insertMacro(Kommander::switchBlock, "switch(TQString expresion)", i18n("Begin of switch block. Following case values are compared to expression.

@switch()
@case()
@end"), 1); - insert(Kommander::dcop, "dcop(QString id, QString interface, QString function, QString args)", + insert(Kommander::dcop, "dcop(TQString id, TQString interface, TQString function, TQString 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)", + insertInternal(Kommander::createWidget, "createWidget(TQString widgetName, TQString widgetType, TQString parent)", i18n("Creates a new widget with the specified type and as the child of parent."), 3); - insertInternal(Kommander::widgetExists, "widgetExists(QString widgetName)", + insertInternal(Kommander::widgetExists, "widgetExists(TQString 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)", + insertInternal(Kommander::connect, "connect(TQString sender, TQString signal, TQString receiver, TQString 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)", + insertInternal(Kommander::disconnect, "disconnect(TQString sender, TQString signal, TQString receiver, TQString slot)", i18n("Disconnects the signal of sender from the slot of the receiver"), 4); -/* insertInternal(Kommander::switchInternal, "switch(QString Variable)", +/* insertInternal(Kommander::switchInternal, "switch(TQString Variable)", i18n("Can use can use
switch var
case 1
//code
else
//code
end

also can use the form of
switch var {
case 1; //code
else; code
}

semicolons are optional in place of returns. Currently switch does not parse value from arrays.") ); */ insertInternal(Kommander::exit, "exit", @@ -457,167 +457,167 @@ void SpecialInformation::registerSpecials() 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)", + insertInternal(Kommander::Return, "return(TQString 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)", + insert(Array::values, "values(TQString array)", i18n("Returns an EOL-separated list of all values in the array."), 1); - insert(Array::keys,"keys(QString array)", + insert(Array::keys,"keys(TQString array)", i18n("Returns an EOL-separated list of all keys in the array."), 1); - insert(Array::clear,"clear(QString array)", + insert(Array::clear,"clear(TQString array)", i18n("Removes all elements from the array."), 1); - insert(Array::count,"count(QString array)", + insert(Array::count,"count(TQString array)", i18n("Returns the number of elements in the array."), 1); - insertMacro(Array::value, "value(QString array, QString key)", + insertMacro(Array::value, "value(TQString array, TQString key)", i18n("Returns the value associated with the given key."), 2); - insert(Array::remove,"remove(QString array, QString key)", + insert(Array::remove,"remove(TQString array, TQString key)", i18n("Removes element with the given key from the array."), 2); - insertMacro(Array::setValue,"setValue(QString array, QString key, QString value)", + insertMacro(Array::setValue,"setValue(TQString array, TQString key, TQString value)", i18n("Adds element with the given key and value to the array"), 3); - insert(Array::fromString, "fromString(QString array, QString string)", + insert(Array::fromString, "fromString(TQString array, TQString string)", i18n("Adds all elements in the string to the array. " "String should have key\\tvalue\\n format."), 2); - insert(Array::toString, "toString(QString array)", + insert(Array::toString, "toString(TQString array)", i18n("Returns all elements in the array in

key\\tvalue\\n
format."), 1); - insertInternal(Array::indexedFromString, "indexedFromString(QString array, QString string, QString separator)", + insertInternal(Array::indexedFromString, "indexedFromString(TQString array, TQString string, TQString 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)", + insertInternal(Array::indexedToString, "indexedToString(TQString array, TQString 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)", + insertInternal(Array::indexedRemoveElements, "indexedRemoveElements(TQString 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)", + insertInternal(Array::indexedInsertElements, "indexedInsertElements(TQString array, int key, TQString string, TQString 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)", + insertInternal(Array::flipCopy, "flipCopy(TQString Array, TQString 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)", + insertInternal(Matrix::fromString, "fromString(TQString matrix, TQString 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]\".
NOTE: Watch keys! 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)", + insertInternal(Matrix::toString, "toString(TQString 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)", + insertInternal(Matrix::rows, "rows(TQString matrix)", i18n("Return the number of rows in the matrix"), 1); - insertInternal(Matrix::columns, "columns(QString matrix)", + insertInternal(Matrix::columns, "columns(TQString matrix)", i18n("Return the number of columns in the matrix"), 1); - insertInternal(Matrix::clear, "clear(QString matrix)", + insertInternal(Matrix::clear, "clear(TQString matrix)", i18n("Clear the entire matrix"), 1); - insertInternal(Matrix::rowToArray, "rowToArray(QString matrix, QString Row, QString Array, bool Clear-First, bool Indexed)", + insertInternal(Matrix::rowToArray, "rowToArray(TQString matrix, TQString Row, TQString 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)", + insertInternal(Matrix::columnToArray, "columnToArray(TQString matrix, TQString Column, TQString 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)", + insertInternal(Matrix::columnToIndexedArray, "columnToIndexedArray(TQString matrix, TQString Column, TQString Array)", i18n("Copy a column of a Matrix to an indexed array"), 3); - insertInternal(Matrix::rowKeys, "rowKeys(QString Matrix, QString Seperator)", + insertInternal(Matrix::rowKeys, "rowKeys(TQString Matrix, TQString 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)", + insertInternal(Matrix::columnKeys, "columnKeys(TQString Matrix, TQString 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)", + insertInternal(Matrix::addRow, "addRow(TQString Matrix, TQString RowKey, TQString 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)", + insertInternal(Matrix::removeRow, "removeRow(TQString Matrix, TQString 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)", + insertInternal(Matrix::removeColumn, "removeColumn(TQString Matrix, TQString 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)", + insertInternal(Matrix::findRow, "findRow(TQString Matrix, TQString Col-Key, TQString 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)", + insert(String::length, "length(TQString string)", i18n("Returns number of chars in the string."), 1); - insert(String::contains, "contains(QString string, QString substring)", + insert(String::contains, "contains(TQString string, TQString substring)", i18n("Checks if the the string contains the given substring."), 2); - insert(String::find, "find(QString string, QString sought, int index)", + insert(String::find, "find(TQString string, TQString 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)", + insert(String::findRev, "findRev(TQString string, TQString 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)", + insertInternal(String::count, "count(TQString String, TQString substring)", i18n("Returns the count of a given substring in the given string."), 2); - insert(String::left, "left(QString string, int n)", + insert(String::left, "left(TQString string, int n)", i18n("Returns the first n chars of the string."), 2); - insert(String::right, "right(QString string, int n)", + insert(String::right, "right(TQString string, int n)", i18n("Returns the last n chars of the string."), 2); - insert(String::mid, "mid(QString string, int start, int n)", + insert(String::mid, "mid(TQString string, int start, int n)", i18n("Returns n chars of the string, starting from start."), 3); - insert(String::remove, "remove(QString string, QString substring)", + insert(String::remove, "remove(TQString string, TQString substring)", i18n("Removes all occurrences of given substring."), 2); - insert(String::replace, "replace(QString string, QString substring, QString replacement)", + insert(String::replace, "replace(TQString string, TQString substring, TQString replacement)", i18n("Replaces all occurrences of the given substring with the given replacement."), 3); - insert(String::upper, "upper(QString string)", + insert(String::upper, "upper(TQString string)", i18n("Converts the string to uppercase."), 1); - insert(String::lower, "lower(QString string)", + insert(String::lower, "lower(TQString string)", i18n("Converts the string to lowercase."), 1); - insert(String::compare, "compare(QString string1, QString string2)", + insert(String::compare, "compare(TQString string1, TQString 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)", + insert(String::isEmpty, "isEmpty(TQString string)", i18n("Checks if the string is empty."), 1); - insert(String::isNumber, "isNumber(QString string)", + insert(String::isNumber, "isNumber(TQString string)", i18n("Checks if the string is a valid number."), 1); - insert(String::section, "section(QString string, QString separator, int index)", + insert(String::section, "section(TQString string, TQString separator, int index)", i18n("Returns given section of a string."), 1); - insert(String::args, "args(QString string, QString arg1, QString arg2, QString arg3)", + insert(String::args, "args(TQString string, TQString arg1, TQString arg2, TQString arg3)", i18n("Returns the given string with %1, %2, %3 replaced with arg1, arg2, arg3 accordingly."), 2); - insert(String::round, "round(QString Number, int Digits)", + insert(String::round, "round(TQString Number, int Digits)", i18n("Round a floating point number by x digits."), 2); - insertInternal(String::sort, "sort(QString String, QString Separator)", + insertInternal(String::sort, "sort(TQString String, TQString Separator)", i18n("Sort a string list. Only first paramter is required. Default separator is a newline."), 1, 2); - insertInternal(String::trim, "trim(QString String)", + insertInternal(String::trim, "trim(TQString String)", i18n("Strips white space from beginning and end of string."), 1); - insertInternal(String::padLeft, "padLeft(QString String, int Length, QString Pad)", + insertInternal(String::padLeft, "padLeft(TQString String, int Length, TQString 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)", + insertInternal(String::padRight, "padRight(TQString String, int Length, TQString 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)", + insertInternal(String::toInt, "toint(TQString string, TQString 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)", + insertInternal(String::toDouble, "todouble(TQString string, TQString 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)", + insert(File::read, "read(TQString file)", i18n("Returns content of given file."), 1); - insert(File::write, "write(QString file, QString string)", + insert(File::write, "write(TQString file, TQString string)", i18n("Writes given string to a file."), 2); - insert(File::append, "append(QString file, QString string)", + insert(File::append, "append(TQString file, TQString string)", i18n("Appends given string to the end of a file."), 2); - insert(File::exists, "exists(QString file)", + insert(File::exists, "exists(TQString 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)", + insert(Input::color, "color(TQString defaultColor)", i18n("Shows color dialog. Returns color in #RRGGBB format. Defaults to the parameter, if specified."), 0, 1); + insert(Input::text, "text(TQString caption, TQString label, TQString default)", i18n("Shows text selection dialog. Returns entered text."), 2); - insert(Input::password, "password(QString caption, QString password)", + insert(Input::password, "password(TQString caption, TQString 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)", + insert(Input::value, "value(TQString caption, TQString 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)", + insert(Input::valueDouble, "double(TQString caption, TQString 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)", + insert(Input::openfile, "openfile(TQString startdir, TQString filter, TQString caption)", i18n("Shows existing file selection dialog. Returns selected file."), 0); - insert(Input::savefile, "savefile(QString startdir, QString filter, QString caption)", + insert(Input::savefile, "savefile(TQString startdir, TQString filter, TQString caption)", i18n("Shows save file selection dialog. Returns selected file."), 0); - insert(Input::directory, "directory(QString startdir, QString filter, QString caption)", + insert(Input::directory, "directory(TQString startdir, TQString filter, TQString caption)", i18n("Shows directory selection dialog. Returns selected directory."), 0); - insert(Input::openfiles, "openfiles(QString startdir, QString filter, QString caption)", + insert(Input::openfiles, "openfiles(TQString startdir, TQString filter, TQString 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)", + insert(Message::info, "info(TQString text, TQString 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)", + insert(Message::error, "error(TQString text, TQString 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)", + insert(Message::warning, "warning(TQString text, TQString caption, TQString button1, TQString button2, TQString 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)", + insert(Message::question, "question(TQString text, TQString caption, TQString button1, TQString button2, TQString button3)", i18n("Shows a question dialog with up to three buttons. Returns number of selected button."), 1); } -QMap > SpecialInformation::m_specials; -QMap SpecialInformation::m_groups; -QMap SpecialInformation::m_parserGroups; -QMap > SpecialInformation::m_functions; -QMap > SpecialInformation::m_aliases; +TQMap > SpecialInformation::m_specials; +TQMap SpecialInformation::m_groups; +TQMap SpecialInformation::m_parserGroups; +TQMap > SpecialInformation::m_functions; +TQMap > SpecialInformation::m_aliases; int SpecialInformation::m_defaultGroup; diff --git a/kommander/plugin/specialinformation.h b/kommander/plugin/specialinformation.h index 20b6ea04..fa898620 100644 --- a/kommander/plugin/specialinformation.h +++ b/kommander/plugin/specialinformation.h @@ -18,10 +18,10 @@ #define _HAVE_SPECIALINFORMATION_H_ /* QT INCLUDES */ -#include -#include -#include -#include +#include +#include +#include +#include class SpecialFunction { @@ -35,10 +35,10 @@ public: 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(const TQString& function, const TQString& description + = TQString::null, int minArgs = -1, int maxArgs = -1); + SpecialFunction(ParserType p, const TQString& function, const TQString& description + = TQString::null, int minArgs = -1, int maxArgs = -1); SpecialFunction() {m_minArgs = m_maxArgs = 0;} /* minimum number of arguments */ int minArg() const {return m_minArgs;} @@ -47,25 +47,25 @@ public: /* checks number of arguments */ bool isValidArg(int args) const {return args >= minArg() && args <= maxArg();} /* function description */ - QString description() const {return m_description;} + TQString description() const {return m_description;} /* function name */ - QString name() const {return m_function;} + TQString name() const {return m_function;} /* function prototype: with parameter types and optional names */ - QString prototype(uint prototypeFlags = 0) const; + TQString prototype(uint prototypeFlags = 0) const; /* i-th parameter name */ - QString argumentName(uint i) const; + TQString argumentName(uint i) const; /* i-th parameter type */ - QString argumentType(uint i) const; + TQString 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; + TQString m_function; + TQString m_description; int m_minArgs, m_maxArgs; - QStringList m_args; - QStringList m_types; + TQStringList m_args; + TQStringList m_types; unsigned m_parserTypes; }; @@ -76,41 +76,41 @@ 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 int function(int group, const TQString& fname); + static SpecialFunction functionObject(const TQString& gname, const TQString& fname); + static int group(const TQString& gname); static bool isValid(int gname, int fname); - static bool isValid(const QString& gname, const QString& fname); + static bool isValid(const TQString& gname, const TQString& fname); static bool isValid(int gname, int fname, SpecialFunction::ParserType p); - static bool isValid(const QString& gname, const QString& fname, SpecialFunction::ParserType p); + static bool isValid(const TQString& gname, const TQString& 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); + static TQString description(int gname, int fname); + static TQString 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, + static bool insert(int id, const TQString& function, const TQString description = TQString::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, + static bool insertMacro(int id, const TQString& function, const TQString description = TQString::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, + static bool insertInternal(int id, const TQString& function, const TQString description = TQString::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 bool insertAlias(int id, const TQString& alias); + static void insertGroup(int id, const TQString& name, const TQString& parserName); static void setDefaultGroup(int gname); static void registerSpecials(); - static QString parserGroupName(const QString&); - static QStringList groups(); - static QStringList functions(const QString& group); + static TQString parserGroupName(const TQString&); + static TQStringList groups(); + static TQStringList functions(const TQString& group); protected: - static QMap > m_specials; - static QMap m_groups; - static QMap m_parserGroups; - static QMap > m_functions; - static QMap > m_aliases; + static TQMap > m_specials; + static TQMap m_groups; + static TQMap m_parserGroups; + static TQMap > m_functions; + static TQMap > m_aliases; static int m_defaultGroup; }; diff --git a/kommander/pluginmanager/main.cpp b/kommander/pluginmanager/main.cpp index cdbf9cd5..74561925 100644 --- a/kommander/pluginmanager/main.cpp +++ b/kommander/pluginmanager/main.cpp @@ -20,12 +20,12 @@ #include #include #include -#include -#include +#include +#include #include /* QT INCLUDES */ -#include +#include /* OTHER INCLUDES */ #include "pluginmanager.h" @@ -86,8 +86,8 @@ int main(int argc, char *argv[]) if (args->isSet("list")) { - QStringList plugins = P.items(); - for (QStringList::ConstIterator it = plugins.begin(); it != plugins.end(); ++it) + TQStringList plugins = P.items(); + for (TQStringList::ConstIterator it = plugins.begin(); it != plugins.end(); ++it) cout << (*it).local8Bit() << "\n"; } } diff --git a/kommander/pluginmanager/mainwindow.cpp b/kommander/pluginmanager/mainwindow.cpp index 4cc67d62..94d365f5 100644 --- a/kommander/pluginmanager/mainwindow.cpp +++ b/kommander/pluginmanager/mainwindow.cpp @@ -28,14 +28,14 @@ #include #include -MainWindow::MainWindow( QWidget* parent, const char *name, WFlags f ) +MainWindow::MainWindow( TQWidget* 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)) ); + connect( toolBar, TQT_SIGNAL(clicked(int)), this, TQT_SLOT(toolButton(int)) ); m_list = new KListBox( this ); setCentralWidget(m_list); @@ -67,17 +67,17 @@ void MainWindow::toolButton( int id ) void MainWindow::add() { - QString libDir = KGlobal::dirs()->findResourceDir("lib", "libkommanderplugin"); - QString plugin = KFileDialog::getOpenFileName(libDir, "lib*", this, + TQString libDir = KGlobal::dirs()->findResourceDir("lib", "libkommanderplugin"); + TQString plugin = KFileDialog::getOpenFileName(libDir, "lib*", this, i18n("Add Kommander Plugin")); add(plugin); } -void MainWindow::add(const QString &plugin) +void MainWindow::add(const TQString &plugin) { if (!m_pluginManager->add(plugin)) { - QString errMsg = i18n("Unable to load Kommander plugin
%1
").arg(plugin); + TQString errMsg = i18n("Unable to load Kommander plugin
%1
").arg(plugin); KMessageBox::error(this, errMsg, i18n("Cannot add plugin")); } else @@ -86,7 +86,7 @@ void MainWindow::add(const QString &plugin) void MainWindow::remove() { - QString plugin = m_list->currentText(); + TQString plugin = m_list->currentText(); if (m_pluginManager->remove(plugin)) refresh(); } diff --git a/kommander/pluginmanager/mainwindow.h b/kommander/pluginmanager/mainwindow.h index addf1a5f..c774832f 100644 --- a/kommander/pluginmanager/mainwindow.h +++ b/kommander/pluginmanager/mainwindow.h @@ -27,7 +27,7 @@ class MainWindow : public KMainWindow { Q_OBJECT public: - MainWindow( QWidget* parent = 0, const char *name = 0, WFlags f = WType_TopLevel | WDestructiveClose ); + MainWindow( TQWidget* parent = 0, const char *name = 0, WFlags f = WType_TopLevel | WDestructiveClose ); ~MainWindow(); protected slots: @@ -38,7 +38,7 @@ protected slots: // Show dialogbox for selecting plugin, then add it void add(); // Add given plugin if is not added yet - void add( const QString &plugin ); + void add( const TQString &plugin ); // Check whether installed plugins are valid void verify(); private: diff --git a/kommander/pluginmanager/pluginmanager.cpp b/kommander/pluginmanager/pluginmanager.cpp index e9301b26..79da4d81 100644 --- a/kommander/pluginmanager/pluginmanager.cpp +++ b/kommander/pluginmanager/pluginmanager.cpp @@ -22,7 +22,7 @@ PluginManager::PluginManager() { m_cfg = new KConfig("kommanderrc"); - m_list = new QStringList(m_cfg->readListEntry("plugins")); + m_list = new TQStringList(m_cfg->readListEntry("plugins")); } PluginManager::~PluginManager() @@ -37,14 +37,14 @@ int PluginManager::count() const return m_list->count(); } -QString PluginManager::item(int i) const +TQString PluginManager::item(int i) const { return (*m_list)[i]; } -bool PluginManager::add(const QString& plugin, bool) +bool PluginManager::add(const TQString& plugin, bool) { - QString plugName= libraryName(plugin); + TQString plugName= libraryName(plugin); if (plugName.isNull()) return false; if (m_list->contains(plugName)) @@ -53,7 +53,7 @@ bool PluginManager::add(const QString& plugin, bool) return true; } -bool PluginManager::remove(const QString& plugin) +bool PluginManager::remove(const TQString& plugin) { if (!m_list->contains(plugin)) return false; @@ -63,8 +63,8 @@ bool PluginManager::remove(const QString& plugin) int PluginManager::verify() { - QStringList verified; - for (QStringList::ConstIterator it = m_list->begin(); it != m_list->end(); ++it) + TQStringList verified; + for (TQStringList::ConstIterator it = m_list->begin(); it != m_list->end(); ++it) if (!libraryName(*it).isNull()) verified.append(*it); int removed = count() - verified.count(); @@ -73,16 +73,16 @@ int PluginManager::verify() return removed; } -QString PluginManager::libraryName(const QString& plugin) const +TQString PluginManager::libraryName(const TQString& plugin) const { KLibrary *l = KLibLoader::self()->library(plugin.latin1()); - QString libname; + TQString libname; if (l && l->hasSymbol("kommander_plugin")) libname = l->fileName(); return libname; } -QStringList PluginManager::items() const +TQStringList PluginManager::items() const { return (*m_list); } diff --git a/kommander/pluginmanager/pluginmanager.h b/kommander/pluginmanager/pluginmanager.h index 0c7c79b7..10bcc183 100644 --- a/kommander/pluginmanager/pluginmanager.h +++ b/kommander/pluginmanager/pluginmanager.h @@ -17,7 +17,7 @@ #ifndef __HAVE_PLUGINMANAGER_H #define __HAVE_PLUGINMANAGER_H -#include +#include class KConfig; @@ -30,21 +30,21 @@ public: // number of known plugins int count() const; // n-th plugin - QString item(int i) const; + TQString 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); + bool add(const TQString& plugin, bool overwrite = true); // removes given plugin - bool remove(const QString& plugin); + bool remove(const TQString& plugin); // remove invalid plugins, returns number of removed plugins int verify(); // list of plugins - QStringList items() const; + TQStringList items() const; private: // returns expanded library name or null if it is invalid - QString libraryName(const QString& plugin) const; + TQString libraryName(const TQString& plugin) const; - QStringList* m_list; + TQStringList* m_list; KConfig *m_cfg; }; diff --git a/kommander/widget/expression.cpp b/kommander/widget/expression.cpp index 88d46b51..d29d94e8 100644 --- a/kommander/widget/expression.cpp +++ b/kommander/widget/expression.cpp @@ -22,17 +22,17 @@ Expression::Expression() : m_start(0), m_error(false) { } -Expression::Expression(const QString& expr) +Expression::Expression(const TQString& expr) { *this = expr; } -Expression& Expression::operator=(const QString& s) +Expression& Expression::operator=(const TQString& s) { m_start = 0; m_error = false; m_parts.clear(); - const QString single = "()<>!+-/*%"; + const TQString single = "()<>!+-/*%"; int start = 0; int len = s.length(); int i = 0; @@ -41,30 +41,30 @@ Expression& Expression::operator=(const QString& s) 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))); + m_parts.append(TQVariant(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('.')))) + while (i < len && (s[i].isDigit() || (!decimal && s[i] == TQChar('.')))) { if (s[i] == '.') decimal = true; i++; } if (decimal) - m_parts.append(QVariant(s.mid(start, i - start).toDouble())); + m_parts.append(TQVariant(s.mid(start, i - start).toDouble())); else - m_parts.append(QVariant(s.mid(start, i - start).toInt())); + m_parts.append(TQVariant(s.mid(start, i - start).toInt())); } else if (single.contains(s[i])) - m_parts.append(QVariant(QString(s[i++]))); + m_parts.append(TQVariant(TQString(s[i++]))); else if (s[i] == '\"') { i++; while (i < len && s[i] != '\"') i++; - m_parts.append(QVariant(s.mid(start + 1, i - start - 1))); + m_parts.append(TQVariant(s.mid(start + 1, i - start - 1))); i++; } else if (s[i].isSpace()) while (i < len && s[i].isSpace()) @@ -73,25 +73,25 @@ Expression& Expression::operator=(const QString& s) { while (i < len && !s[i].isSpace()) i++; - QString keyword = s.mid(start, i - start); + TQString keyword = s.mid(start, i - start); if (keyword == "true") - m_parts.append(QVariant(true)); + m_parts.append(TQVariant(true)); else if (keyword == "false") - m_parts.append(QVariant(false)); + m_parts.append(TQVariant(false)); else /* will be deprecated soon */ - m_parts.append(QVariant(keyword)); + m_parts.append(TQVariant(keyword)); } start = i; } return *this; } -QString Expression::next() const +TQString Expression::next() const { if (m_start < m_parts.count()) return m_parts[m_start].toString(); else - return QString(); + return TQString(); } bool Expression::validate() @@ -100,11 +100,11 @@ bool Expression::validate() setError(); return !m_error; } -Expression::Type Expression::commonType(const QVariant v1, const QVariant v2) const +Expression::Type Expression::commonType(const TQVariant v1, const TQVariant v2) const { - if (v1.type() == QVariant::String || v2.type() == QVariant::String) + if (v1.type() == TQVariant::String || v2.type() == TQVariant::String) return TypeString; - else if (v1.type() == QVariant::Double || v2.type() == QVariant::Double) + else if (v1.type() == TQVariant::Double || v2.type() == TQVariant::Double) return TypeDouble; return TypeInt; } @@ -115,7 +115,7 @@ static int expression_compareDouble(const double A, const double B) } -int Expression::compare(const QVariant v1, const QVariant v2) const +int Expression::compare(const TQVariant v1, const TQVariant v2) const { switch (commonType(v1, v2)) { case TypeString: return v1.toString().compare(v2.toString()); @@ -132,22 +132,22 @@ void Expression::setError(int pos) m_error = true; } -QVariant Expression::parseNumber() +TQVariant Expression::parseNumber() { if (!validate()) return -1; return m_parts[m_start++]; } -QVariant Expression::parseMinus() +TQVariant Expression::parseMinus() { if (!validate()) return -1; bool sign = next() == "-"; if (sign) { m_start++; - QVariant value = parseNumber(); - if (value.type() == QVariant::Double) + TQVariant value = parseNumber(); + if (value.type() == TQVariant::Double) return -value.toDouble(); else return -value.toInt(); @@ -158,13 +158,13 @@ QVariant Expression::parseMinus() -QVariant Expression::parseBracket() +TQVariant Expression::parseBracket() { if (!validate()) return -1; if (next() == "(") { m_start++; - QVariant value = parse(); + TQVariant value = parse(); if (next() == ")") m_start++; else @@ -176,15 +176,15 @@ QVariant Expression::parseBracket() } -QVariant Expression::parseMultiply() +TQVariant Expression::parseMultiply() { if (!validate()) return -1; - QVariant value = parseBracket(); - QString op = next(); + TQVariant value = parseBracket(); + TQString op = next(); while (op == "*" || op == "/" || op == "%") { m_start++; - QVariant value2 = parseBracket(); + TQVariant value2 = parseBracket(); Type mode = commonType(value, value2); if (op == "*") { @@ -216,15 +216,15 @@ QVariant Expression::parseMultiply() return value; } -QVariant Expression::parseAdd() +TQVariant Expression::parseAdd() { if (!validate()) return -1; - QVariant value = parseMultiply(); - QString op = next(); + TQVariant value = parseMultiply(); + TQString op = next(); while (op == "+" || op == "-") { m_start++; - QVariant value2 = parseMultiply(); + TQVariant value2 = parseMultiply(); Type mode = commonType(value, value2); if (op == "+") if (mode == TypeDouble) @@ -241,15 +241,15 @@ QVariant Expression::parseAdd() return value; } -QVariant Expression::parseComparison() +TQVariant Expression::parseComparison() { if (!validate()) return -1; - QVariant value = parseAdd(); - QString cmp = next(); + TQVariant value = parseAdd(); + TQString cmp = next(); if (cmp == "<" || cmp == "<=" || cmp == "==" || cmp == ">=" || cmp == ">" || cmp == "<>" || cmp == "!=") { m_start++; - QVariant value2 = parseAdd(); + TQVariant value2 = parseAdd(); if (cmp == "<") return compare(value, value2) < 0; else if (cmp == "<=") @@ -266,7 +266,7 @@ QVariant Expression::parseComparison() return value; } -QVariant Expression::parseNot() +TQVariant Expression::parseNot() { if (next() == "!" || next() == "not") { @@ -277,10 +277,10 @@ QVariant Expression::parseNot() return parseComparison(); } -QVariant Expression::parseAnd() +TQVariant Expression::parseAnd() { if (!validate()) return -1; - QVariant value = parseNot(); + TQVariant value = parseNot(); while (next() == "&&" || next() == "and") { m_start++; @@ -290,10 +290,10 @@ QVariant Expression::parseAnd() return value; } -QVariant Expression::parseOr() +TQVariant Expression::parseOr() { if (!validate()) return -1; - QVariant value = parseAnd(); + TQVariant value = parseAnd(); while (next() == "||" || next() == "or") { m_start++; @@ -302,31 +302,31 @@ QVariant Expression::parseOr() return value; } -QVariant Expression::parse() +TQVariant Expression::parse() { return parseOr(); } -QVariant Expression::value(bool* valid) +TQVariant Expression::value(bool* valid) { m_start = 0; m_error = false; - QVariant val = parse(); + TQVariant val = parse(); if (valid) *valid = !m_error && m_start == m_parts.count(); return val; } -QVariant Expression::value(const QString& s, bool* valid) +TQVariant Expression::value(const TQString& s, bool* valid) { *this = s; return value(valid); } -bool Expression::isTrue(const QString& s, bool* valid) +bool Expression::isTrue(const TQString& s, bool* valid) { - QVariant v = value(s, valid); - return (v.type() == QVariant::String && !v.toString().isNull()) || - (v.type() != QVariant::String && v.toInt() != 0); + TQVariant v = value(s, valid); + return (v.type() == TQVariant::String && !v.toString().isNull()) || + (v.type() != TQVariant::String && v.toInt() != 0); } diff --git a/kommander/widget/expression.h b/kommander/widget/expression.h index 7ab163e2..2302ba46 100644 --- a/kommander/widget/expression.h +++ b/kommander/widget/expression.h @@ -17,59 +17,59 @@ #ifndef _HAVE_EXPRESSION_H_ #define _HAVE_EXPRESSION_H_ -#include -#include -#include +#include +#include +#include class Expression { public: Expression(); - Expression(const QString& expr); + Expression(const TQString& expr); /* set string to parse */ - Expression& operator=(const QString& s); + Expression& operator=(const TQString& s); /* calculate value */ - QVariant value(bool* valid = 0); + TQVariant value(bool* valid = 0); /* equivalent of setString(s) and value(valid) */ - QVariant value(const QString& s, bool* valid = 0); + TQVariant value(const TQString& s, bool* valid = 0); /* equivalent of setString(s) and checking if value(valid) is true */ - bool isTrue(const QString& s, bool* valid = 0); + bool isTrue(const TQString& s, bool* valid = 0); private: enum Type {TypeInt, TypeDouble, TypeString}; /* parsing function - top-down approach */ /* parse terminal (number or string) */ - QVariant parseNumber(); + TQVariant parseNumber(); /* parse -x expression */ - QVariant parseMinus(); + TQVariant parseMinus(); /* parse (x) expression */ - QVariant parseBracket(); + TQVariant parseBracket(); /* parse x*y, x/y and x%y expressions */ - QVariant parseMultiply(); + TQVariant parseMultiply(); /* parse x+y and x-y expressions */ - QVariant parseAdd(); + TQVariant parseAdd(); /* parse !x and (equivalent) not x expressions */ - QVariant parseNot(); + TQVariant parseNot(); /* parse x==y, x<=y, x>=y, xy expressions */ - QVariant parseComparison(); + TQVariant parseComparison(); /* parse x && y, (equivalent) x and y expressions */ - QVariant parseAnd(); + TQVariant parseAnd(); /* parse x || y and (equivalent) x or y expressions */ - QVariant parseOr(); + TQVariant parseOr(); /* starting point of parsing - just call first function above */ - QVariant parse(); + TQVariant parse(); /* check if we still have next argument */ bool validate(); /* return next argument to parse or null if there is none */ - QString next() const; + TQString 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; + /* compare various types of TQVariant (strings, floats, ints */ + int compare(const TQVariant v1, const TQVariant v2) const; /* return common type for binary operations */ - Type commonType(const QVariant v1, const QVariant v2) const; + Type commonType(const TQVariant v1, const TQVariant v2) const; - QValueList m_parts; + TQValueList m_parts; uint m_start; bool m_error; uint m_errorPosition; diff --git a/kommander/widget/function.h b/kommander/widget/function.h index fbd8b99b..47631b22 100644 --- a/kommander/widget/function.h +++ b/kommander/widget/function.h @@ -18,12 +18,12 @@ #define _HAVE_FUNCTION_H_ #include "parsenode.h" -#include +#include class Parser; -typedef QValueVector ParameterList; -typedef QValueVector TypeList; +typedef TQValueVector ParameterList; +typedef TQValueVector TypeList; typedef ParseNode(*FunctionPointer)(Parser*, const ParameterList&); class Function diff --git a/kommander/widget/functionlib.cpp b/kommander/widget/functionlib.cpp index d763ff96..416207b7 100644 --- a/kommander/widget/functionlib.cpp +++ b/kommander/widget/functionlib.cpp @@ -26,10 +26,10 @@ #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -57,7 +57,7 @@ static ParseNode f_stringContains(Parser*, const ParameterList& params) static ParseNode f_stringCompare(Parser*, const ParameterList& params) { - int result = QString::compare(params[0].toString(),params[1].toString()); + int result = TQString::compare(params[0].toString(),params[1].toString()); if (result < 0) { result = -1; @@ -163,7 +163,7 @@ static ParseNode f_return(Parser* p, const ParameterList& params) static ParseNode f_stringRound(Parser*, const ParameterList& params) { - QString s; + TQString s; s.sprintf("%."+params[1].toString()+"f", params[0].toDouble()); return s; } @@ -191,22 +191,22 @@ static ParseNode f_echo(Parser*, const ParameterList& params) /******************* File function ********************************/ static ParseNode f_fileRead(Parser*, const ParameterList& params) { - QFile file(params[0].toString()); + TQFile file(params[0].toString()); if (!file.exists() || !file.open(IO_ReadOnly)) return ParseNode(""); - QTextStream text(&file); + TQTextStream text(&file); return text.read(); } static ParseNode f_fileWrite(Parser*, const ParameterList& params) { - QString fname = params[0].toString(); + TQString fname = params[0].toString(); if (fname.isEmpty()) return 0; - QFile file(fname); + TQFile file(fname); if (!file.open(IO_WriteOnly)) return 0; - QTextStream text(&file); + TQTextStream text(&file); for (uint i=1; icurrentWidget(); if (!widget) return ParseNode::error("unknown widget"); widget = widget->widgetByName(widgetName); if (!widget) return ParseNode::error("unknown widget"); - QObject *object = widget->object(); + TQObject *object = widget->object(); if (!object) return ParseNode::error("unknown widget"); - QStrList slotSignatures = object->metaObject()->slotNames(true); - QStringList slotNames = QStringList::fromStrList(slotSignatures); + TQStrList slotSignatures = object->metaObject()->slotNames(true); + TQStringList slotNames = TQStringList::fromStrList(slotSignatures); int slotNum = -1; uint i = 0; while (i < slotNames.count()) @@ -265,7 +265,7 @@ static ParseNode f_executeSlot(Parser* parser, const ParameterList& params) } if (slotNum == -1) return ParseNode::error("unknown function"); - QStringList args; + TQStringList args; ++it; // skip widget while (it != params.end()) { @@ -283,17 +283,17 @@ static ParseNode f_executeSlot(Parser* parser, const ParameterList& params) /******************* DCOP function ********************************/ static ParseNode f_dcopid(Parser*, const ParameterList& ) { - return QString(kapp->dcopClient()->appId()); + return TQString(kapp->dcopClient()->appId()); } static ParseNode f_pid(Parser*, const ParameterList& ) { - return QString::number(getpid()); + return TQString::number(getpid()); } static ParseNode f_parentPid(Parser*p, const ParameterList& ) { - return p->variable("_PARENTPID").toString().isEmpty() ? QString::number(getppid()) : p->variable("_PARENTPID"); + return p->variable("_PARENTPID").toString().isEmpty() ? TQString::number(getppid()) : p->variable("_PARENTPID"); } static ParseNode f_internalDcop(Parser* parser, const ParameterList& params) @@ -312,7 +312,7 @@ static ParseNode f_internalDcop(Parser* parser, const ParameterList& params) widget = widget->widgetByName(params[1].toString()); if (!widget) return ParseNode::error("unknown widget"); - QStringList args; + TQStringList args; ParameterList::ConstIterator it = params.begin(); ++it; // skip function ++it; // skip widget @@ -327,12 +327,12 @@ static ParseNode f_internalDcop(Parser* parser, const ParameterList& params) 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); + TQCString appId = params[0].toString().latin1(); + TQCString object = params[1].toString().latin1(); + TQString function = params[2].toString().section('(', 0, 0); + TQStringList items = TQStringList::split(",", params[2].toString().section('(', 1, 1).section(')', 0, 0)); + TQByteArray byteData; + TQDataStream byteDataStream(byteData, IO_WriteOnly); if (items.count() != params.count() - 3) { @@ -340,7 +340,7 @@ static ParseNode f_dcop(Parser*, const ParameterList& params) return ParseNode(); } int i = 3; - for (QStringList::Iterator it = items.begin(); it != items.end(); ++it) + for (TQStringList::Iterator it = items.begin(); it != items.end(); ++it) { *it = (*it).stripWhiteSpace(); if (*it == "int") @@ -353,16 +353,16 @@ static ParseNode f_dcop(Parser*, const ParameterList& params) byteDataStream << params[i++].toDouble(); else if (*it == "bool") byteDataStream << (bool)params[i++].toInt(); - else if (*it == "QStringList") + else if (*it == "TQStringList") if (params[i].toString().find('\n') != -1) - byteDataStream << QStringList::split("\n", params[i++].toString(), true); + byteDataStream << TQStringList::split("\n", params[i++].toString(), true); else - byteDataStream << QStringList::split("\\n", params[i++].toString(), true); + byteDataStream << TQStringList::split("\\n", params[i++].toString(), true); else byteDataStream << params[i++].toString(); } - function.append(QString("(%1)").arg(items.join(","))); - QCString replyType, byteReply; + function.append(TQString("(%1)").arg(items.join(","))); + TQCString replyType, byteReply; DCOPClient* cl = KApplication::dcopClient(); if (!cl || !cl->call(appId, object, function.latin1(), byteData, replyType, byteReply)) @@ -370,10 +370,10 @@ static ParseNode f_dcop(Parser*, const ParameterList& params) qDebug("DCOP failure"); return ParseNode(); } - QDataStream byteReplyStream(byteReply, IO_ReadOnly); - if (replyType == "QString") + TQDataStream byteReplyStream(byteReply, IO_ReadOnly); + if (replyType == "TQString") { - QString text; + TQString text; byteReplyStream >> text; return text; } @@ -389,15 +389,15 @@ static ParseNode f_dcop(Parser*, const ParameterList& params) byteReplyStream >> b; return b; } - else if (replyType == "QStringList") + else if (replyType == "TQStringList") { - QStringList text; + TQStringList 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()); + qDebug("%s", TQString("DCOP return type %1 is not yet implemented.").arg(replyType.data()).latin1()); } return ParseNode(); @@ -405,14 +405,14 @@ static ParseNode f_dcop(Parser*, const ParameterList& params) static ParseNode f_createWidget(Parser* p, const ParameterList& params) { - QString widgetName = params[0].toString(); - QString widgetType = params[1].toString(); - QString parentName = params[2].toString(); + TQString widgetName = params[0].toString(); + TQString widgetType = params[1].toString(); + TQString parentName = params[2].toString(); KommanderWidget *widget = p->currentWidget()->widgetByName(parentName); if (!widget) return ParseNode::error("unknown widget"); - QWidget *parent = dynamic_cast(widget->object()); - QWidget *w = KommanderFactory::createWidget(widgetType, parent, widgetName.latin1()); + TQWidget *parent = dynamic_cast(widget->object()); + TQWidget *w = KommanderFactory::createWidget(widgetType, parent, widgetName.latin1()); if (w) w->adjustSize(); return ParseNode(); @@ -420,7 +420,7 @@ static ParseNode f_createWidget(Parser* p, const ParameterList& params) static ParseNode f_widgetExists(Parser* p, const ParameterList& params) { - QString widgetName = params[0].toString(); + TQString widgetName = params[0].toString(); KommanderWidget *widget = p->currentWidget()->widgetByName(widgetName); return (widget ? true : false); } @@ -428,33 +428,33 @@ static ParseNode f_widgetExists(Parser* p, const ParameterList& params) 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(); + TQString sender = params[0].toString(); + TQString signal = TQString::number(QSIGNAL_CODE) + params[1].toString(); + TQString receiver = params[2].toString(); + TQString slot = TQString::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(senderW)->connect(dynamic_cast(senderW), signal.ascii(), dynamic_cast(receiverW), slot.ascii()); + dynamic_cast(senderW)->connect(dynamic_cast(senderW), signal.ascii(), dynamic_cast(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(); + TQString sender = params[0].toString(); + TQString signal = TQString::number(QSIGNAL_CODE) + params[1].toString(); + TQString receiver = params[2].toString(); + TQString slot = TQString::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(senderW)->disconnect(dynamic_cast(senderW), signal.ascii(), dynamic_cast(receiverW), slot.ascii()); + dynamic_cast(senderW)->disconnect(dynamic_cast(senderW), signal.ascii(), dynamic_cast(receiverW), slot.ascii()); return ParseNode(); } @@ -462,7 +462,7 @@ static ParseNode f_disconnect(Parser* p, const ParameterList& params) static ParseNode f_exec(Parser* P, const ParameterList& params) { MyProcess proc(P->currentWidget()); - QString text; + TQString text; // qDebug("Trying %s", params[0].toString().latin1()); if (params.count() > 1) text = proc.run(params[0].toString().local8Bit(), params[1].toString()); @@ -475,7 +475,7 @@ static ParseNode f_execBackground(Parser* P, const ParameterList& params) { MyProcess proc(P->currentWidget()); proc.setBlocking(false); - QString text; + TQString text; qDebug("Trying %s", params[0].toString().latin1()); if (params.count() > 1) text = proc.run(params[0].toString().local8Bit(), params[1].toString()); @@ -486,23 +486,23 @@ static ParseNode f_execBackground(Parser* P, const ParameterList& params) static ParseNode f_dialog(Parser* P, const ParameterList& params) { - QString a_dialog = params[0].toString().local8Bit(); - QString a_params = params[1].toString().local8Bit(); + TQString a_dialog = params[0].toString().local8Bit(); + TQString a_params = params[1].toString().local8Bit(); - QString pFileName = P->currentWidget()->global("_KDDIR") + QString("/") + a_dialog; - QFileInfo pDialogFile(pFileName); + TQString pFileName = P->currentWidget()->global("_KDDIR") + TQString("/") + a_dialog; + TQFileInfo pDialogFile(pFileName); if (!pDialogFile.exists()) { pFileName = a_dialog; pDialogFile.setFile(pFileName); if (!pDialogFile.exists()) - return QString(); + return TQString(); } - QString cmd = QString("kmdr-executor %1 %2 _PARENTPID=%3 _PARENTDCOPID=kmdr-executor-%4") + TQString cmd = TQString("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; + TQString text; text = proc.run(cmd); return text; @@ -515,7 +515,7 @@ static ParseNode f_i18n(Parser*, const ParameterList& params) static ParseNode f_env(Parser*, const ParameterList& params) { - return QString(getenv(params[0].toString().latin1())); + return TQString(getenv(params[0].toString().latin1())); } /******************* Array functions ********************************/ @@ -537,16 +537,16 @@ 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"); + return TQStringList(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 values = P->array(params[0].toString()).values(); - QString array; - for (QValueList::ConstIterator it = values.begin(); it != values.end(); ++it ) + TQValueList values = P->array(params[0].toString()).values(); + TQString array; + for (TQValueList::ConstIterator it = values.begin(); it != values.end(); ++it ) array += (*it).toString() + '\n'; return array; } @@ -560,18 +560,18 @@ static ParseNode f_arrayRemove(Parser* P, const ParameterList& params) static ParseNode f_arrayToString(Parser* P, const ParameterList& params) { - QString name = params[0].toString(); + TQString name = params[0].toString(); if (!P->isArray(name)) return ParseNode(); - QString array; - QStringList keys = P->array(name).keys(); - QValueList values = P->array(name).values(); + TQString array; + TQStringList keys = P->array(name).keys(); + TQValueList values = P->array(name).values(); - QStringList::Iterator it = keys.begin(); - QValueList::Iterator itval = values.begin(); + TQStringList::Iterator it = keys.begin(); + TQValueList::Iterator itval = values.begin(); while (*it) { - array += QString("%1\t%2\n").arg(*it).arg((*itval).toString()); + array += TQString("%1\t%2\n").arg(*it).arg((*itval).toString()); ++it; ++itval; } @@ -580,11 +580,11 @@ static ParseNode f_arrayToString(Parser* P, const ParameterList& params) 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 ) + TQString name = params[0].toString(); + TQStringList lines = TQStringList::split("\n", params[1].toString()); + for (TQStringList::Iterator it = lines.begin(); it != lines.end(); ++it ) { - QString key = (*it).section('\t', 0, 0).stripWhiteSpace(); + TQString key = (*it).section('\t', 0, 0).stripWhiteSpace(); if (!key.isEmpty()) P->setArray(name, key, (*it).section('\t', 1)); } @@ -594,16 +594,16 @@ static ParseNode f_arrayFromString(Parser* P, const ParameterList& params) static ParseNode f_arrayIndexedFromString(Parser* P, const ParameterList& params) { - QString name = params[0].toString(); - QStringList lines; + TQString name = params[0].toString(); + TQStringList lines; if (params.count() == 2) - lines = QStringList::split('\t', params[1].toString(), true); + lines = TQStringList::split('\t', params[1].toString(), true); else - lines = QStringList::split(params[2].toString(), params[1].toString(), true); + lines = TQStringList::split(params[2].toString(), params[1].toString(), true); int i = 0; - for (QStringList::Iterator it = lines.begin(); it != lines.end(); ++it ) + for (TQStringList::Iterator it = lines.begin(); it != lines.end(); ++it ) { - P->setArray(name, QString::number(i), (*it)); + P->setArray(name, TQString::number(i), (*it)); i++; } return ParseNode(); @@ -611,28 +611,28 @@ static ParseNode f_arrayIndexedFromString(Parser* P, const ParameterList& params static ParseNode f_arrayIndexedToString(Parser* P, const ParameterList& params) { - QString name = params[0].toString(); + TQString name = params[0].toString(); if (!P->isArray(name)) return ParseNode(); - QString separator = "\t"; + TQString separator = "\t"; if (params.count() == 2) separator = params[1].toString(); - QString array; + TQString array; int count = P->array(name).keys().count(); - QValueList values = P->array(name).values(); + TQValueList 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()); + array.append(P->arrayValue(name, TQString::number(i)).toString()); } return array; } static ParseNode f_arrayIndexedRemoveElements(Parser* P, const ParameterList& params) { - QString name = params[0].toString(); + TQString name = params[0].toString(); if (!P->isArray(name)) return ParseNode(); int key = params[1].toInt(); @@ -641,29 +641,29 @@ static ParseNode f_arrayIndexedRemoveElements(Parser* P, const ParameterList& pa num = params[2].toInt() - 1; if (num < 0) num = 0; - QString array; - QStringList keys = P->array(name).keys(); + TQString array; + TQStringList 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) + if (keys.contains(TQString::number(i)) != 1) return ParseNode(); //array is not indexed } for (int i = key; i <= key + num; i++) { - P->unsetArray(name, QString::number(i)); + P->unsetArray(name, TQString::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))); + P->setArray(name, TQString::number(j), P->arrayValue(name, TQString::number(i))); j++; } for (int i = 1; i <= num + 1; i++) { - P->unsetArray(name, QString::number(count - i)); + P->unsetArray(name, TQString::number(count - i)); } return ParseNode(); } @@ -671,27 +671,27 @@ static ParseNode f_arrayIndexedRemoveElements(Parser* P, const ParameterList& pa static ParseNode f_arrayIndexedInsertElements(Parser* P, const ParameterList& params) { - QString name = params[0].toString(); + TQString name = params[0].toString(); if (!P->isArray(name)) return ParseNode(); int key = params[1].toInt(); - QStringList keys = P->array(name).keys(); + TQStringList keys = P->array(name).keys(); int count = keys.count(); if (key > count || key < 0) return ParseNode(); //out of index range - QString separator = "\t"; + TQString separator = "\t"; if (params.count() == 4) separator = params[3].toString(); - QStringList elements = QStringList::split(separator, params[2].toString(), true); + TQStringList elements = TQStringList::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))); + P->setArray(name, TQString::number(i + num), P->arrayValue(name, TQString::number(i))); } int i = key; - for (QStringList::Iterator it = elements.begin(); it != elements.end(); ++it ) + for (TQStringList::Iterator it = elements.begin(); it != elements.end(); ++it ) { - P->setArray(name, QString::number(i), (*it)); + P->setArray(name, TQString::number(i), (*it)); i++; } return ParseNode(); @@ -700,7 +700,7 @@ static ParseNode f_arrayIndexedInsertElements(Parser* P, const ParameterList& pa /********** input functions *********************/ static ParseNode f_inputColor(Parser*, const ParameterList& params) { - QColor color; + TQColor color; if (params.count()) color.setNamedColor(params[0].toString()); KColorDialog::getColor(color); @@ -709,7 +709,7 @@ static ParseNode f_inputColor(Parser*, const ParameterList& params) static ParseNode f_inputText(Parser*, const ParameterList& params) { - QString value; + TQString value; if (params.count() > 2) value = params[2].toString(); return KInputDialog::getText(params[0].toString(), params[1].toString(), value); @@ -717,11 +717,11 @@ static ParseNode f_inputText(Parser*, const ParameterList& params) static ParseNode f_inputPassword(Parser*, const ParameterList& params) { - QCString value; + TQCString value; if (params.count() > 1) value = params[1].toString().local8Bit(); KPasswordDialog::getPassword(value, params[0].toString()); - return QString::fromLocal8Bit(value); + return TQString::fromLocal8Bit(value); } static ParseNode f_inputValue(Parser*, const ParameterList& params) @@ -741,7 +741,7 @@ static ParseNode f_inputValueDouble(Parser*, const ParameterList& params) static ParseNode f_inputOpenFile(Parser*, const ParameterList& params) { - QString startdir, filter, caption; + TQString startdir, filter, caption; if (params.count() > 0) startdir = params[0].toString(); if (params.count() > 1) @@ -753,7 +753,7 @@ static ParseNode f_inputOpenFile(Parser*, const ParameterList& params) static ParseNode f_inputOpenFiles(Parser*, const ParameterList& params) { - QString startdir, filter, caption; + TQString startdir, filter, caption; if (params.count() > 0) startdir = params[0].toString(); if (params.count() > 1) @@ -765,7 +765,7 @@ static ParseNode f_inputOpenFiles(Parser*, const ParameterList& params) static ParseNode f_inputSaveFile(Parser*, const ParameterList& params) { - QString startdir, filter, caption; + TQString startdir, filter, caption; if (params.count() > 0) startdir = params[0].toString(); if (params.count() > 1) @@ -777,7 +777,7 @@ static ParseNode f_inputSaveFile(Parser*, const ParameterList& params) static ParseNode f_inputDirectory(Parser*, const ParameterList& params) { - QString startdir, caption; + TQString startdir, caption; if (params.count() > 0) startdir = params[0].toString(); if (params.count() > 1) @@ -787,7 +787,7 @@ static ParseNode f_inputDirectory(Parser*, const ParameterList& params) static ParseNode f_message_info(Parser*, const ParameterList& params) { - QString text, caption; + TQString text, caption; if (params.count() > 0) text = params[0].toString(); if (params.count() > 1) @@ -798,7 +798,7 @@ static ParseNode f_message_info(Parser*, const ParameterList& params) static ParseNode f_message_error(Parser*, const ParameterList& params) { - QString text, caption; + TQString text, caption; if (params.count() > 0) text = params[0].toString(); if (params.count() > 1) @@ -810,7 +810,7 @@ static ParseNode f_message_error(Parser*, const ParameterList& params) static ParseNode f_message_warning(Parser*, const ParameterList& params) { int result; - QString text, caption, button1, button2, button3; + TQString text, caption, button1, button2, button3; if (params.count() > 0) text = params[0].toString(); if (params.count() > 1) @@ -843,7 +843,7 @@ static ParseNode f_message_warning(Parser*, const ParameterList& params) static ParseNode f_message_question(Parser*, const ParameterList& params) { int result; - QString text, caption, button1, button2, button3; + TQString text, caption, button1, button2, button3; if (params.count() > 0) text = params[0].toString(); if (params.count() > 1) @@ -875,12 +875,12 @@ static ParseNode f_message_question(Parser*, const ParameterList& params) static ParseNode f_read_setting(Parser* parser, const ParameterList& params) { - QString def; + TQString def; if (params.count() > 1) def = params[1].toString(); if (parser->currentWidget()) { - QString fname = parser->currentWidget()->fileName(); + TQString fname = parser->currentWidget()->fileName(); if (fname.isEmpty()) return ParseNode(); KConfig cfg("kommanderrc", true); @@ -894,7 +894,7 @@ static ParseNode f_write_setting(Parser* parser, const ParameterList& params) { if (parser->currentWidget()) { - QString fname = parser->currentWidget()->fileName(); + TQString fname = parser->currentWidget()->fileName(); if (fname.isEmpty()) return ParseNode(); KConfig cfg("kommanderrc", false); diff --git a/kommander/widget/invokeclass.cpp b/kommander/widget/invokeclass.cpp index b5de4678..866f629b 100644 --- a/kommander/widget/invokeclass.cpp +++ b/kommander/widget/invokeclass.cpp @@ -12,27 +12,27 @@ #include "invokeclass.h" -#include -#include +#include +#include -InvokeClass::InvokeClass(QObject *parent):QObject(parent) +InvokeClass::InvokeClass(TQObject *parent):TQObject(parent) { m_acceptedSlots = acceptedSlots(); } -void InvokeClass::invokeSlot(QObject *object, const QString& slot, QStringList args) +void InvokeClass::invokeSlot(TQObject *object, const TQString& slot, TQStringList args) { - QString invokeName = slot; + TQString invokeName = slot; invokeName = invokeName.mid(invokeName.find('(')); - invokeName.prepend(QString::number(QSIGNAL_CODE) + "invoke"); - QString slotName = QString::number(QSLOT_CODE) + slot; + invokeName.prepend(TQString::number(QSIGNAL_CODE) + "invoke"); + TQString slotName = TQString::number(QSLOT_CODE) + slot; connect(this, invokeName.ascii(), object, slotName.ascii()); if (args.count() == 0) emit invoke(); else { - QString slotArgStr = slot.section(QRegExp("\\(|\\)"), 1); + TQString slotArgStr = slot.section(TQRegExp("\\(|\\)"), 1); uint argNum = slotArgStr.contains(',') + 1; for (uint i = args.count(); i < argNum; i++) args << ""; @@ -52,7 +52,7 @@ void InvokeClass::invokeSlot(QObject *object, const QString& slot, QStringList a 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])); + emit invoke(TQColor(args[0])); } disconnect(this, invokeName.ascii(), object, slotName.ascii()); diff --git a/kommander/widget/invokeclass.h b/kommander/widget/invokeclass.h index 61688b3e..4b1a8c0b 100644 --- a/kommander/widget/invokeclass.h +++ b/kommander/widget/invokeclass.h @@ -13,43 +13,43 @@ #ifndef INVOKECLASS_H #define INVOKECLASS_H -#include -#include +#include +#include -class InvokeClass : public QObject { +class InvokeClass : public TQObject { Q_OBJECT public: - InvokeClass(QObject *parent); - void invokeSlot(QObject *object, const QString& slot, QStringList args); + InvokeClass(TQObject *parent); + void invokeSlot(TQObject *object, const TQString& slot, TQStringList args); - static QStringList acceptedSlots() + static TQStringList acceptedSlots() { - static QStringList acceptedSlots; - acceptedSlots << "const QString&"; - acceptedSlots << "const QString&,const QString&"; + static TQStringList acceptedSlots; + acceptedSlots << "const TQString&"; + acceptedSlots << "const TQString&,const TQString&"; acceptedSlots << "bool"; acceptedSlots << "int"; acceptedSlots << "int,int"; acceptedSlots << "int,int,int"; acceptedSlots << "int,int,int,int"; - acceptedSlots << "const QColor&"; + acceptedSlots << "const TQColor&"; return acceptedSlots; } signals: void invoke(); - void invoke(const QString&); - void invoke(const QString&,const QString&); + void invoke(const TQString&); + void invoke(const TQString&,const TQString&); 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&); + void invoke(const TQColor&); private: - QStringList m_acceptedSlots; + TQStringList m_acceptedSlots; }; diff --git a/kommander/widget/kmdrmainwindow.cpp b/kommander/widget/kmdrmainwindow.cpp index cfe79d0c..e123a035 100644 --- a/kommander/widget/kmdrmainwindow.cpp +++ b/kommander/widget/kmdrmainwindow.cpp @@ -11,12 +11,12 @@ // #include "kmdrmainwindow.h" -#include +#include -KmdrMainWindow::KmdrMainWindow(QWidget *parent, const char *name, WFlags f) +KmdrMainWindow::KmdrMainWindow(TQWidget *parent, const char *name, WFlags f) : KMainWindow(parent, name, f) { - QTimer::singleShot(10, this, SIGNAL(initialize())); + TQTimer::singleShot(10, this, TQT_SIGNAL(initialize())); } diff --git a/kommander/widget/kmdrmainwindow.h b/kommander/widget/kmdrmainwindow.h index 059b514e..6637ffc8 100644 --- a/kommander/widget/kmdrmainwindow.h +++ b/kommander/widget/kmdrmainwindow.h @@ -21,7 +21,7 @@ class KmdrMainWindow : public KMainWindow { Q_OBJECT public: - KmdrMainWindow(QWidget *parent = 0, const char *name = 0, WFlags f = WType_TopLevel | WDestructiveClose); + KmdrMainWindow(TQWidget *parent = 0, const char *name = 0, WFlags f = WType_TopLevel | WDestructiveClose); ~KmdrMainWindow(); diff --git a/kommander/widget/kommanderfunctions.cpp b/kommander/widget/kommanderfunctions.cpp index a5a678db..6ef6e6f0 100644 --- a/kommander/widget/kommanderfunctions.cpp +++ b/kommander/widget/kommanderfunctions.cpp @@ -17,9 +17,9 @@ #include #include -#include -#include -#include +#include +#include +#include #include #include @@ -33,7 +33,7 @@ #include "expression.h" #include "parser.h" -QString KommanderWidget::evalFunction(const QString& function, const QStringList& args) +TQString KommanderWidget::evalFunction(const TQString& function, const TQStringList& args) { switch (SpecialInformation::function(Group::Kommander, function)) { case Kommander::widgetText: @@ -43,56 +43,56 @@ QString KommanderWidget::evalFunction(const QString& function, const QStringList case Kommander::dcopid: return kapp->dcopClient()->appId(); case Kommander::pid: - return QString().setNum(getpid()); + return TQString().setNum(getpid()); case Kommander::null: - return QString(); + return TQString(); case Kommander::comment: - return QString("#"); + return TQString("#"); 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"); + return global("_PARENTPID").isEmpty() ? TQString().setNum(getppid()) : global("_PARENTPID"); case Kommander::env: - return QString(getenv(args[0].latin1())); + return TQString(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(); + return TQString(); case Kommander::debug: qDebug("%s", args[0].latin1()); fflush(stderr); - return QString::null; + return TQString::null; case Kommander::echo: for (uint i=0; i 1) @@ -103,73 +103,73 @@ QString KommanderWidget::evalFunction(const QString& function, const QStringList { Expression expr(args[0]); bool ok; - QVariant value = expr.value(&ok); - return ok ? value.toString() : QString(); + TQVariant value = expr.value(&ok); + return ok ? value.toString() : TQString(); } default: - return QString(); + return TQString(); } } -QString KommanderWidget::evalExecBlock(const QStringList& args, const QString& s, int& pos) +TQString KommanderWidget::evalExecBlock(const TQStringList& args, const TQString& s, int& pos) { int f = s.find("@execEnd", pos); if (f == -1) { printError(i18n("Unterminated @execBegin ... @execEnd block.")); - return QString(); + return TQString(); } else { - QString shell = args.count() ? args[0] : QString(); + TQString shell = args.count() ? args[0] : TQString(); int start = pos; - pos = f + QString("@execEnd").length()+1; + pos = f + TQString("@execEnd").length()+1; return execCommand(evalAssociatedText(s.mid(start, f - start)), shell); } } -QString KommanderWidget::evalForEachBlock(const QStringList& args, const QString& s, int& pos) +TQString KommanderWidget::evalForEachBlock(const TQStringList& args, const TQString& 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(); + return TQString(); } 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); + pos = f + TQString("@end").length()+1; + TQString var = args[0]; + TQStringList loop = TQStringList::split("\n", args[1]); + TQString output; + TQString block = substituteVariable(s.mid(start, f - start), TQString("%1_count").arg(var), + TQString::number(loop.count())); + TQString varidx = TQString("%1_index").arg(var); for (uint i=0; i map = parser.array(array); - QStringList keys; - for (QMap::ConstIterator it = map.begin(); it != map.end(); ++it) + const TQMap map = parser.array(array); + TQStringList keys; + for (TQMap::ConstIterator it = map.begin(); it != map.end(); ++it) keys.append(it.key()); return keys.join("\n"); } case Array::values: { - const QMap map = parser.array(array); - QStringList values; - for (QMap::ConstIterator it = map.begin(); it != map.end(); ++it) + const TQMap map = parser.array(array); + TQStringList values; + for (TQMap::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(); + return TQString(); case Array::remove: parser.unsetArray(array, args[1]); - return QString(); + return TQString(); case Array::count: - return QString::number(parser.array(array).count()); + return TQString::number(parser.array(array).count()); case Array::toString: { - const QMap map = parser.array(array); - QString arraystring; - for (QMap::ConstIterator it = map.begin(); it != map.end(); ++it) - arraystring += QString("%1\t%2\n").arg(it.key()).arg(it.data().toString()); + const TQMap map = parser.array(array); + TQString arraystring; + for (TQMap::ConstIterator it = map.begin(); it != map.end(); ++it) + arraystring += TQString("%1\t%2\n").arg(it.key()).arg(it.data().toString()); return arraystring; } default: - return QString(); + return TQString(); } - return QString(); + return TQString(); } -QString KommanderWidget::evalWidgetFunction(const QString& identifier, const QString& s, int& pos) +TQString KommanderWidget::evalWidgetFunction(const TQString& identifier, const TQString& s, int& pos) { KommanderWidget* pWidget = parseWidget(identifier); if (!pWidget) { printError(i18n("Unknown widget: @%1.").arg(identifier)); - return QString(); + return TQString(); } if (s[pos] == '.') { pos++; bool ok = true; - QString function = parseIdentifier(s, pos); - QStringList args = parseFunction("DCOP", function, s, pos, ok); + TQString function = parseIdentifier(s, pos); + TQStringList args = parseFunction("DCOP", function, s, pos, ok); if (!ok) - return QString(); + return TQString(); args.prepend(pWidget->widgetName()); - QString prototype = SpecialInformation::prototype(Group::DCOP, + TQString prototype = SpecialInformation::prototype(Group::DCOP, SpecialInformation::function(Group::DCOP, function)); return localDCOPQuery(prototype, args); } @@ -337,12 +337,12 @@ QString KommanderWidget::evalWidgetFunction(const QString& identifier, const QSt { printError(i18n("Infinite loop: @%1 called inside @%2.").arg(pWidget->widgetName()) .arg(pWidget->widgetName())); - return QString(); + return TQString(); } else if (!pWidget->hasAssociatedText()) { printError(i18n("Script for @%1 is empty.").arg(pWidget->widgetName())); - return QString(); + return TQString(); } return pWidget->evalAssociatedText(); } diff --git a/kommander/widget/kommanderwidget.cpp b/kommander/widget/kommanderwidget.cpp index 525f662b..4cfbba8c 100644 --- a/kommander/widget/kommanderwidget.cpp +++ b/kommander/widget/kommanderwidget.cpp @@ -26,16 +26,16 @@ #include /* QT INCLUDES */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include /* UNIX INCLUDES */ @@ -51,7 +51,7 @@ #include "parserdata.h" #include "kommanderwindow.h" -KommanderWidget::KommanderWidget(QObject *a_thisObject) +KommanderWidget::KommanderWidget(TQObject *a_thisObject) { m_thisObject = a_thisObject; } @@ -60,14 +60,14 @@ KommanderWidget::~KommanderWidget() { } -void KommanderWidget::setAssociatedText(const QStringList& a_associations) +void KommanderWidget::setAssociatedText(const TQStringList& a_associations) { m_associatedText = a_associations; while(m_associatedText.count() < (states().count())) - m_associatedText += QString(); // sync states and associations + m_associatedText += TQString(); // sync states and associations } -QStringList KommanderWidget::associatedText() const +TQStringList KommanderWidget::associatedText() const { return m_associatedText; } @@ -81,48 +81,48 @@ bool KommanderWidget::hasAssociatedText() } -void KommanderWidget::setPopulationText(const QString& a_txt) +void KommanderWidget::setPopulationText(const TQString& a_txt) { m_populationText = a_txt; } -QString KommanderWidget::populationText() const +TQString KommanderWidget::populationText() const { return m_populationText; } -QStringList KommanderWidget::states() const +TQStringList KommanderWidget::states() const { return m_states; } -QStringList KommanderWidget::displayStates() const +TQStringList KommanderWidget::displayStates() const { return m_displayStates; } -void KommanderWidget::setStates(const QStringList& a_states) +void KommanderWidget::setStates(const TQStringList& a_states) { m_states = a_states; } -void KommanderWidget::setDisplayStates(const QStringList& a_displayStates) +void KommanderWidget::setDisplayStates(const TQStringList& a_displayStates) { m_displayStates = a_displayStates; } -QString KommanderWidget::evalAssociatedText() // expands and returns associated text as a string +TQString 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 TQString(); } return evalAssociatedText(m_associatedText[index]); } -QString KommanderWidget::evalAssociatedText(const QString& a_text) +TQString KommanderWidget::evalAssociatedText(const TQString& a_text) { /* New internal parser is used if global flag is set */ if ((KommanderWidget::useInternalParser && !a_text.startsWith("#!")) || a_text.startsWith("#!kommander")) @@ -132,14 +132,14 @@ QString KommanderWidget::evalAssociatedText(const QString& a_text) 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(); + return TQString(); } /* Old macro-only parser is implemented below */ bool parserType = KommanderWidget::useInternalParser; KommanderWidget::useInternalParser = false; //shebang is used, switch to old parser - QString evalText; + TQString evalText; int pos = 0, baseTextLength = a_text.length(); while (pos < baseTextLength) { @@ -159,7 +159,7 @@ QString KommanderWidget::evalAssociatedText(const QString& a_text) continue; } - QString identifier = parseIdentifier(a_text, pos); + TQString identifier = parseIdentifier(a_text, pos); /* comment */ if (identifier.isEmpty()) { @@ -176,16 +176,16 @@ QString KommanderWidget::evalAssociatedText(const QString& a_text) continue; } bool ok = true; - QStringList args; + TQStringList args; /* Standard, non-prefixed special */ if (identifier == "if") // if required special handling as it takes expression { - QString arg = parseBrackets(a_text, pos, ok); + TQString arg = parseBrackets(a_text, pos, ok); if (!ok) - return QString(); + return TQString(); args.append(evalAssociatedText(arg)); evalText += evalIfBlock(args, a_text, pos); } @@ -193,7 +193,7 @@ QString KommanderWidget::evalAssociatedText(const QString& a_text) { args = parseFunction("Kommander", identifier, a_text, pos, ok); if (!ok) - return QString(); + return TQString(); else if (identifier == "execBegin") evalText += evalExecBlock(args, a_text, pos); else if (identifier == "forEach") @@ -214,10 +214,10 @@ QString KommanderWidget::evalAssociatedText(const QString& a_text) else if (a_text[pos] == '.') { pos++; - QString function = parseIdentifier(a_text, pos); + TQString function = parseIdentifier(a_text, pos); args = parseFunction(identifier, function, a_text, pos, ok); if (!ok) - return QString(); + return TQString(); switch (SpecialInformation::group(identifier)) { case Group::Array: @@ -236,13 +236,13 @@ QString KommanderWidget::evalAssociatedText(const QString& a_text) evalText += Parser::function(internalParserData(), "input_" + function, args); break; default: - return QString(); + return TQString(); } } else { printError(i18n("Unknown special: \'%1\'.").arg(identifier)); - return QString(); + return TQString(); } } @@ -251,14 +251,14 @@ QString KommanderWidget::evalAssociatedText(const QString& a_text) } -QString KommanderWidget::DCOPQuery(const QStringList& a_query) +TQString KommanderWidget::DCOPQuery(const TQStringList& a_query) { - QString app = a_query[0]; + TQString app = a_query[0]; app.remove("\""); - QCString appId = app.latin1(), object = a_query[1].latin1(); + TQCString appId = app.latin1(), object = a_query[1].latin1(); // parse function arguments - QString function = a_query[2], pTypes; + TQString function = a_query[2], pTypes; function.remove(' '); int start = function.find('('); bool ok = false; @@ -272,18 +272,18 @@ QString KommanderWidget::DCOPQuery(const QStringList& a_query) if (!ok) { printError(i18n("Unmatched parenthesis in DCOP call \'%1\'.").arg(a_query[2])); - return QString(); + return TQString(); } - const QStringList argTypes = parseArgs(pTypes, ok); + const TQStringList 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(); + return TQString(); } - QCString replyType; - QByteArray byteData, byteReply; - QDataStream byteDataStream(byteData, IO_WriteOnly); + TQCString replyType; + TQByteArray byteData, byteReply; + TQDataStream byteDataStream(byteData, IO_WriteOnly); for (uint i=0 ; icall(appId, object, function.latin1(), byteData, replyType, byteReply)) { printError(i18n("Tried to perform DCOP query, but failed.")); - return QString(); + return TQString(); } - QDataStream byteReplyStream(byteReply, IO_ReadOnly); - if (replyType == "QString") + TQDataStream byteReplyStream(byteReply, IO_ReadOnly); + if (replyType == "TQString") { - QString text; + TQString text; byteReplyStream >> text; return text; } @@ -322,17 +322,17 @@ QString KommanderWidget::DCOPQuery(const QStringList& a_query) { int i; byteReplyStream >> i; - return QString::number(i); + return TQString::number(i); } else if(replyType == "bool") { bool b; byteReplyStream >> b; - return QString::number(b); + return TQString::number(b); } - else if (replyType == "QStringList") + else if (replyType == "TQStringList") { - QStringList text; + TQStringList text; byteReplyStream >> text; return text.join("\n"); } @@ -341,12 +341,12 @@ QString KommanderWidget::DCOPQuery(const QStringList& a_query) printError(i18n("DCOP return type %1 is not yet implemented.").arg(replyType.data())); } - return QString(); + return TQString(); } -QString KommanderWidget::localDCOPQuery(const QString function, const QStringList& args) +TQString KommanderWidget::localDCOPQuery(const TQString function, const TQStringList& args) { - QStringList pArgs; + TQStringList pArgs; pArgs.append(kapp->dcopClient()->appId()); pArgs.append("KommanderIf"); pArgs.append(function); @@ -355,10 +355,10 @@ QString KommanderWidget::localDCOPQuery(const QString function, const QStringLis return DCOPQuery(pArgs); } -QString KommanderWidget::localDCOPQuery(const QString function, const QString& arg1, - const QString& arg2, const QString& arg3, const QString& arg4) +TQString KommanderWidget::localDCOPQuery(const TQString function, const TQString& arg1, + const TQString& arg2, const TQString& arg3, const TQString& arg4) { - QStringList pArgs; + TQStringList pArgs; pArgs.append(kapp->dcopClient()->appId()); pArgs.append("KommanderIf"); pArgs.append(function); @@ -372,53 +372,53 @@ QString KommanderWidget::localDCOPQuery(const QString function, const QString& a } -QString KommanderWidget::execCommand(const QString& a_command, const QString& a_shell) const +TQString KommanderWidget::execCommand(const TQString& a_command, const TQString& a_shell) const { MyProcess proc(this); - QString text = proc.run(a_command.local8Bit(), a_shell.latin1()); + TQString 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) +TQString KommanderWidget::runDialog(const TQString& a_dialog, const TQString& a_params) { - QString pFileName = localDCOPQuery("global(QString)", "_KDDIR") + QString("/") + a_dialog; - QFileInfo pDialogFile(pFileName); + TQString pFileName = localDCOPQuery("global(TQString)", "_KDDIR") + TQString("/") + a_dialog; + TQFileInfo pDialogFile(pFileName); if (!pDialogFile.exists()) { pFileName = a_dialog; pDialogFile.setFile(pFileName); if (!pDialogFile.exists()) - return QString(); + return TQString(); } - QString cmd = QString("kmdr-executor %1 %2 _PARENTPID=%3 _PARENTDCOPID=kmdr-executor-%4") + TQString cmd = TQString("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 +void KommanderWidget::printError(const TQString& 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("Error in widget %1:

%2").arg(QString(m_thisObject->name())) - .arg(a_error), QStringList(), QString(), 0, 0)) + switch (KMessageBox::createKMessageBox(dialog, TQMessageBox::Warning, + i18n("Error in widget %1:

%2").arg(TQString(m_thisObject->name())) + .arg(a_error), TQStringList(), TQString(), 0, 0)) { case KDialogBase::No: showErrors = false; case KDialogBase::Yes: break; case KDialogBase::Cancel: - if (parentDialog()->inherits("QDialog")) + if (parentDialog()->inherits("TQDialog")) { parentDialog()->close(); exit(-1); } - else if (parentDialog()->inherits("QMainWindow")) + else if (parentDialog()->inherits("TQMainWindow")) kapp->quit(); } } @@ -430,7 +430,7 @@ void KommanderWidget::printError(const QString& a_error) const -QString KommanderWidget::parseIdentifier(const QString& s, int& from) const +TQString KommanderWidget::parseIdentifier(const TQString& s, int& from) const { uint start = from; while (start < s.length() && s[start].isSpace()) @@ -442,14 +442,14 @@ QString KommanderWidget::parseIdentifier(const QString& s, int& from) const return s.mid(start, end-start); } -QString KommanderWidget::parseBrackets(const QString& s, int& from, bool& ok) const +TQString KommanderWidget::parseBrackets(const TQString& 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(); + return TQString(); bool quoteSingle = false, quoteDouble = false; int brackets = 1; for (uint end = start+1; end < s.length(); end++) @@ -470,13 +470,13 @@ QString KommanderWidget::parseBrackets(const QString& s, int& from, bool& ok) co } } ok = false; - return QString(); + return TQString(); } -QStringList KommanderWidget::parseArgs(const QString& s, bool &ok) +TQStringList KommanderWidget::parseArgs(const TQString& s, bool &ok) { - QStringList argList; + TQStringList argList; bool quoteDouble = false, quoteSingle = false; uint i, start = 0, brackets=0; for (i = 0; i < s.length(); i++) @@ -495,7 +495,7 @@ QStringList KommanderWidget::parseArgs(const QString& s, bool &ok) quoteDouble = !quoteDouble; else if (s[i] == ',' && !quoteDouble && !quoteSingle) { - QString arg = s.mid(start, i - start).stripWhiteSpace(); + TQString arg = s.mid(start, i - start).stripWhiteSpace(); if (!arg.isEmpty()) argList.append(evalAssociatedText(parseQuotes(arg))); start = i+1; @@ -504,7 +504,7 @@ QStringList KommanderWidget::parseArgs(const QString& s, bool &ok) } if (!quoteDouble && !quoteSingle) { - QString arg = s.mid(start, s.length() - start + 1).stripWhiteSpace(); + TQString arg = s.mid(start, s.length() - start + 1).stripWhiteSpace(); if (!arg.isEmpty()) argList.append(evalAssociatedText(parseQuotes(arg))); } @@ -513,11 +513,11 @@ QStringList KommanderWidget::parseArgs(const QString& s, bool &ok) return argList; } -QString KommanderWidget::parseQuotes(const QString& s) const +TQString KommanderWidget::parseQuotes(const TQString& s) const { if (s[0] == s[s.length()-1] && (s[0] == '\'' || s[0] == '\"')) { - QMemArray buf(s.length()); + TQMemArray buf(s.length()); int start = 0; int end = s.length() - 1; for (int i=1; iname()) == widgetName) + if (TQString(parentDialog()->name()) == widgetName) return dynamic_cast (parentDialog()); - QCString s = widgetName.lower() == "self" ? m_thisObject->name() : widgetName.latin1(); - QObject* childObj = parentDialog()->child(s); + TQCString s = widgetName.lower() == "self" ? m_thisObject->name() : widgetName.latin1(); + TQObject* childObj = parentDialog()->child(s); /* if (!childObj) { Parser parser(internalParserData()); - QString variableValue = parser.variable(widgetName).toString(); + TQString variableValue = parser.variable(widgetName).toString(); s = variableValue.lower() == "self" ? m_thisObject->name() : variableValue.latin1(); childObj = parentDialog()->child(s); }*/ return dynamic_cast (childObj); } -QStringList KommanderWidget::parseFunction(const QString& group, const QString& function, - const QString& s, int& from, bool& ok) +TQStringList KommanderWidget::parseFunction(const TQString& group, const TQString& function, + const TQString& s, int& from, bool& ok) { ok = true; bool success = false; - QString arg = parseBrackets(s, from, ok); + TQString arg = parseBrackets(s, from, ok); if (!ok) { printError(i18n("Unmatched parenthesis after \'%1\'.").arg(function)); - return QString(); + return TQString(); } - const QStringList args = parseArgs(arg, ok); + const TQStringList args = parseArgs(arg, ok); int gname = SpecialInformation::group(group); int fname = SpecialInformation::function(gname, function); bool extraArg = gname == Group::DCOP; @@ -611,7 +611,7 @@ QStringList KommanderWidget::parseFunction(const QString& group, const QString& return args; } -int KommanderWidget::parseBlockBoundary(const QString& s, int from, const QStringList& args) const +int KommanderWidget::parseBlockBoundary(const TQString& s, int from, const TQStringList& args) const { int shortest = -1; for (uint i=0; iparent()) { superParent = superParent->parent(); - if (superParent->inherits("QDialog") || superParent->inherits("QMainWindow")) + if (superParent->inherits("TQDialog") || superParent->inherits("TQMainWindow")) break; } - return (QWidget*)superParent; + return (TQWidget*)superParent; } -QString KommanderWidget::global(const QString& variableName) +TQString KommanderWidget::global(const TQString& variableName) { - QString var = variableName.startsWith("_") ? variableName : QString("_")+ variableName; + TQString var = variableName.startsWith("_") ? variableName : TQString("_")+ variableName; Parser parser(internalParserData()); return parser.variable(var).toString(); } -void KommanderWidget::setGlobal(const QString& variableName, const QString& value) +void KommanderWidget::setGlobal(const TQString& variableName, const TQString& value) { - QString var = variableName.startsWith("_") ? variableName : QString("_")+ variableName; + TQString var = variableName.startsWith("_") ? variableName : TQString("_")+ variableName; Parser parser(internalParserData()); parser.setVariable(var, value); } -QString KommanderWidget::handleDCOP(const int function, const QStringList& args) +TQString KommanderWidget::handleDCOP(const int function, const TQStringList& args) { - QWidget* current = dynamic_cast(m_thisObject); + TQWidget* current = dynamic_cast(m_thisObject); if (!current) - return QString(); + return TQString(); switch(function) { case DCOP::setEnabled: current->setEnabled( args[0] != "false" && args[0] != "0"); @@ -694,15 +694,15 @@ QString KommanderWidget::handleDCOP(const int function, const QStringList& args) 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()) + TQStringList matching; + TQObjectList* widgets = current->queryList("TQWidget", 0, false, args.count() == 0 || args[0] != "false"); + for (TQObject* w = widgets->first(); w; w = widgets->next()) if (w->name() && (dynamic_cast(w))) matching.append(w->name()); return matching.join("\n"); } } - return QString(); + return TQString(); } bool KommanderWidget::isFunctionSupported(int f) @@ -720,21 +720,21 @@ ParserData* KommanderWidget::internalParserData() const return m_parserData; } -QString KommanderWidget::fileName() +TQString KommanderWidget::fileName() { KommanderWindow* window = dynamic_cast(parentDialog()); if (window) - return QString(window->fileName()); + return TQString(window->fileName()); else - return QString(); + return TQString(); } -QString KommanderWidget::widgetName() const +TQString KommanderWidget::widgetName() const { if (m_thisObject) - return QString::fromLatin1(m_thisObject->name()); + return TQString::fromLatin1(m_thisObject->name()); else - return QString(); + return TQString(); } bool KommanderWidget::inEditor = false; diff --git a/kommander/widget/kommanderwidget.h b/kommander/widget/kommanderwidget.h index 90a748b2..c9576010 100644 --- a/kommander/widget/kommanderwidget.h +++ b/kommander/widget/kommanderwidget.h @@ -23,11 +23,11 @@ #include "kommander_export.h" /* QT INCLUDES */ -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include class ParserData; @@ -35,64 +35,64 @@ class KOMMANDER_EXPORT KommanderWidget { friend class MyProcess; public: - KommanderWidget(QObject *); + KommanderWidget(TQObject *); 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 TQStringList states() const; + virtual TQStringList displayStates() const; + virtual TQString currentState() const = 0; virtual bool isKommanderWidget() const = 0; // Associated script - virtual void setAssociatedText(const QStringList& a_associations); - virtual QStringList associatedText() const; + virtual void setAssociatedText(const TQStringList& a_associations); + virtual TQStringList associatedText() const; virtual bool hasAssociatedText(); // Execute default script, expanding all @macros. - virtual QString evalAssociatedText(); + virtual TQString evalAssociatedText(); // Execute given script, expanding all @macros. - virtual QString evalAssociatedText(const QString&); + virtual TQString evalAssociatedText(const TQString&); // Evaluate given Kommander function using given args. - virtual QString evalFunction(const QString& function, const QStringList& args); + virtual TQString evalFunction(const TQString& function, const TQStringList& 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); + virtual TQString evalWidgetFunction(const TQString& identifier, const TQString& s, int& pos); // Evaluate given array function using given args. - virtual QString evalArrayFunction(const QString&, const QStringList&); + virtual TQString evalArrayFunction(const TQString&, const TQStringList&); // Parse and evaluate given execBegin..execEnd block. - virtual QString evalExecBlock(const QStringList&, const QString& s, int& pos); + virtual TQString evalExecBlock(const TQStringList&, const TQString& s, int& pos); // Parse and evaluate given forEach..end block. - virtual QString evalForEachBlock(const QStringList&, const QString& s, int& pos); + virtual TQString evalForEachBlock(const TQStringList&, const TQString& s, int& pos); // Parse and evaluate given for..end block. - virtual QString evalForBlock(const QStringList&, const QString& s, int& pos); + virtual TQString evalForBlock(const TQStringList&, const TQString& s, int& pos); // Parse and evaluate given switch..case..end block. - virtual QString evalSwitchBlock(const QStringList&, const QString& s, int& pos); + virtual TQString evalSwitchBlock(const TQStringList&, const TQString& s, int& pos); // Parse and evaluate given if..endif block. - virtual QString evalIfBlock(const QStringList&, const QString& s, int& pos); + virtual TQString evalIfBlock(const TQStringList&, const TQString& s, int& pos); // Population text. It will become widgetText after populate() is called - virtual QString populationText() const; - virtual void setPopulationText(const QString&); + virtual TQString populationText() const; + virtual void setPopulationText(const TQString&); virtual void populate() = 0; // Handles all widget-specific DCOP calls - virtual QString handleDCOP(int function, const QStringList& args = QStringList()); + virtual TQString handleDCOP(int function, const TQStringList& args = TQStringList()); // 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; + virtual bool isWidget(const TQString& a_name) const; // Returns widget from name - virtual KommanderWidget* widgetByName(const QString& a_name) const; + virtual KommanderWidget* widgetByName(const TQString& a_name) const; // Returns current widget name; - virtual QString widgetName() const; + virtual TQString widgetName() const; // Returns filename associated with the dialog - virtual QString fileName(); + virtual TQString fileName(); - QObject* object() { return m_thisObject;} + TQObject* object() { return m_thisObject;} // Recognizes editor vs executor mode @@ -102,55 +102,55 @@ public: // Default parser static bool useInternalParser; // Return global variable value - QString global(const QString& variableName); + TQString global(const TQString& variableName); // Set global variable value - void setGlobal(const QString& variableName, const QString& value); + void setGlobal(const TQString& variableName, const TQString& value); protected: - virtual void setStates(const QStringList& a_states); - virtual void setDisplayStates(const QStringList& a_displayStates); + virtual void setStates(const TQStringList& a_states); + virtual void setDisplayStates(const TQStringList& 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); + // Only TQString and int are now handled + TQString DCOPQuery(const TQStringList& args); + TQString localDCOPQuery(const TQString function, const TQStringList& args = TQStringList()); + TQString localDCOPQuery(const TQString function, const TQString& arg1, + const TQString& arg2, const TQString& arg3 = TQString::null, + const TQString& arg4 = TQString::null); // Execute given command, return its result - QString execCommand(const QString& a_command, const QString& a_shell = QString::null) const; + TQString execCommand(const TQString& a_command, const TQString& a_shell = TQString::null) const; // Find and run dialog (with optional parameters) - QString runDialog(const QString& a_dialog, const QString& a_params = QString::null); + TQString runDialog(const TQString& a_dialog, const TQString& a_params = TQString::null); // Display error message a_error; display current class name if no other is given - void printError(const QString& a_error) const; + void printError(const TQString& a_error) const; // Auxiliary functions for parser // Find matching brackets starting from current position - QString parseBrackets(const QString& s, int& from, bool& ok) const; + TQString parseBrackets(const TQString& 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; + TQString parseIdentifier(const TQString& s, int& from) const; // Parse arguments for given function. Returns list of arguments without quotations - QStringList parseArgs(const QString& s, bool &ok); + TQStringList parseArgs(const TQString& s, bool &ok); // Remove quotes from given identifier - QString parseQuotes(const QString& s) const; + TQString parseQuotes(const TQString& s) const; // Parse function - QStringList parseFunction(const QString& group, const QString& function, - const QString& s, int& from, bool& ok); + TQStringList parseFunction(const TQString& group, const TQString& function, + const TQString& s, int& from, bool& ok); // Detect and return block boundary - int parseBlockBoundary(const QString& s, int from, const QStringList& args) const; + int parseBlockBoundary(const TQString& s, int from, const TQStringList& args) const; // Parse given identifier as widget name - KommanderWidget* parseWidget(const QString& name) const; + KommanderWidget* parseWidget(const TQString& name) const; // Return parent dialog of this widget - QWidget* parentDialog() const; - QString substituteVariable(QString text, QString variable, QString value) const; + TQWidget* parentDialog() const; + TQString substituteVariable(TQString text, TQString variable, TQString value) const; ParserData* internalParserData() const; - QObject *m_thisObject; - QStringList m_states; - QStringList m_displayStates; - QStringList m_associatedText; - QString m_populationText; + TQObject *m_thisObject; + TQStringList m_states; + TQStringList m_displayStates; + TQStringList m_associatedText; + TQString m_populationText; // Internal parser data static ParserData* m_parserData; diff --git a/kommander/widget/kommanderwindow.cpp b/kommander/widget/kommanderwindow.cpp index b536eb87..e8b597b2 100644 --- a/kommander/widget/kommanderwindow.cpp +++ b/kommander/widget/kommanderwindow.cpp @@ -15,7 +15,7 @@ #include "kommanderwindow.h" -KommanderWindow::KommanderWindow(QObject* object) : KommanderWidget(object) +KommanderWindow::KommanderWindow(TQObject* object) : KommanderWidget(object) { } @@ -24,12 +24,12 @@ KommanderWindow::~KommanderWindow() } -void KommanderWindow::setFileName(const QString& s) +void KommanderWindow::setFileName(const TQString& s) { m_fileName = s; } -QString KommanderWindow::fileName() +TQString KommanderWindow::fileName() { return m_fileName; } diff --git a/kommander/widget/kommanderwindow.h b/kommander/widget/kommanderwindow.h index 023bd395..18c0ee29 100644 --- a/kommander/widget/kommanderwindow.h +++ b/kommander/widget/kommanderwindow.h @@ -21,14 +21,14 @@ class KOMMANDER_EXPORT KommanderWindow : public KommanderWidget { public: - KommanderWindow(QObject *); + KommanderWindow(TQObject *); virtual ~KommanderWindow(); - virtual void setFileName(const QString& s); - virtual QString fileName(); + virtual void setFileName(const TQString& s); + virtual TQString fileName(); protected: private: - QString m_fileName; + TQString m_fileName; }; diff --git a/kommander/widget/myprocess.cpp b/kommander/widget/myprocess.cpp index e7e05e3b..59eb67fb 100644 --- a/kommander/widget/myprocess.cpp +++ b/kommander/widget/myprocess.cpp @@ -19,9 +19,9 @@ #include /* QT INCLUDES */ -#include -#include -#include +#include +#include +#include /* OTHER INCLUDES */ #include "myprocess.h" @@ -32,15 +32,15 @@ MyProcess::MyProcess(const KommanderWidget *a_atw) { } -void qt_enter_modal(QWidget *widget); -void qt_leave_modal(QWidget *widget); +void qt_enter_modal(TQWidget *widget); +void qt_leave_modal(TQWidget *widget); void MyProcess::setBlocking(bool blocking) { m_blocking = blocking; } -QString MyProcess::output() const +TQString MyProcess::output() const { return m_output; } @@ -59,16 +59,16 @@ void MyProcess::cancel() } } -QString MyProcess::run(const QString& a_command, const QString& a_shell) +TQString MyProcess::run(const TQString& a_command, const TQString& a_shell) { - QString at = a_command.stripWhiteSpace(); + TQString at = a_command.stripWhiteSpace(); if (at.isEmpty()) { emit processExited(0); - return QString(); + return TQString(); } - QString shellName = a_shell; + TQString shellName = a_shell; if (shellName.isEmpty()) shellName = "/bin/sh"; @@ -85,24 +85,24 @@ QString MyProcess::run(const QString& a_command, const QString& a_shell) 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*))); + connect(mProcess, TQT_SIGNAL(receivedStdout(KProcess*, char*, int)), + TQT_SLOT(slotReceivedStdout(KProcess*, char*, int))); + connect(mProcess, TQT_SIGNAL(processExited(KProcess*)), TQT_SLOT(slotProcessExited(KProcess*))); if(!mProcess->start(KProcess::NotifyOnExit, KProcess::All)) { m_atw->printError(i18n("Failed to start shell process
%1
").arg(shellName)); - return QString(); + return TQString(); } mProcess->writeStdin(m_input, m_input.length()); mProcess->closeStdin(); if (!m_blocking) - return QString(); + return TQString(); else { - QWidget dummy(0, 0, WType_Dialog | WShowModal); - dummy.setFocusPolicy(QWidget::NoFocus); + TQWidget dummy(0, 0, WType_Dialog | WShowModal); + dummy.setFocusPolicy(TQWidget::NoFocus); m_loopStarted = true; qt_enter_modal(&dummy); qApp->enter_loop(); @@ -117,7 +117,7 @@ QString MyProcess::run(const QString& a_command, const QString& a_shell) void MyProcess::slotReceivedStdout(KProcess*, char* a_buffer, int a_len) { - m_output += QString::fromLocal8Bit(a_buffer, a_len); + m_output += TQString::fromLocal8Bit(a_buffer, a_len); emit processReceivedStdout(this, a_buffer, a_len); } diff --git a/kommander/widget/myprocess.h b/kommander/widget/myprocess.h index 8487f170..36af1b48 100644 --- a/kommander/widget/myprocess.h +++ b/kommander/widget/myprocess.h @@ -20,8 +20,8 @@ #include /* QT INCLUDES */ -#include -#include +#include +#include #include "kommander_export.h" class KommanderWidget; @@ -33,12 +33,12 @@ 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"); + TQString run(const TQString& a_command, const TQString& a_shell = "/bin/sh"); // Kill running process void cancel(); void setBlocking(bool blocking); bool isBlocking() const; - QString output() const; + TQString output() const; signals: void processExited(MyProcess*); void processReceivedStdout(MyProcess*, char*, int); @@ -47,8 +47,8 @@ private slots: void slotProcessExited(KProcess*); protected: const KommanderWidget *m_atw; - QString m_output; - QCString m_input; + TQString m_output; + TQCString m_input; bool m_loopStarted; bool m_blocking; bool m_handleOutput; diff --git a/kommander/widget/parsenode.cpp b/kommander/widget/parsenode.cpp index d080e114..492c00fb 100644 --- a/kommander/widget/parsenode.cpp +++ b/kommander/widget/parsenode.cpp @@ -22,7 +22,7 @@ ParseNode::ParseNode() : m_type(ValueNone), m_context(-1) { } -ParseNode::ParseNode(const QString& s) : m_type(ValueString), m_string(s), m_context(-1) +ParseNode::ParseNode(const TQString& s) : m_type(ValueString), m_string(s), m_context(-1) { } @@ -38,16 +38,16 @@ 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) : m_type(ValueKeyword), m_keyword(k), m_string(TQString::null), m_context(-1) { } -ParseNode::ParseNode(Keyword k, const QString& name) : m_type(ValueKeyword), m_keyword(k), m_context(-1) +ParseNode::ParseNode(Keyword k, const TQString& name) : m_type(ValueKeyword), m_keyword(k), m_context(-1) { - m_string = (k == Variable) ? name : QString::null; + m_string = (k == Variable) ? name : TQString::null; } -ParseNode ParseNode::error(const QString& s) +ParseNode ParseNode::error(const TQString& s) { ParseNode p; p.m_string = s; @@ -65,13 +65,13 @@ Keyword ParseNode::keyword() const return isKeyword() ? m_keyword : Invalid; } -QString ParseNode::toString() const +TQString 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(); + case ValueInt: return TQString::number(m_int); + case ValueDouble: return TQString::number(m_double); + default: return TQString(); } } @@ -120,14 +120,14 @@ bool ParseNode::isVariable() const return type() == ValueKeyword && keyword() == Variable; } -QString ParseNode::variableName() const +TQString ParseNode::variableName() const { - return isVariable() ? m_string : QString(); + return isVariable() ? m_string : TQString(); } -QString ParseNode::errorMessage() const +TQString ParseNode::errorMessage() const { - return isValid() ? QString() : m_string; + return isValid() ? TQString() : m_string; } @@ -168,7 +168,7 @@ bool ParseNode::operator==(bool b) const return toBool() == b; } -bool ParseNode::operator==(const QString& s) const +bool ParseNode::operator==(const TQString& s) const { return toString() == s; } @@ -215,13 +215,13 @@ void ParseNode::setValue(double d) m_double = d; } -void ParseNode::setValue(const QString& s) +void ParseNode::setValue(const TQString& s) { m_type = ValueString; m_string = s; } -void ParseNode::setVariable(const QString& name) +void ParseNode::setVariable(const TQString& name) { m_type = ValueKeyword; m_keyword = Variable; diff --git a/kommander/widget/parsenode.h b/kommander/widget/parsenode.h index aa657d35..42ffbf71 100644 --- a/kommander/widget/parsenode.h +++ b/kommander/widget/parsenode.h @@ -17,7 +17,7 @@ #ifndef _HAVE_PARSENODE_H_ #define _HAVE_PARSENODE_H_ -#include +#include namespace Parse { @@ -40,7 +40,7 @@ public: /* Default constructor */ ParseNode(); /* Create node from string */ - ParseNode(const QString& s); + ParseNode(const TQString& s); /* Create node from integer */ ParseNode(int i); /* Create node from integer */ @@ -50,16 +50,16 @@ public: /* Create node from keyword */ ParseNode(Parse::Keyword k); /* Create node from keyword and variable name */ - ParseNode(Parse::Keyword k, const QString& s); + ParseNode(Parse::Keyword k, const TQString& s); /* Create error node with optional error message */ - static ParseNode error(const QString& s); + static ParseNode error(const TQString& s); /* Return current type */ Parse::ValueType type() const; /* Return current keyword if appropriate */ Parse::Keyword keyword() const; /* Cast value to string */ - QString toString() const; + TQString toString() const; /* Cast value to integer */ int toInt() const; /* Cast value to double */ @@ -75,9 +75,9 @@ public: /* Check if current value is a variable */ bool isVariable() const; /* Return the name of variable */ - QString variableName() const; + TQString variableName() const; /* Return error message if applicable */ - QString errorMessage() const; + TQString errorMessage() const; /* Calculate common type for two nodes */ Parse::ValueType commonType(const ParseNode& p) const; /* Find common type and compare values */ @@ -85,7 +85,7 @@ public: /* Various comparing functions */ bool operator==(int i) const; bool operator==(bool b) const; - bool operator==(const QString& s) const; + bool operator==(const TQString& s) const; bool operator==(const ParseNode& p) const; bool operator!=(const ParseNode& p) const; bool operator>=(const ParseNode& p) const; @@ -97,9 +97,9 @@ public: /* set value as double */ void setValue(double d); /* set value as string */ - void setValue(const QString& s); + void setValue(const TQString& s); /* set value as variable */ - void setVariable(const QString& name); + void setVariable(const TQString& name); /* check if it is correct value */ bool isValue() const; /* for setting some context information, f. e. for bug reporting */ @@ -114,7 +114,7 @@ private: double m_double; Parse::Keyword m_keyword; }; - QString m_string; + TQString m_string; int m_context; }; diff --git a/kommander/widget/parser.cpp b/kommander/widget/parser.cpp index 1424d6c7..04748e45 100644 --- a/kommander/widget/parser.cpp +++ b/kommander/widget/parser.cpp @@ -22,23 +22,23 @@ using namespace Parse; -QString unescape(QString s) +TQString unescape(TQString 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), +Parser::Parser(ParserData* pData) : m_data(pData), m_start(0), m_error(TQString::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) +Parser::Parser(ParserData* pData, const TQString& expr) : m_data(pData), m_start(0), + m_error(TQString::null), m_errorPosition(0), m_widget(0) { setString(expr); } -bool Parser::setString(const QString& s) +bool Parser::setString(const TQString& s) { reset(); m_parts.clear(); @@ -78,7 +78,7 @@ bool Parser::setString(const QString& s) 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++) + for (i = start+1; s[i].isDigit() || (!decimal && s[i] == TQChar('.')); i++) if (s[i] == '.') decimal = true; if (decimal) @@ -91,7 +91,7 @@ bool Parser::setString(const QString& s) { for (i = start+1; s[i].isLetterOrNumber() || s[i] == '_'; i++) ; - QString name = s.mid(start, i - start); + TQString name = s.mid(start, i - start); insertNode(ParseNode(m_data->stringToKeyword(name), name), lines); start = i; } // comment @@ -131,28 +131,28 @@ void Parser::insertNode(ParseNode p, int line) m_parts.append(p); } -QString Parser::errorMessage() const +TQString Parser::errorMessage() const { return m_error; } -QString Parser::function(ParserData* data, const QString& name, const QStringList& params) +TQString Parser::function(ParserData* data, const TQString& name, const TQStringList& params) { ParameterList par; - for (QStringList::ConstIterator Iter = params.begin(); Iter != params.end(); ++Iter) + for (TQStringList::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) +TQString Parser::expression(Mode mode) { reset(); ParseNode p = parseExpression(mode); if (!isError()) return p.toString(); else - return QString(); + return TQString(); } bool Parser::isError() const @@ -206,14 +206,14 @@ ParseNode Parser::parseValue(Mode mode) { if (tryKeyword(LeftBracket, CheckOnly)) { - QString index = parseValue(mode).toString(); + TQString index = parseValue(mode).toString(); tryKeyword(RightBracket); - QString arr = p.variableName(); + TQString arr = p.variableName(); return arrayValue(arr, index); } else if (tryKeyword(Dot, CheckOnly)) { - QString value = variable(p.variableName()).toString(); + TQString value = variable(p.variableName()).toString(); if (m_widget && m_widget->isWidget(value)) { m_start--; @@ -300,7 +300,7 @@ ParseNode Parser::parseAdd(Mode mode) { if (k == Plus) if (type == ValueString) - p = QString(p.toString() + p2.toString()); + p = TQString(p.toString() + p2.toString()); else if (type == ValueDouble) p = p.toDouble() + p2.toDouble(); else @@ -410,7 +410,7 @@ ParseNode Parser::parseExpression(Mode mode) ParseNode Parser::parseFunction(Mode mode) { int pos = m_start; - QString name = next().variableName(); + TQString name = next().variableName(); Function f = m_data->function(name); m_start++; ParameterList params; @@ -440,10 +440,10 @@ ParseNode Parser::parseFunction(Mode mode) return ParseNode(); } -ParseNode Parser::parseWidget(Mode mode, const QString &widgetName) +ParseNode Parser::parseWidget(Mode mode, const TQString &widgetName) { int pos = m_start; - QString widget; + TQString widget; if (widgetName.isNull()) widget = nextVariable(mode); else @@ -452,7 +452,7 @@ ParseNode Parser::parseWidget(Mode mode, const QString &widgetName) if (!tryKeyword(Dot)) return ParseNode(); - QString var = nextVariable(); + TQString var = nextVariable(); if (var.isNull()) return ParseNode(); ParameterList params; @@ -483,10 +483,10 @@ ParseNode Parser::parseWidget(Mode mode, const QString &widgetName) ParseNode Parser::parseAssignment(Mode mode) { - QString var = nextVariable(); + TQString var = nextVariable(); if (tryKeyword(LeftBracket, CheckOnly)) { - QString index = parseValue(mode).toString(); + TQString index = parseValue(mode).toString(); tryKeyword(RightBracket); tryKeyword(Assign); ParseNode p = parseExpression(mode); @@ -501,7 +501,7 @@ ParseNode Parser::parseAssignment(Mode mode) } else if (tryKeyword(Dot, CheckOnly)) { - QString value = variable(var).toString(); + TQString value = variable(var).toString(); if (m_widget && m_widget->isWidget(value)) { m_start--; @@ -585,7 +585,7 @@ Parse::Flow Parser::parseWhile(Mode mode) Parse::Flow Parser::parseFor(Mode mode) { m_start++; - QString var = nextVariable(); + TQString var = nextVariable(); tryKeyword(Assign); int start = parseExpression(mode).toInt(); tryKeyword(To); @@ -620,16 +620,16 @@ Parse::Flow Parser::parseFor(Mode mode) Parse::Flow Parser::parseForeach(Mode mode) { m_start++; - QString var = nextVariable(); + TQString var = nextVariable(); tryKeyword(In); - QString arr = nextVariable(); + TQString arr = nextVariable(); tryKeyword(Do); int start = m_start; Parse::Flow flow = FlowStandard; if (isArray(arr) && array(arr).count()) { - const QMap A = array(arr); - for (QMapConstIterator It = A.begin(); It != A.end(); ++It) + const TQMap A = array(arr); + for (TQMapConstIterator It = A.begin(); It != A.end(); ++It) { m_start = start; setVariable(var, It.key()); @@ -652,7 +652,7 @@ Parse::Flow Parser::parseForeach(Mode mode) void Parser::parseSwitch(Mode mode) { m_start++; - QString var = nextVariable(); + TQString var = nextVariable(); ParseNode caseValue = variable(var); bool executed = false; tryKeyword(Semicolon, CheckOnly); @@ -688,7 +688,7 @@ Flow Parser::parseCommand(Mode mode) return FlowBreak; else if (isFunction()) { - QString name = next().variableName(); + TQString name = next().variableName(); parseFunction(mode); if (name == "return" && mode == Execute) return FlowExit; @@ -749,7 +749,7 @@ bool Parser::tryVariable(Mode mode) { if (next().isVariable()) { - QString name = next().variableName(); + TQString name = next().variableName(); m_start++; return true; } @@ -758,17 +758,17 @@ bool Parser::tryVariable(Mode mode) return false; } -QString Parser::nextVariable(Mode mode) +TQString Parser::nextVariable(Mode mode) { if (next().isVariable()) { - QString name = next().variableName(); + TQString name = next().variableName(); m_start++; return name; } else if (mode == Execute) setError(i18n("Expected variable")); - return QString(); + return TQString(); } @@ -785,16 +785,16 @@ bool Parser::isWidget() const void Parser::reset() { m_start = 0; - m_error = QString::null; + m_error = TQString::null; m_errorPosition = 0; } -void Parser::setError(const QString& msg) +void Parser::setError(const TQString& msg) { setError(msg, m_start); } -void Parser::setError(const QString& msg, int pos) +void Parser::setError(const TQString& msg, int pos) { if (m_error.isNull()) { @@ -803,7 +803,7 @@ void Parser::setError(const QString& msg, int pos) } } -void Parser::setVariable(const QString& name, ParseNode value) +void Parser::setVariable(const TQString& name, ParseNode value) { if (isGlobal(name)) m_globalVariables[name] = value; @@ -811,7 +811,7 @@ void Parser::setVariable(const QString& name, ParseNode value) m_variables[name] = value; } -ParseNode Parser::variable(const QString& name) const +ParseNode Parser::variable(const TQString& name) const { if (isGlobal(name)) return m_globalVariables.contains(name) ? m_globalVariables[name] : ParseNode(); @@ -819,17 +819,17 @@ ParseNode Parser::variable(const QString& name) const return m_variables.contains(name) ? m_variables[name] : ParseNode(); } -bool Parser::isGlobal(const QString& name) const +bool Parser::isGlobal(const TQString& name) const { return !name.isEmpty() && name[0] == '_'; } -bool Parser::isVariable(const QString& name) const +bool Parser::isVariable(const TQString& name) const { return m_variables.contains(name) || m_globalVariables.contains(name); } -void Parser::unsetVariable(const QString& key) +void Parser::unsetVariable(const TQString& key) { if (isGlobal(key)) m_globalVariables.remove(key); @@ -837,7 +837,7 @@ void Parser::unsetVariable(const QString& key) m_variables.remove(key); } -const QMap& Parser::array(const QString& name) const +const TQMap& Parser::array(const TQString& name) const { if (isGlobal(name)) return m_globalArrays[name]; @@ -845,12 +845,12 @@ const QMap& Parser::array(const QString& name) const return m_arrays[name]; } -bool Parser::isArray(const QString& name) const +bool Parser::isArray(const TQString& name) const { return m_arrays.contains(name) || m_globalArrays.contains(name); } -void Parser::setArray(const QString& name, const QString& key, ParseNode value) +void Parser::setArray(const TQString& name, const TQString& key, ParseNode value) { if (isGlobal(name)) m_globalArrays[name][key] = value; @@ -858,7 +858,7 @@ void Parser::setArray(const QString& name, const QString& key, ParseNode value) m_arrays[name][key] = value; } -void Parser::unsetArray(const QString& name, const QString& key) +void Parser::unsetArray(const TQString& name, const TQString& key) { if (isGlobal(name)) { @@ -876,7 +876,7 @@ void Parser::unsetArray(const QString& name, const QString& key) } } -ParseNode Parser::arrayValue(const QString& name, const QString& key) const +ParseNode Parser::arrayValue(const TQString& name, const TQString& key) const { if (!isArray(name)) return ParseNode(); @@ -893,7 +893,7 @@ KommanderWidget* Parser::currentWidget() const return m_widget; } -QMap Parser::m_globalVariables; -QMap > Parser::m_globalArrays; +TQMap Parser::m_globalVariables; +TQMap > Parser::m_globalArrays; diff --git a/kommander/widget/parser.h b/kommander/widget/parser.h index 6dc66258..3ad7d59c 100644 --- a/kommander/widget/parser.h +++ b/kommander/widget/parser.h @@ -20,9 +20,9 @@ #include "kommander_export.h" #include "parsenode.h" -#include -#include -#include +#include +#include +#include class KommanderWidget; class ParserData; @@ -31,43 +31,43 @@ class Parser { public: Parser(ParserData* data); - Parser(ParserData* data, const QString& expr); + Parser(ParserData* data, const TQString& expr); // set string to parse - bool setString(const QString& s); + bool setString(const TQString& s); // set Kommander widget associated with parser void setWidget(KommanderWidget* w); // parse generic expression - QString expression(Parse::Mode mode = Parse::Execute); + TQString 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); + static TQString function(ParserData* data, const TQString& name, const TQStringList& 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; + TQString errorMessage() const; // check if this is a name of standard variable - bool isVariable(const QString& name) const; + bool isVariable(const TQString& name) const; // set variable value - void setVariable(const QString& name, ParseNode value); + void setVariable(const TQString& name, ParseNode value); // unset variable - void unsetVariable(const QString& key); + void unsetVariable(const TQString& key); // get variable value - ParseNode variable(const QString& name) const; + ParseNode variable(const TQString& name) const; // access associative array - const QMap& array(const QString& name) const; + const TQMap& array(const TQString& name) const; // check if this is a name of an array - bool isArray(const QString& name) const; + bool isArray(const TQString& name) const; // set array key - void setArray(const QString& name, const QString& key, ParseNode value); + void setArray(const TQString& name, const TQString& key, ParseNode value); // unset array key or whole array - void unsetArray(const QString& name, const QString& key = QString::null); + void unsetArray(const TQString& name, const TQString& key = TQString::null); // array value - ParseNode arrayValue(const QString& name, const QString& key) const; + ParseNode arrayValue(const TQString& name, const TQString& key) const; // get associated widget KommanderWidget* currentWidget() const; @@ -110,7 +110,7 @@ private: // parse parameters ParseNode parseFunction(Parse::Mode mode = Parse::Execute); // parse widget function - ParseNode parseWidget(Parse::Mode mode = Parse::Execute, const QString &widgetName = QString::null); + ParseNode parseWidget(Parse::Mode mode = Parse::Execute, const TQString &widgetName = TQString::null); // parse assignment ParseNode parseAssignment(Parse::Mode mode = Parse::Execute); @@ -139,9 +139,9 @@ private: bool tryVariable(Parse::Mode mode = Parse::Execute); // get the name of the next node treated as variable - QString nextVariable(Parse::Mode mode = Parse::Execute); + TQString nextVariable(Parse::Mode mode = Parse::Execute); // check whether variable/array name is global (preceded with _) - bool isGlobal(const QString& name) const; + bool isGlobal(const TQString& name) const; // check if next item is a function bool isFunction() const; // check if next item is a widget @@ -150,8 +150,8 @@ private: // 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); + void setError(const TQString& msg); + void setError(const TQString& msg, int pos); // check whether parsing was successful bool isError() const; @@ -160,21 +160,21 @@ private: // current parsing position uint m_start; // current error message - QString m_error; + TQString m_error; // in case of error, this keeps position of first error uint m_errorPosition; // parsing nodes - QValueVector m_parts; + TQValueVector m_parts; // variables - QMap m_variables; + TQMap m_variables; // arrays - QMap > m_arrays; + TQMap > m_arrays; // Kommander KommanderWidget* m_widget; // global variables - static QMap m_globalVariables; + static TQMap m_globalVariables; // global arrays - static QMap > m_globalArrays; + static TQMap > m_globalArrays; }; #endif diff --git a/kommander/widget/parserdata.cpp b/kommander/widget/parserdata.cpp index f803283e..274d7220 100644 --- a/kommander/widget/parserdata.cpp +++ b/kommander/widget/parserdata.cpp @@ -25,24 +25,24 @@ KeywordGroup ParserData::keywordGroup(Keyword k) const return GroupMisc; } -Keyword ParserData::stringToKeyword(const QString& s) const +Keyword ParserData::stringToKeyword(const TQString& s) const { - QString k = s.lower(); + TQString k = s.lower(); if (m_keywords.contains(k)) return m_keywords[k]; else return Variable; } -QString ParserData::keywordToString(Parse::Keyword k) const +TQString ParserData::keywordToString(Parse::Keyword k) const { - for (QMapConstIterator it = m_keywords.begin(); it != m_keywords.end(); ++it) + for (TQMapConstIterator it = m_keywords.begin(); it != m_keywords.end(); ++it) if (it.data() == k) return it.key(); - return QString(); + return TQString(); } -bool ParserData::registerFunction(const QString& name, Function f) +bool ParserData::registerFunction(const TQString& name, Function f) { m_functions[name.lower()] = f; return true; @@ -114,12 +114,12 @@ ParserData::ParserData() registerStandardFunctions(); } -bool ParserData::isFunction(const QString& name) const +bool ParserData::isFunction(const TQString& name) const { return m_functions.contains(name.lower()); } -const Function& ParserData::function(const QString& name) const +const Function& ParserData::function(const TQString& name) const { return m_functions[name.lower()]; } diff --git a/kommander/widget/parserdata.h b/kommander/widget/parserdata.h index 4c7f8d50..e427e600 100644 --- a/kommander/widget/parserdata.h +++ b/kommander/widget/parserdata.h @@ -19,7 +19,7 @@ #include "parsenode.h" #include "function.h" -#include +#include class ParserData { public: @@ -28,22 +28,22 @@ public: /* Return group of given keyword */ Parse::KeywordGroup keywordGroup(Parse::Keyword k) const; /* Convert string to keyword */ - Parse::Keyword stringToKeyword(const QString& s) const; + Parse::Keyword stringToKeyword(const TQString& s) const; /* Convert keyword to string */ - QString keywordToString(Parse::Keyword k) const; + TQString keywordToString(Parse::Keyword k) const; /* register a function */ - bool registerFunction(const QString& name, Function f); + bool registerFunction(const TQString& name, Function f); /* check if this is a name of standard function */ - bool isFunction(const QString& name) const; + bool isFunction(const TQString& 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; + const Function& function(const TQString& name) const; private: // register standard function void registerStandardFunctions(); - QMap m_keywords; - QMap m_groups; - QMap m_functions; + TQMap m_keywords; + TQMap m_groups; + TQMap m_functions; }; diff --git a/kommander/widgets/aboutdialog.cpp b/kommander/widgets/aboutdialog.cpp index 7f8c3428..9377b377 100644 --- a/kommander/widgets/aboutdialog.cpp +++ b/kommander/widgets/aboutdialog.cpp @@ -9,7 +9,7 @@ // Copyright: See COPYING file that comes with this distribution // // -#include +#include #include "aboutdialog.h" #include "kommanderplugin.h" @@ -21,7 +21,7 @@ #include #include -#include +#include enum Functions { FirstFunction = 159, @@ -36,17 +36,17 @@ enum Functions { LastFunction }; -AboutDialog::AboutDialog(QWidget *parent, const char *name) - : QLabel(parent, name), KommanderWidget(this) +AboutDialog::AboutDialog(TQWidget *parent, const char *name) + : TQLabel(parent, name), KommanderWidget(this) { - QStringList states; + TQStringList states; states << "default"; setStates(states); setDisplayStates(states); if (KommanderWidget::inEditor) { setPixmap(KGlobal::iconLoader()->loadIcon("kommander", KIcon::NoGroup, KIcon::SizeMedium)); - setFrameStyle(QFrame::Box | QFrame::Plain); + setFrameStyle(TQFrame::Box | TQFrame::Plain); setLineWidth(1); setFixedSize(pixmap()->size()); } @@ -55,21 +55,21 @@ AboutDialog::AboutDialog(QWidget *parent, const char *name) m_aboutData = 0L; KommanderPlugin::setDefaultGroup(Group::DCOP); - KommanderPlugin::registerFunction(Initialize, "initialize(QString widget, QString appName, QString icon, QString version, QString copyright)", + KommanderPlugin::registerFunction(Initialize, "initialize(TQString widget, TQString appName, TQString icon, TQString version, TQString 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)", + KommanderPlugin::registerFunction(AddAuthor, "addAuthor(TQString widget, TQString author, TQString task, TQString email, TQString webAddress)", i18n("Add an author. Only the author name is required."), 2, 5); - KommanderPlugin::registerFunction(AddTranslator, "addTranslator(QString widget, QString author, QString email)", + KommanderPlugin::registerFunction(AddTranslator, "addTranslator(TQString widget, TQString author, TQString email)", i18n("Add a translator. Only the name is required."), 2, 3); - KommanderPlugin::registerFunction(SetDescription, "setDescription(QString widget, QString description)", + KommanderPlugin::registerFunction(SetDescription, "setDescription(TQString widget, TQString description)", i18n("Set a short description text."), 2); - KommanderPlugin::registerFunction(SetHomepage, "setHomepage(QString widget, QString homepage)", + KommanderPlugin::registerFunction(SetHomepage, "setHomepage(TQString widget, TQString homepage)", i18n("Set a homepage address."), 2); - KommanderPlugin::registerFunction(SetBugAddress, "setBugAddress(QString widget, QString address)", + KommanderPlugin::registerFunction(SetBugAddress, "setBugAddress(TQString widget, TQString address)", i18n("Set an email address, where bugs can be reported."), 2); - KommanderPlugin::registerFunction(SetLicense, "setLicense(QString widget, QString license)", + KommanderPlugin::registerFunction(SetLicense, "setLicense(TQString widget, TQString 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)", + KommanderPlugin::registerFunction(Version, "version(TQString widget)", i18n("Returns the set version string."), 1); } @@ -80,21 +80,21 @@ AboutDialog::~AboutDialog() m_aboutData = 0L; } -QString AboutDialog::currentState() const +TQString AboutDialog::currentState() const { - return QString("default"); + return TQString("default"); } bool AboutDialog::isKommanderWidget() const { return true; } -QStringList AboutDialog::associatedText() const +TQStringList AboutDialog::associatedText() const { return KommanderWidget::associatedText(); } -void AboutDialog::setAssociatedText(const QStringList& a_at) +void AboutDialog::setAssociatedText(const TQStringList& a_at) { KommanderWidget::setAssociatedText(a_at); } @@ -105,7 +105,7 @@ 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) +void AboutDialog::initialize(const TQString& appName, const TQString &icon, const TQString& version, const TQString& copyright) { delete m_aboutData; m_authors.clear(); @@ -125,7 +125,7 @@ void AboutDialog::initialize(const QString& appName, const QString &icon, const 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) +void AboutDialog::addAuthor(const TQString& author, const TQString &task, const TQString& email, const TQString &webAddress) { if (!m_aboutData) return; @@ -136,7 +136,7 @@ void AboutDialog::addAuthor(const QString& author, const QString &task, const QS m_aboutData->addAuthor(author, task, email, webAddress); } -void AboutDialog::addTranslator(const QString& author, const QString& email) +void AboutDialog::addTranslator(const TQString& author, const TQString& email) { if (!m_aboutData) return; @@ -145,7 +145,7 @@ void AboutDialog::addTranslator(const QString& author, const QString& email) m_aboutData->setTranslator(author, email); } -void AboutDialog::setDescription(const QString& description) +void AboutDialog::setDescription(const TQString& description) { if (!m_aboutData) return; @@ -153,7 +153,7 @@ void AboutDialog::setDescription(const QString& description) m_aboutData->setShortDescription(m_description); } -void AboutDialog::setHomepage(const QString &homepage) +void AboutDialog::setHomepage(const TQString &homepage) { if (!m_aboutData) return; @@ -161,7 +161,7 @@ void AboutDialog::setHomepage(const QString &homepage) m_aboutData->setHomepage(m_homepage); } -void AboutDialog::setBugAddress(const QString &bugAddress) +void AboutDialog::setBugAddress(const TQString &bugAddress) { if (!m_aboutData) return; @@ -169,12 +169,12 @@ void AboutDialog::setBugAddress(const QString &bugAddress) m_aboutData->setBugAddress(m_bugaddress); } -void AboutDialog::setLicense(const QString &key) +void AboutDialog::setLicense(const TQString &key) { if (!m_aboutData) return; - QString license = key.upper(); - QString file; + TQString license = key.upper(); + TQString file; if (key == "GPL_V2") { file = locate("data", "LICENSES/GPL_V2"); @@ -191,7 +191,7 @@ void AboutDialog::setLicense(const QString &key) { file = locate("data", "LICENSES/ARTISTIC"); } - if (file.isEmpty() && !QFile::exists( key )) + if (file.isEmpty() && !TQFile::exists( key )) { if (!key.isEmpty()) m_license = key; @@ -209,12 +209,12 @@ void AboutDialog::setLicense(const QString &key) } -void AboutDialog::setPopulationText(const QString& a_text) +void AboutDialog::setPopulationText(const TQString& a_text) { KommanderWidget::setPopulationText(a_text); } -QString AboutDialog::populationText() const +TQString AboutDialog::populationText() const { return KommanderWidget::populationText(); } @@ -233,7 +233,7 @@ void AboutDialog::execute() } } -QString AboutDialog::handleDCOP(int function, const QStringList& args) +TQString AboutDialog::handleDCOP(int function, const TQStringList& args) { switch (function) { case Initialize: @@ -289,7 +289,7 @@ QString AboutDialog::handleDCOP(int function, const QStringList& args) default: return KommanderWidget::handleDCOP(function, args); } - return QString(); + return TQString(); } #include "aboutdialog.moc" diff --git a/kommander/widgets/aboutdialog.h b/kommander/widgets/aboutdialog.h index 0d0249a7..64d6c9ab 100644 --- a/kommander/widgets/aboutdialog.h +++ b/kommander/widgets/aboutdialog.h @@ -12,7 +12,7 @@ #ifndef ABOUTDIALOG_H #define ABOUTDIALOG_H -#include +#include #include class KAboutApplication; @@ -21,52 +21,52 @@ class KAboutData; /** @author Andras Mantia */ -class AboutDialog : public QLabel, public KommanderWidget +class AboutDialog : public TQLabel, 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) + Q_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false) + Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false) public: - AboutDialog(QWidget *parent = 0, const char *name = 0); + AboutDialog(TQWidget *parent = 0, const char *name = 0); ~AboutDialog(); virtual bool isKommanderWidget() const; - virtual QString currentState() const; + virtual TQString 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&); + virtual TQString handleDCOP(int function, const TQStringList& args); + virtual TQString populationText() const; + virtual void setPopulationText(const TQString&); + virtual TQStringList associatedText() const; + virtual void setAssociatedText(const TQStringList&); 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); + void initialize(const TQString& appName, const TQString &icon, const TQString& version, const TQString& copyright); + void addAuthor(const TQString& author, const TQString &task, const TQString& email, const TQString &webAddress); + void addTranslator(const TQString& author, const TQString& email); + void setDescription(const TQString& description); + void setHomepage(const TQString &homepage); + void setBugAddress(const TQString &bugAddress); + void setLicense(const TQString &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; + TQString m_version; + TQString m_appName; + TQString m_copyright; + TQString m_icon; + TQString m_bugaddress; + TQStringList m_authors; + TQStringList m_emails; + TQStringList m_tasks; + TQStringList m_addresses; + TQString m_description; + TQString m_homepage; + TQString m_license; }; #endif diff --git a/kommander/widgets/buttongroup.cpp b/kommander/widgets/buttongroup.cpp index 0a6eafc2..751c8e5c 100644 --- a/kommander/widgets/buttongroup.cpp +++ b/kommander/widgets/buttongroup.cpp @@ -17,12 +17,12 @@ #include /* QT INCLUDES */ -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include /* OTHER INCLUDES */ #include @@ -38,17 +38,17 @@ enum Functions { LastFunction }; -ButtonGroup::ButtonGroup(QWidget *a_parent, const char *a_name) - : QButtonGroup(a_parent, a_name), KommanderWidget(this) +ButtonGroup::ButtonGroup(TQWidget *a_parent, const char *a_name) + : TQButtonGroup(a_parent, a_name), KommanderWidget(this) { - QStringList states; + TQStringList 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); + KommanderPlugin::registerFunction(BG_selectedId, "selectedId(TQString widget)", i18n("Returns the ID of the selected button."), 1); } @@ -56,7 +56,7 @@ ButtonGroup::~ButtonGroup() { } -QString ButtonGroup::currentState() const +TQString ButtonGroup::currentState() const { if (!isCheckable() || isChecked()) return "checked"; @@ -69,22 +69,22 @@ bool ButtonGroup::isKommanderWidget() const return true; } -QStringList ButtonGroup::associatedText() const +TQStringList ButtonGroup::associatedText() const { return KommanderWidget::associatedText(); } -void ButtonGroup::setAssociatedText(const QStringList& a_at) +void ButtonGroup::setAssociatedText(const TQStringList& a_at) { KommanderWidget::setAssociatedText(a_at); } -void ButtonGroup::setPopulationText(const QString& a_text) +void ButtonGroup::setPopulationText(const TQString& a_text) { KommanderWidget::setPopulationText( a_text ); } -QString ButtonGroup::populationText() const +TQString ButtonGroup::populationText() const { return KommanderWidget::populationText(); } @@ -94,16 +94,16 @@ void ButtonGroup::populate() //FIXME: implement } -void ButtonGroup::showEvent(QShowEvent* e) +void ButtonGroup::showEvent(TQShowEvent* e) { - QButtonGroup::showEvent(e); + TQButtonGroup::showEvent(e); emit widgetOpened(); } -void ButtonGroup::contextMenuEvent( QContextMenuEvent * e ) +void ButtonGroup::contextMenuEvent( TQContextMenuEvent * e ) { e->accept(); - QPoint p = e->globalPos(); + TQPoint p = e->globalPos(); emit contextMenuRequested(p.x(), p.y()); } @@ -113,29 +113,29 @@ bool ButtonGroup::isFunctionSupported(int f) } -QString ButtonGroup::handleDCOP(int function, const QStringList& args) +TQString ButtonGroup::handleDCOP(int function, const TQStringList& args) { switch (function) { case DCOP::text: { - QString text; + TQString text; for (int i = 0; i < count(); i++) if (dynamic_cast(find(i))) text += (dynamic_cast(find(i)))->evalAssociatedText(); return text; } case DCOP::checked: - return QString::number(isChecked()); + return TQString::number(isChecked()); case DCOP::setChecked: setCheckable(true); setChecked(args[0] != "false"); break; case BG_selectedId: - return QString::number(this->selectedId() ); + return TQString::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()); + TQString geo = TQString::number(this->x())+" "+TQString::number(this->y())+" "+TQString::number(this->width())+" "+TQString::number(this->height()); return geo; break; } @@ -144,7 +144,7 @@ QString ButtonGroup::handleDCOP(int function, const QStringList& args) break; case DCOP::setBackgroundColor: { - QColor color; + TQColor color; color.setNamedColor(args[0]); this->setPaletteBackgroundColor(color); break; @@ -152,7 +152,7 @@ QString ButtonGroup::handleDCOP(int function, const QStringList& args) default: return KommanderWidget::handleDCOP(function, args); } - return QString(); + return TQString(); } diff --git a/kommander/widgets/buttongroup.h b/kommander/widgets/buttongroup.h index 0e123864..f5a01be3 100644 --- a/kommander/widgets/buttongroup.h +++ b/kommander/widgets/buttongroup.h @@ -19,10 +19,10 @@ /* KDE INCLUDES */ /* QT INCLUDES */ -#include -#include -#include -#include +#include +#include +#include +#include /* OTHER INCLUDES */ #include @@ -31,36 +31,36 @@ class QWidget; class QShowEvent; -class KOMMANDER_EXPORT ButtonGroup : public QButtonGroup, public KommanderWidget +class KOMMANDER_EXPORT ButtonGroup : public TQButtonGroup, 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(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false) + Q_PROPERTY(TQStringList 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(TQWidget *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 void setAssociatedText(const TQStringList&); + virtual TQStringList associatedText() const; + virtual TQString currentState() const; + virtual TQString populationText() const; + virtual void setPopulationText(const TQString&); - virtual QString handleDCOP(int function, const QStringList& args); + virtual TQString handleDCOP(int function, const TQStringList& args); virtual bool isFunctionSupported(int function); public slots: virtual void populate(); signals: void widgetOpened(); - void widgetTextChanged(const QString&); + void widgetTextChanged(const TQString&); void contextMenuRequested(int xpos, int ypos); protected: - void showEvent(QShowEvent* e); - void contextMenuEvent( QContextMenuEvent * e ); + void showEvent(TQShowEvent* e); + void contextMenuEvent( TQContextMenuEvent * e ); private: }; diff --git a/kommander/widgets/checkbox.cpp b/kommander/widgets/checkbox.cpp index e78dbdb8..f7fe20be 100644 --- a/kommander/widgets/checkbox.cpp +++ b/kommander/widgets/checkbox.cpp @@ -16,27 +16,27 @@ /* KDE INCLUDES */ /* QT INCLUDES */ -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include /* OTHER INCLUDES */ #include #include "checkbox.h" -CheckBox::CheckBox(QWidget *a_parent, const char *a_name) - : QCheckBox(a_parent, a_name), KommanderWidget(this) +CheckBox::CheckBox(TQWidget *a_parent, const char *a_name) + : TQCheckBox(a_parent, a_name), KommanderWidget(this) { - QStringList states; + TQStringList states; states << "unchecked"; states << "semichecked"; states << "checked"; setStates(states); - QStringList displayStates; + TQStringList displayStates; displayStates << "checked"; displayStates << "semichecked"; displayStates << "unchecked"; @@ -47,15 +47,15 @@ CheckBox::~CheckBox() { } -QString CheckBox::currentState() const +TQString CheckBox::currentState() const { - if (state() == QButton::Off) + if (state() == TQButton::Off) return "unchecked"; - else if (state() == QButton::NoChange) + else if (state() == TQButton::NoChange) return "semichecked"; - else if (state() == QButton::On) + else if (state() == TQButton::On) return "checked"; - return QString(); + return TQString(); } bool CheckBox::isKommanderWidget() const @@ -63,22 +63,22 @@ bool CheckBox::isKommanderWidget() const return true; } -QStringList CheckBox::associatedText() const +TQStringList CheckBox::associatedText() const { return KommanderWidget::associatedText(); } -void CheckBox::setAssociatedText(const QStringList & a_at) +void CheckBox::setAssociatedText(const TQStringList & a_at) { KommanderWidget::setAssociatedText(a_at); } -void CheckBox::setPopulationText(const QString & a_text) +void CheckBox::setPopulationText(const TQString & a_text) { KommanderWidget::setPopulationText(a_text); } -QString CheckBox::populationText() const +TQString CheckBox::populationText() const { return KommanderWidget::populationText(); } @@ -88,15 +88,15 @@ void CheckBox::populate() setWidgetText(KommanderWidget::evalAssociatedText(populationText())); } -void CheckBox::setWidgetText(const QString& a_text) +void CheckBox::setWidgetText(const TQString& a_text) { setText(a_text); emit widgetTextChanged(a_text); } -void CheckBox::showEvent(QShowEvent* e) +void CheckBox::showEvent(TQShowEvent* e) { - QCheckBox::showEvent(e); + TQCheckBox::showEvent(e); emit widgetOpened(); } @@ -105,14 +105,14 @@ 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 ) +void CheckBox::contextMenuEvent( TQContextMenuEvent * e ) { e->accept(); - QPoint p = e->globalPos(); + TQPoint p = e->globalPos(); emit contextMenuRequested(p.x(), p.y()); } -QString CheckBox::handleDCOP(int function, const QStringList& args) +TQString CheckBox::handleDCOP(int function, const TQStringList& args) { switch (function) { case DCOP::text: @@ -121,13 +121,13 @@ QString CheckBox::handleDCOP(int function, const QStringList& args) setWidgetText(args[0]); break; case DCOP::checked: - return QString::number(isChecked()); + return TQString::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()); + TQString geo = TQString::number(this->x())+" "+TQString::number(this->y())+" "+TQString::number(this->width())+" "+TQString::number(this->height()); return geo; break; } @@ -136,7 +136,7 @@ QString CheckBox::handleDCOP(int function, const QStringList& args) break; case DCOP::setBackgroundColor: { - QColor color; + TQColor color; color.setNamedColor(args[0]); this->setPaletteBackgroundColor(color); break; @@ -144,7 +144,7 @@ QString CheckBox::handleDCOP(int function, const QStringList& args) default: return KommanderWidget::handleDCOP(function, args); } - return QString(); + return TQString(); } diff --git a/kommander/widgets/checkbox.h b/kommander/widgets/checkbox.h index c9743434..f3da677f 100644 --- a/kommander/widgets/checkbox.h +++ b/kommander/widgets/checkbox.h @@ -19,10 +19,10 @@ /* KDE INCLUDES */ /* QT INCLUDES */ -#include -#include -#include -#include +#include +#include +#include +#include /* OTHER INCLUDES */ #include @@ -31,36 +31,36 @@ class QWidget; class QShowEvent; -class KOMMANDER_EXPORT CheckBox : public QCheckBox, public KommanderWidget +class KOMMANDER_EXPORT CheckBox : public TQCheckBox, 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(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false) + Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false) Q_PROPERTY(bool KommanderWidget READ isKommanderWidget) public: - CheckBox(QWidget *a_parent, const char *a_name); + CheckBox(TQWidget *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 void setAssociatedText(const TQStringList&); + virtual TQStringList associatedText() const; + virtual TQString currentState() const; + virtual TQString populationText() const; + virtual void setPopulationText(const TQString&); - virtual QString handleDCOP(int function, const QStringList& args); + virtual TQString handleDCOP(int function, const TQStringList& args); virtual bool isFunctionSupported(int function); public slots: - virtual void setWidgetText(const QString&); + virtual void setWidgetText(const TQString&); virtual void populate(); signals: void widgetOpened(); - void widgetTextChanged(const QString&); + void widgetTextChanged(const TQString&); void contextMenuRequested(int xpos, int ypos); protected: - void showEvent(QShowEvent *e); - void contextMenuEvent( QContextMenuEvent * e ); + void showEvent(TQShowEvent *e); + void contextMenuEvent( TQContextMenuEvent * e ); private: }; diff --git a/kommander/widgets/closebutton.cpp b/kommander/widgets/closebutton.cpp index 9da9f1a0..d30a9346 100644 --- a/kommander/widgets/closebutton.cpp +++ b/kommander/widgets/closebutton.cpp @@ -19,45 +19,45 @@ #include /* QT INCLUDES */ -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include /* OTHER INCLUDES */ #include #include "closebutton.h" -CloseButton::CloseButton(QWidget* a_parent, const char* a_name) +CloseButton::CloseButton(TQWidget* a_parent, const char* a_name) : KPushButton(a_parent, a_name), KommanderWidget(this) { - QStringList states; + TQStringList states; states << "default"; setStates(states); setDisplayStates(states); setWriteStdout(true); - connect(this, SIGNAL(clicked()), this, SLOT(startProcess())); + connect(this, TQT_SIGNAL(clicked()), this, TQT_SLOT(startProcess())); - QObject *parent = this; + TQObject *parent = this; while (parent->parent() != 0) { parent = parent->parent(); - if (parent->inherits("QDialog")) + if (parent->inherits("TQDialog")) break; } - connect(this, SIGNAL(clicked()), parent, SLOT(reject())); + connect(this, TQT_SIGNAL(clicked()), parent, TQT_SLOT(reject())); } CloseButton::~CloseButton() { } -QString CloseButton::currentState() const +TQString CloseButton::currentState() const { - return QString("default"); + return TQString("default"); } bool CloseButton::isKommanderWidget() const @@ -65,22 +65,22 @@ bool CloseButton::isKommanderWidget() const return true; } -QStringList CloseButton::associatedText() const +TQStringList CloseButton::associatedText() const { return KommanderWidget::associatedText(); } -void CloseButton::setAssociatedText(const QStringList& a_at) +void CloseButton::setAssociatedText(const TQStringList& a_at) { KommanderWidget::setAssociatedText(a_at); } -void CloseButton::setPopulationText(const QString& a_text) +void CloseButton::setPopulationText(const TQString& a_text) { KommanderWidget::setPopulationText(a_text); } -QString CloseButton::populationText() const +TQString CloseButton::populationText() const { return KommanderWidget::populationText(); } @@ -90,7 +90,7 @@ void CloseButton::populate() setWidgetText(KommanderWidget::evalAssociatedText(populationText())); } -void CloseButton::setWidgetText(const QString& a_text) +void CloseButton::setWidgetText(const TQString& a_text) { setText(a_text); emit widgetTextChanged(a_text); @@ -98,17 +98,17 @@ void CloseButton::setWidgetText(const QString& a_text) void CloseButton::startProcess() { - QString at = evalAssociatedText(); + TQString 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 *, + connect(process, TQT_SIGNAL(processExited(KProcess *)), TQT_SLOT(endProcess(KProcess *))); + connect(process, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)), TQT_SLOT(appendOutput(KProcess *, char *, int))); - connect(process, SIGNAL(receivedStderr(KProcess *, char *, int)), SLOT(appendOutput(KProcess *, + connect(process, TQT_SIGNAL(receivedStderr(KProcess *, char *, int)), TQT_SLOT(appendOutput(KProcess *, char *, int))); if (!process->start(KProcess::Block, KProcess::Stdout)) @@ -128,7 +128,7 @@ void CloseButton::appendOutput(KProcess *, char *a_buffer, int a_len) for (int i = 0; i < a_len; ++i) buffer[i] = a_buffer[i]; - QString bufferString(buffer); + TQString bufferString(buffer); m_output += bufferString; if (writeStdout()) { @@ -155,9 +155,9 @@ void CloseButton::setWriteStdout(bool a_enable) m_writeStdout = a_enable; } -void CloseButton::showEvent(QShowEvent *e) +void CloseButton::showEvent(TQShowEvent *e) { - QPushButton::showEvent(e); + TQPushButton::showEvent(e); emit widgetOpened(); } @@ -166,7 +166,7 @@ bool CloseButton::isFunctionSupported(int f) return f == DCOP::text || f == DCOP::setText; } -QString CloseButton::handleDCOP(int function, const QStringList& args) +TQString CloseButton::handleDCOP(int function, const TQStringList& args) { switch (function) { case DCOP::text: @@ -177,7 +177,7 @@ QString CloseButton::handleDCOP(int function, const QStringList& args) default: return KommanderWidget::handleDCOP(function, args); } - return QString(); + return TQString(); } #include "closebutton.moc" diff --git a/kommander/widgets/closebutton.h b/kommander/widgets/closebutton.h index 8b7aa57a..20c44eac 100644 --- a/kommander/widgets/closebutton.h +++ b/kommander/widgets/closebutton.h @@ -22,7 +22,7 @@ #include /* QT INCLUDES */ -#include +#include /* OTHER INCLUDES */ #include @@ -34,38 +34,38 @@ 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(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false) + Q_PROPERTY(TQStringList 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(TQWidget* 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&); + virtual void setAssociatedText(const TQStringList&); + virtual TQStringList associatedText() const; + virtual TQString currentState() const; + virtual TQString populationText() const; + virtual void setPopulationText(const TQString&); bool writeStdout() const; - virtual QString handleDCOP(int function, const QStringList& args); + virtual TQString handleDCOP(int function, const TQStringList& args); virtual bool isFunctionSupported(int function); public slots: virtual void setWriteStdout(bool); - virtual void setWidgetText(const QString &); + virtual void setWidgetText(const TQString &); virtual void startProcess(); virtual void appendOutput(KProcess*, char*, int); virtual void endProcess(KProcess*); virtual void populate(); signals: void widgetOpened(); - void widgetTextChanged(const QString&); + void widgetTextChanged(const TQString&); protected: bool m_writeStdout; - QString m_output; - void showEvent(QShowEvent* e); + TQString m_output; + void showEvent(TQShowEvent* e); private: }; diff --git a/kommander/widgets/combobox.cpp b/kommander/widgets/combobox.cpp index 250d3820..cab29337 100644 --- a/kommander/widgets/combobox.cpp +++ b/kommander/widgets/combobox.cpp @@ -19,10 +19,10 @@ #include /* QT INCLUDES */ -#include -#include -#include -#include +#include +#include +#include +#include /* OTHER INCLUDES */ #include @@ -36,18 +36,18 @@ enum Functions { }; -ComboBox::ComboBox(QWidget *a_parent, const char *a_name) +ComboBox::ComboBox(TQWidget *a_parent, const char *a_name) : KComboBox(a_parent, a_name), KommanderWidget(this) { - QStringList states; + TQStringList states; states << "default"; setStates(states); setDisplayStates(states); - connect(this, SIGNAL(activated(int)), this, SLOT(emitWidgetTextChanged(int))); + connect(this, TQT_SIGNAL(activated(int)), this, TQT_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); + KommanderPlugin::registerFunction(popupList, "popupList(TQString widget)", i18n("Make the ComboBox expose it's list without mousing around."), 1); } @@ -55,9 +55,9 @@ ComboBox::~ComboBox() { } -QString ComboBox::currentState() const +TQString ComboBox::currentState() const { - return QString("default"); + return TQString("default"); } bool ComboBox::isKommanderWidget() const @@ -65,22 +65,22 @@ bool ComboBox::isKommanderWidget() const return true; } -QStringList ComboBox::associatedText() const +TQStringList ComboBox::associatedText() const { return KommanderWidget::associatedText(); } -void ComboBox::setAssociatedText(const QStringList& a_at) +void ComboBox::setAssociatedText(const TQStringList& a_at) { KommanderWidget::setAssociatedText(a_at); } -void ComboBox::setPopulationText(const QString& a_text) +void ComboBox::setPopulationText(const TQString& a_text) { KommanderWidget::setPopulationText(a_text); } -QString ComboBox::populationText() const +TQString ComboBox::populationText() const { return KommanderWidget::populationText(); } @@ -90,10 +90,10 @@ void ComboBox::populate() setWidgetText(KommanderWidget::evalAssociatedText( populationText())); } -void ComboBox::setWidgetText(const QString& a_text) +void ComboBox::setWidgetText(const TQString& a_text) { clear(); - insertStringList(QStringList::split("\n", a_text)); + insertStringList(TQStringList::split("\n", a_text)); emit widgetTextChanged(a_text); } @@ -102,16 +102,16 @@ void ComboBox::emitWidgetTextChanged(int a_index) emit widgetTextChanged(text(a_index)); } -void ComboBox::showEvent(QShowEvent *e) +void ComboBox::showEvent(TQShowEvent *e) { - QComboBox::showEvent( e ); + TQComboBox::showEvent( e ); emit widgetOpened(); } -void ComboBox::contextMenuEvent( QContextMenuEvent * e ) +void ComboBox::contextMenuEvent( TQContextMenuEvent * e ) { e->accept(); - QPoint p = e->globalPos(); + TQPoint p = e->globalPos(); emit contextMenuRequested(p.x(), p.y()); } @@ -124,7 +124,7 @@ bool ComboBox::isFunctionSupported(int f) 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) +TQString ComboBox::handleDCOP(int function, const TQStringList& args) { switch (function) { case DCOP::text: @@ -135,7 +135,7 @@ QString ComboBox::handleDCOP(int function, const QStringList& args) case DCOP::selection: return currentText(); case DCOP::currentItem: - return QString::number(currentItem()); + return TQString::number(currentItem()); case DCOP::setCurrentItem: setCurrentItem(args[0].toUInt()); break; @@ -153,19 +153,19 @@ QString ComboBox::handleDCOP(int function, const QStringList& args) insertItem(args[0], args[1].toInt()); break; case DCOP::insertItems: - insertStringList(QStringList::split("\n", args[0]), args[1].toInt()); + insertStringList(TQStringList::split("\n", args[0]), args[1].toInt()); break; case DCOP::addUniqueItem: for (int i=0; isetPaletteBackgroundColor(color); break; } case popupList: - QComboBox::popup(); + TQComboBox::popup(); break; case DCOP::geometry: { - QString geo = QString::number(this->x())+" "+QString::number(this->y())+" "+QString::number(this->width())+" "+QString::number(this->height()); + TQString geo = TQString::number(this->x())+" "+TQString::number(this->y())+" "+TQString::number(this->width())+" "+TQString::number(this->height()); return geo; break; } case DCOP::hasFocus: - return QString::number(this->hasFocus()); + return TQString::number(this->hasFocus()); break; default: return KommanderWidget::handleDCOP(function, args); } - return QString(); + return TQString(); } #include "combobox.moc" diff --git a/kommander/widgets/combobox.h b/kommander/widgets/combobox.h index 916846d9..6dd4fb71 100644 --- a/kommander/widgets/combobox.h +++ b/kommander/widgets/combobox.h @@ -20,9 +20,9 @@ /* KDE INCLUDES */ /* QT INCLUDES */ -#include -#include -#include +#include +#include +#include /* OTHER INCLUDES */ #include @@ -35,35 +35,35 @@ 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(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false) + Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false) Q_PROPERTY(bool KommanderWidget READ isKommanderWidget) public: - ComboBox(QWidget *a_parent, const char *a_name); + ComboBox(TQWidget *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 void setAssociatedText(const TQStringList&); + virtual TQStringList associatedText() const; + virtual TQString currentState() const; + virtual TQString populationText() const; + virtual void setPopulationText(const TQString&); - virtual QString handleDCOP(int function, const QStringList& args); + virtual TQString handleDCOP(int function, const TQStringList& args); virtual bool isFunctionSupported(int function); public slots: - virtual void setWidgetText(const QString&); + virtual void setWidgetText(const TQString&); virtual void populate(); virtual void emitWidgetTextChanged(int); signals: void widgetOpened(); - void widgetTextChanged(const QString&); + void widgetTextChanged(const TQString&); void contextMenuRequested(int xpos, int ypos); protected: - void showEvent(QShowEvent *e); - void contextMenuEvent( QContextMenuEvent * e ); + void showEvent(TQShowEvent *e); + void contextMenuEvent( TQContextMenuEvent * e ); private: }; diff --git a/kommander/widgets/datepicker.cpp b/kommander/widgets/datepicker.cpp index c1b1f834..928e1b81 100644 --- a/kommander/widgets/datepicker.cpp +++ b/kommander/widgets/datepicker.cpp @@ -17,19 +17,19 @@ /* KDE INCLUDES */ /* QT INCLUDES */ -#include -#include -#include -#include +#include +#include +#include +#include /* OTHER INCLUDES */ #include #include "datepicker.h" -DatePicker::DatePicker(QWidget *a_parent, const char *a_name) +DatePicker::DatePicker(TQWidget *a_parent, const char *a_name) : KDatePicker(a_parent, a_name), KommanderWidget(this) { - QStringList states; + TQStringList states; states << "default"; setStates(states); setDisplayStates(states); @@ -39,9 +39,9 @@ DatePicker::~DatePicker() { } -QString DatePicker::currentState() const +TQString DatePicker::currentState() const { - return QString("default"); + return TQString("default"); } bool DatePicker::isKommanderWidget() const @@ -49,22 +49,22 @@ bool DatePicker::isKommanderWidget() const return true; } -QStringList DatePicker::associatedText() const +TQStringList DatePicker::associatedText() const { return KommanderWidget::associatedText(); } -void DatePicker::setAssociatedText(const QStringList& a_at) +void DatePicker::setAssociatedText(const TQStringList& a_at) { KommanderWidget::setAssociatedText(a_at); } -void DatePicker::setPopulationText(const QString& a_text) +void DatePicker::setPopulationText(const TQString& a_text) { KommanderWidget::setPopulationText(a_text); } -QString DatePicker::populationText() const +TQString DatePicker::populationText() const { return KommanderWidget::populationText(); } @@ -74,27 +74,27 @@ void DatePicker::populate() setWidgetText(KommanderWidget::evalAssociatedText( populationText())); } -void DatePicker::setWidgetText(const QString& a_text) +void DatePicker::setWidgetText(const TQString& a_text) { - setDate(QDate::fromString(a_text, Qt::ISODate)); + setDate(TQDate::fromString(a_text, Qt::ISODate)); emit widgetTextChanged(a_text); } -QString DatePicker::widgetText() const +TQString DatePicker::widgetText() const { return date().toString(Qt::ISODate); } -void DatePicker::showEvent(QShowEvent *e) +void DatePicker::showEvent(TQShowEvent *e) { KDatePicker::showEvent( e ); emit widgetOpened(); } -void DatePicker::contextMenuEvent( QContextMenuEvent * e ) +void DatePicker::contextMenuEvent( TQContextMenuEvent * e ) { e->accept(); - QPoint p = e->globalPos(); + TQPoint p = e->globalPos(); emit contextMenuRequested(p.x(), p.y()); } @@ -104,27 +104,27 @@ 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) +TQString DatePicker::handleDCOP(int function, const TQStringList& args) { switch (function) { case DCOP::text: return date().toString(Qt::ISODate); case DCOP::setText: - setDate(QDate::fromString(args[0], Qt::ISODate)); + setDate(TQDate::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()); + TQString geo = TQString::number(this->x())+" "+TQString::number(this->y())+" "+TQString::number(this->width())+" "+TQString::number(this->height()); return geo; break; } case DCOP::hasFocus: - return QString::number(this->hasFocus()); + return TQString::number(this->hasFocus()); break; default: return KommanderWidget::handleDCOP(function, args); } - return QString(); + return TQString(); } #include "datepicker.moc" diff --git a/kommander/widgets/datepicker.h b/kommander/widgets/datepicker.h index 0383937a..242f1a65 100644 --- a/kommander/widgets/datepicker.h +++ b/kommander/widgets/datepicker.h @@ -20,9 +20,9 @@ /* KDE INCLUDES */ /* QT INCLUDES */ -#include -#include -#include +#include +#include +#include /* OTHER INCLUDES */ #include @@ -35,35 +35,35 @@ 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(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false) + Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false) Q_PROPERTY(bool KommanderWidget READ isKommanderWidget) public: - DatePicker(QWidget *a_parent, const char *a_name); + DatePicker(TQWidget *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 void setAssociatedText(const TQStringList&); + virtual TQStringList associatedText() const; + virtual TQString currentState() const; + virtual TQString populationText() const; + virtual void setPopulationText(const TQString&); + virtual TQString widgetText() const; - virtual QString handleDCOP(int function, const QStringList& args); + virtual TQString handleDCOP(int function, const TQStringList& args); virtual bool isFunctionSupported(int function); public slots: - virtual void setWidgetText(const QString&); + virtual void setWidgetText(const TQString&); virtual void populate(); signals: void widgetOpened(); - void widgetTextChanged(const QString&); + void widgetTextChanged(const TQString&); void contextMenuRequested(int xpos, int ypos); protected: - void showEvent(QShowEvent *e); - void contextMenuEvent( QContextMenuEvent * e ); + void showEvent(TQShowEvent *e); + void contextMenuEvent( TQContextMenuEvent * e ); private: }; diff --git a/kommander/widgets/dialog.cpp b/kommander/widgets/dialog.cpp index ef9b727b..fd3b0b27 100644 --- a/kommander/widgets/dialog.cpp +++ b/kommander/widgets/dialog.cpp @@ -17,14 +17,14 @@ #include /* QT INCLUDES */ -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include /* OTHER INCLUDES */ #include @@ -40,10 +40,10 @@ enum Functions { 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) +Dialog::Dialog(TQWidget *a_parent, const char *a_name, bool a_modal, int a_flags) + : TQDialog(a_parent, a_name, a_modal, a_flags), KommanderWindow(this) { - QStringList states; + TQStringList states; states << "default"; states << "initialization"; states << "destroy"; @@ -53,9 +53,9 @@ Dialog::Dialog(QWidget *a_parent, const char *a_name, bool a_modal, int a_flags) 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); + KommanderPlugin::registerFunction(D_focusWidget, "focusWidget(TQString widget)", i18n("The name of the widget having focus"), 1); + KommanderPlugin::registerFunction(D_waitCursor, "waitCursor(TQString 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(TQString widget)", i18n("Restore normal curser. NOTE: must be called as many times as wait was."), 1); } Dialog::~Dialog() @@ -64,9 +64,9 @@ Dialog::~Dialog() destroy(); } -QString Dialog::currentState() const +TQString Dialog::currentState() const { - return QString("default"); + return TQString("default"); } bool Dialog::isKommanderWidget() const @@ -86,22 +86,22 @@ void Dialog::setUseInternalParser(bool b) } -QStringList Dialog::associatedText() const +TQStringList Dialog::associatedText() const { return KommanderWidget::associatedText(); } -void Dialog::setAssociatedText(const QStringList& a_at) +void Dialog::setAssociatedText(const TQStringList& a_at) { KommanderWidget::setAssociatedText(a_at); } -void Dialog::setPopulationText(const QString& a_text) +void Dialog::setPopulationText(const TQString& a_text) { KommanderWidget::setPopulationText( a_text ); } -QString Dialog::populationText() const +TQString Dialog::populationText() const { return KommanderWidget::populationText(); } @@ -113,7 +113,7 @@ void Dialog::populate() void Dialog::initialize() { - const QStringList assoc = associatedText(); + const TQStringList assoc = associatedText(); if (assoc.count() > 1 && !assoc[1].isEmpty()) { MyProcess proc(this); @@ -123,7 +123,7 @@ void Dialog::initialize() void Dialog::destroy() { - const QStringList assoc = associatedText(); + const TQStringList assoc = associatedText(); if (assoc.count() > 2 && !assoc[2].isEmpty()) { MyProcess proc(this); @@ -132,7 +132,7 @@ void Dialog::destroy() } -void Dialog::setWidgetText(const QString& a_text) +void Dialog::setWidgetText(const TQString& a_text) { setCaption(a_text); emit widgetTextChanged(a_text); @@ -140,7 +140,7 @@ void Dialog::setWidgetText(const QString& a_text) void Dialog::exec() { - QDialog::exec(); + TQDialog::exec(); emit finished(); } @@ -148,14 +148,14 @@ 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 +//QWidget's show method to show the widgets, but don't do any TQDialog specific //task if (!m_firstShow) { - QWidget::show(); + TQWidget::show(); } else { - QDialog::show(); + TQDialog::show(); if (!inEditor) initialize(); m_firstShow = false; @@ -166,28 +166,28 @@ void Dialog::done(int r) { /* if (!inEditor) destroy();*/ - QDialog::done(r); + TQDialog::done(r); } -void Dialog::showEvent(QShowEvent *e) +void Dialog::showEvent(TQShowEvent *e) { - QDialog::showEvent( e ); + TQDialog::showEvent( e ); emit widgetOpened(); } -void Dialog::keyPressEvent( QKeyEvent *e ) +void Dialog::keyPressEvent( TQKeyEvent *e ) { if ( e->state() == 0 && e->key() == Key_Escape) return; else - QDialog::keyPressEvent(e); + TQDialog::keyPressEvent(e); } -void Dialog::contextMenuEvent( QContextMenuEvent * e ) +void Dialog::contextMenuEvent( TQContextMenuEvent * e ) { - QDialog::contextMenuEvent( e ); - QPoint p = e->globalPos(); + TQDialog::contextMenuEvent( e ); + TQPoint p = e->globalPos(); emit contextMenuRequested(p.x(), p.y()); } @@ -196,7 +196,7 @@ 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) +TQString Dialog::handleDCOP(int function, const TQStringList& args) { switch (function) { case DCOP::text: @@ -205,21 +205,21 @@ QString Dialog::handleDCOP(int function, const QStringList& args) setWidgetText(args[0]); break; case DCOP::geometry: - return QString::number(this->x())+" "+QString::number(this->y())+" "+QString::number(this->width())+" "+QString::number(this->height()); + return TQString::number(this->x())+" "+TQString::number(this->y())+" "+TQString::number(this->width())+" "+TQString::number(this->height()); break; case D_focusWidget: return focusWidget()->name(); break; case D_waitCursor: - QApplication::setOverrideCursor(QCursor(Qt::WaitCursor)); + TQApplication::setOverrideCursor(TQCursor(Qt::WaitCursor)); break; case D_restoreCursor: - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); break; default: return KommanderWidget::handleDCOP(function, args); } - return QString(); + return TQString(); } diff --git a/kommander/widgets/dialog.h b/kommander/widgets/dialog.h index 091ff890..794e5dbc 100644 --- a/kommander/widgets/dialog.h +++ b/kommander/widgets/dialog.h @@ -20,46 +20,46 @@ /* KDE INCLUDES */ /* QT INCLUDES */ -#include +#include /* OTHER INCLUDES */ #include #include class QShowEvent; -class KOMMANDER_EXPORT Dialog : public QDialog, public KommanderWindow +class KOMMANDER_EXPORT Dialog : public TQDialog, 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(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false) + Q_PROPERTY(TQStringList 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_PROPERTY(TQString shebang READ Shebang WRITE setShebang DESIGNABLE true) Q_OVERRIDE(bool modal DESIGNABLE false) public: - Dialog(QWidget *, const char *, bool = true, int=0); + Dialog(TQWidget *, 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 setAssociatedText(const TQStringList&); + virtual TQStringList associatedText() const; + virtual TQString currentState() const; + virtual TQString populationText() const; + virtual void setPopulationText(const TQString&); 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; } + TQString Shebang() const { return m_shebang; } + void setShebang(const TQString &text) { m_shebang = text; } - virtual QString handleDCOP(int function, const QStringList& args); + virtual TQString handleDCOP(int function, const TQStringList& args); virtual bool isFunctionSupported(int function); public slots: - virtual void setWidgetText(const QString&); + virtual void setWidgetText(const TQString&); virtual void exec(); virtual void populate(); virtual void done(int r); @@ -69,19 +69,19 @@ protected slots: signals: void widgetOpened(); - void widgetTextChanged(const QString&); + void widgetTextChanged(const TQString&); void finished(); void contextMenuRequested(int xpos, int ypos); protected: - void showEvent( QShowEvent *e ); - void keyPressEvent( QKeyEvent * ); - void contextMenuEvent( QContextMenuEvent * e ); + void showEvent( TQShowEvent *e ); + void keyPressEvent( TQKeyEvent * ); + void contextMenuEvent( TQContextMenuEvent * e ); private: - QString m_fileName; + TQString 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 + TQString m_shebang; //#!/usr/bin/kmdr-executor or similar }; #endif diff --git a/kommander/widgets/execbutton.cpp b/kommander/widgets/execbutton.cpp index 69d06f8b..eccfe306 100644 --- a/kommander/widgets/execbutton.cpp +++ b/kommander/widgets/execbutton.cpp @@ -20,14 +20,14 @@ #include /* QT INCLUDES */ -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include /* OTHER INCLUDES */ #include @@ -47,30 +47,30 @@ enum Functions { LastFunction }; -ExecButton::ExecButton(QWidget* a_parent, const char* a_name) +ExecButton::ExecButton(TQWidget* a_parent, const char* a_name) : KPushButton(a_parent, a_name), KommanderWidget(this) { - QStringList states; + TQStringList states; states << "default"; setStates(states); setDisplayStates(states); setWriteStdout(true); setBlockGUI(Button); - connect(this, SIGNAL(clicked()), this, SLOT(startProcess())); + connect(this, TQT_SIGNAL(clicked()), this, TQT_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); + KommanderPlugin::registerFunction(EB_isOn, "isOn(TQString widget)", i18n("For use only when button is togle type."), 1); + KommanderPlugin::registerFunction(EB_setPopup, "setPopup(TQString widget, TQString Menu)", i18n("Associate a Kommander PopupMenu with this ExecButton."), 2); + KommanderPlugin::registerFunction(EB_setButtonText, "setButtonText(TQString widget, TQString Text)", i18n("Set the text on the ExecButton."), 2); } ExecButton::~ExecButton() { } -QString ExecButton::currentState() const +TQString ExecButton::currentState() const { - return QString("default"); + return TQString("default"); } bool ExecButton::isKommanderWidget() const @@ -78,33 +78,33 @@ bool ExecButton::isKommanderWidget() const return true; } -QStringList ExecButton::associatedText() const +TQStringList ExecButton::associatedText() const { return KommanderWidget::associatedText(); } -void ExecButton::setAssociatedText(const QStringList& a_at) +void ExecButton::setAssociatedText(const TQStringList& a_at) { KommanderWidget::setAssociatedText(a_at); } -void ExecButton::setPopulationText(const QString& a_text) +void ExecButton::setPopulationText(const TQString& a_text) { KommanderWidget::setPopulationText(a_text); } -QString ExecButton::populationText() const +TQString ExecButton::populationText() const { return KommanderWidget::populationText(); } void ExecButton::populate() { - QString txt = KommanderWidget::evalAssociatedText(populationText()); + TQString txt = KommanderWidget::evalAssociatedText(populationText()); setWidgetText(txt); } -void ExecButton::setWidgetText(const QString& a_text) +void ExecButton::setWidgetText(const TQString& a_text) { setText(a_text); emit widgetTextChanged(a_text); @@ -112,15 +112,15 @@ void ExecButton::setWidgetText(const QString& a_text) void ExecButton::startProcess() { - QString at = evalAssociatedText().stripWhiteSpace(); + TQString at = evalAssociatedText().stripWhiteSpace(); bool enabledStatus = isEnabled(); if (m_blockGUI != None) setEnabled(false); if (m_blockGUI == GUI) - KApplication::setOverrideCursor(QCursor(Qt::WaitCursor)); + KApplication::setOverrideCursor(TQCursor(Qt::WaitCursor)); MyProcess* process = new MyProcess(this); process->setBlocking(m_blockGUI == GUI); - connect(process, SIGNAL(processExited(MyProcess*)), SLOT(processExited(MyProcess*))); + connect(process, TQT_SIGNAL(processExited(MyProcess*)), TQT_SLOT(processExited(MyProcess*))); m_output = process->run(at); if (m_blockGUI == GUI) { @@ -165,16 +165,16 @@ void ExecButton::processExited(MyProcess* p) } } -void ExecButton::showEvent(QShowEvent* e) +void ExecButton::showEvent(TQShowEvent* e) { KPushButton::showEvent(e); emit widgetOpened(); } -void ExecButton::contextMenuEvent( QContextMenuEvent * e ) +void ExecButton::contextMenuEvent( TQContextMenuEvent * e ) { e->accept(); - QPoint p = e->globalPos(); + TQPoint p = e->globalPos(); emit contextMenuRequested(p.x(), p.y()); } @@ -183,7 +183,7 @@ 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) +TQString ExecButton::handleDCOP(int function, const TQStringList& args) { switch (function) { case DCOP::text: @@ -195,21 +195,21 @@ QString ExecButton::handleDCOP(int function, const QStringList& args) startProcess(); break; case EB_isOn: - return QString::number(this->isOn() ); + return TQString::number(this->isOn() ); break; case EB_setButtonText: ExecButton::setText(args[0]); break; case EB_setPopup: { - QWidgetList *list = QApplication::allWidgets(); - QWidgetListIt it( *list ); - QWidget * w; + TQWidgetList *list = TQApplication::allWidgets(); + TQWidgetListIt it( *list ); + TQWidget * w; while ( (w=it.current()) != 0 ) { // for each widget... ++it; if (w->name() == args[0] && w->className() == "PopupMenu") { - QPopupMenu *popup = dynamic_cast(w->child("unnamed", "KPopupMenu")); + TQPopupMenu *popup = dynamic_cast(w->child("unnamed", "KPopupMenu")); this->setPopup(popup); } } @@ -217,7 +217,7 @@ QString ExecButton::handleDCOP(int function, const QStringList& args) } case DCOP::geometry: { - QString geo = QString::number(this->x())+" "+QString::number(this->y())+" "+QString::number(this->width())+" "+QString::number(this->height()); + TQString geo = TQString::number(this->x())+" "+TQString::number(this->y())+" "+TQString::number(this->width())+" "+TQString::number(this->height()); return geo; break; } @@ -226,7 +226,7 @@ QString ExecButton::handleDCOP(int function, const QStringList& args) break; case DCOP::setBackgroundColor: { - QColor color; + TQColor color; color.setNamedColor(args[0]); this->setPaletteBackgroundColor(color); break; @@ -234,7 +234,7 @@ QString ExecButton::handleDCOP(int function, const QStringList& args) default: return KommanderWidget::handleDCOP(function, args); } - return QString(); + return TQString(); } diff --git a/kommander/widgets/execbutton.h b/kommander/widgets/execbutton.h index 2e2ea60a..925fa498 100644 --- a/kommander/widgets/execbutton.h +++ b/kommander/widgets/execbutton.h @@ -22,7 +22,7 @@ #include /* QT INCLUDES */ -#include +#include /* OTHER INCLUDES */ #include @@ -38,23 +38,23 @@ 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(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false) + Q_PROPERTY(TQStringList 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(TQWidget *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 void setAssociatedText(const TQStringList&); + virtual TQStringList associatedText() const; + virtual TQString currentState() const; - virtual QString populationText() const; - virtual void setPopulationText(const QString&); + virtual TQString populationText() const; + virtual void setPopulationText(const TQString&); // Handle stdout setting virtual void setWriteStdout(bool); @@ -64,11 +64,11 @@ public: virtual void setBlockGUI(Blocking a_enable); Blocking blockGUI() const; - virtual QString handleDCOP(int function, const QStringList& args); + virtual TQString handleDCOP(int function, const TQStringList& args); virtual bool isFunctionSupported(int function); public slots: virtual void populate(); - virtual void setWidgetText(const QString &); + virtual void setWidgetText(const TQString &); // Execute script from associastedText virtual void startProcess(); @@ -76,18 +76,18 @@ public slots: virtual void processExited(MyProcess* p); signals: void widgetOpened(); - void widgetTextChanged(const QString&); + void widgetTextChanged(const TQString&); void contextMenuRequested(int xpos, int ypos); protected: - void contextMenuEvent( QContextMenuEvent * e ); + void contextMenuEvent( TQContextMenuEvent * 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 ); + TQString m_output; + void showEvent( TQShowEvent *e ); private: }; diff --git a/kommander/widgets/fileselector.cpp b/kommander/widgets/fileselector.cpp index b220b8d9..a7c29673 100644 --- a/kommander/widgets/fileselector.cpp +++ b/kommander/widgets/fileselector.cpp @@ -23,21 +23,21 @@ #include /* QT INCLUDES */ -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include /* OTHER INCLUDES */ #include #include "fileselector.h" -FileSelector::FileSelector(QWidget * a_parent, const char *a_name) - : QWidget(a_parent, a_name), KommanderWidget(this) +FileSelector::FileSelector(TQWidget * a_parent, const char *a_name) + : TQWidget(a_parent, a_name), KommanderWidget(this) { - QStringList states; + TQStringList states; states << "default"; setStates(states); setDisplayStates(states); @@ -46,15 +46,15 @@ FileSelector::FileSelector(QWidget * a_parent, const char *a_name) m_selectButton = new KPushButton(BarIconSet("fileopen"), "", this); - m_boxLayout = new QHBoxLayout(this, 0, 11); + m_boxLayout = new TQHBoxLayout(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)); + m_lineEdit->setSizePolicy(TQSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding)); + m_selectButton->setSizePolicy(TQSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Expanding)); - connect(m_selectButton, SIGNAL(clicked()), this, SLOT(makeSelection())); + connect(m_selectButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(makeSelection())); setSelectionType(Open); setSelectionOpenMultiple(false); @@ -64,9 +64,9 @@ FileSelector::~FileSelector() { } -QString FileSelector::currentState() const +TQString FileSelector::currentState() const { - return QString("default"); + return TQString("default"); } bool FileSelector::isKommanderWidget() const @@ -74,33 +74,33 @@ bool FileSelector::isKommanderWidget() const return true; } -QStringList FileSelector::associatedText() const +TQStringList FileSelector::associatedText() const { return KommanderWidget::associatedText(); } -void FileSelector::setAssociatedText(const QStringList& a_at) +void FileSelector::setAssociatedText(const TQStringList& a_at) { KommanderWidget::setAssociatedText(a_at); } -void FileSelector::setPopulationText(const QString& a_text) +void FileSelector::setPopulationText(const TQString& a_text) { KommanderWidget::setPopulationText(a_text); } -QString FileSelector::populationText() const +TQString FileSelector::populationText() const { return KommanderWidget::populationText(); } void FileSelector::populate() { - QString txt = KommanderWidget::evalAssociatedText(populationText()); + TQString txt = KommanderWidget::evalAssociatedText(populationText()); setWidgetText(txt); } -void FileSelector::setWidgetText(const QString& a_text) +void FileSelector::setWidgetText(const TQString& a_text) { m_lineEdit->setText(a_text); emit widgetTextChanged(a_text); @@ -122,22 +122,22 @@ void FileSelector::setSelectionType(SelectionType a_selectionType) } -QString FileSelector::selectionFilter() const +TQString FileSelector::selectionFilter() const { return m_filter; } -void FileSelector::setSelectionFilter(const QString& a_filter) +void FileSelector::setSelectionFilter(const TQString& a_filter) { m_filter = a_filter; } -QString FileSelector::selectionCaption() const +TQString FileSelector::selectionCaption() const { return m_caption; } -void FileSelector::setSelectionCaption(const QString& a_caption) +void FileSelector::setSelectionCaption(const TQString& a_caption) { m_caption = a_caption; } @@ -154,7 +154,7 @@ void FileSelector::setSelectionOpenMultiple(bool a_openMultiple) void FileSelector::makeSelection() { - QString text; + TQString 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) @@ -168,12 +168,12 @@ void FileSelector::makeSelection() setWidgetText(text); } -QString FileSelector::caption() const +TQString FileSelector::caption() const { return m_selectButton->text(); } -void FileSelector::setCaption(const QString& a_text) +void FileSelector::setCaption(const TQString& a_text) { m_selectButton->setText(a_text); } @@ -191,16 +191,16 @@ void FileSelector::setShowEditor(bool a_visible) m_lineEdit->hide(); } -void FileSelector::showEvent(QShowEvent * e) +void FileSelector::showEvent(TQShowEvent * e) { - QWidget::showEvent(e); + TQWidget::showEvent(e); emit widgetOpened(); } -void FileSelector::contextMenuEvent( QContextMenuEvent * e ) +void FileSelector::contextMenuEvent( TQContextMenuEvent * e ) { e->accept(); - QPoint p = e->globalPos(); + TQPoint p = e->globalPos(); emit contextMenuRequested(p.x(), p.y()); } @@ -210,7 +210,7 @@ bool FileSelector::isFunctionSupported(int f) f == DCOP::clear; } -QString FileSelector::handleDCOP(int function, const QStringList& args) +TQString FileSelector::handleDCOP(int function, const TQStringList& args) { switch (function) { case DCOP::text: @@ -228,12 +228,12 @@ QString FileSelector::handleDCOP(int function, const QStringList& args) break; } case DCOP::clear: - setWidgetText(QString::null); + setWidgetText(TQString::null); break; default: return KommanderWidget::handleDCOP(function, args); } - return QString(); + return TQString(); } diff --git a/kommander/widgets/fileselector.h b/kommander/widgets/fileselector.h index 9da6847d..c80648e0 100644 --- a/kommander/widgets/fileselector.h +++ b/kommander/widgets/fileselector.h @@ -19,10 +19,10 @@ /* KDE INCLUDES */ /* QT INCLUDES */ -#include -#include -#include -#include +#include +#include +#include +#include /* OTHER INCLUDES */ #include @@ -33,69 +33,69 @@ class KPushButton; class KLineEdit; class QShowEvent; -class KOMMANDER_EXPORT FileSelector : public QWidget, public KommanderWidget +class KOMMANDER_EXPORT FileSelector : public TQWidget, 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(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false) + Q_PROPERTY(TQStringList 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(TQString buttonCaption READ caption WRITE setCaption) + Q_PROPERTY(TQString selectionFilter READ selectionFilter WRITE setSelectionFilter) + Q_PROPERTY(TQString 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(TQWidget *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&); + virtual void setAssociatedText(const TQStringList&); + virtual TQStringList associatedText() const; + virtual TQString currentState() const; + virtual TQString populationText() const; + virtual void setPopulationText(const TQString&); 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&); + TQString selectionFilter() const; + void setSelectionFilter(const TQString&); + TQString selectionCaption() const; + void setSelectionCaption(const TQString&); + TQString caption() const; + void setCaption(const TQString&); bool showEditor() const; void setShowEditor(bool); - virtual QString handleDCOP(int function, const QStringList& args); + virtual TQString handleDCOP(int function, const TQStringList& args); virtual bool isFunctionSupported(int function); public slots: - virtual void setWidgetText(const QString&); + virtual void setWidgetText(const TQString&); virtual void makeSelection(); virtual void populate(); signals: void widgetOpened(); - void widgetTextChanged(const QString&); + void widgetTextChanged(const TQString&); void contextMenuRequested(int xpos, int ypos); protected: - void contextMenuEvent( QContextMenuEvent * e ); + void contextMenuEvent( TQContextMenuEvent * e ); bool m_openMultiple; - QString m_caption; - QString m_filter; + TQString m_caption; + TQString m_filter; SelectionType m_selectionType; KLineEdit *m_lineEdit; KPushButton *m_selectButton; - QBoxLayout *m_boxLayout; - void showEvent(QShowEvent *e); + TQBoxLayout *m_boxLayout; + void showEvent(TQShowEvent *e); private: }; diff --git a/kommander/widgets/fontdialog.cpp b/kommander/widgets/fontdialog.cpp index 432b2d7f..5fc17edc 100644 --- a/kommander/widgets/fontdialog.cpp +++ b/kommander/widgets/fontdialog.cpp @@ -28,32 +28,32 @@ enum Functions { LastFunction }; -FontDialog::FontDialog(QWidget *parent, const char *name) - : QLabel(parent, name), KommanderWidget(this) +FontDialog::FontDialog(TQWidget *parent, const char *name) + : TQLabel(parent, name), KommanderWidget(this) { - QStringList states; + TQStringList states; states << "default"; setStates(states); setDisplayStates(states); if (KommanderWidget::inEditor) { setPixmap(KGlobal::iconLoader()->loadIcon("kfontcombo", KIcon::NoGroup, KIcon::SizeMedium)); - setFrameStyle(QFrame::Box | QFrame::Plain); + setFrameStyle(TQFrame::Box | TQFrame::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)", + KommanderPlugin::registerFunction(SetFont, "setFont(TQString widget, TQString 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)", + KommanderPlugin::registerFunction(Family, "family(TQString widget)", i18n("Returns the font family."), 1); - KommanderPlugin::registerFunction(PointSize, "pointSize(QString widget)", + KommanderPlugin::registerFunction(PointSize, "pointSize(TQString widget)", i18n("Returns the font size in point."), 1); - KommanderPlugin::registerFunction(Bold, "bold(QString widget)", + KommanderPlugin::registerFunction(Bold, "bold(TQString widget)", i18n("Returns true, if the font is bold."), 1); - KommanderPlugin::registerFunction(Italic, "italic(QString widget)", + KommanderPlugin::registerFunction(Italic, "italic(TQString widget)", i18n("Returns true, if the font is italic."), 1); } @@ -61,9 +61,9 @@ FontDialog::~FontDialog() { } -QString FontDialog::currentState() const +TQString FontDialog::currentState() const { - return QString("default"); + return TQString("default"); } bool FontDialog::isKommanderWidget() const @@ -71,27 +71,27 @@ bool FontDialog::isKommanderWidget() const return true; } -QStringList FontDialog::associatedText() const +TQStringList FontDialog::associatedText() const { return KommanderWidget::associatedText(); } -void FontDialog::setAssociatedText(const QStringList& a_at) +void FontDialog::setAssociatedText(const TQStringList& a_at) { KommanderWidget::setAssociatedText(a_at); } -void FontDialog::setWidgetText(const QString& a_text) +void FontDialog::setWidgetText(const TQString& a_text) { KommanderWidget::setAssociatedText(a_text); } -void FontDialog::setPopulationText(const QString& a_text) +void FontDialog::setPopulationText(const TQString& a_text) { KommanderWidget::setPopulationText(a_text); } -QString FontDialog::populationText() const +TQString FontDialog::populationText() const { return KommanderWidget::populationText(); } @@ -106,7 +106,7 @@ bool FontDialog::isFunctionSupported(int f) return (f > FirstFunction && f < LastFunction) || f == DCOP::execute; } -QString FontDialog::handleDCOP(int function, const QStringList& args) +TQString FontDialog::handleDCOP(int function, const TQStringList& args) { switch (function) { case SetFont: @@ -127,7 +127,7 @@ QString FontDialog::handleDCOP(int function, const QStringList& args) } case PointSize: { - return QString::number(m_font.pointSize()); + return TQString::number(m_font.pointSize()); break; } case Bold: @@ -150,7 +150,7 @@ QString FontDialog::handleDCOP(int function, const QStringList& args) default: return KommanderWidget::handleDCOP(function, args); } - return QString(); + return TQString(); } diff --git a/kommander/widgets/fontdialog.h b/kommander/widgets/fontdialog.h index 38bf7830..f7ccdf0f 100644 --- a/kommander/widgets/fontdialog.h +++ b/kommander/widgets/fontdialog.h @@ -12,39 +12,39 @@ #ifndef FONTDIALOG_H #define FONTDIALOG_H -#include +#include #include -#include +#include /** @author Andras Mantia */ -class FontDialog : public QLabel, public KommanderWidget +class FontDialog : public TQLabel, 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(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false) + Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false) Q_PROPERTY(bool KommanderWidget READ isKommanderWidget) public: - FontDialog(QWidget *parent = 0, const char *name = 0); + FontDialog(TQWidget *parent = 0, const char *name = 0); ~FontDialog(); virtual bool isKommanderWidget() const; - virtual QString currentState() const; + virtual TQString 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&); + virtual TQString handleDCOP(int function, const TQStringList& args); + virtual TQStringList associatedText() const; + virtual void setAssociatedText(const TQStringList&); + virtual TQString populationText() const; + virtual void setPopulationText(const TQString&); public slots: - virtual void setWidgetText(const QString &); + virtual void setWidgetText(const TQString &); virtual void populate(); - QFont m_font; + TQFont m_font; }; #endif diff --git a/kommander/widgets/groupbox.cpp b/kommander/widgets/groupbox.cpp index 29947eb1..7ca1c199 100644 --- a/kommander/widgets/groupbox.cpp +++ b/kommander/widgets/groupbox.cpp @@ -16,13 +16,13 @@ /* KDE INCLUDES */ /* QT INCLUDES */ -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include /* OTHER INCLUDES */ @@ -31,10 +31,10 @@ #include "groupbox.h" -GroupBox::GroupBox(QWidget *a_parent, const char *a_name) - : QGroupBox(a_parent, a_name), KommanderWidget(this) +GroupBox::GroupBox(TQWidget *a_parent, const char *a_name) + : TQGroupBox(a_parent, a_name), KommanderWidget(this) { - QStringList states; + TQStringList states; states << "default"; setStates(states); setDisplayStates(states); @@ -44,9 +44,9 @@ GroupBox::~GroupBox() { } -QString GroupBox::currentState() const +TQString GroupBox::currentState() const { - return QString("default"); + return TQString("default"); } bool GroupBox::isKommanderWidget() const @@ -54,55 +54,55 @@ bool GroupBox::isKommanderWidget() const return true; } -QStringList GroupBox::associatedText() const +TQStringList GroupBox::associatedText() const { return KommanderWidget::associatedText(); } -void GroupBox::setAssociatedText(const QStringList& a_at) +void GroupBox::setAssociatedText(const TQStringList& a_at) { KommanderWidget::setAssociatedText(a_at); } -void GroupBox::setPopulationText(const QString& a_text) +void GroupBox::setPopulationText(const TQString& a_text) { KommanderWidget::setPopulationText(a_text); } -QString GroupBox::populationText() const +TQString GroupBox::populationText() const { return KommanderWidget::populationText(); } void GroupBox::populate() { - QString txt = KommanderWidget::evalAssociatedText( populationText() ); + TQString 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) +void GroupBox::insertChild(TQObject *a_child) { m_childList.append(a_child); - QObject::insertChild(a_child); + TQObject::insertChild(a_child); } -void GroupBox::removeChild(QObject *a_child) +void GroupBox::removeChild(TQObject *a_child) { m_childList.remove(a_child); - QObject::removeChild(a_child); + TQObject::removeChild(a_child); } -void GroupBox::showEvent( QShowEvent *e ) +void GroupBox::showEvent( TQShowEvent *e ) { - QGroupBox::showEvent(e); + TQGroupBox::showEvent(e); emit widgetOpened(); } -void GroupBox::contextMenuEvent( QContextMenuEvent * e ) +void GroupBox::contextMenuEvent( TQContextMenuEvent * e ) { e->accept(); - QPoint p = e->globalPos(); + TQPoint p = e->globalPos(); emit contextMenuRequested(p.x(), p.y()); } @@ -112,13 +112,13 @@ bool GroupBox::isFunctionSupported(int f) // || (f >= FirstFunction && f <= LastFunction); } -QString GroupBox::handleDCOP(int function, const QStringList& args) +TQString GroupBox::handleDCOP(int function, const TQStringList& args) { switch (function) { case DCOP::text: { - QString text; - for (QObjectListIt it(m_childList); it.current(); ++it) + TQString text; + for (TQObjectListIt it(m_childList); it.current(); ++it) if (dynamic_cast(it.current())) text += (dynamic_cast(it.current()))->evalAssociatedText(); return text; @@ -128,7 +128,7 @@ QString GroupBox::handleDCOP(int function, const QStringList& args) break; case DCOP::geometry: { - QString geo = QString::number(this->x())+" "+QString::number(this->y())+" "+QString::number(this->width())+" "+QString::number(this->height()); + TQString geo = TQString::number(this->x())+" "+TQString::number(this->y())+" "+TQString::number(this->width())+" "+TQString::number(this->height()); return geo; break; } @@ -137,7 +137,7 @@ QString GroupBox::handleDCOP(int function, const QStringList& args) break; case DCOP::setBackgroundColor: { - QColor color; + TQColor color; color.setNamedColor(args[0]); this->setPaletteBackgroundColor(color); break; @@ -145,7 +145,7 @@ QString GroupBox::handleDCOP(int function, const QStringList& args) default: return KommanderWidget::handleDCOP(function, args); } - return QString(); + return TQString(); } diff --git a/kommander/widgets/groupbox.h b/kommander/widgets/groupbox.h index b7de75e1..47889416 100644 --- a/kommander/widgets/groupbox.h +++ b/kommander/widgets/groupbox.h @@ -19,11 +19,11 @@ /* KDE INCLUDES */ /* QT INCLUDES */ -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include /* OTHER INCLUDES */ #include @@ -31,39 +31,39 @@ class QWidget; class QShowEvent; -class KOMMANDER_EXPORT GroupBox : public QGroupBox, public KommanderWidget +class KOMMANDER_EXPORT GroupBox : public TQGroupBox, 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(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false) + Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false) Q_PROPERTY(bool KommanderWidget READ isKommanderWidget) public: - GroupBox(QWidget *a_parent, const char *a_name); + GroupBox(TQWidget *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 setAssociatedText(const TQStringList&); + virtual TQStringList associatedText() const; + virtual TQString currentState() const; + virtual TQString populationText() const; + virtual void setPopulationText(const TQString&); - virtual void insertChild(QObject*); - virtual void removeChild(QObject*); + virtual void insertChild(TQObject*); + virtual void removeChild(TQObject*); - virtual QString handleDCOP(int function, const QStringList& args); + virtual TQString handleDCOP(int function, const TQStringList& args); virtual bool isFunctionSupported(int function); public slots: virtual void populate(); signals: void widgetOpened(); - void widgetTextChanged(const QString &); + void widgetTextChanged(const TQString &); void contextMenuRequested(int xpos, int ypos); protected: - QObjectList m_childList; - void showEvent(QShowEvent *e); - void contextMenuEvent( QContextMenuEvent * e ); + TQObjectList m_childList; + void showEvent(TQShowEvent *e); + void contextMenuEvent( TQContextMenuEvent * e ); private: }; diff --git a/kommander/widgets/konsole.cpp b/kommander/widgets/konsole.cpp index 587f2318..c27cb8fe 100644 --- a/kommander/widgets/konsole.cpp +++ b/kommander/widgets/konsole.cpp @@ -14,10 +14,10 @@ ***************************************************************************/ /* QT INCLUDES */ -#include -#include -#include -#include +#include +#include +#include +#include /* OTHER INCLUDES */ #include @@ -25,10 +25,10 @@ #include "konsole.h" #include -Konsole::Konsole(QWidget* a_parent, const char* a_name) +Konsole::Konsole(TQWidget* a_parent, const char* a_name) : KTextEdit(a_parent, a_name), KommanderWidget(this), mSeenEOL(false), mProcess(false) { - QStringList states; + TQStringList states; states << "default"; setStates(states); setDisplayStates(states); @@ -38,9 +38,9 @@ Konsole::~Konsole() { } -QString Konsole::currentState() const +TQString Konsole::currentState() const { - return QString("default"); + return TQString("default"); } bool Konsole::isKommanderWidget() const @@ -48,48 +48,48 @@ bool Konsole::isKommanderWidget() const return true; } -QStringList Konsole::associatedText() const +TQStringList Konsole::associatedText() const { return KommanderWidget::associatedText(); } -void Konsole::setAssociatedText(const QStringList& a_at) +void Konsole::setAssociatedText(const TQStringList& a_at) { KommanderWidget::setAssociatedText(a_at); } -void Konsole::setPopulationText(const QString& a_text) +void Konsole::setPopulationText(const TQString& a_text) { KommanderWidget::setPopulationText(a_text); } -QString Konsole::populationText() const +TQString Konsole::populationText() const { return KommanderWidget::populationText(); } void Konsole::populate() { - QString txt = KommanderWidget::evalAssociatedText(populationText()); + TQString txt = KommanderWidget::evalAssociatedText(populationText()); setWidgetText(txt); } -void Konsole::setWidgetText(const QString&) +void Konsole::setWidgetText(const TQString&) { // FIXME: emit widgetTextChanged(a_text); } void Konsole::execute() { - QString at = evalAssociatedText().stripWhiteSpace(); + TQString 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)); + connect(mProcess, TQT_SIGNAL(processExited(MyProcess*)), TQT_SLOT(processExited(MyProcess*))); + connect(mProcess, TQT_SIGNAL(processReceivedStdout(MyProcess*, char*, int)), TQT_SLOT(processReceivedStdout(MyProcess*, char*, int))); + setCursor(TQCursor(Qt::WaitCursor)); mProcess->run(at); } @@ -104,7 +104,7 @@ void Konsole::cancel() void Konsole::processReceivedStdout(MyProcess*, char* buffer, int buflen) { - QString pBuf = QString::fromLocal8Bit(buffer, buflen); + TQString pBuf = TQString::fromLocal8Bit(buffer, buflen); if (mSeenEOL) pBuf = '\n' + pBuf; mSeenEOL = pBuf[pBuf.length()-1] == '\n'; @@ -126,7 +126,7 @@ 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) +TQString Konsole::handleDCOP(int function, const TQStringList& args) { switch (function) { case DCOP::setText: @@ -146,7 +146,7 @@ QString Konsole::handleDCOP(int function, const QStringList& args) default: return KommanderWidget::handleDCOP(function, args); } - return QString(); + return TQString(); } diff --git a/kommander/widgets/konsole.h b/kommander/widgets/konsole.h index a031adef..feddbbac 100644 --- a/kommander/widgets/konsole.h +++ b/kommander/widgets/konsole.h @@ -21,7 +21,7 @@ #include /* QT INCLUDES */ -#include +#include /* OTHER INCLUDES */ #include @@ -33,28 +33,28 @@ 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_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false) + Q_PROPERTY(TQStringList 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(TQWidget *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 void setAssociatedText(const TQStringList&); + virtual TQStringList associatedText() const; + virtual TQString currentState() const; - virtual QString populationText() const; - virtual void setPopulationText(const QString&); + virtual TQString populationText() const; + virtual void setPopulationText(const TQString&); - virtual QString handleDCOP(int function, const QStringList& args); + virtual TQString handleDCOP(int function, const TQStringList& args); virtual bool isFunctionSupported(int function); public slots: virtual void populate(); - virtual void setWidgetText(const QString &); + virtual void setWidgetText(const TQString &); // Execute current script virtual void execute(); // Stop executing current script diff --git a/kommander/widgets/label.cpp b/kommander/widgets/label.cpp index a9a24e3b..ee422325 100644 --- a/kommander/widgets/label.cpp +++ b/kommander/widgets/label.cpp @@ -14,21 +14,21 @@ ***************************************************************************/ /* QT INCLUDES */ -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include /* OTHER INCLUDES */ #include #include #include "label.h" -Label::Label(QWidget *a_parent, const char *a_name) - : QLabel(a_parent, a_name), KommanderWidget(this) +Label::Label(TQWidget *a_parent, const char *a_name) + : TQLabel(a_parent, a_name), KommanderWidget(this) { - QStringList states; + TQStringList states; states << "default"; setStates(states); setDisplayStates(states); @@ -40,9 +40,9 @@ Label::~Label() { } -QString Label::currentState() const +TQString Label::currentState() const { - return QString("default"); + return TQString("default"); } bool Label::isKommanderWidget() const @@ -50,22 +50,22 @@ bool Label::isKommanderWidget() const return true; } -QStringList Label::associatedText() const +TQStringList Label::associatedText() const { return KommanderWidget::associatedText(); } -void Label::setAssociatedText(const QStringList& a_at) +void Label::setAssociatedText(const TQStringList& a_at) { KommanderWidget::setAssociatedText(a_at); } -void Label::setPopulationText(const QString& a_text) +void Label::setPopulationText(const TQString& a_text) { KommanderWidget::setPopulationText(a_text); } -QString Label::populationText() const +TQString Label::populationText() const { return KommanderWidget::populationText(); } @@ -75,14 +75,14 @@ void Label::populate() setWidgetText(KommanderWidget::evalAssociatedText(populationText())); } -void Label::setWidgetText(const QString& a_text) +void Label::setWidgetText(const TQString& a_text) { setText(a_text); } -void Label::showEvent(QShowEvent *e) +void Label::showEvent(TQShowEvent *e) { - QLabel::showEvent(e); + TQLabel::showEvent(e); emit widgetOpened(); } @@ -91,7 +91,7 @@ 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) +TQString Label::handleDCOP(int function, const TQStringList& args) { switch (function) { case DCOP::text: @@ -104,7 +104,7 @@ QString Label::handleDCOP(int function, const QStringList& args) break; case DCOP::geometry: { - QString geo = QString::number(this->x())+" "+QString::number(this->y())+" "+QString::number(this->width())+" "+QString::number(this->height()); + TQString geo = TQString::number(this->x())+" "+TQString::number(this->y())+" "+TQString::number(this->width())+" "+TQString::number(this->height()); return geo; break; } @@ -113,7 +113,7 @@ QString Label::handleDCOP(int function, const QStringList& args) break; case DCOP::setBackgroundColor: { - QColor color; + TQColor color; color.setNamedColor(args[0]); this->setPaletteBackgroundColor(color); break; @@ -121,7 +121,7 @@ QString Label::handleDCOP(int function, const QStringList& args) default: return KommanderWidget::handleDCOP(function, args); } - return QString(); + return TQString(); } #include "label.moc" diff --git a/kommander/widgets/label.h b/kommander/widgets/label.h index 216998db..8ce4b58c 100644 --- a/kommander/widgets/label.h +++ b/kommander/widgets/label.h @@ -19,45 +19,45 @@ /* KDE INCLUDES */ /* QT INCLUDES */ -#include -#include -#include +#include +#include +#include /* OTHER INCLUDES */ #include -#include +#include class QWidget; class QShowEvent; -class KOMMANDER_EXPORT Label : public QLabel, public KommanderWidget +class KOMMANDER_EXPORT Label : public TQLabel, 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(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false) + Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false) Q_PROPERTY(bool KommanderWidget READ isKommanderWidget) public: - Label(QWidget *a_parent, const char *a_name); + Label(TQWidget *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 void setAssociatedText(const TQStringList&); + virtual TQStringList associatedText() const; + virtual TQString currentState() const; + virtual TQString populationText() const; + virtual void setPopulationText(const TQString&); - virtual QString handleDCOP(int function, const QStringList& args); + virtual TQString handleDCOP(int function, const TQStringList& args); virtual bool isFunctionSupported(int function); public slots: - virtual void setWidgetText(const QString&); + virtual void setWidgetText(const TQString&); virtual void populate(); signals: void widgetOpened(); - void widgetTextChanged(const QString&); + void widgetTextChanged(const TQString&); protected: - void showEvent(QShowEvent *e); + void showEvent(TQShowEvent *e); private: }; diff --git a/kommander/widgets/lineedit.cpp b/kommander/widgets/lineedit.cpp index d243660a..08913b4e 100644 --- a/kommander/widgets/lineedit.cpp +++ b/kommander/widgets/lineedit.cpp @@ -15,8 +15,8 @@ ***************************************************************************/ /* QT INCLUDES */ -#include -#include +#include +#include /* OTHER INCLUDES */ #include @@ -30,42 +30,42 @@ enum functions { LastFunction }; -LineEdit::LineEdit(QWidget *a_parent, const char *a_name) - : KLineEdit(a_parent, a_name), KommanderWidget((QObject *)this) +LineEdit::LineEdit(TQWidget *a_parent, const char *a_name) + : KLineEdit(a_parent, a_name), KommanderWidget((TQObject *)this) { - QStringList states; + TQStringList states; states << "default"; setStates(states); setDisplayStates(states); - connect(this, SIGNAL(textChanged(const QString &)), this, - SIGNAL(widgetTextChanged(const QString &))); + connect(this, TQT_SIGNAL(textChanged(const TQString &)), this, + TQT_SIGNAL(widgetTextChanged(const TQString &))); KommanderPlugin::setDefaultGroup(Group::DCOP); - KommanderPlugin::registerFunction(LE_clearModified, "clearModified(QString widget)", i18n("Clear widget modified status."), 1); + KommanderPlugin::registerFunction(LE_clearModified, "clearModified(TQString widget)", i18n("Clear widget modified status."), 1); } -void LineEdit::showEvent(QShowEvent *e) +void LineEdit::showEvent(TQShowEvent *e) { - QLineEdit::showEvent(e); + TQLineEdit::showEvent(e); emit widgetOpened(); } -void LineEdit::focusInEvent( QFocusEvent * e) +void LineEdit::focusInEvent( TQFocusEvent * e) { - QLineEdit::focusInEvent(e); + TQLineEdit::focusInEvent(e); emit gotFocus(); } -void LineEdit::focusOutEvent( QFocusEvent * e) +void LineEdit::focusOutEvent( TQFocusEvent * e) { - QLineEdit::focusOutEvent(e); + TQLineEdit::focusOutEvent(e); emit lostFocus(); } -QString LineEdit::currentState() const +TQString LineEdit::currentState() const { - return QString("default"); + return TQString("default"); } LineEdit::~LineEdit() @@ -77,47 +77,47 @@ bool LineEdit::isKommanderWidget() const return true; } -QStringList LineEdit::associatedText() const +TQStringList LineEdit::associatedText() const { return KommanderWidget::associatedText(); } -void LineEdit::setAssociatedText(const QStringList& a_at) +void LineEdit::setAssociatedText(const TQStringList& a_at) { KommanderWidget::setAssociatedText(a_at); } -void LineEdit::setPopulationText(const QString& a_text) +void LineEdit::setPopulationText(const TQString& a_text) { KommanderWidget::setPopulationText(a_text); } -QString LineEdit::populationText() const +TQString LineEdit::populationText() const { return KommanderWidget::populationText(); } void LineEdit::populate() { - QString txt = KommanderWidget::evalAssociatedText(populationText()); + TQString txt = KommanderWidget::evalAssociatedText(populationText()); setWidgetText(txt); } -void LineEdit::setSelectedWidgetText(const QString& a_text) +void LineEdit::setSelectedWidgetText(const TQString& a_text) { insert(a_text); } -void LineEdit::setWidgetText(const QString& a_text) +void LineEdit::setWidgetText(const TQString& a_text) { setText(a_text); emit widgetTextChanged(a_text); } -void LineEdit::contextMenuEvent( QContextMenuEvent * e ) +void LineEdit::contextMenuEvent( TQContextMenuEvent * e ) { e->accept(); - QPoint p = e->globalPos(); + TQPoint p = e->globalPos(); emit contextMenuRequested(p.x(), p.y()); } @@ -127,7 +127,7 @@ bool LineEdit::isFunctionSupported(int f) 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) +TQString LineEdit::handleDCOP(int function, const TQStringList& args) { switch (function) { case DCOP::text: @@ -148,19 +148,19 @@ QString LineEdit::handleDCOP(int function, const QStringList& args) break; case DCOP::geometry: { - QString geo = QString::number(this->x())+" "+QString::number(this->y())+" "+QString::number(this->width())+" "+QString::number(this->height()); + TQString geo = TQString::number(this->x())+" "+TQString::number(this->y())+" "+TQString::number(this->width())+" "+TQString::number(this->height()); return geo; break; } case DCOP::hasFocus: - return QString::number(this->hasFocus()); + return TQString::number(this->hasFocus()); break; case DCOP::getBackgroundColor: return this->paletteBackgroundColor().name(); break; case DCOP::setBackgroundColor: { - QColor color; + TQColor color; color.setNamedColor(args[0]); this->setPaletteBackgroundColor(color); break; @@ -174,7 +174,7 @@ QString LineEdit::handleDCOP(int function, const QStringList& args) default: return KommanderWidget::handleDCOP(function, args); } - return QString(); + return TQString(); } diff --git a/kommander/widgets/lineedit.h b/kommander/widgets/lineedit.h index 8b4d403a..05fb79c4 100644 --- a/kommander/widgets/lineedit.h +++ b/kommander/widgets/lineedit.h @@ -21,9 +21,9 @@ #include /* QT INCLUDES */ -#include -#include -#include +#include +#include +#include /* OTHER INCLUDES */ #include @@ -35,37 +35,37 @@ 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(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false) + Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false) Q_PROPERTY(bool KommanderWidget READ isKommanderWidget) public: - LineEdit(QWidget *, const char *); + LineEdit(TQWidget *, 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 void setAssociatedText(const TQStringList&); + virtual TQStringList associatedText() const; + virtual TQString currentState() const; + virtual TQString populationText() const; + virtual void setPopulationText(const TQString&); - virtual QString handleDCOP(int function, const QStringList& args); + virtual TQString handleDCOP(int function, const TQStringList& args); virtual bool isFunctionSupported(int function); public slots: - virtual void setWidgetText(const QString &); - virtual void setSelectedWidgetText(const QString &a_text); + virtual void setWidgetText(const TQString &); + virtual void setSelectedWidgetText(const TQString &a_text); virtual void populate(); signals: void widgetOpened(); - void widgetTextChanged(const QString &); + void widgetTextChanged(const TQString &); 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); + virtual void showEvent( TQShowEvent *e ); + void contextMenuEvent( TQContextMenuEvent * e ); + void focusInEvent( TQFocusEvent* e); + void focusOutEvent( TQFocusEvent* e); private: }; diff --git a/kommander/widgets/listbox.cpp b/kommander/widgets/listbox.cpp index 19b1b540..3dd36357 100644 --- a/kommander/widgets/listbox.cpp +++ b/kommander/widgets/listbox.cpp @@ -18,21 +18,21 @@ #include /* QT INCLUDES */ -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include /* OTHER INCLUDES */ #include #include #include "listbox.h" -ListBox::ListBox(QWidget *a_parent, const char *a_name) +ListBox::ListBox(TQWidget *a_parent, const char *a_name) : KListBox(a_parent, a_name), KommanderWidget(this) { - QStringList states; + TQStringList states; states << "default"; setStates(states); setDisplayStates(states); @@ -42,9 +42,9 @@ ListBox::~ListBox() { } -QString ListBox::currentState() const +TQString ListBox::currentState() const { - return QString("default"); + return TQString("default"); } bool ListBox::isKommanderWidget() const @@ -52,42 +52,42 @@ bool ListBox::isKommanderWidget() const return true; } -QStringList ListBox::associatedText() const +TQStringList ListBox::associatedText() const { return KommanderWidget::associatedText(); } -void ListBox::setAssociatedText(const QStringList& a_at) +void ListBox::setAssociatedText(const TQStringList& a_at) { KommanderWidget::setAssociatedText(a_at); } -void ListBox::setPopulationText(const QString& a_text) +void ListBox::setPopulationText(const TQString& a_text) { KommanderWidget::setPopulationText(a_text); } -QString ListBox::populationText() const +TQString ListBox::populationText() const { return KommanderWidget::populationText(); } void ListBox::populate() { - QString txt = KommanderWidget::evalAssociatedText(populationText()); + TQString txt = KommanderWidget::evalAssociatedText(populationText()); setWidgetText(txt); } -void ListBox::setWidgetText(const QString& a_text) +void ListBox::setWidgetText(const TQString& a_text) { clear(); - insertStringList(QStringList::split("\n", a_text)); + insertStringList(TQStringList::split("\n", a_text)); emit widgetTextChanged(a_text); } -void ListBox::showEvent(QShowEvent *e) +void ListBox::showEvent(TQShowEvent *e) { - QListBox::showEvent(e); + TQListBox::showEvent(e); emit widgetOpened(); } @@ -99,15 +99,15 @@ bool ListBox::isFunctionSupported(int f) 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 ) +void ListBox::contextMenuEvent( TQContextMenuEvent * e ) { e->accept(); - QPoint p = e->globalPos(); + TQPoint p = e->globalPos(); emit contextMenuRequested(p.x(), p.y()); } -QString ListBox::handleDCOP(int function, const QStringList& args) +TQString ListBox::handleDCOP(int function, const TQStringList& args) { switch (function) { case DCOP::setText: @@ -117,7 +117,7 @@ QString ListBox::handleDCOP(int function, const QStringList& args) { if (selectionMode() == Single) return currentText(); - QString value; + TQString value; for (uint i=0; itext(); @@ -125,13 +125,13 @@ QString ListBox::handleDCOP(int function, const QStringList& args) } case DCOP::setSelection: { - QListBoxItem* found = findItem(args[0], Qt::ExactMatch); + TQListBoxItem* found = findItem(args[0], Qt::ExactMatch); if (found) setCurrentItem(index(found)); break; } case DCOP::insertItems: - insertStringList(QStringList::split("\n", args[0]), args[1].toInt()); + insertStringList(TQStringList::split("\n", args[0]), args[1].toInt()); break; case DCOP::insertItem: insertItem(args[0], args[1].toInt()); @@ -143,9 +143,9 @@ QString ListBox::handleDCOP(int function, const QStringList& args) clear(); break; case DCOP::count: - return QString::number(count()); + return TQString::number(count()); case DCOP::currentItem: - return QString::number(currentItem()); + return TQString::number(currentItem()); case DCOP::setCurrentItem: { int index = args[0].toInt(); @@ -159,7 +159,7 @@ QString ListBox::handleDCOP(int function, const QStringList& args) if (index >= 0 && index < (int)count()) return item(index)->text(); else - return QString(); + return TQString(); } case DCOP::addUniqueItem: if (!findItem(args[0], Qt::ExactMatch)) @@ -167,17 +167,17 @@ QString ListBox::handleDCOP(int function, const QStringList& args) break; case DCOP::findItem: { - QListBoxItem* found = findItem(args[0], Qt::ExactMatch); + TQListBoxItem* 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); + return TQString::number(index(found)); + else return TQString::number(-1); break; } case DCOP::setPixmap: { - QPixmap pixmap = KGlobal::iconLoader()->loadIcon(args[0], KIcon::Small); + TQPixmap pixmap = KGlobal::iconLoader()->loadIcon(args[0], KIcon::Small); if (pixmap.isNull()) pixmap.load(args[0]); int index = args[1].toInt(); @@ -192,26 +192,26 @@ QString ListBox::handleDCOP(int function, const QStringList& args) } case DCOP::text: { - QStringList strings; + TQStringList 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()); + TQString geo = TQString::number(this->x())+" "+TQString::number(this->y())+" "+TQString::number(this->width())+" "+TQString::number(this->height()); return geo; break; } case DCOP::hasFocus: - return QString::number(this->hasFocus()); + return TQString::number(this->hasFocus()); break; case DCOP::getBackgroundColor: return this->paletteBackgroundColor().name(); break; case DCOP::setBackgroundColor: { - QColor color; + TQColor color; color.setNamedColor(args[0]); this->setPaletteBackgroundColor(color); break; @@ -219,7 +219,7 @@ QString ListBox::handleDCOP(int function, const QStringList& args) default: return KommanderWidget::handleDCOP(function, args); } - return QString(); + return TQString(); } #include "listbox.moc" diff --git a/kommander/widgets/listbox.h b/kommander/widgets/listbox.h index 516e9f86..ebd5784f 100644 --- a/kommander/widgets/listbox.h +++ b/kommander/widgets/listbox.h @@ -20,9 +20,9 @@ /* KDE INCLUDES */ /* QT INCLUDES */ -#include -#include -#include +#include +#include +#include /* OTHER INCLUDES */ #include @@ -35,32 +35,32 @@ 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(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false) + Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false) Q_PROPERTY(bool KommanderWidget READ isKommanderWidget) public: - ListBox(QWidget *a_parent, const char *a_name); + ListBox(TQWidget *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 void setAssociatedText(const TQStringList&); + virtual TQStringList associatedText() const; + virtual TQString currentState() const; + virtual TQString populationText() const; + virtual void setPopulationText(const TQString&); - virtual QString handleDCOP(int function, const QStringList& args); + virtual TQString handleDCOP(int function, const TQStringList& args); virtual bool isFunctionSupported(int function); public slots: - virtual void setWidgetText(const QString&); + virtual void setWidgetText(const TQString&); virtual void populate(); signals: void widgetOpened(); - void widgetTextChanged(const QString&); + void widgetTextChanged(const TQString&); void contextMenuRequested(int xpos, int ypos); protected: - void showEvent(QShowEvent *e); - void contextMenuEvent( QContextMenuEvent * e ); + void showEvent(TQShowEvent *e); + void contextMenuEvent( TQContextMenuEvent * e ); private: }; diff --git a/kommander/widgets/pixmaplabel.cpp b/kommander/widgets/pixmaplabel.cpp index 7d7095e3..78077c5c 100644 --- a/kommander/widgets/pixmaplabel.cpp +++ b/kommander/widgets/pixmaplabel.cpp @@ -14,12 +14,12 @@ ***************************************************************************/ /* QT INCLUDES */ -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include /* KDE INCLUDES */ #include @@ -30,10 +30,10 @@ #include #include "pixmaplabel.h" -PixmapLabel::PixmapLabel(QWidget *a_parent, const char *a_name) - : QLabel(a_parent, a_name), KommanderWidget(this) +PixmapLabel::PixmapLabel(TQWidget *a_parent, const char *a_name) + : TQLabel(a_parent, a_name), KommanderWidget(this) { - QStringList states; + TQStringList states; states << "default"; setStates(states); setDisplayStates(states); @@ -46,9 +46,9 @@ PixmapLabel::~PixmapLabel() { } -QString PixmapLabel::currentState() const +TQString PixmapLabel::currentState() const { - return QString("default"); + return TQString("default"); } bool PixmapLabel::isKommanderWidget() const @@ -56,22 +56,22 @@ bool PixmapLabel::isKommanderWidget() const return true; } -QStringList PixmapLabel::associatedText() const +TQStringList PixmapLabel::associatedText() const { return KommanderWidget::associatedText(); } -void PixmapLabel::setAssociatedText(const QStringList& a_at) +void PixmapLabel::setAssociatedText(const TQStringList& a_at) { KommanderWidget::setAssociatedText(a_at); } -void PixmapLabel::setPopulationText(const QString& a_text) +void PixmapLabel::setPopulationText(const TQString& a_text) { KommanderWidget::setPopulationText(a_text); } -QString PixmapLabel::populationText() const +TQString PixmapLabel::populationText() const { return KommanderWidget::populationText(); } @@ -81,23 +81,23 @@ void PixmapLabel::populate() setWidgetText(KommanderWidget::evalAssociatedText(populationText())); } -void PixmapLabel::setWidgetText(const QString& a_text) +void PixmapLabel::setWidgetText(const TQString& a_text) { - QPixmap pixmap; + TQPixmap pixmap; if (pixmap.load(a_text)) setPixmap(pixmap); } -void PixmapLabel::showEvent(QShowEvent *e) +void PixmapLabel::showEvent(TQShowEvent *e) { - QLabel::showEvent(e); + TQLabel::showEvent(e); emit widgetOpened(); } -void PixmapLabel::contextMenuEvent( QContextMenuEvent * e ) +void PixmapLabel::contextMenuEvent( TQContextMenuEvent * e ) { e->accept(); - QPoint p = e->globalPos(); + TQPoint p = e->globalPos(); emit contextMenuRequested(p.x(), p.y()); } @@ -106,27 +106,27 @@ 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) +TQString PixmapLabel::handleDCOP(int function, const TQStringList& args) { switch (function) { case DCOP::setText: setWidgetText(args[0]); break; case DCOP::clear: - setPixmap(QPixmap()); + setPixmap(TQPixmap()); 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()); + TQString geo = TQString::number(this->x())+" "+TQString::number(this->y())+" "+TQString::number(this->width())+" "+TQString::number(this->height()); return geo; break; } default: return KommanderWidget::handleDCOP(function, args); } - return QString(); + return TQString(); } #include "pixmaplabel.moc" diff --git a/kommander/widgets/pixmaplabel.h b/kommander/widgets/pixmaplabel.h index a932ad1e..a9ba9ca9 100644 --- a/kommander/widgets/pixmaplabel.h +++ b/kommander/widgets/pixmaplabel.h @@ -20,46 +20,46 @@ /* KDE INCLUDES */ /* QT INCLUDES */ -#include -#include -#include +#include +#include +#include /* OTHER INCLUDES */ #include -#include +#include class QWidget; class QShowEvent; -class KOMMANDER_EXPORT PixmapLabel : public QLabel, public KommanderWidget +class KOMMANDER_EXPORT PixmapLabel : public TQLabel, 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(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false) + Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false) Q_PROPERTY(bool KommanderWidget READ isKommanderWidget) public: - PixmapLabel(QWidget *a_parent, const char *a_name); + PixmapLabel(TQWidget *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 void setAssociatedText(const TQStringList&); + virtual TQStringList associatedText() const; + virtual TQString currentState() const; + virtual TQString populationText() const; + virtual void setPopulationText(const TQString&); - virtual QString handleDCOP(int function, const QStringList& args); + virtual TQString handleDCOP(int function, const TQStringList& args); virtual bool isFunctionSupported(int function); public slots: - virtual void setWidgetText(const QString&); + virtual void setWidgetText(const TQString&); virtual void populate(); signals: void widgetOpened(); - void widgetTextChanged(const QString&); + void widgetTextChanged(const TQString&); void contextMenuRequested(int xpos, int ypos); protected: - void showEvent(QShowEvent *e); - void contextMenuEvent( QContextMenuEvent * e ); + void showEvent(TQShowEvent *e); + void contextMenuEvent( TQContextMenuEvent * e ); private: }; diff --git a/kommander/widgets/plugin.cpp b/kommander/widgets/plugin.cpp index 9319bc00..020ae6da 100644 --- a/kommander/widgets/plugin.cpp +++ b/kommander/widgets/plugin.cpp @@ -57,7 +57,7 @@ class KomStdPlugin : public KommanderPlugin { public: KomStdPlugin(); - virtual QWidget *create( const QString &key, QWidget *parent = 0, const char *name = 0 ); + virtual TQWidget *create( const TQString &key, TQWidget *parent = 0, const char *name = 0 ); }; KomStdPlugin::KomStdPlugin() @@ -80,7 +80,7 @@ KomStdPlugin::KomStdPlugin() 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("ToolBox", group, "", new TQIconSet(KGlobal::iconLoader()->loadIcon("toolbox", KIcon::NoGroup, KIcon::SizeMedium)), "", true); // addWidget("SubDialog", group, ""); addWidget("ListBox", group, "", 0); addWidget("Timer", group, "", 0); @@ -92,12 +92,12 @@ KomStdPlugin::KomStdPlugin() 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))); + addWidget("PopupMenu", group, "", new TQIconSet(KGlobal::iconLoader()->loadIcon("contents", KIcon::NoGroup, KIcon::SizeMedium))); + addWidget("FontDialog", group, "", new TQIconSet(KGlobal::iconLoader()->loadIcon("kfontcombo", KIcon::NoGroup, KIcon::SizeMedium))); + addWidget("AboutDialog", group, "", new TQIconSet(KGlobal::iconLoader()->loadIcon("kommander", KIcon::NoGroup, KIcon::SizeMedium))); } -QWidget *KomStdPlugin::create( const QString &key, QWidget *parent, const char *name ) +TQWidget *KomStdPlugin::create( const TQString &key, TQWidget *parent, const char *name ) { if (key == "ButtonGroup") return new ButtonGroup(parent, name); else if (key == "CheckBox") return new CheckBox(parent, name); diff --git a/kommander/widgets/popupmenu.cpp b/kommander/widgets/popupmenu.cpp index 696bd0be..48bb4474 100644 --- a/kommander/widgets/popupmenu.cpp +++ b/kommander/widgets/popupmenu.cpp @@ -12,7 +12,7 @@ #include "popupmenu.h" #include "specials.h" -#include +#include #include #include @@ -32,17 +32,17 @@ #define INSERTSUBMENU 109 #define LAST_FUNCTION INSERTSUBMENU -PopupMenu::PopupMenu(QWidget *parent, const char *name) - : QLabel(parent, name), KommanderWidget(this) +PopupMenu::PopupMenu(TQWidget *parent, const char *name) + : TQLabel(parent, name), KommanderWidget(this) { - QStringList states; + TQStringList states; states << "default"; setStates(states); setDisplayStates(states); if (KommanderWidget::inEditor) { setPixmap(KGlobal::iconLoader()->loadIcon("contents", KIcon::NoGroup, KIcon::SizeMedium)); - setFrameStyle(QFrame::Box | QFrame::Plain); + setFrameStyle(TQFrame::Box | TQFrame::Plain); setLineWidth(1); setFixedSize(pixmap()->size()); } @@ -50,19 +50,19 @@ PopupMenu::PopupMenu(QWidget *parent, const char *name) setHidden(true); m_menu = new KPopupMenu(this); - connect(m_menu, SIGNAL(activated(int)), this, SLOT(slotMenuItemActivated(int))); + connect(m_menu, TQT_SIGNAL(activated(int)), this, TQT_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); + KommanderPlugin::registerFunction(INSERTMENUITEM, "insertMenuItem(TQString widget, TQString text, TQString executeWidget, int index, TQString 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(TQString 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(TQString widget, int id, TQString text, TQString executeWidget, TQString 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(TQString widget, int id, bool enable)", i18n("Enable the item specified by id in the popup menu."), 3); + KommanderPlugin::registerFunction(ITEMENABLED, "itemEnabled(TQString widget, int id)", i18n("Check if the item specified by id is enabled."), 2); + KommanderPlugin::registerFunction(SETITEMVISIBLE, "setItemVisible(TQString widget, int id, bool enable)", i18n("Make the item specified by id visible."), 3); + KommanderPlugin::registerFunction(SETITEMCHECKED, "setItemChecked(TQString widget, int id, bool enable)", i18n("Apply checked status for the item specified by id."), 3); + KommanderPlugin::registerFunction(ITEMVISIBLE, "itemVisible(TQString widget, int id)", i18n("Check if the item specified by id is visible."), 2); + KommanderPlugin::registerFunction(ITEMCHECKED, "itemChecked(TQString widget, int id)", i18n("Verify if the item specified by id is checked."), 2); + KommanderPlugin::registerFunction(INSERTSUBMENU, "insertSubmenu(TQString widget, TQString text, TQString menuWidget, int index, TQString icon)", i18n("Insert submenu widget into the popup menu. Use -1 for index to insert to the end. The icon is optional."), 4, 5); } @@ -71,9 +71,9 @@ PopupMenu::~PopupMenu() delete m_menu; } -QString PopupMenu::currentState() const +TQString PopupMenu::currentState() const { - return QString("default"); + return TQString("default"); } bool PopupMenu::isKommanderWidget() const @@ -81,40 +81,40 @@ bool PopupMenu::isKommanderWidget() const return true; } -QStringList PopupMenu::associatedText() const +TQStringList PopupMenu::associatedText() const { return KommanderWidget::associatedText(); } -void PopupMenu::setAssociatedText(const QStringList& a_at) +void PopupMenu::setAssociatedText(const TQStringList& a_at) { KommanderWidget::setAssociatedText(a_at); } -void PopupMenu::setWidgetText(const QString& a_text) +void PopupMenu::setWidgetText(const TQString& a_text) { KommanderWidget::setAssociatedText(a_text); } -void PopupMenu::setPopulationText(const QString& a_text) +void PopupMenu::setPopulationText(const TQString& a_text) { KommanderWidget::setPopulationText(a_text); } -QString PopupMenu::populationText() const +TQString PopupMenu::populationText() const { return KommanderWidget::populationText(); } void PopupMenu::popup(int x, int y) { - m_menu->exec(QPoint(x, y)); + m_menu->exec(TQPoint(x, y)); } void PopupMenu::slotMenuItemActivated(int id) { - QString widget = m_associations[id]; - KommanderWidget::evalAssociatedText(QString("#!kommander\n%1.execute(%2)").arg(widget).arg(id)); + TQString widget = m_associations[id]; + KommanderWidget::evalAssociatedText(TQString("#!kommander\n%1.execute(%2)").arg(widget).arg(id)); } void PopupMenu::populate() @@ -122,17 +122,17 @@ void PopupMenu::populate() setAssociatedText(KommanderWidget::evalAssociatedText( populationText())); } -QString PopupMenu::insertSubmenu(const QString& title, const QString &menuWidget, int index, const QString& icon) +TQString PopupMenu::insertSubmenu(const TQString& title, const TQString &menuWidget, int index, const TQString& icon) { KommanderWidget *w = widgetByName(menuWidget); if (dynamic_cast(w)) { if (icon.isEmpty()) - return QString::number(m_menu->insertItem(title, dynamic_cast(w)->menu(), index)); + return TQString::number(m_menu->insertItem(title, dynamic_cast(w)->menu(), index)); else - return QString::number( m_menu->insertItem(KGlobal::iconLoader()->loadIcon(icon, KIcon::NoGroup, KIcon::SizeMedium), title, dynamic_cast(w)->menu(), index)); + return TQString::number( m_menu->insertItem(KGlobal::iconLoader()->loadIcon(icon, KIcon::NoGroup, KIcon::SizeMedium), title, dynamic_cast(w)->menu(), index)); } - return QString(); + return TQString(); } @@ -141,7 +141,7 @@ 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) +TQString PopupMenu::handleDCOP(int function, const TQStringList& args) { switch (function) { case DCOP::clear: @@ -161,7 +161,7 @@ QString PopupMenu::handleDCOP(int function, const QStringList& args) 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); + return TQString::number(id); break; } case INSERTSUBMENU: @@ -223,22 +223,22 @@ QString PopupMenu::handleDCOP(int function, const QStringList& args) case DCOP::item: { uint index = args[0].toInt(); - return index < m_params.count() ? m_params[index] : QString::null; + return index < m_params.count() ? m_params[index] : TQString::null; break; } case DCOP::count: - return QString::number(m_menu->count()); + return TQString::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()); + TQString geo = TQString::number(this->x())+" "+TQString::number(this->y())+" "+TQString::number(this->width())+" "+TQString::number(this->height()); return geo; break; } default: return KommanderWidget::handleDCOP(function, args); } - return QString(); + return TQString(); } diff --git a/kommander/widgets/popupmenu.h b/kommander/widgets/popupmenu.h index f2db18a6..dff28a86 100644 --- a/kommander/widgets/popupmenu.h +++ b/kommander/widgets/popupmenu.h @@ -12,8 +12,8 @@ #ifndef POPUPMENU_H #define POPUPMENU_H -#include -#include +#include +#include #include @@ -22,28 +22,28 @@ class KPopupMenu; /** @author Andras Mantia */ -class PopupMenu : public QLabel, public KommanderWidget +class PopupMenu : public TQLabel, 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(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false) + Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false) Q_PROPERTY(bool KommanderWidget READ isKommanderWidget) public: - PopupMenu(QWidget *parent = 0, const char *name = 0); + PopupMenu(TQWidget *parent = 0, const char *name = 0); ~PopupMenu(); virtual bool isKommanderWidget() const; - virtual QString currentState() const; + virtual TQString 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&); + virtual TQString handleDCOP(int function, const TQStringList& args); + virtual TQStringList associatedText() const; + virtual void setAssociatedText(const TQStringList&); + virtual TQString populationText() const; + virtual void setPopulationText(const TQString&); KPopupMenu *menu() {return m_menu;} public slots: - virtual void setWidgetText(const QString &); + virtual void setWidgetText(const TQString &); virtual void populate(); void popup(int x, int y); @@ -51,11 +51,11 @@ private slots: void slotMenuItemActivated(int id); private: - QString insertSubmenu(const QString& title, const QString &menuWidget, int index, const QString& icon); + TQString insertSubmenu(const TQString& title, const TQString &menuWidget, int index, const TQString& icon); KPopupMenu *m_menu; - QMap m_associations; - QStringList m_params; + TQMap m_associations; + TQStringList m_params; }; #endif diff --git a/kommander/widgets/progressbar.cpp b/kommander/widgets/progressbar.cpp index 874601f5..30d4f329 100644 --- a/kommander/widgets/progressbar.cpp +++ b/kommander/widgets/progressbar.cpp @@ -17,11 +17,11 @@ #include /* QT INCLUDES */ -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include /* OTHER INCLUDES */ #include @@ -35,25 +35,25 @@ enum Functions { LastFunction }; -ProgressBar::ProgressBar(QWidget *a_parent, const char *a_name) +ProgressBar::ProgressBar(TQWidget *a_parent, const char *a_name) : KProgress(a_parent, a_name), KommanderWidget(this) { - QStringList states; + TQStringList 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); + KommanderPlugin::registerFunction(PB_setHighlightColor, "setBarColor(TQString widget, TQString Color)", i18n("Sets the ProgresBar color"), 2); + KommanderPlugin::registerFunction(PB_setHightlightTextColor, "setBarTextColor(TQString widget, TQString Color)", i18n("Sets the ProgresBar text color"), 2); } ProgressBar::~ProgressBar() { } -QString ProgressBar::currentState() const +TQString ProgressBar::currentState() const { - return QString("default"); + return TQString("default"); } bool ProgressBar::isKommanderWidget() const @@ -61,22 +61,22 @@ bool ProgressBar::isKommanderWidget() const return true; } -QStringList ProgressBar::associatedText() const +TQStringList ProgressBar::associatedText() const { return KommanderWidget::associatedText(); } -void ProgressBar::setAssociatedText(const QStringList& a_at) +void ProgressBar::setAssociatedText(const TQStringList& a_at) { KommanderWidget::setAssociatedText(a_at); } -void ProgressBar::setPopulationText(const QString& a_text) +void ProgressBar::setPopulationText(const TQString& a_text) { KommanderWidget::setPopulationText(a_text); } -QString ProgressBar::populationText() const +TQString ProgressBar::populationText() const { return KommanderWidget::populationText(); } @@ -86,9 +86,9 @@ void ProgressBar::populate() setProgress(KommanderWidget::evalAssociatedText(populationText()).toUInt()); } -void ProgressBar::showEvent(QShowEvent *e) +void ProgressBar::showEvent(TQShowEvent *e) { - QProgressBar::showEvent(e); + TQProgressBar::showEvent(e); emit widgetOpened(); } @@ -97,11 +97,11 @@ 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) +TQString ProgressBar::handleDCOP(int function, const TQStringList& args) { switch (function) { case DCOP::text: - return QString::number(progress()); + return TQString::number(progress()); case DCOP::setText: setProgress(args[0].toUInt()); break; @@ -113,32 +113,32 @@ QString ProgressBar::handleDCOP(int function, const QStringList& args) break; case DCOP::geometry: { - QString geo = QString::number(this->x())+" "+QString::number(this->y())+" "+QString::number(this->width())+" "+QString::number(this->height()); + TQString geo = TQString::number(this->x())+" "+TQString::number(this->y())+" "+TQString::number(this->width())+" "+TQString::number(this->height()); return geo; break; } case PB_setHighlightColor: { - QColor color; + TQColor color; color.setNamedColor(args[0]); - QPalette p = this->palette(); - p.setColor(QPalette::Active, QColorGroup::Highlight, color); + TQPalette p = this->palette(); + p.setColor(TQPalette::Active, TQColorGroup::Highlight, color); this->setPalette( p, TRUE ); break; } case PB_setHightlightTextColor: { - QColor color; + TQColor color; color.setNamedColor(args[0]); - QPalette p = this->palette(); - p.setColor(QPalette::Active, QColorGroup::HighlightedText, color); + TQPalette p = this->palette(); + p.setColor(TQPalette::Active, TQColorGroup::HighlightedText, color); this->setPalette( p, TRUE ); break; } default: return KommanderWidget::handleDCOP(function, args); } - return QString(); + return TQString(); } #include "progressbar.moc" diff --git a/kommander/widgets/progressbar.h b/kommander/widgets/progressbar.h index b4aa3d94..d54e1185 100644 --- a/kommander/widgets/progressbar.h +++ b/kommander/widgets/progressbar.h @@ -19,9 +19,9 @@ /* KDE INCLUDES */ /* QT INCLUDES */ -#include -#include -#include +#include +#include +#include /* OTHER INCLUDES */ #include @@ -34,29 +34,29 @@ 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(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false) + Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false) Q_PROPERTY(bool KommanderWidget READ isKommanderWidget) public: - ProgressBar(QWidget *a_parent, const char *a_name); + ProgressBar(TQWidget *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 void setAssociatedText(const TQStringList&); + virtual TQStringList associatedText() const; + virtual TQString currentState() const; + virtual TQString populationText() const; + virtual void setPopulationText(const TQString&); - virtual QString handleDCOP(int function, const QStringList& args); + virtual TQString handleDCOP(int function, const TQStringList& args); virtual bool isFunctionSupported(int function); public slots: virtual void populate(); signals: void widgetOpened(); protected: - void showEvent(QShowEvent *e); + void showEvent(TQShowEvent *e); private: }; diff --git a/kommander/widgets/radiobutton.cpp b/kommander/widgets/radiobutton.cpp index a7faa91a..ba46248d 100644 --- a/kommander/widgets/radiobutton.cpp +++ b/kommander/widgets/radiobutton.cpp @@ -16,25 +16,25 @@ /* KDE INCLUDES */ /* QT INCLUDES */ -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include /* OTHER INCLUDES */ #include #include "radiobutton.h" -RadioButton::RadioButton(QWidget *a_parent, const char *a_name) - : QRadioButton(a_parent, a_name), KommanderWidget(this) +RadioButton::RadioButton(TQWidget *a_parent, const char *a_name) + : TQRadioButton(a_parent, a_name), KommanderWidget(this) { - QStringList states; + TQStringList states; states << "unchecked"; states << "checked"; setStates(states); - QStringList displayStates; + TQStringList displayStates; displayStates << "checked"; displayStates << "unchecked"; setDisplayStates(displayStates); @@ -44,7 +44,7 @@ RadioButton::~RadioButton() { } -QString RadioButton::currentState() const +TQString RadioButton::currentState() const { return (isChecked() ? "checked" : "unchecked"); } @@ -54,48 +54,48 @@ bool RadioButton::isKommanderWidget() const return true; } -QStringList RadioButton::associatedText() const +TQStringList RadioButton::associatedText() const { return KommanderWidget::associatedText(); } -void RadioButton::setAssociatedText(const QStringList& a_at) +void RadioButton::setAssociatedText(const TQStringList& a_at) { KommanderWidget::setAssociatedText(a_at); } -void RadioButton::setWidgetText(const QString &a_text) +void RadioButton::setWidgetText(const TQString &a_text) { setText(a_text); emit widgetTextChanged(a_text); } -void RadioButton::setPopulationText(const QString& a_text) +void RadioButton::setPopulationText(const TQString& a_text) { KommanderWidget::setPopulationText( a_text ); } -QString RadioButton::populationText() const +TQString RadioButton::populationText() const { return KommanderWidget::populationText(); } void RadioButton::populate() { - QString txt = KommanderWidget::evalAssociatedText( populationText() ); + TQString txt = KommanderWidget::evalAssociatedText( populationText() ); setWidgetText( txt ); } -void RadioButton::showEvent( QShowEvent *e ) +void RadioButton::showEvent( TQShowEvent *e ) { - QRadioButton::showEvent( e ); + TQRadioButton::showEvent( e ); emit widgetOpened(); } -void RadioButton::contextMenuEvent( QContextMenuEvent * e ) +void RadioButton::contextMenuEvent( TQContextMenuEvent * e ) { e->accept(); - QPoint p = e->globalPos(); + TQPoint p = e->globalPos(); emit contextMenuRequested(p.x(), p.y()); } @@ -104,7 +104,7 @@ 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) +TQString RadioButton::handleDCOP(int function, const TQStringList& args) { switch (function) { case DCOP::text: @@ -116,10 +116,10 @@ QString RadioButton::handleDCOP(int function, const QStringList& args) setChecked(args[0] != "false"); break; case DCOP::checked: - return QString::number(isOn()); + return TQString::number(isOn()); case DCOP::geometry: { - QString geo = QString::number(this->x())+" "+QString::number(this->y())+" "+QString::number(this->width())+" "+QString::number(this->height()); + TQString geo = TQString::number(this->x())+" "+TQString::number(this->y())+" "+TQString::number(this->width())+" "+TQString::number(this->height()); return geo; break; } @@ -128,7 +128,7 @@ QString RadioButton::handleDCOP(int function, const QStringList& args) break; case DCOP::setBackgroundColor: { - QColor color; + TQColor color; color.setNamedColor(args[0]); this->setPaletteBackgroundColor(color); break; @@ -136,7 +136,7 @@ QString RadioButton::handleDCOP(int function, const QStringList& args) default: return KommanderWidget::handleDCOP(function, args); } - return QString(); + return TQString(); } diff --git a/kommander/widgets/radiobutton.h b/kommander/widgets/radiobutton.h index f9fb5a16..88dcdcb1 100644 --- a/kommander/widgets/radiobutton.h +++ b/kommander/widgets/radiobutton.h @@ -19,10 +19,10 @@ /* KDE INCLUDES */ /* QT INCLUDES */ -#include -#include -#include -#include +#include +#include +#include +#include /* OTHER INCLUDES */ #include @@ -30,36 +30,36 @@ class QWidget; class QShowEvent; -class KOMMANDER_EXPORT RadioButton : public QRadioButton, public KommanderWidget +class KOMMANDER_EXPORT RadioButton : public TQRadioButton, 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(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false) + Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false) Q_PROPERTY(bool KommanderWidget READ isKommanderWidget) public: - RadioButton(QWidget *a_parent, const char *a_name); + RadioButton(TQWidget *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 void setAssociatedText(const TQStringList&); + virtual TQStringList associatedText() const; + virtual TQString currentState() const; + virtual TQString populationText() const; + virtual void setPopulationText(const TQString&); - virtual QString handleDCOP(int function, const QStringList& args); + virtual TQString handleDCOP(int function, const TQStringList& args); virtual bool isFunctionSupported(int function); public slots: - virtual void setWidgetText(const QString &); + virtual void setWidgetText(const TQString &); virtual void populate(); signals: void widgetOpened(); - void widgetTextChanged(const QString &); + void widgetTextChanged(const TQString &); void contextMenuRequested(int xpos, int ypos); protected: - void showEvent( QShowEvent *e ); - void contextMenuEvent( QContextMenuEvent * e ); + void showEvent( TQShowEvent *e ); + void contextMenuEvent( TQContextMenuEvent * e ); private: }; diff --git a/kommander/widgets/richtexteditor.cpp b/kommander/widgets/richtexteditor.cpp index eea0b0d6..9e54f07c 100644 --- a/kommander/widgets/richtexteditor.cpp +++ b/kommander/widgets/richtexteditor.cpp @@ -17,18 +17,18 @@ #include /* QT INCLUDES */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include /* OTHER INCLUDES */ #include @@ -42,38 +42,38 @@ #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) +RichTextEditor::RichTextEditor(TQWidget *a_parent, const char *a_name) + : TQWidget(a_parent, a_name), KommanderWidget((TQObject *)this) { - QStringList states; + TQStringList states; states << "default"; setStates(states); setDisplayStates(states); // setup toolbar - m_toolbar = new QFrame(this, "buttonBar"); + m_toolbar = new TQFrame(this, "buttonBar"); m_toolbar->setMinimumSize(0, 32); - m_toolbar->setFrameShape(QFrame::NoFrame); - m_toolbar->setFrameShadow(QFrame::Plain); + m_toolbar->setFrameShape(TQFrame::NoFrame); + m_toolbar->setFrameShadow(TQFrame::Plain); //setup textedit - m_textedit = new QTextEdit(this, "editor"); + m_textedit = new TQTextEdit(this, "editor"); m_textedit->setTextFormat(RichText); // layout the widgets - QVBoxLayout *layout = new QVBoxLayout(this); + TQVBoxLayout *layout = new TQVBoxLayout(this); layout->addWidget(m_toolbar); layout->addWidget(m_textedit); layout->setSpacing(1); // setup buttons - QHBoxLayout *tbLayout = new QHBoxLayout(m_toolbar); + TQHBoxLayout *tbLayout = new TQHBoxLayout(m_toolbar); //bold italic underline left right center link - m_formatGroup = new QHButtonGroup(m_toolbar, "formatGroup"); + m_formatGroup = new TQHButtonGroup(m_toolbar, "formatGroup"); //m_formatGroup->setFlat(true); - m_alignGroup = new QHButtonGroup(m_toolbar, "alignGroup"); + m_alignGroup = new TQHButtonGroup(m_toolbar, "alignGroup"); //m_alignGroup->setFlat(true); m_alignGroup->setExclusive(true); tbLayout->insertStretch(0); @@ -81,40 +81,40 @@ RichTextEditor::RichTextEditor(QWidget *a_parent, const char *a_name) tbLayout->addWidget(m_alignGroup); tbLayout->insertStretch(3); - m_buttonTextBold = new QToolButton(m_formatGroup, "textBold"); - m_buttonTextBold->setPixmap(QPixmap((const char **)bold_xpm)); + m_buttonTextBold = new TQToolButton(m_formatGroup, "textBold"); + m_buttonTextBold->setPixmap(TQPixmap((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)); + connect(m_buttonTextBold, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(textBold(bool))); + m_buttonTextItalic = new TQToolButton(m_formatGroup, "textItalic"); + m_buttonTextItalic->setPixmap(TQPixmap((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)); + connect(m_buttonTextItalic, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(textItalic(bool))); + m_buttonTextUnder = new TQToolButton(m_formatGroup, "textUnder"); + m_buttonTextUnder->setPixmap(TQPixmap((const char **)under_xpm)); m_buttonTextUnder->setToggleButton(true); - connect(m_buttonTextUnder, SIGNAL(toggled(bool)), this, SLOT(textUnder(bool))); + connect(m_buttonTextUnder, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(textUnder(bool))); - m_buttonTextLeft = new QToolButton(m_alignGroup, "textLeft"); - m_buttonTextLeft->setPixmap(QPixmap((const char **)left_xpm)); + m_buttonTextLeft = new TQToolButton(m_alignGroup, "textLeft"); + m_buttonTextLeft->setPixmap(TQPixmap((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 = new TQToolButton(m_alignGroup, "textCenter"); + m_buttonTextCenter->setPixmap(TQPixmap((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 = new TQToolButton(m_alignGroup, "textRight"); + m_buttonTextRight->setPixmap(TQPixmap((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_alignGroup, TQT_SIGNAL(clicked(int)), this, TQT_SLOT(textAlign(int))); + connect(m_textedit, TQT_SIGNAL(currentFontChanged(const TQFont &)), this, TQT_SLOT(fontChanged(const TQFont &))); + connect(m_textedit, TQT_SIGNAL(currentAlignmentChanged(int)), this, TQT_SLOT(alignmentChanged(int))); - connect(m_textedit, SIGNAL(textChanged()), this, SLOT(setTextChanged())); + connect(m_textedit, TQT_SIGNAL(textChanged()), this, TQT_SLOT(setTextChanged())); } -QString RichTextEditor::currentState() const +TQString RichTextEditor::currentState() const { - return QString("default"); + return TQString("default"); } RichTextEditor::~RichTextEditor() @@ -126,33 +126,33 @@ bool RichTextEditor::isKommanderWidget() const return true; } -QStringList RichTextEditor::associatedText() const +TQStringList RichTextEditor::associatedText() const { return KommanderWidget::associatedText(); } -void RichTextEditor::setAssociatedText(const QStringList& a_at) +void RichTextEditor::setAssociatedText(const TQStringList& a_at) { KommanderWidget::setAssociatedText(a_at); } -void RichTextEditor::setPopulationText(const QString& a_text) +void RichTextEditor::setPopulationText(const TQString& a_text) { KommanderWidget::setPopulationText( a_text ); } -QString RichTextEditor::populationText() const +TQString RichTextEditor::populationText() const { return KommanderWidget::populationText(); } void RichTextEditor::populate() { - QString txt = KommanderWidget::evalAssociatedText( populationText() ); + TQString txt = KommanderWidget::evalAssociatedText( populationText() ); setWidgetText( txt ); } -void RichTextEditor::setWidgetText(const QString &a_text) +void RichTextEditor::setWidgetText(const TQString &a_text) { m_textedit->setText(a_text); emit widgetTextChanged(a_text); @@ -180,7 +180,7 @@ void RichTextEditor::textItalic(bool a_isOn) void RichTextEditor::textAlign(int a_id) { - QToolButton *b = (QToolButton *)m_alignGroup->find(a_id); + TQToolButton *b = (TQToolButton *)m_alignGroup->find(a_id); if(b == m_buttonTextLeft) m_textedit->setAlignment(Qt::AlignLeft); else if(b == m_buttonTextCenter) @@ -189,7 +189,7 @@ void RichTextEditor::textAlign(int a_id) m_textedit->setAlignment(Qt::AlignRight); } -void RichTextEditor::fontChanged(const QFont &a_font) +void RichTextEditor::fontChanged(const TQFont &a_font) { m_buttonTextBold->setOn(a_font.bold()); m_buttonTextItalic->setOn(a_font.italic()); @@ -206,16 +206,16 @@ void RichTextEditor::alignmentChanged(int a_alignment) m_buttonTextRight->setOn(true); } -void RichTextEditor::showEvent( QShowEvent *e ) +void RichTextEditor::showEvent( TQShowEvent *e ) { - QWidget::showEvent(e); + TQWidget::showEvent(e); emit widgetOpened(); } -void RichTextEditor::contextMenuEvent( QContextMenuEvent * e ) +void RichTextEditor::contextMenuEvent( TQContextMenuEvent * e ) { e->accept(); - QPoint p = e->globalPos(); + TQPoint p = e->globalPos(); emit contextMenuRequested(p.x(), p.y()); } @@ -224,7 +224,7 @@ 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) +TQString RichTextEditor::handleDCOP(int function, const TQStringList& args) { switch (function) { case DCOP::text: @@ -243,7 +243,7 @@ QString RichTextEditor::handleDCOP(int function, const QStringList& args) default: return KommanderWidget::handleDCOP(function, args); } - return QString(); + return TQString(); } #include "richtexteditor.moc" diff --git a/kommander/widgets/richtexteditor.h b/kommander/widgets/richtexteditor.h index 4436d73f..5a0ab8d6 100644 --- a/kommander/widgets/richtexteditor.h +++ b/kommander/widgets/richtexteditor.h @@ -19,9 +19,9 @@ /* KDE INCLUDES */ /* QT INCLUDES */ -#include -#include -#include +#include +#include +#include /* OTHER INCLUDES */ #include @@ -34,51 +34,51 @@ class QToolButton; class QHButtonGroup; class QShowEvent; -class KOMMANDER_EXPORT RichTextEditor : public QWidget, public KommanderWidget +class KOMMANDER_EXPORT RichTextEditor : public TQWidget, 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(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false) + Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false) Q_PROPERTY(bool KommanderWidget READ isKommanderWidget) public: - RichTextEditor(QWidget *, const char *); + RichTextEditor(TQWidget *, 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&); + void setAssociatedText(const TQStringList&); + TQStringList associatedText() const; + TQString currentState() const; + virtual TQString populationText() const; + virtual void setPopulationText(const TQString&); - virtual QString handleDCOP(int function, const QStringList& args); + virtual TQString handleDCOP(int function, const TQStringList& args); virtual bool isFunctionSupported(int function); public slots: void setTextChanged(); - void setWidgetText(const QString &); + void setWidgetText(const TQString &); void textAlign(int); void textBold(bool); void textUnder(bool); void textItalic(bool); - void fontChanged(const QFont &); + void fontChanged(const TQFont &); void alignmentChanged(int); virtual void populate(); signals: void widgetOpened(); - void widgetTextChanged(const QString&); + void widgetTextChanged(const TQString&); void contextMenuRequested(int xpos, int ypos); protected: - void showEvent( QShowEvent *e ); - void contextMenuEvent( QContextMenuEvent * e ); + void showEvent( TQShowEvent *e ); + void contextMenuEvent( TQContextMenuEvent * e ); private: - QFrame *m_toolbar; - QTextEdit *m_textedit; + TQFrame *m_toolbar; + TQTextEdit *m_textedit; - QToolButton *m_buttonTextBold, *m_buttonTextUnder, *m_buttonTextItalic, + TQToolButton *m_buttonTextBold, *m_buttonTextUnder, *m_buttonTextItalic, *m_buttonTextLeft, *m_buttonTextCenter, *m_buttonTextRight; - QHButtonGroup *m_formatGroup, *m_alignGroup; + TQHButtonGroup *m_formatGroup, *m_alignGroup; }; diff --git a/kommander/widgets/scriptobject.cpp b/kommander/widgets/scriptobject.cpp index 859d87d0..2824d81f 100644 --- a/kommander/widgets/scriptobject.cpp +++ b/kommander/widgets/scriptobject.cpp @@ -14,8 +14,8 @@ * * ***************************************************************************/ /* QT INCLUDES */ -#include -#include +#include +#include /* KDE INCLUDES */ #include @@ -29,17 +29,17 @@ #include #include -ScriptObject::ScriptObject(QWidget *a_parent, const char *a_name) - : QLabel(a_parent, a_name), KommanderWidget(this) +ScriptObject::ScriptObject(TQWidget *a_parent, const char *a_name) + : TQLabel(a_parent, a_name), KommanderWidget(this) { - QStringList states; + TQStringList states; states << "default"; setStates(states); setDisplayStates(states); if (KommanderWidget::inEditor) { setPixmap(KGlobal::iconLoader()->loadIcon("shellscript", KIcon::NoGroup, KIcon::SizeMedium)); - setFrameStyle(QFrame::Box | QFrame::Plain); + setFrameStyle(TQFrame::Box | TQFrame::Plain); setLineWidth(1); setFixedSize(pixmap()->size()); } @@ -51,9 +51,9 @@ ScriptObject::~ScriptObject() { } -QString ScriptObject::currentState() const +TQString ScriptObject::currentState() const { - return QString("default"); + return TQString("default"); } bool ScriptObject::isKommanderWidget() const @@ -61,27 +61,27 @@ bool ScriptObject::isKommanderWidget() const return true; } -QStringList ScriptObject::associatedText() const +TQStringList ScriptObject::associatedText() const { return KommanderWidget::associatedText(); } -void ScriptObject::setAssociatedText(const QStringList& a_at) +void ScriptObject::setAssociatedText(const TQStringList& a_at) { KommanderWidget::setAssociatedText(a_at); } -void ScriptObject::setWidgetText(const QString& a_text) +void ScriptObject::setWidgetText(const TQString& a_text) { KommanderWidget::setAssociatedText(a_text); } -void ScriptObject::setPopulationText(const QString& a_text) +void ScriptObject::setPopulationText(const TQString& a_text) { KommanderWidget::setPopulationText(a_text); } -QString ScriptObject::populationText() const +TQString ScriptObject::populationText() const { return KommanderWidget::populationText(); } @@ -91,15 +91,15 @@ void ScriptObject::populate() setAssociatedText(KommanderWidget::evalAssociatedText(populationText())); } -QString ScriptObject::executeProcess(bool blocking) +TQString ScriptObject::executeProcess(bool blocking) { int index = ( states().findIndex( currentState()) ); if (index == -1) { printError(i18n("Invalid state for associated text.")); - return QString(); + return TQString(); } - QString evalText = m_associatedText[index]; + TQString evalText = m_associatedText[index]; if ((KommanderWidget::useInternalParser && !evalText.startsWith("#!")) || evalText.startsWith("#!kommander")) { @@ -119,14 +119,14 @@ void ScriptObject::execute() executeProcess(true); } -void ScriptObject::execute(const QString& s) +void ScriptObject::execute(const TQString& s) { m_params.clear(); m_params.append(s); executeProcess(true); } -void ScriptObject::execute(const QString& s1, const QString& s2) +void ScriptObject::execute(const TQString& s1, const TQString& s2) { m_params.clear(); m_params.append(s1); @@ -137,22 +137,22 @@ void ScriptObject::execute(const QString& s1, const QString& s2) void ScriptObject::execute(int i) { m_params.clear(); - m_params.append(QString::number(i)); + m_params.append(TQString::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)); + m_params.append(TQString::number(i)); + m_params.append(TQString::number(j)); executeProcess(true); } void ScriptObject::execute(bool i) { m_params.clear(); - m_params.append(QString::number(i)); + m_params.append(TQString::number(i)); executeProcess(true); } @@ -162,14 +162,14 @@ bool ScriptObject::isFunctionSupported(int f) || f == DCOP::count; } -QString ScriptObject::handleDCOP(int function, const QStringList& args) +TQString ScriptObject::handleDCOP(int function, const TQStringList& args) { switch (function) { case DCOP::setText: setAssociatedText(args[0]); break; case DCOP::clear: - setAssociatedText(QString::null); + setAssociatedText(TQString::null); break; case DCOP::execute: m_params = args; @@ -178,14 +178,14 @@ QString ScriptObject::handleDCOP(int function, const QStringList& args) case DCOP::item: { uint index = args[0].toInt(); - return index < m_params.count() ? m_params[index] : QString::null; + return index < m_params.count() ? m_params[index] : TQString::null; } case DCOP::count: - return QString::number(m_params.count()); + return TQString::number(m_params.count()); default: return KommanderWidget::handleDCOP(function, args); } - return QString(); + return TQString(); } #include "scriptobject.moc" diff --git a/kommander/widgets/scriptobject.h b/kommander/widgets/scriptobject.h index 3906d5e4..325903cc 100644 --- a/kommander/widgets/scriptobject.h +++ b/kommander/widgets/scriptobject.h @@ -20,39 +20,39 @@ /* KDE INCLUDES */ /* QT INCLUDES */ -#include +#include /* OTHER INCLUDES */ #include #include -class KOMMANDER_EXPORT ScriptObject : public QLabel, public KommanderWidget +class KOMMANDER_EXPORT ScriptObject : public TQLabel, 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(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false) + Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false) Q_PROPERTY(bool KommanderWidget READ isKommanderWidget) public: - ScriptObject(QWidget *a_parent, const char *a_name); + ScriptObject(TQWidget *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 void setAssociatedText(const TQStringList&); + virtual TQStringList associatedText() const; + virtual TQString currentState() const; + virtual TQString populationText() const; + virtual void setPopulationText(const TQString&); - virtual QString handleDCOP(int function, const QStringList& args); + virtual TQString handleDCOP(int function, const TQStringList& args); virtual bool isFunctionSupported(int function); public slots: - virtual void setWidgetText(const QString &); + virtual void setWidgetText(const TQString &); virtual void populate(); virtual void execute(); - virtual void execute(const QString&); - virtual void execute(const QString&, const QString&); + virtual void execute(const TQString&); + virtual void execute(const TQString&, const TQString&); virtual void execute(int); virtual void execute(int, int); virtual void execute(bool); @@ -60,9 +60,9 @@ signals: void widgetOpened(); protected: - virtual QString executeProcess(bool blocking); + virtual TQString executeProcess(bool blocking); private: - QStringList m_params; + TQStringList m_params; }; #endif diff --git a/kommander/widgets/slider.cpp b/kommander/widgets/slider.cpp index 52f6d47a..b3bef6fc 100644 --- a/kommander/widgets/slider.cpp +++ b/kommander/widgets/slider.cpp @@ -15,25 +15,25 @@ ***************************************************************************/ /* QT INCLUDES */ -#include -#include +#include +#include /* OTHER INCLUDES */ #include #include "slider.h" -Slider::Slider(QWidget * a_parent, const char *a_name) - : QSlider(a_parent, a_name), KommanderWidget((QObject *) this) +Slider::Slider(TQWidget * a_parent, const char *a_name) + : TQSlider(a_parent, a_name), KommanderWidget((TQObject *) this) { - QStringList states; + TQStringList states; states << "default"; setStates(states); setDisplayStates(states); } -QString Slider::currentState() const +TQString Slider::currentState() const { - return QString("default"); + return TQString("default"); } Slider::~Slider() @@ -45,40 +45,40 @@ bool Slider::isKommanderWidget() const return true; } -QStringList Slider::associatedText() const +TQStringList Slider::associatedText() const { return KommanderWidget::associatedText(); } -void Slider::setAssociatedText(const QStringList & a_at) +void Slider::setAssociatedText(const TQStringList & a_at) { KommanderWidget::setAssociatedText(a_at); } -void Slider::setPopulationText(const QString & a_text) +void Slider::setPopulationText(const TQString & a_text) { KommanderWidget::setPopulationText(a_text); } -QString Slider::populationText() const +TQString Slider::populationText() const { return KommanderWidget::populationText(); } void Slider::populate() { - QString txt = KommanderWidget::evalAssociatedText(populationText()); + TQString txt = KommanderWidget::evalAssociatedText(populationText()); setWidgetText(txt); } -void Slider::setWidgetText(const QString & a_text) +void Slider::setWidgetText(const TQString & a_text) { setValue(a_text.toInt()); } -void Slider::showEvent(QShowEvent * e) +void Slider::showEvent(TQShowEvent * e) { - QSlider::showEvent(e); + TQSlider::showEvent(e); emit widgetOpened(); } @@ -87,11 +87,11 @@ 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) +TQString Slider::handleDCOP(int function, const TQStringList& args) { switch (function) { case DCOP::text: - return QString::number(value()); + return TQString::number(value()); case DCOP::setText: setValue(args[0].toInt()); break; @@ -106,7 +106,7 @@ QString Slider::handleDCOP(int function, const QStringList& args) break; case DCOP::setBackgroundColor: { - QColor color; + TQColor color; color.setNamedColor(args[0]); this->setPaletteBackgroundColor(color); break; @@ -114,7 +114,7 @@ QString Slider::handleDCOP(int function, const QStringList& args) default: return KommanderWidget::handleDCOP(function, args); } - return QString(); + return TQString(); } diff --git a/kommander/widgets/slider.h b/kommander/widgets/slider.h index 59526deb..365abe3c 100644 --- a/kommander/widgets/slider.h +++ b/kommander/widgets/slider.h @@ -17,44 +17,44 @@ #define _HAVE_SLIDER_H_ /* KDE INCLUDES */ -#include +#include /* QT INCLUDES */ -#include -#include +#include +#include /* OTHER INCLUDES */ #include #include class QShowEvent; -class KOMMANDER_EXPORT Slider: public QSlider, public KommanderWidget +class KOMMANDER_EXPORT Slider: public TQSlider, 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_OBJECT Q_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false) + Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false) Q_PROPERTY(bool KommanderWidget READ isKommanderWidget) public: - Slider(QWidget*, const char*); + Slider(TQWidget*, 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 void setAssociatedText(const TQStringList &); + virtual TQStringList associatedText() const; + virtual TQString currentState() const; + virtual TQString populationText() const; + virtual void setPopulationText(const TQString &); - virtual QString handleDCOP(int function, const QStringList& args); + virtual TQString handleDCOP(int function, const TQStringList& args); virtual bool isFunctionSupported(int function); public slots: - virtual void setWidgetText(const QString &); + virtual void setWidgetText(const TQString &); virtual void populate(); signals: void widgetOpened(); protected: - void showEvent(QShowEvent* e); + void showEvent(TQShowEvent* e); }; #endif diff --git a/kommander/widgets/spinboxint.cpp b/kommander/widgets/spinboxint.cpp index ce013333..a2b9af6a 100644 --- a/kommander/widgets/spinboxint.cpp +++ b/kommander/widgets/spinboxint.cpp @@ -16,21 +16,21 @@ /* KDE INCLUDES */ /* QT INCLUDES */ -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include /* OTHER INCLUDES */ #include #include "spinboxint.h" -SpinBoxInt::SpinBoxInt(QWidget *a_parent, const char *a_name) - : QSpinBox(a_parent, a_name), KommanderWidget(this) +SpinBoxInt::SpinBoxInt(TQWidget *a_parent, const char *a_name) + : TQSpinBox(a_parent, a_name), KommanderWidget(this) { - QStringList states; + TQStringList states; states << "default"; setStates(states); setDisplayStates(states); @@ -40,7 +40,7 @@ SpinBoxInt::~SpinBoxInt() { } -QString SpinBoxInt::currentState() const +TQString SpinBoxInt::currentState() const { return "default"; } @@ -50,22 +50,22 @@ bool SpinBoxInt::isKommanderWidget() const return true; } -QStringList SpinBoxInt::associatedText() const +TQStringList SpinBoxInt::associatedText() const { return KommanderWidget::associatedText(); } -void SpinBoxInt::setAssociatedText(const QStringList& a_at) +void SpinBoxInt::setAssociatedText(const TQStringList& a_at) { KommanderWidget::setAssociatedText(a_at); } -void SpinBoxInt::setPopulationText(const QString& a_text) +void SpinBoxInt::setPopulationText(const TQString& a_text) { KommanderWidget::setPopulationText(a_text); } -QString SpinBoxInt::populationText() const +TQString SpinBoxInt::populationText() const { return KommanderWidget::populationText(); } @@ -75,27 +75,27 @@ void SpinBoxInt::populate() setWidgetText(KommanderWidget::evalAssociatedText( populationText())); } -void SpinBoxInt::setWidgetText(const QString &a_text) +void SpinBoxInt::setWidgetText(const TQString &a_text) { setValue(a_text.toInt()); emit widgetTextChanged(a_text); } -void SpinBoxInt::showEvent( QShowEvent *e ) +void SpinBoxInt::showEvent( TQShowEvent *e ) { - QSpinBox::showEvent(e); + TQSpinBox::showEvent(e); emit widgetOpened(); } -void SpinBoxInt::focusOutEvent( QFocusEvent * e) +void SpinBoxInt::focusOutEvent( TQFocusEvent * e) { - QSpinBox::focusOutEvent(e); + TQSpinBox::focusOutEvent(e); emit lostFocus(); } -void SpinBoxInt::focusInEvent( QFocusEvent * e) +void SpinBoxInt::focusInEvent( TQFocusEvent * e) { - QSpinBox::focusInEvent(e); + TQSpinBox::focusInEvent(e); emit gotFocus(); } @@ -104,7 +104,7 @@ 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) +TQString SpinBoxInt::handleDCOP(int function, const TQStringList& args) { switch (function) { case DCOP::text: @@ -117,7 +117,7 @@ QString SpinBoxInt::handleDCOP(int function, const QStringList& args) break; case DCOP::geometry: { - QString geo = QString::number(this->x())+" "+QString::number(this->y())+" "+QString::number(this->width())+" "+QString::number(this->height()); + TQString geo = TQString::number(this->x())+" "+TQString::number(this->y())+" "+TQString::number(this->width())+" "+TQString::number(this->height()); return geo; break; } @@ -126,7 +126,7 @@ QString SpinBoxInt::handleDCOP(int function, const QStringList& args) break; case DCOP::setBackgroundColor: { - QColor color; + TQColor color; color.setNamedColor(args[0]); this->setPaletteBackgroundColor(color); break; @@ -134,7 +134,7 @@ QString SpinBoxInt::handleDCOP(int function, const QStringList& args) default: return KommanderWidget::handleDCOP(function, args); } - return QString(); + return TQString(); } #include "spinboxint.moc" diff --git a/kommander/widgets/spinboxint.h b/kommander/widgets/spinboxint.h index 03c30b24..ffd135e7 100644 --- a/kommander/widgets/spinboxint.h +++ b/kommander/widgets/spinboxint.h @@ -19,10 +19,10 @@ /* KDE INCLUDES */ /* QT INCLUDES */ -#include -#include -#include -#include +#include +#include +#include +#include /* OTHER INCLUDES */ #include @@ -30,38 +30,38 @@ class QWidget; class QShowEvent; -class KOMMANDER_EXPORT SpinBoxInt : public QSpinBox, public KommanderWidget +class KOMMANDER_EXPORT SpinBoxInt : public TQSpinBox, 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(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false) + Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false) Q_PROPERTY(bool KommanderWidget READ isKommanderWidget) public: - SpinBoxInt(QWidget *a_parent, const char *a_name); + SpinBoxInt(TQWidget *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 void setAssociatedText(const TQStringList&); + virtual TQStringList associatedText() const; + virtual TQString currentState() const; + virtual TQString populationText() const; + virtual void setPopulationText(const TQString&); - virtual QString handleDCOP(int function, const QStringList& args); + virtual TQString handleDCOP(int function, const TQStringList& args); virtual bool isFunctionSupported(int function); public slots: - virtual void setWidgetText(const QString&); + virtual void setWidgetText(const TQString&); virtual void populate(); signals: void widgetOpened(); - void widgetTextChanged(const QString&); + void widgetTextChanged(const TQString&); void lostFocus(); void gotFocus(); protected: - void showEvent(QShowEvent *e); - void focusOutEvent( QFocusEvent* e); - void focusInEvent( QFocusEvent* e); + void showEvent(TQShowEvent *e); + void focusOutEvent( TQFocusEvent* e); + void focusInEvent( TQFocusEvent* e); private: }; diff --git a/kommander/widgets/statusbar.cpp b/kommander/widgets/statusbar.cpp index 90b23999..59070884 100644 --- a/kommander/widgets/statusbar.cpp +++ b/kommander/widgets/statusbar.cpp @@ -16,24 +16,24 @@ /* KDE INCLUDES */ /* QT INCLUDES */ -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include /* OTHER INCLUDES */ #include #include "statusbar.h" -StatusBar::StatusBar(QWidget *a_parent, const char *a_name) +StatusBar::StatusBar(TQWidget *a_parent, const char *a_name) : KStatusBar(a_parent, a_name), KommanderWidget(this) { - QStringList states; + TQStringList states; states << "default"; setStates(states); setDisplayStates(states); - insertItem(QString::null, 0, 1); + insertItem(TQString::null, 0, 1); setItemAlignment(0, Qt::AlignLeft); } @@ -41,9 +41,9 @@ StatusBar::~StatusBar() { } -QString StatusBar::currentState() const +TQString StatusBar::currentState() const { - return QString("default"); + return TQString("default"); } bool StatusBar::isKommanderWidget() const @@ -51,22 +51,22 @@ bool StatusBar::isKommanderWidget() const return true; } -QStringList StatusBar::associatedText() const +TQStringList StatusBar::associatedText() const { return KommanderWidget::associatedText(); } -void StatusBar::setAssociatedText(const QStringList& a_at) +void StatusBar::setAssociatedText(const TQStringList& a_at) { KommanderWidget::setAssociatedText(a_at); } -void StatusBar::setPopulationText(const QString& a_text) +void StatusBar::setPopulationText(const TQString& a_text) { KommanderWidget::setPopulationText(a_text); } -QString StatusBar::populationText() const +TQString StatusBar::populationText() const { return KommanderWidget::populationText(); } @@ -76,16 +76,16 @@ void StatusBar::populate() changeItem(KommanderWidget::evalAssociatedText(populationText()), 0); } -void StatusBar::showEvent(QShowEvent *e) +void StatusBar::showEvent(TQShowEvent *e) { - QStatusBar::showEvent(e); + TQStatusBar::showEvent(e); emit widgetOpened(); } -void StatusBar::contextMenuEvent( QContextMenuEvent * e ) +void StatusBar::contextMenuEvent( TQContextMenuEvent * e ) { e->accept(); - QPoint p = e->globalPos(); + TQPoint p = e->globalPos(); emit contextMenuRequested(p.x(), p.y()); } @@ -94,7 +94,7 @@ 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) +TQString StatusBar::handleDCOP(int function, const TQStringList& args) { switch (function) { case DCOP::setText: @@ -117,7 +117,7 @@ QString StatusBar::handleDCOP(int function, const QStringList& args) break; case DCOP::setBackgroundColor: { - QColor color; + TQColor color; color.setNamedColor(args[0]); this->setPaletteBackgroundColor(color); break; @@ -125,7 +125,7 @@ QString StatusBar::handleDCOP(int function, const QStringList& args) default: return KommanderWidget::handleDCOP(function, args); } - return QString(); + return TQString(); } #include "statusbar.moc" diff --git a/kommander/widgets/statusbar.h b/kommander/widgets/statusbar.h index 4920abca..30b9beae 100644 --- a/kommander/widgets/statusbar.h +++ b/kommander/widgets/statusbar.h @@ -19,9 +19,9 @@ /* KDE INCLUDES */ /* QT INCLUDES */ -#include -#include -#include +#include +#include +#include /* OTHER INCLUDES */ #include @@ -34,22 +34,22 @@ 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(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false) + Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false) Q_PROPERTY(bool KommanderWidget READ isKommanderWidget) public: - StatusBar(QWidget *a_parent, const char *a_name); + StatusBar(TQWidget *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 void setAssociatedText(const TQStringList&); + virtual TQStringList associatedText() const; + virtual TQString currentState() const; + virtual TQString populationText() const; + virtual void setPopulationText(const TQString&); - virtual QString handleDCOP(int function, const QStringList& args); + virtual TQString handleDCOP(int function, const TQStringList& args); virtual bool isFunctionSupported(int function); public slots: virtual void populate(); @@ -57,8 +57,8 @@ signals: void widgetOpened(); void contextMenuRequested(int xpos, int ypos); protected: - void showEvent(QShowEvent *e); - void contextMenuEvent( QContextMenuEvent * e ); + void showEvent(TQShowEvent *e); + void contextMenuEvent( TQContextMenuEvent * e ); private: }; diff --git a/kommander/widgets/subdialog.cpp b/kommander/widgets/subdialog.cpp index 4986d174..292ac541 100644 --- a/kommander/widgets/subdialog.cpp +++ b/kommander/widgets/subdialog.cpp @@ -16,13 +16,13 @@ /* KDE INCLUDES */ /* QT INCLUDES */ -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include /* OTHER INCLUDES */ #include @@ -31,15 +31,15 @@ #include #include "subdialog.h" -SubDialog::SubDialog(QWidget *a_parent, const char *a_name) - : QPushButton(a_parent, a_name), KommanderWidget(this), m_dialog(0) +SubDialog::SubDialog(TQWidget *a_parent, const char *a_name) + : TQPushButton(a_parent, a_name), KommanderWidget(this), m_dialog(0) { - QStringList states; + TQStringList states; states << "default"; setStates(states); setDisplayStates(states); - connect(this, SIGNAL(clicked()), this, SLOT(showDialog())); + connect(this, TQT_SIGNAL(clicked()), this, TQT_SLOT(showDialog())); } @@ -47,9 +47,9 @@ SubDialog::~SubDialog() { } -QString SubDialog::currentState() const +TQString SubDialog::currentState() const { - return QString("default"); + return TQString("default"); } bool SubDialog::isKommanderWidget() const @@ -57,39 +57,39 @@ bool SubDialog::isKommanderWidget() const return true; } -QStringList SubDialog::associatedText() const +TQStringList SubDialog::associatedText() const { return KommanderWidget::associatedText(); } -void SubDialog::setAssociatedText(const QStringList& a_at) +void SubDialog::setAssociatedText(const TQStringList& a_at) { KommanderWidget::setAssociatedText(a_at); } -void SubDialog::setPopulationText(const QString& a_text) +void SubDialog::setPopulationText(const TQString& a_text) { KommanderWidget::setPopulationText( a_text ); } -QString SubDialog::populationText() const +TQString SubDialog::populationText() const { return KommanderWidget::populationText(); } void SubDialog::populate() { - QString txt = KommanderWidget::evalAssociatedText( populationText() ); + TQString txt = KommanderWidget::evalAssociatedText( populationText() ); //FIXME } -void SubDialog::setKmdrFile(QString a_kmdrFile) +void SubDialog::setKmdrFile(TQString a_kmdrFile) { m_kmdrFile = a_kmdrFile; } -QString SubDialog::kmdrFile() const +TQString SubDialog::kmdrFile() const { return m_kmdrFile; } @@ -99,11 +99,11 @@ void SubDialog::showDialog() delete m_dialog; KommanderFactory::loadPlugins(); - m_dialog = (QDialog *)KommanderFactory::create(kmdrFile()); + m_dialog = (TQDialog *)KommanderFactory::create(kmdrFile()); if(!m_dialog) { kdWarning() << "Creation of sub dialog failed .." << endl; - connect(m_dialog, SIGNAL(finished()), this, SLOT(slotFinished())); + connect(m_dialog, TQT_SIGNAL(finished()), this, TQT_SLOT(slotFinished())); m_dialog->exec(); } @@ -119,19 +119,19 @@ void SubDialog::slotFinished() } } -void SubDialog::showEvent( QShowEvent *e ) +void SubDialog::showEvent( TQShowEvent *e ) { - QPushButton::showEvent( e ); + TQPushButton::showEvent( e ); emit widgetOpened(); } -QString SubDialog::handleDCOP(int function, const QStringList& args) +TQString SubDialog::handleDCOP(int function, const TQStringList& args) { switch (function) { case DCOP::text: { if (!m_dialog) - return QString(); + return TQString(); KommanderWidget *atw = dynamic_cast(m_dialog); if(atw) return atw->evalAssociatedText(); @@ -139,7 +139,7 @@ QString SubDialog::handleDCOP(int function, const QStringList& args) default: return KommanderWidget::handleDCOP(function, args); } - return QString(); + return TQString(); } diff --git a/kommander/widgets/subdialog.h b/kommander/widgets/subdialog.h index ad19fec5..941455ca 100644 --- a/kommander/widgets/subdialog.h +++ b/kommander/widgets/subdialog.h @@ -19,10 +19,10 @@ /* KDE INCLUDES */ /* QT INCLUDES */ -#include -#include -#include -#include +#include +#include +#include +#include /* OTHER INCLUDES */ #include @@ -31,39 +31,39 @@ class QWidget; class QDialog; class QShowEvent; -class KOMMANDER_EXPORT SubDialog : public QPushButton, public KommanderWidget +class KOMMANDER_EXPORT SubDialog : public TQPushButton, 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(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false) + Q_PROPERTY(TQString kmdrFile READ kmdrFile WRITE setKmdrFile) + Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false) Q_PROPERTY(bool KommanderWidget READ isKommanderWidget) public: - SubDialog(QWidget *a_parent, const char *a_name); + SubDialog(TQWidget *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 void setAssociatedText(const TQStringList&); + virtual TQStringList associatedText() const; + virtual TQString currentState() const; + virtual TQString populationText() const; + virtual void setPopulationText(const TQString&); + TQString kmdrFile() const; - virtual QString handleDCOP(int function, const QStringList& args); + virtual TQString handleDCOP(int function, const TQStringList& args); public slots: - void setKmdrFile(QString); + void setKmdrFile(TQString); virtual void showDialog(); virtual void slotFinished(); virtual void populate(); signals: void widgetOpened(); - void widgetTextChanged(const QString &); + void widgetTextChanged(const TQString &); protected: - QDialog *m_dialog; - QString m_kmdrFile; - void showEvent( QShowEvent *e ); + TQDialog *m_dialog; + TQString m_kmdrFile; + void showEvent( TQShowEvent *e ); private: }; diff --git a/kommander/widgets/table.cpp b/kommander/widgets/table.cpp index 358b548b..b7e2d68a 100644 --- a/kommander/widgets/table.cpp +++ b/kommander/widgets/table.cpp @@ -20,11 +20,11 @@ #include /* QT INCLUDES */ -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include /* OTHER INCLUDES */ #include "kommanderplugin.h" @@ -47,24 +47,24 @@ enum Functions { }; -Table::Table(QWidget *a_parent, const char *a_name) - : QTable(a_parent, a_name), KommanderWidget(this) +Table::Table(TQWidget *a_parent, const char *a_name) + : TQTable(a_parent, a_name), KommanderWidget(this) { - QStringList states; + TQStringList 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
Not guaranteed to have KDE4 compatiblility"), 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.
Not guaranteed to have KDE4 compatiblility"), 2); - KommanderPlugin::registerFunction(TBL_setColumnReadOnly, "setColumnReadOnly(QString widget, int col, bool Readonly)", i18n("Set the column read only using zero based index.
Not guaranteed to have KDE4 compatiblility"), 3); - KommanderPlugin::registerFunction(TBL_setRowReadOnly, "setRowReadOnly(QString widget, int row, bool Readonly)", i18n("Set the row read only using zero based index.
Not guaranteed to have KDE4 compatiblility"), 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); + KommanderPlugin::registerFunction(TBL_sortColumnExtra, "sortColumnExtra(TQString 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(TQString widget, int row, int col)", i18n("Scrolls the table so the cell indicated is visible."), 3); + KommanderPlugin::registerFunction(TBL_selectCells, "selectCells(TQString widget, int row, int col, int row, int col)", i18n("Select cells using the upper left and lower right cell addresses
Not guaranteed to have KDE4 compatiblility"), 5); + KommanderPlugin::registerFunction(TBL_selectRow, "selectRow(TQString widget, int row)", i18n("Select the row with the zero based index."), 2); + KommanderPlugin::registerFunction(TBL_selectColumn, "selectColumn(TQString widget, int col)", i18n("Select the column with the zero based index.
Not guaranteed to have KDE4 compatiblility"), 2); + KommanderPlugin::registerFunction(TBL_setColumnReadOnly, "setColumnReadOnly(TQString widget, int col, bool Readonly)", i18n("Set the column read only using zero based index.
Not guaranteed to have KDE4 compatiblility"), 3); + KommanderPlugin::registerFunction(TBL_setRowReadOnly, "setRowReadOnly(TQString widget, int row, bool Readonly)", i18n("Set the row read only using zero based index.
Not guaranteed to have KDE4 compatiblility"), 3); + KommanderPlugin::registerFunction(TBL_rowCount, "rowCount(TQString widget)", i18n("Returns the number of rows of the table"), 1); + KommanderPlugin::registerFunction(TBL_colHeader, "columnHeader(TQString widget, int Column)", i18n("Returns the text of the header for the column index"), 2); + KommanderPlugin::registerFunction(TBL_rowHeader, "rowHeader(TQString widget, int Row)", i18n("Returns the text of the header for the row index"), 2); } @@ -72,9 +72,9 @@ Table::~Table() { } -QString Table::currentState() const +TQString Table::currentState() const { - return QString("default"); + return TQString("default"); } bool Table::isKommanderWidget() const @@ -82,22 +82,22 @@ bool Table::isKommanderWidget() const return true; } -QStringList Table::associatedText() const +TQStringList Table::associatedText() const { return KommanderWidget::associatedText(); } -void Table::setAssociatedText(const QStringList& a_at) +void Table::setAssociatedText(const TQStringList& a_at) { KommanderWidget::setAssociatedText(a_at); } -void Table::setPopulationText(const QString& a_text) +void Table::setPopulationText(const TQString& a_text) { KommanderWidget::setPopulationText(a_text); } -QString Table::populationText() const +TQString Table::populationText() const { return KommanderWidget::populationText(); } @@ -107,14 +107,14 @@ void Table::populate() setWidgetText(KommanderWidget::evalAssociatedText( populationText())); } -void Table::setWidgetText(const QString&) +void Table::setWidgetText(const TQString&) { } -QString Table::selectedArea() +TQString Table::selectedArea() { - QTableSelection sel = selection(currentSelection()); - return QString("%1,%2,%3,%4").arg(sel.topRow()).arg(sel.leftCol()).arg(sel.bottomRow()).arg(sel.rightCol()); + TQTableSelection sel = selection(currentSelection()); + return TQString("%1,%2,%3,%4").arg(sel.topRow()).arg(sel.leftCol()).arg(sel.bottomRow()).arg(sel.rightCol()); } @@ -126,48 +126,48 @@ bool Table::isFunctionSupported(int f) 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) +void Table::setCellWidget(int row, int col, const TQString & _widgetName) { KommanderWidget *w = widgetByName(_widgetName); if (w) { - QWidget *widget = static_cast(w->object()); - if (QTable::cellWidget(row, col) != widget) + TQWidget *widget = static_cast(w->object()); + if (TQTable::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); + TQTable::ensureCellVisible(row, col); clearCellWidget(row, col); - QTable::setCellWidget(row, col, widget); + TQTable::setCellWidget(row, col, widget); } } else clearCellWidget(row, col); } -QString Table::cellWidget(int row, int col) +TQString Table::cellWidget(int row, int col) { - QWidget *widget = QTable::cellWidget(row, col); + TQWidget *widget = TQTable::cellWidget(row, col); if (widget) { KommanderWidget *w = widgetByName(widget->name()); if (w) return widget->name(); } - return QString(); + return TQString(); } -void Table::setCellText(int row, int col, const QString& text) +void Table::setCellText(int row, int col, const TQString& text) { - QWidget *widget = QTable::cellWidget(row, col); + TQWidget *widget = TQTable::cellWidget(row, col); if (widget) { KommanderWidget *w = widgetByName(widget->name()); if (w) - widget->reparent(parentDialog(), QPoint(0,0)); + widget->reparent(parentDialog(), TQPoint(0,0)); } setText(row, col, text); endEdit(row, col, false, false); @@ -175,13 +175,13 @@ void Table::setCellText(int row, int col, const QString& text) void Table::clearCellWidget(int row, int col) { - QTable::clearCellWidget(row, col); //just for debugging + TQTable::clearCellWidget(row, col); //just for debugging } -void Table::contextMenuEvent( QContextMenuEvent * e ) +void Table::contextMenuEvent( TQContextMenuEvent * e ) { e->accept(); - QPoint p = e->globalPos(); + TQPoint p = e->globalPos(); emit contextMenuRequested(p.x(), p.y()); } @@ -194,7 +194,7 @@ void Table::columnClicked(int col) sortColumn( col, ascending, TRUE); } -QString Table::handleDCOP(int function, const QStringList& args) +TQString Table::handleDCOP(int function, const TQStringList& args) { switch (function) { @@ -218,11 +218,11 @@ QString Table::handleDCOP(int function, const QStringList& args) insertColumns(args[0].toInt(), args.count() == 1 ? 1 : args[1].toInt()); break; case DCOP::currentColumn: - return QString::number(currentColumn()); + return TQString::number(currentColumn()); case DCOP::currentRow: - return QString::number(currentRow()); + return TQString::number(currentRow()); case DCOP::columnCount: - return QString::number(numCols()); + return TQString::number(numCols()); break; case DCOP::removeColumn: if (numCols() >= args[0].toInt()) @@ -239,7 +239,7 @@ QString Table::handleDCOP(int function, const QStringList& args) break; } case TBL_rowCount: - return QString::number(numRows()); + return TQString::number(numRows()); break; case DCOP::removeRow: { @@ -259,10 +259,10 @@ QString Table::handleDCOP(int function, const QStringList& args) break; case DCOP::text: { - QString rows; + TQString rows; for (int r = 0; r < numRows(); r++) { - QString row; + TQString row; for (int c = 0; c < numCols(); c++) { if (c) @@ -280,17 +280,17 @@ QString Table::handleDCOP(int function, const QStringList& args) int r = 0, c = 0; setNumCols(0); setNumRows(0); - QStringList rows; - QStringList row; - rows = QStringList::split("\n", args[0], true); + TQStringList rows; + TQStringList row; + rows = TQStringList::split("\n", args[0], true); setNumRows(rows.count()); - for (QStringList::Iterator it = rows.begin(); it != rows.end(); ++it, ++r) + for (TQStringList::Iterator it = rows.begin(); it != rows.end(); ++it, ++r) { - row = QStringList::split("\t", *it, true); + row = TQStringList::split("\t", *it, true); if (!r) setNumCols(row.count()); c = 0; - for (QStringList::Iterator itr = row.begin(); itr != row.end(); ++itr, ++c) + for (TQStringList::Iterator itr = row.begin(); itr != row.end(); ++itr, ++c) setText(r, c, *itr); } break; @@ -303,42 +303,42 @@ QString Table::handleDCOP(int function, const QStringList& args) break; case DCOP::setBackgroundColor: { - QColor color; + TQColor 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()); + TQTable::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); + TQTable::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()); + TQTable::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()); + TQTable::selectRow (args[0].toInt()); break; case TBL_selectColumn: if (numCols() >= args[0].toInt()) - QTable::selectColumn (args[0].toInt()); + TQTable::selectColumn (args[0].toInt()); break; case TBL_setColumnReadOnly: if (numCols() >= args[0].toInt()) - QTable::setColumnReadOnly (args[0].toInt(), args[1].toUInt()); + TQTable::setColumnReadOnly (args[0].toInt(), args[1].toUInt()); break; case TBL_setRowReadOnly: if (numRows() >= args[0].toInt()) - QTable::setRowReadOnly (args[0].toInt(), args[1].toUInt()); + TQTable::setRowReadOnly (args[0].toInt(), args[1].toUInt()); break; case TBL_colHeader: { - QHeader* hdr = QTable::horizontalHeader(); + TQHeader* hdr = TQTable::horizontalHeader(); if (numCols() >= args[0].toInt()) return hdr->label(args[0].toInt()); else @@ -347,7 +347,7 @@ QString Table::handleDCOP(int function, const QStringList& args) } case TBL_rowHeader: { - QHeader* hdr = QTable::verticalHeader(); + TQHeader* hdr = TQTable::verticalHeader(); if (numRows() >= args[0].toInt()) return hdr->label(args[0].toInt()); else @@ -356,17 +356,17 @@ QString Table::handleDCOP(int function, const QStringList& args) } case DCOP::geometry: { - QString geo = QString::number(this->x())+" "+QString::number(this->y())+" "+QString::number(this->width())+" "+QString::number(this->height()); + TQString geo = TQString::number(this->x())+" "+TQString::number(this->y())+" "+TQString::number(this->width())+" "+TQString::number(this->height()); return geo; break; } case DCOP::hasFocus: - return QString::number(this->hasFocus()); + return TQString::number(this->hasFocus()); break; default: return KommanderWidget::handleDCOP(function, args); } - return QString(); + return TQString(); } #include "table.moc" diff --git a/kommander/widgets/table.h b/kommander/widgets/table.h index 26ed3b36..c2ec755e 100644 --- a/kommander/widgets/table.h +++ b/kommander/widgets/table.h @@ -20,53 +20,53 @@ /* KDE INCLUDES */ /* QT INCLUDES */ -#include -#include +#include +#include /* OTHER INCLUDES */ #include class QWidget; -class KOMMANDER_EXPORT Table : public QTable, public KommanderWidget +class KOMMANDER_EXPORT Table : public TQTable, 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(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false) + Q_PROPERTY(TQStringList 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(TQWidget *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 void setAssociatedText(const TQStringList&); + virtual TQStringList associatedText() const; + virtual TQString currentState() const; - virtual QString populationText() const; - virtual void setPopulationText(const QString&); + virtual TQString populationText() const; + virtual void setPopulationText(const TQString&); - virtual QString handleDCOP(int function, const QStringList& args); + virtual TQString handleDCOP(int function, const TQStringList& 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 &); + virtual void setWidgetText(const TQString &); //void adjustColumn(int col); signals: void contextMenuRequested(int xpos, int ypos); void columnHeaderClicked(int col); protected: - void contextMenuEvent( QContextMenuEvent * e ); + void contextMenuEvent( TQContextMenuEvent * 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); + TQString selectedArea(); + TQString cellWidget(int row, int col); + void setCellWidget(int row, int col, const TQString &widgetName); + void setCellText(int row, int col, const TQString &text); }; #endif diff --git a/kommander/widgets/tabwidget.cpp b/kommander/widgets/tabwidget.cpp index ec0a02cf..8ffc95b1 100644 --- a/kommander/widgets/tabwidget.cpp +++ b/kommander/widgets/tabwidget.cpp @@ -18,12 +18,12 @@ #include /* QT INCLUDES */ -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include /* OTHER INCLUDES */ #include @@ -43,31 +43,31 @@ enum Functions { LastFunction }; -TabWidget::TabWidget(QWidget *a_parent, const char *a_name, int a_flags) - : QTabWidget(a_parent, a_name, a_flags), KommanderWidget(this) +TabWidget::TabWidget(TQWidget *a_parent, const char *a_name, int a_flags) + : TQTabWidget(a_parent, a_name, a_flags), KommanderWidget(this) { - QStringList states; + TQStringList 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); + KommanderPlugin::registerFunction(TAB_setTabIcon, "setTabIcon(TQString widget, int Tab, TQString Icon)", i18n("Sets an icon on the specified tab. Index is zero based."), 3); + KommanderPlugin::registerFunction(TAB_tabLabel, "tabLabel(TQString widget, int Tab)", i18n("Returns the tab label at the given index. Index is zero based."), 2); + KommanderPlugin::registerFunction(TAB_isTabEnabled, "isTabEnabled(TQString widget, int Tab)", i18n("Returns true if tab at specified index is enabled, otherwise returns false."), 2); + KommanderPlugin::registerFunction(TAB_setTabEnabled, "setTabEnabled(TQString widget, int Tab, bool Enabled)", i18n("Sets the tab at the given index to enabled or disabled."), 3); + KommanderPlugin::registerFunction(TAB_showTabBar, "showTabBar(TQString widget, bool Show)", i18n("Show or hide the tabs on the tab widget."), 2); + KommanderPlugin::registerFunction(TAB_setCurrentPage, "setCurrentPage(TQString widget, TQString Page)", i18n("Set the current page by name."), 2); + KommanderPlugin::registerFunction(TAB_setTabLabel, "setTabLabel(TQString widget, int Tab, TQString Text)", i18n("Sets the tab tab label."), 3); } TabWidget::~TabWidget() { } -QString TabWidget::currentState() const +TQString TabWidget::currentState() const { - return QString("default"); + return TQString("default"); } bool TabWidget::isKommanderWidget() const @@ -75,22 +75,22 @@ bool TabWidget::isKommanderWidget() const return true; } -QStringList TabWidget::associatedText() const +TQStringList TabWidget::associatedText() const { return KommanderWidget::associatedText(); } -void TabWidget::setAssociatedText(const QStringList& a_at) +void TabWidget::setAssociatedText(const TQStringList& a_at) { KommanderWidget::setAssociatedText(a_at); } -void TabWidget::setPopulationText(const QString& a_text) +void TabWidget::setPopulationText(const TQString& a_text) { KommanderWidget::setPopulationText( a_text ); } -QString TabWidget::populationText() const +TQString TabWidget::populationText() const { return KommanderWidget::populationText(); } @@ -99,16 +99,16 @@ void TabWidget::populate() { } -void TabWidget::showEvent(QShowEvent* e) +void TabWidget::showEvent(TQShowEvent* e) { - QTabWidget::showEvent(e); + TQTabWidget::showEvent(e); emit widgetOpened(); } -void TabWidget::contextMenuEvent( QContextMenuEvent * e ) +void TabWidget::contextMenuEvent( TQContextMenuEvent * e ) { e->accept(); - QPoint p = e->globalPos(); + TQPoint p = e->globalPos(); emit contextMenuRequested(p.x(), p.y()); } @@ -117,11 +117,11 @@ 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) +TQString TabWidget::handleDCOP(int function, const TQStringList& args) { switch (function) { case DCOP::currentItem: - return QString::number(currentPageIndex()); + return TQString::number(currentPageIndex()); case DCOP::setCurrentItem: setCurrentPage(args[0].toUInt()); break; @@ -130,31 +130,31 @@ QString TabWidget::handleDCOP(int function, const QStringList& args) break; case TAB_tabLabel: { - QString s = this->label(args[0].toInt()); + TQString s = this->label(args[0].toInt()); return s.remove("&"); break; } case TAB_setTabIcon: { - QWidget *w = page(args[0].toInt()); + TQWidget *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)); + TQWidget *w = page(args[0].toInt()); + return TQString::number(this->isTabEnabled(w)); break; } case TAB_setTabLabel: { - QWidget *w = page(args[0].toInt()); + TQWidget *w = page(args[0].toInt()); setTabLabel(w, args[1]); break; } case TAB_setTabEnabled: { - QWidget *w = page(args[0].toInt()); + TQWidget *w = page(args[0].toInt()); this->setTabEnabled(w, args[1].toInt()); break; } @@ -164,7 +164,7 @@ QString TabWidget::handleDCOP(int function, const QStringList& args) int i = 0; bool found = false; while (i < cnt) { - QString s = this->label(i); + TQString s = this->label(i); if (s.remove("&") == args[0]) { setCurrentPage(i); @@ -173,12 +173,12 @@ QString TabWidget::handleDCOP(int function, const QStringList& args) } i++; } - return QString::number(found); + return TQString::number(found); break; } case TAB_showTabBar: { - QTabBar *t = this->tabBar(); + TQTabBar *t = this->tabBar(); if (args[0].toInt() == 1) t->show(); else @@ -188,7 +188,7 @@ QString TabWidget::handleDCOP(int function, const QStringList& args) default: return KommanderWidget::handleDCOP(function, args); } - return QString(); + return TQString(); } #include "tabwidget.moc" diff --git a/kommander/widgets/tabwidget.h b/kommander/widgets/tabwidget.h index 48f19232..87376279 100644 --- a/kommander/widgets/tabwidget.h +++ b/kommander/widgets/tabwidget.h @@ -19,31 +19,31 @@ /* KDE INCLUDES */ /* QT INCLUDES */ -#include +#include /* OTHER INCLUDES */ #include #include class QShowEvent; -class KOMMANDER_EXPORT TabWidget : public QTabWidget, public KommanderWidget +class KOMMANDER_EXPORT TabWidget : public TQTabWidget, 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(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false) + Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false) Q_PROPERTY(bool KommanderWidget READ isKommanderWidget) public: - TabWidget(QWidget *, const char *, int=0); + TabWidget(TQWidget *, 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 void setAssociatedText(const TQStringList&); + virtual TQStringList associatedText() const; + virtual TQString currentState() const; + virtual TQString populationText() const; + virtual void setPopulationText(const TQString&); - virtual QString handleDCOP(int function, const QStringList& args); + virtual TQString handleDCOP(int function, const TQStringList& args); virtual bool isFunctionSupported(int function); public slots: @@ -52,8 +52,8 @@ signals: void widgetOpened(); void contextMenuRequested(int xpos, int ypos); protected: - void showEvent(QShowEvent *e); - void contextMenuEvent( QContextMenuEvent * e ); + void showEvent(TQShowEvent *e); + void contextMenuEvent( TQContextMenuEvent * e ); private: }; diff --git a/kommander/widgets/textbrowser.cpp b/kommander/widgets/textbrowser.cpp index 324bc62c..a2f9e744 100644 --- a/kommander/widgets/textbrowser.cpp +++ b/kommander/widgets/textbrowser.cpp @@ -18,9 +18,9 @@ #include /* QT INCLUDES */ -#include -#include -#include +#include +#include +#include /* OTHER INCLUDES */ #include "kommanderplugin.h" @@ -34,21 +34,21 @@ enum Functions { LastFunction }; -TextBrowser::TextBrowser(QWidget * a_parent, const char *a_name) - : KTextBrowser(a_parent, a_name), KommanderWidget((QObject *) this) +TextBrowser::TextBrowser(TQWidget * a_parent, const char *a_name) + : KTextBrowser(a_parent, a_name), KommanderWidget((TQObject *) this) { - QStringList states; + TQStringList 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); + KommanderPlugin::registerFunction(TBR_setNotifyClick, "setNotifyClick(TQString widget, bool Set)",i18n("Set notify click to intercept clicks and handle links"), 2, 2); + KommanderPlugin::registerFunction(TBR_isNotifyClick, "isNotifyClick(TQString widget)",i18n("Set notify click to intercept clicks and handle links"), 1); } -QString TextBrowser::currentState() const +TQString TextBrowser::currentState() const { - return QString("default"); + return TQString("default"); } TextBrowser::~TextBrowser() @@ -60,47 +60,47 @@ bool TextBrowser::isKommanderWidget() const return true; } -QStringList TextBrowser::associatedText() const +TQStringList TextBrowser::associatedText() const { return KommanderWidget::associatedText(); } -void TextBrowser::setAssociatedText(const QStringList & a_at) +void TextBrowser::setAssociatedText(const TQStringList & a_at) { KommanderWidget::setAssociatedText(a_at); } -void TextBrowser::setPopulationText(const QString & a_text) +void TextBrowser::setPopulationText(const TQString & a_text) { KommanderWidget::setPopulationText(a_text); } -QString TextBrowser::populationText() const +TQString TextBrowser::populationText() const { return KommanderWidget::populationText(); } void TextBrowser::populate() { - QString txt = KommanderWidget::evalAssociatedText(populationText()); + TQString txt = KommanderWidget::evalAssociatedText(populationText()); setWidgetText(txt); } -void TextBrowser::setWidgetText(const QString & a_text) +void TextBrowser::setWidgetText(const TQString & a_text) { setText(a_text); } -void TextBrowser::showEvent(QShowEvent * e) +void TextBrowser::showEvent(TQShowEvent * e) { - QTextBrowser::showEvent(e); + TQTextBrowser::showEvent(e); emit widgetOpened(); } -void TextBrowser::contextMenuEvent( QContextMenuEvent * e ) +void TextBrowser::contextMenuEvent( TQContextMenuEvent * e ) { e->accept(); - QPoint p = e->globalPos(); + TQPoint p = e->globalPos(); emit contextMenuRequested(p.x(), p.y()); } @@ -110,7 +110,7 @@ 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) +TQString TextBrowser::handleDCOP(int function, const TQStringList& args) { switch (function) { case DCOP::text: @@ -124,7 +124,7 @@ QString TextBrowser::handleDCOP(int function, const QStringList& args) KTextBrowser::setNotifyClick(args[0]); break; case TBR_isNotifyClick: - return QString::number(KTextBrowser::isNotifyClick()); + return TQString::number(KTextBrowser::isNotifyClick()); break; case DCOP::clear: clear(); @@ -132,7 +132,7 @@ QString TextBrowser::handleDCOP(int function, const QStringList& args) default: return KommanderWidget::handleDCOP(function, args); } - return QString(); + return TQString(); } diff --git a/kommander/widgets/textbrowser.h b/kommander/widgets/textbrowser.h index f34e374e..e640bb3f 100644 --- a/kommander/widgets/textbrowser.h +++ b/kommander/widgets/textbrowser.h @@ -20,8 +20,8 @@ #include /* QT INCLUDES */ -#include -#include +#include +#include /* OTHER INCLUDES */ #include @@ -30,25 +30,25 @@ 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(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false) + Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false) Q_PROPERTY(bool KommanderWidget READ isKommanderWidget) public: - TextBrowser(QWidget*, const char*); + TextBrowser(TQWidget*, 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 void setAssociatedText(const TQStringList &); + virtual TQStringList associatedText() const; + virtual TQString currentState() const; + virtual TQString populationText() const; + virtual void setPopulationText(const TQString &); - virtual QString handleDCOP(int function, const QStringList& args); + virtual TQString handleDCOP(int function, const TQStringList& args); virtual bool isFunctionSupported(int function); public slots: - virtual void setWidgetText(const QString &); + virtual void setWidgetText(const TQString &); virtual void populate(); signals: @@ -56,8 +56,8 @@ signals: void contextMenuRequested(int xpos, int ypos); protected: - void showEvent(QShowEvent* e); - void contextMenuEvent( QContextMenuEvent * e ); + void showEvent(TQShowEvent* e); + void contextMenuEvent( TQContextMenuEvent * e ); }; #endif diff --git a/kommander/widgets/textedit.cpp b/kommander/widgets/textedit.cpp index b59e0513..72f8c754 100644 --- a/kommander/widgets/textedit.cpp +++ b/kommander/widgets/textedit.cpp @@ -16,10 +16,10 @@ ***************************************************************************/ /* QT INCLUDES */ -#include -#include -#include -#include +#include +#include +#include +#include /* OTHER INCLUDES */ #include @@ -42,33 +42,33 @@ enum Functions { LastFunction }; -TextEdit::TextEdit(QWidget * a_parent, const char *a_name):KTextEdit(a_parent, a_name), -KommanderWidget((QObject *) this) +TextEdit::TextEdit(TQWidget * a_parent, const char *a_name):KTextEdit(a_parent, a_name), +KommanderWidget((TQObject *) this) { - QStringList states; + TQStringList states; states << "default"; setStates(states); setDisplayStates(states); - connect(this, SIGNAL(textChanged()), this, SLOT(setTextChanged())); + connect(this, TQT_SIGNAL(textChanged()), this, TQT_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); + KommanderPlugin::registerFunction(TE_setModified, "setModified(TQString widget, bool Modified)", i18n("Set widget modified status."), 1); + KommanderPlugin::registerFunction(TE_selectText, "selectText(TQString 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(TQString widget, TQString 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(TQString widget, TQString 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(TQString widget)", i18n("Get the number of paragraphs in the widget."), 1); + KommanderPlugin::registerFunction(TE_length, "length(TQString widget)", i18n("Get the total length of all text."), 1); +// KommanderPlugin::registerFunction(TE_getCursorPosition, "getCursorPosition(TQString widget)", i18n("Get the cursor postion in the form of paragraph and postion integers."), 1); + KommanderPlugin::registerFunction(TE_paragraphLength, "paragraphLength(TQString widget, int Paragraph)", i18n("Get the length of the paragraph."), 2); + KommanderPlugin::registerFunction(TE_linesOfParagraph, "linesOfParagraph(TQString widget, int Paragraph)", i18n("Get the number of lines in the paragraph."), 2); + KommanderPlugin::registerFunction(TE_VAsuperScript, "setSuperScript(TQString widget)", i18n("Use to set superscript."), 1); + KommanderPlugin::registerFunction(TE_VAnormalScript, "setNormalScript(TQString widget)", i18n("Use to revert from superscript to normal script."), 1); } -QString TextEdit::currentState() const +TQString TextEdit::currentState() const { - return QString("default"); + return TQString("default"); } TextEdit::~TextEdit() @@ -80,22 +80,22 @@ bool TextEdit::isKommanderWidget() const return true; } -QStringList TextEdit::associatedText() const +TQStringList TextEdit::associatedText() const { return KommanderWidget::associatedText(); } -void TextEdit::setAssociatedText(const QStringList & a_at) +void TextEdit::setAssociatedText(const TQStringList & a_at) { KommanderWidget::setAssociatedText(a_at); } -void TextEdit::setPopulationText(const QString & a_text) +void TextEdit::setPopulationText(const TQString & a_text) { KommanderWidget::setPopulationText(a_text); } -QString TextEdit::populationText() const +TQString TextEdit::populationText() const { return KommanderWidget::populationText(); } @@ -105,7 +105,7 @@ void TextEdit::populate() setWidgetText(KommanderWidget::evalAssociatedText(populationText())); } -void TextEdit::setWidgetText(const QString & a_text) +void TextEdit::setWidgetText(const TQString & a_text) { setText(a_text); emit widgetTextChanged(text()); @@ -116,28 +116,28 @@ void TextEdit::setTextChanged() emit widgetTextChanged(text()); } -void TextEdit::focusOutEvent( QFocusEvent * e) +void TextEdit::focusOutEvent( TQFocusEvent * e) { - QTextEdit::focusOutEvent(e); + TQTextEdit::focusOutEvent(e); emit lostFocus(); } -void TextEdit::focusInEvent( QFocusEvent * e) +void TextEdit::focusInEvent( TQFocusEvent * e) { - QTextEdit::focusInEvent(e); + TQTextEdit::focusInEvent(e); emit gotFocus(); } -void TextEdit::showEvent(QShowEvent * e) +void TextEdit::showEvent(TQShowEvent * e) { - QTextEdit::showEvent(e); + TQTextEdit::showEvent(e); emit widgetOpened(); } -void TextEdit::contextMenuEvent( QContextMenuEvent * e ) +void TextEdit::contextMenuEvent( TQContextMenuEvent * e ) { e->accept(); - QPoint p = e->globalPos(); + TQPoint p = e->globalPos(); emit contextMenuRequested(p.x(), p.y()); } @@ -146,7 +146,7 @@ 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) +TQString TextEdit::handleDCOP(int function, const TQStringList& args) { switch (function) { case DCOP::text: @@ -160,7 +160,7 @@ QString TextEdit::handleDCOP(int function, const QStringList& args) insert(args[0]); break; case DCOP::clear: - setWidgetText(QString()); + setWidgetText(TQString()); break; case DCOP::setEditable: setReadOnly(args[0] == "false" || args[0] == "0"); @@ -170,7 +170,7 @@ QString TextEdit::handleDCOP(int function, const QStringList& args) break; case DCOP::setBackgroundColor: { - QColor color; + TQColor color; color.setNamedColor(args[0]); this->setPaletteBackgroundColor(color); break; @@ -182,47 +182,47 @@ QString TextEdit::handleDCOP(int function, const QStringList& args) this->setModified(args[0].toInt()); break; case TE_selectText: - QTextEdit::setSelection(args[0].toInt(), args[1].toInt(), args[2].toInt(), args[3].toInt()); + TQTextEdit::setSelection(args[0].toInt(), args[1].toInt(), args[2].toInt(), args[3].toInt()); break; case TE_length: - return QString::number(QTextEdit::length() ); + return TQString::number(TQTextEdit::length() ); break; /*case TE_getCursorPosition: - return QString::number(QTextEdit::getCursorPosition() ); + return TQString::number(TQTextEdit::getCursorPosition() ); break;*/ case TE_paragraphLength: - return QString::number(QTextEdit::paragraphLength(args[0].toInt() ) ); + return TQString::number(TQTextEdit::paragraphLength(args[0].toInt() ) ); break; case TE_linesOfParagraph: - return QString::number(QTextEdit::linesOfParagraph(args[0].toInt() ) ); + return TQString::number(TQTextEdit::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 )); +// return TQString::number(TQTextEdit::find(args[0], args[1].toUInt(), false, args[2].toUInt(), para, idx )); + return TQString::number(TQTextEdit::find(args[0], args[1].toUInt(), false )); break; } case TE_VAsuperScript: break; - QTextEdit::setVerticalAlignment(AlignSuperScript); + TQTextEdit::setVerticalAlignment(AlignSuperScript); case TE_VAnormalScript: - QTextEdit::setVerticalAlignment(AlignNormal); + TQTextEdit::setVerticalAlignment(AlignNormal); break; case DCOP::geometry: { - QString geo = QString::number(this->x())+" "+QString::number(this->y())+" "+QString::number(this->width())+" "+QString::number(this->height()); + TQString geo = TQString::number(this->x())+" "+TQString::number(this->y())+" "+TQString::number(this->width())+" "+TQString::number(this->height()); return geo; break; } case DCOP::hasFocus: - return QString::number(this->hasFocus()); + return TQString::number(this->hasFocus()); break; default: return KommanderWidget::handleDCOP(function, args); } - return QString(); + return TQString(); } diff --git a/kommander/widgets/textedit.h b/kommander/widgets/textedit.h index 7f842343..4f118ffd 100644 --- a/kommander/widgets/textedit.h +++ b/kommander/widgets/textedit.h @@ -21,8 +21,8 @@ #include /* QT INCLUDES */ -#include -#include +#include +#include /* OTHER INCLUDES */ #include @@ -31,40 +31,40 @@ 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_OBJECT Q_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false) + Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false) Q_PROPERTY(bool KommanderWidget READ isKommanderWidget) public: - TextEdit(QWidget *, const char *); + TextEdit(TQWidget *, 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 void setAssociatedText(const TQStringList &); + virtual TQStringList associatedText() const; + virtual TQString currentState() const; + virtual TQString populationText() const; + virtual void setPopulationText(const TQString &); - virtual QString handleDCOP(int function, const QStringList& args); + virtual TQString handleDCOP(int function, const TQStringList& args); virtual bool isFunctionSupported(int function); public slots: virtual void setTextChanged(); - virtual void setWidgetText(const QString &); + virtual void setWidgetText(const TQString &); virtual void populate(); signals: void widgetOpened(); - void widgetTextChanged(const QString&); + void widgetTextChanged(const TQString&); 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); + void showEvent(TQShowEvent* e); + void contextMenuEvent( TQContextMenuEvent * e ); + void focusOutEvent( TQFocusEvent* e); + void focusInEvent( TQFocusEvent* e); }; #endif diff --git a/kommander/widgets/timer.cpp b/kommander/widgets/timer.cpp index 9aff1560..5a7251f1 100644 --- a/kommander/widgets/timer.cpp +++ b/kommander/widgets/timer.cpp @@ -13,9 +13,9 @@ * * ***************************************************************************/ /* QT INCLUDES */ -#include -#include -#include +#include +#include +#include /* KDE INCLUDES */ #include @@ -37,30 +37,30 @@ enum Functions { LastFunction }; -Timer::Timer(QWidget *a_parent, const char *a_name) - : QLabel(a_parent, a_name), KommanderWidget(this) +Timer::Timer(TQWidget *a_parent, const char *a_name) + : TQLabel(a_parent, a_name), KommanderWidget(this) { - QStringList states; + TQStringList states; states << "default"; setStates(states); setDisplayStates(states); if (KommanderWidget::inEditor) { setPixmap(KGlobal::iconLoader()->loadIcon("kalarm", KIcon::NoGroup, KIcon::SizeMedium)); - setFrameStyle(QFrame::Box | QFrame::Plain); + setFrameStyle(TQFrame::Box | TQFrame::Plain); setLineWidth(1); setFixedSize(pixmap()->size()); } else setHidden(true); - mTimer = new QTimer(this); + mTimer = new TQTimer(this); setInterval(5000); setSingleShot(false); - connect(mTimer, SIGNAL(timeout()), SLOT(timeout())); + connect(mTimer, TQT_SIGNAL(timeout()), TQT_SLOT(timeout())); KommanderPlugin::setDefaultGroup(Group::DCOP); - KommanderPlugin::registerFunction(SetInterval, "setInterval(QString widget, int interval)", i18n("Set the timer timeout interval in ms."), 2); + KommanderPlugin::registerFunction(SetInterval, "setInterval(TQString widget, int interval)", i18n("Set the timer timeout interval in ms."), 2); } Timer::~Timer() @@ -91,9 +91,9 @@ void Timer::setSingleShot(bool a_shot) mSingleShot = a_shot; } -QString Timer::currentState() const +TQString Timer::currentState() const { - return QString("default"); + return TQString("default"); } bool Timer::isKommanderWidget() const @@ -101,27 +101,27 @@ bool Timer::isKommanderWidget() const return true; } -QStringList Timer::associatedText() const +TQStringList Timer::associatedText() const { return KommanderWidget::associatedText(); } -void Timer::setAssociatedText(const QStringList& a_at) +void Timer::setAssociatedText(const TQStringList& a_at) { KommanderWidget::setAssociatedText(a_at); } -void Timer::setWidgetText(const QString& a_text) +void Timer::setWidgetText(const TQString& a_text) { KommanderWidget::setAssociatedText(a_text); } -void Timer::setPopulationText(const QString& a_text) +void Timer::setPopulationText(const TQString& a_text) { KommanderWidget::setPopulationText(a_text); } -QString Timer::populationText() const +TQString Timer::populationText() const { return KommanderWidget::populationText(); } @@ -148,7 +148,7 @@ void Timer::timeout() void Timer::execute() { if (mSingleShot) - QTimer::singleShot(mInterval, this, SLOT(timeout())); + TQTimer::singleShot(mInterval, this, TQT_SLOT(timeout())); else mTimer->start(mInterval); } @@ -165,7 +165,7 @@ 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) +TQString Timer::handleDCOP(int function, const TQStringList& args) { switch (function) { case DCOP::setText: @@ -183,7 +183,7 @@ QString Timer::handleDCOP(int function, const QStringList& args) default: return KommanderWidget::handleDCOP(function, args); } - return QString(); + return TQString(); } #include "timer.moc" diff --git a/kommander/widgets/timer.h b/kommander/widgets/timer.h index 856ceeb3..8d200f2f 100644 --- a/kommander/widgets/timer.h +++ b/kommander/widgets/timer.h @@ -18,40 +18,40 @@ /* KDE INCLUDES */ /* QT INCLUDES */ -#include +#include /* OTHER INCLUDES */ #include class QTimer; -class KOMMANDER_EXPORT Timer : public QLabel, public KommanderWidget +class KOMMANDER_EXPORT Timer : public TQLabel, 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(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false) + Q_PROPERTY(TQStringList 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(TQWidget *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 void setAssociatedText(const TQStringList&); + virtual TQStringList associatedText() const; + virtual TQString currentState() const; + virtual TQString populationText() const; + virtual void setPopulationText(const TQString&); 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 TQString handleDCOP(int function, const TQStringList& args); virtual bool isFunctionSupported(int function); public slots: - virtual void setWidgetText(const QString &); + virtual void setWidgetText(const TQString &); virtual void populate(); virtual void execute(); virtual void cancel(); @@ -62,7 +62,7 @@ class KOMMANDER_EXPORT Timer : public QLabel, public KommanderWidget protected: virtual void executeProcess(bool blocking); - QTimer* mTimer; + TQTimer* mTimer; int mInterval; bool mSingleShot; diff --git a/kommander/widgets/toolbox.cpp b/kommander/widgets/toolbox.cpp index 90a31e46..a6340098 100644 --- a/kommander/widgets/toolbox.cpp +++ b/kommander/widgets/toolbox.cpp @@ -27,27 +27,27 @@ #define FIRST_FUNCTION ADDWIDGET #define LAST_FUNCTION INDEXOF -ToolBox::ToolBox(QWidget *parent, const char *name) - : QToolBox(parent, name), KommanderWidget(this) +ToolBox::ToolBox(TQWidget *parent, const char *name) + : TQToolBox(parent, name), KommanderWidget(this) { - QStringList states; + TQStringList states; states << "default"; setStates(states); setDisplayStates(states); KommanderPlugin::setDefaultGroup(Group::DCOP); - KommanderPlugin::registerFunction(ADDWIDGET, "addWidget(QString widget, QString widgetName, QString Label)", + KommanderPlugin::registerFunction(ADDWIDGET, "addWidget(TQString widget, TQString widgetName, TQString Label)", i18n("Adds a widget to the toolbox. Returns the index of the widget."), 3); - KommanderPlugin::registerFunction(CURRENTWIDGET, "currentWidget(QString widget)", + KommanderPlugin::registerFunction(CURRENTWIDGET, "currentWidget(TQString 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)", + KommanderPlugin::registerFunction(REMOVEWIDGET, "removeWidget(TQString widget, TQString 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(TQString 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(TQString widget, TQString widgetName)", i18n("Activates the selected widget."), 2); - KommanderPlugin::registerFunction(CURRENTINDEX, "currentIndex(QString widget)", + KommanderPlugin::registerFunction(CURRENTINDEX, "currentIndex(TQString widget)", i18n("Returns the index of the active widget."), 1); - KommanderPlugin::registerFunction(WIDGETAT, "widgetAt(QString widget, int index)", + KommanderPlugin::registerFunction(WIDGETAT, "widgetAt(TQString widget, int index)", i18n("Returns the widget having the supplied index."), 2); - KommanderPlugin::registerFunction(INDEXOF, "indexOf(QString widget, QString widgetName)", + KommanderPlugin::registerFunction(INDEXOF, "indexOf(TQString widget, TQString widgetName)", i18n("Returns the index of the widget, -1 if the widget is not part of the toolbox."), 2); } @@ -57,9 +57,9 @@ ToolBox::~ToolBox() { } -QString ToolBox::currentState() const +TQString ToolBox::currentState() const { - return QString("default"); + return TQString("default"); } bool ToolBox::isKommanderWidget() const @@ -72,50 +72,50 @@ void ToolBox::populate() setAssociatedText(KommanderWidget::evalAssociatedText( populationText())); } -QStringList ToolBox::associatedText() const +TQStringList ToolBox::associatedText() const { return KommanderWidget::associatedText(); } -void ToolBox::setAssociatedText(const QStringList& a_at) +void ToolBox::setAssociatedText(const TQStringList& a_at) { KommanderWidget::setAssociatedText(a_at); } -void ToolBox::setPopulationText(const QString& a_text) +void ToolBox::setPopulationText(const TQString& a_text) { KommanderWidget::setPopulationText(a_text); } -QString ToolBox::populationText() const +TQString ToolBox::populationText() const { return KommanderWidget::populationText(); } -QString ToolBox::addWidget(const QString& widgetName, const QString &label) +TQString ToolBox::addWidget(const TQString& widgetName, const TQString &label) { KommanderWidget *w = widgetByName(widgetName); if (w) { - int idx = addItem(dynamic_cast(w), label); + int idx = addItem(dynamic_cast(w), label); adjustSize(); - return QString::number(idx); + return TQString::number(idx); } else - return QString("-1"); + return TQString("-1"); } -void ToolBox::showEvent(QShowEvent* e) +void ToolBox::showEvent(TQShowEvent* e) { - QToolBox::showEvent(e); + TQToolBox::showEvent(e); emit widgetOpened(); } -void ToolBox::contextMenuEvent( QContextMenuEvent * e ) +void ToolBox::contextMenuEvent( TQContextMenuEvent * e ) { e->accept(); - QPoint p = e->globalPos(); + TQPoint p = e->globalPos(); emit contextMenuRequested(p.x(), p.y()); } @@ -124,7 +124,7 @@ 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) +TQString ToolBox::handleDCOP(int function, const TQStringList& args) { switch (function) { case ADDWIDGET: @@ -132,59 +132,59 @@ QString ToolBox::handleDCOP(int function, const QStringList& args) break; case CURRENTWIDGET: { - QWidget *w = currentItem(); + TQWidget *w = currentItem(); if (w) return w->name(); else - return QString(); + return TQString(); break; } case SETCURRENTWIDGET: { KommanderWidget *w = widgetByName(args[0]); - setCurrentItem(dynamic_cast(w)); - return QString(); + setCurrentItem(dynamic_cast(w)); + return TQString(); } case REMOVEWIDGET: { KommanderWidget *w = widgetByName(args[0]); - return QString::number(removeItem(dynamic_cast(w))); + return TQString::number(removeItem(dynamic_cast(w))); } case REMOVEWIDGETAT: { - QWidget *w = item(args[0].toInt()); - return QString::number(removeItem(w)); + TQWidget *w = item(args[0].toInt()); + return TQString::number(removeItem(w)); } case CURRENTINDEX: { - return QString::number(currentIndex()); + return TQString::number(currentIndex()); break; } case WIDGETAT: { - QWidget *w = item(args[0].toInt()); + TQWidget *w = item(args[0].toInt()); if (w) return w->name(); else - return QString(); + return TQString(); break; } case INDEXOF: { KommanderWidget *w = widgetByName(args[0]); - return QString::number(indexOf(dynamic_cast(w))); + return TQString::number(indexOf(dynamic_cast(w))); } case DCOP::count: - return QString::number(count()); + return TQString::number(count()); case DCOP::geometry: { - QString geo = QString::number(this->x())+" "+QString::number(this->y())+" "+QString::number(this->width())+" "+QString::number(this->height()); + TQString geo = TQString::number(this->x())+" "+TQString::number(this->y())+" "+TQString::number(this->width())+" "+TQString::number(this->height()); return geo; break; } default: return KommanderWidget::handleDCOP(function, args); } - return QString(); + return TQString(); } #include "toolbox.moc" diff --git a/kommander/widgets/toolbox.h b/kommander/widgets/toolbox.h index 9171aa32..12761df0 100644 --- a/kommander/widgets/toolbox.h +++ b/kommander/widgets/toolbox.h @@ -12,31 +12,31 @@ #ifndef TOOLBOX_H #define TOOLBOX_H -#include +#include #include /** @author Andras Mantia */ -class ToolBox : public QToolBox, public KommanderWidget +class ToolBox : public TQToolBox, 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(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false) + Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false) Q_PROPERTY(bool KommanderWidget READ isKommanderWidget) public: - ToolBox(QWidget *parent = 0, const char *name = 0); + ToolBox(TQWidget *parent = 0, const char *name = 0); ~ToolBox(); virtual bool isKommanderWidget() const; - virtual QString currentState() const; + virtual TQString 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&); + virtual TQString handleDCOP(int function, const TQStringList& args); + virtual TQStringList associatedText() const; + virtual void setAssociatedText(const TQStringList&); + virtual TQString populationText() const; + virtual void setPopulationText(const TQString&); public slots: virtual void populate(); @@ -45,9 +45,9 @@ 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); + void showEvent(TQShowEvent *e); + void contextMenuEvent( TQContextMenuEvent * e ); + TQString addWidget(const TQString& widgetName, const TQString &label); }; diff --git a/kommander/widgets/treewidget.cpp b/kommander/widgets/treewidget.cpp index 578384c5..ef3b7e65 100644 --- a/kommander/widgets/treewidget.cpp +++ b/kommander/widgets/treewidget.cpp @@ -23,11 +23,11 @@ #include /* QT INCLUDES */ -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include /* OTHER INCLUDES */ #include @@ -54,52 +54,52 @@ enum Functions { LastFunction }; -TreeWidget::TreeWidget(QWidget *a_parent, const char *a_name) +TreeWidget::TreeWidget(TQWidget *a_parent, const char *a_name) : KListView(a_parent, a_name), KommanderWidget(this) { - QStringList states; + TQStringList 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 left, right or center, 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); + KommanderPlugin::registerFunction(SelectedIndexes, "selectedIndexes(TQString widget)", "", 1); + KommanderPlugin::registerFunction(addColumnTree, "addColumn(TQString widget, const TQString & label, int width = -1 )", i18n("Add column at end with column header"), 2, 3); + KommanderPlugin::registerFunction(setSortCol, "setSortColumn(TQString widget, int column, bool ascending=true)", i18n("Set sorting for a column"), 2, 3); + //KommanderPlugin::registerFunction(setAltBackground, "setAltBackground(TQString widget, const TQColor & c)", i18n("Alternate colors in list view"), 2); +// KommanderPlugin::registerFunction(colCount, "colCount(TQString widget)", i18n("Get the column count"), 1); + KommanderPlugin::registerFunction(colCaption, "columnCaption(TQString widget, int column)", i18n("Get the column caption for column index"), 2); + KommanderPlugin::registerFunction(setColWidth, "setColWidth(TQString widget, int column, int width)", i18n("Set the pixel width for column index - use 0 to hide"), 3); + KommanderPlugin::registerFunction(setColAlignment, "setColumnAlignment(TQString widget, int column, TQString Alignment)", i18n("Set to left, right or center, case insensitive "), 3); + KommanderPlugin::registerFunction(TW_childCount, "childCount(TQString widget)", i18n("Get the count of top level items."), 1); + KommanderPlugin::registerFunction(TW_setOpen, "setOpen(TQString widget, int Index, bool Open)", i18n("Expand or collapse a node."), 3); + KommanderPlugin::registerFunction(TW_isOpen, "isOpen(TQString widget, int Index)", i18n("See if node is open or closed."), 2); } TreeWidget::~TreeWidget() { } -QString TreeWidget::pathSeparator() const +TQString TreeWidget::pathSeparator() const { return m_pathSeparator; } -void TreeWidget::setPathSeparator(const QString& a_pathSep) +void TreeWidget::setPathSeparator(const TQString& a_pathSep) { m_pathSeparator = a_pathSep; } -void TreeWidget::addItemFromString(const QString& s) +void TreeWidget::addItemFromString(const TQString& s) { - QStringList elements = QStringList::split(m_pathSeparator, s, true); + TQStringList elements = TQStringList::split(m_pathSeparator, s, true); if (elements.count() > 1) setRootIsDecorated(true); - QListViewItem* parent = 0; + TQListViewItem* 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) + for (TQStringList::ConstIterator it = elements.begin(); it != elements.end(); ++it) { if (m_lastPath[i] && m_lastPath[i]->text(0) == elements[i]) { @@ -109,7 +109,7 @@ void TreeWidget::addItemFromString(const QString& s) } else { - QListViewItem* item = (i>0) ? parent->firstChild() : firstChild(); + TQListViewItem* item = (i>0) ? parent->firstChild() : firstChild(); while (item) { if (item->text(0) == *it) @@ -126,32 +126,32 @@ void TreeWidget::addItemFromString(const QString& s) } } -QListViewItem* TreeWidget::itemFromString(QListViewItem* parent, const QString& s) +TQListViewItem* TreeWidget::itemFromString(TQListViewItem* parent, const TQString& s) { - QStringList elements; + TQStringList elements; if (s.contains("\t")) - elements = QStringList::split("\t", s, true); + elements = TQStringList::split("\t", s, true); else - elements = QStringList::split("\\t", s, true); + elements = TQStringList::split("\\t", s, true); int cols = elements.count(); if (cols >= columns()) cols = columns(); - QListViewItem* item; + TQListViewItem* item; if (parent) - item = new QListViewItem(parent); + item = new TQListViewItem(parent); else - item = new QListViewItem(this); + item = new TQListViewItem(this); int i = 0; - for (QStringList::ConstIterator it = elements.constBegin(); it != elements.constEnd(); ++it) + for (TQStringList::ConstIterator it = elements.constBegin(); it != elements.constEnd(); ++it) item->setText(i++, *it); return item; } -int TreeWidget::itemToIndex(QListViewItem* item) +int TreeWidget::itemToIndex(TQListViewItem* item) { // if (!item->isSelected()) // return -1; - QListViewItemIterator it(this); + TQListViewItemIterator it(this); int index = 0; while (it.current()) { if (it.current() == item) @@ -162,9 +162,9 @@ int TreeWidget::itemToIndex(QListViewItem* item) return -1; } -int TreeWidget::itemToIndexSafe(QListViewItem* item) +int TreeWidget::itemToIndexSafe(TQListViewItem* item) { - QListViewItemIterator it(this); + TQListViewItemIterator it(this); int index = 0; while (it.current()) { if (it.current() == item) @@ -175,9 +175,9 @@ int TreeWidget::itemToIndexSafe(QListViewItem* item) return -1; } -QListViewItem* TreeWidget::indexToItem(int item) +TQListViewItem* TreeWidget::indexToItem(int item) { - QListViewItemIterator it(this); + TQListViewItemIterator it(this); int index = 0; while (it.current()) { if (index == item) @@ -188,41 +188,41 @@ QListViewItem* TreeWidget::indexToItem(int item) return 0; } -QString TreeWidget::itemText(QListViewItem* item) const +TQString TreeWidget::itemText(TQListViewItem* item) const { if (!item) - return QString(); - QStringList items; + return TQString(); + TQStringList items; for (int i=0; itext(i)); return items.join("\t"); } -QString TreeWidget::itemsText() +TQString TreeWidget::itemsText() { - QStringList items; - QListViewItemIterator it(this); + TQStringList items; + TQListViewItemIterator it(this); while (it.current()) { - QString path = itemPath(it.current()); + TQString path = itemPath(it.current()); if (path.isEmpty()) items.append(itemText(it.current())); else - items.append(QString("%1%2%3").arg(path).arg(m_pathSeparator) + items.append(TQString("%1%2%3").arg(path).arg(m_pathSeparator) .arg(itemText(it.current()))); ++it; } return items.join("\n"); } -QString TreeWidget::itemPath(QListViewItem* item) const +TQString TreeWidget::itemPath(TQListViewItem* item) const { if (!item) - return QString(); + return TQString(); item = item->parent(); if (!item) - return QString(); - QStringList path; + return TQString(); + TQStringList path; while (item) { path.prepend(item->text(0)); @@ -231,9 +231,9 @@ QString TreeWidget::itemPath(QListViewItem* item) const return path.join(m_pathSeparator); } -QString TreeWidget::currentState() const +TQString TreeWidget::currentState() const { - return QString("default"); + return TQString("default"); } bool TreeWidget::isKommanderWidget() const @@ -241,29 +241,29 @@ bool TreeWidget::isKommanderWidget() const return true; } -void TreeWidget::setCurrentItem(QListViewItem* item) +void TreeWidget::setCurrentItem(TQListViewItem* item) { KListView::setCurrentItem(item); setSelected(item, true); ensureItemVisible(item); } -QStringList TreeWidget::associatedText() const +TQStringList TreeWidget::associatedText() const { return KommanderWidget::associatedText(); } -void TreeWidget::setAssociatedText(const QStringList& a_at) +void TreeWidget::setAssociatedText(const TQStringList& a_at) { KommanderWidget::setAssociatedText(a_at); } -void TreeWidget::setPopulationText(const QString& a_text) +void TreeWidget::setPopulationText(const TQString& a_text) { KommanderWidget::setPopulationText( a_text ); } -QString TreeWidget::populationText() const +TQString TreeWidget::populationText() const { return KommanderWidget::populationText(); } @@ -273,26 +273,26 @@ void TreeWidget::populate() setWidgetText(KommanderWidget::evalAssociatedText( populationText())); } -void TreeWidget::setWidgetText(const QString &a_text) +void TreeWidget::setWidgetText(const TQString &a_text) { handleDCOP(DCOP::setText, a_text); emit widgetTextChanged(a_text); } -void TreeWidget::showEvent(QShowEvent* e) +void TreeWidget::showEvent(TQShowEvent* e) { - QListView::showEvent( e ); + TQListView::showEvent( e ); emit widgetOpened(); } -void TreeWidget::contextMenuEvent( QContextMenuEvent * e ) +void TreeWidget::contextMenuEvent( TQContextMenuEvent * e ) { e->accept(); - QPoint p = e->globalPos(); + TQPoint p = e->globalPos(); emit contextMenuRequested(p.x(), p.y()); } -void TreeWidget::setColAlign(int column, const QString& align) +void TreeWidget::setColAlign(int column, const TQString& align) { if (align.lower() == "left") setColumnAlignment (column, Qt::AlignLeft); @@ -310,7 +310,7 @@ bool TreeWidget::isFunctionSupported(int f) 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) +TQString TreeWidget::handleDCOP(int function, const TQStringList& args) { switch (function) { case DCOP::insertItem: @@ -323,8 +323,8 @@ QString TreeWidget::handleDCOP(int function, const QStringList& args) m_lastPath.clear(); case DCOP::insertItems: { - QStringList items(QStringList::split("\n", args[0], true)); - for (QStringList::ConstIterator it = items.constBegin(); it != items.constEnd(); ++it) + TQStringList items(TQStringList::split("\n", args[0], true)); + for (TQStringList::ConstIterator it = items.constBegin(); it != items.constEnd(); ++it) addItemFromString(*it); break; } @@ -332,17 +332,17 @@ QString TreeWidget::handleDCOP(int function, const QStringList& args) setOpen(indexToItem(args[0].toInt()), args[1].toInt()); break; case TW_isOpen: - return QString::number(isOpen(indexToItem(args[0].toInt()))); + return TQString::number(isOpen(indexToItem(args[0].toInt()))); break; case SelectedIndexes: { - QString selection = ""; - QListViewItemIterator it(this); + TQString selection = ""; + TQListViewItemIterator it(this); while (it.current()) { if (it.current()->isSelected()) { - selection.append(QString("%1\n").arg(itemToIndexSafe(it.current()))); + selection.append(TQString("%1\n").arg(itemToIndexSafe(it.current()))); } ++it; } @@ -353,8 +353,8 @@ QString TreeWidget::handleDCOP(int function, const QStringList& args) } case DCOP::selection: { - QString selection = ""; - QListViewItemIterator it(this); + TQString selection = ""; + TQListViewItemIterator it(this); while (it.current()) { if (it.current()->isSelected()) @@ -372,10 +372,10 @@ QString TreeWidget::handleDCOP(int function, const QStringList& args) else { clearSelection(); - QStringList items(QStringList::split("\n", args[0])); - for (QStringList::ConstIterator it = items.begin(); it != items.end(); ++it) + TQStringList items(TQStringList::split("\n", args[0])); + for (TQStringList::ConstIterator it = items.begin(); it != items.end(); ++it) { - QListViewItem* item = findItem(*it, 0); + TQListViewItem* item = findItem(*it, 0); if (item) { item->setSelected(true); @@ -398,24 +398,24 @@ QString TreeWidget::handleDCOP(int function, const QStringList& args) break; } case DCOP::currentItem: - return QString::number(itemToIndexSafe(currentItem())); + return TQString::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))); + return TQString::number(itemToIndexSafe(findItem(args[0], 0))); else { if (args[2].toUInt() && args[3].toUInt()) - return QString::number(itemToIndexSafe(findItem(args[0], args[1].toInt()))); + return TQString::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))); + return TQString::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))); + return TQString::number(itemToIndexSafe(findItem(args[0], args[1].toInt(), Qt::ExactMatch))); else - return QString::number(itemToIndexSafe(findItem(args[0], args[1].toInt(), Qt::Contains))); + return TQString::number(itemToIndexSafe(findItem(args[0], args[1].toInt(), Qt::Contains))); } break; case DCOP::item: @@ -426,18 +426,18 @@ QString TreeWidget::handleDCOP(int function, const QStringList& args) break; case DCOP::itemDepth: { - QListViewItem* item = indexToItem(args[0].toInt()); - return (item) ? QString::number(item->depth()) : QString::number(-1); + TQListViewItem* item = indexToItem(args[0].toInt()); + return (item) ? TQString::number(item->depth()) : TQString::number(-1); } case DCOP::setPixmap: { - QPixmap pixmap = KGlobal::iconLoader()->loadIcon(args[0], KIcon::Small); + TQPixmap pixmap = KGlobal::iconLoader()->loadIcon(args[0], KIcon::Small); if (args[1].toInt() == -1) - for (QListViewItemIterator it(this); it.current(); ++it) + for (TQListViewItemIterator it(this); it.current(); ++it) it.current()->setPixmap(0, pixmap); else { - QListViewItem* item = indexToItem(args[1].toInt()); + TQListViewItem* item = indexToItem(args[1].toInt()); if (item) item->setPixmap(0, pixmap); } @@ -452,31 +452,31 @@ QString TreeWidget::handleDCOP(int function, const QStringList& args) break; case DCOP::setBackgroundColor: { - QColor color; + TQColor color; color.setNamedColor(args[0]); this->setPaletteBackgroundColor(color); break; } case addColumnTree: - return QString::number(KListView::addColumn(args[0], args[1].toInt())); + return TQString::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() ); + return TQString::number(TQListView::columns() ); break; case colCaption: - return QListView::columnText(args[0].toInt()) ; + return TQListView::columnText(args[0].toInt()) ; break; case setColWidth: - QListView::setColumnWidth(args[0].toInt(), args[1].toInt()); + TQListView::setColumnWidth(args[0].toInt(), args[1].toInt()); break; case setColAlignment: setColAlign(args[0].toInt(), args[1]); break; case setAltBackground: - KListView::setAlternateBackground(QColor(args[0])); + KListView::setAlternateBackground(TQColor(args[0])); break; case DCOP::removeColumn: { @@ -492,21 +492,21 @@ QString TreeWidget::handleDCOP(int function, const QStringList& args) break; } case TW_childCount: - return QString::number(childCount()); + return TQString::number(childCount()); break; case DCOP::geometry: { - QString geo = QString::number(this->x())+" "+QString::number(this->y())+" "+QString::number(this->width())+" "+QString::number(this->height()); + TQString geo = TQString::number(this->x())+" "+TQString::number(this->y())+" "+TQString::number(this->width())+" "+TQString::number(this->height()); return geo; break; } case DCOP::hasFocus: - return QString::number(this->hasFocus()); + return TQString::number(this->hasFocus()); break; default: return KommanderWidget::handleDCOP(function, args); } - return QString(); + return TQString(); } #include "treewidget.moc" diff --git a/kommander/widgets/treewidget.h b/kommander/widgets/treewidget.h index 29d0a747..28da108e 100644 --- a/kommander/widgets/treewidget.h +++ b/kommander/widgets/treewidget.h @@ -21,9 +21,9 @@ #include /* QT INCLUDES */ -#include -#include -#include +#include +#include +#include /* OTHER INCLUDES */ #include @@ -36,52 +36,52 @@ 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(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false) + Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false) Q_PROPERTY(bool KommanderWidget READ isKommanderWidget) - Q_PROPERTY(QString pathSeparator READ pathSeparator WRITE setPathSeparator) + Q_PROPERTY(TQString pathSeparator READ pathSeparator WRITE setPathSeparator) public: - TreeWidget(QWidget *a_parent, const char *a_name); + TreeWidget(TQWidget *a_parent, const char *a_name); ~TreeWidget(); - virtual void setCurrentItem(QListViewItem* item); - QString pathSeparator() const; - void setPathSeparator(const QString& a_pathSep); + virtual void setCurrentItem(TQListViewItem* item); + TQString pathSeparator() const; + void setPathSeparator(const TQString& 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 void setAssociatedText(const TQStringList&); + virtual TQStringList associatedText() const; + virtual TQString currentState() const; + virtual TQString populationText() const; + virtual void setPopulationText(const TQString&); - virtual QString handleDCOP(int function, const QStringList& args); + virtual TQString handleDCOP(int function, const TQStringList& args); virtual bool isFunctionSupported(int function); public slots: - virtual void setWidgetText(const QString&); + virtual void setWidgetText(const TQString&); virtual void populate(); signals: void widgetOpened(); - void widgetTextChanged(const QString&); + void widgetTextChanged(const TQString&); 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; + void showEvent(TQShowEvent *e); + void contextMenuEvent( TQContextMenuEvent * e ); + int itemToIndex(TQListViewItem* item); + int itemToIndexSafe(TQListViewItem* item); + TQString itemText(TQListViewItem* item) const; + TQString itemsText(); + TQListViewItem* indexToItem(int index); + TQString itemPath(TQListViewItem* item) const; private: - void addItemFromString(const QString& s); - QListViewItem* itemFromString(QListViewItem* parent, const QString& s); - QPtrVector m_lastPath; - QString m_pathSeparator; - int addColumnTree(const QString & label, int width = -1 ); + void addItemFromString(const TQString& s); + TQListViewItem* itemFromString(TQListViewItem* parent, const TQString& s); + TQPtrVector m_lastPath; + TQString m_pathSeparator; + int addColumnTree(const TQString & label, int width = -1 ); void setSortCol(int column, bool ascending=true); - void setAltBackground(const QColor & c); - void setColAlign(int column, const QString& align); + void setAltBackground(const TQColor & c); + void setColAlign(int column, const TQString& align); }; #endif diff --git a/kommander/widgets/wizard.cpp b/kommander/widgets/wizard.cpp index 7e6a07b4..8cc16933 100644 --- a/kommander/widgets/wizard.cpp +++ b/kommander/widgets/wizard.cpp @@ -17,12 +17,12 @@ #include /* QT INCLUDES */ -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include /* OTHER INCLUDES */ #include @@ -31,17 +31,17 @@ #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) +Wizard::Wizard(TQWidget *a_parent, const char *a_name, bool a_modal, int a_flags) + : TQWizard(a_parent, a_name, a_modal, a_flags), KommanderWidget(this) { - QStringList states; + TQStringList states; states << "default"; states << "initialization"; states << "destroy"; setStates(states); setDisplayStates(states); - connect(this, SIGNAL(helpClicked()), SLOT(runHelp())); + connect(this, TQT_SIGNAL(helpClicked()), TQT_SLOT(runHelp())); } Wizard::~Wizard() @@ -50,9 +50,9 @@ Wizard::~Wizard() destroy(); } -QString Wizard::currentState() const +TQString Wizard::currentState() const { - return QString("default"); + return TQString("default"); } bool Wizard::isKommanderWidget() const @@ -60,33 +60,33 @@ bool Wizard::isKommanderWidget() const return true; } -QStringList Wizard::associatedText() const +TQStringList Wizard::associatedText() const { return KommanderWidget::associatedText(); } -void Wizard::setAssociatedText(const QStringList& a_at) +void Wizard::setAssociatedText(const TQStringList& a_at) { KommanderWidget::setAssociatedText(a_at); } -void Wizard::setPopulationText(const QString& a_text) +void Wizard::setPopulationText(const TQString& a_text) { KommanderWidget::setPopulationText(a_text); } -QString Wizard::populationText() const +TQString Wizard::populationText() const { return KommanderWidget::populationText(); } void Wizard::populate() { - QString txt = KommanderWidget::evalAssociatedText(populationText()); + TQString txt = KommanderWidget::evalAssociatedText(populationText()); //FIXME: implement me } -void Wizard::setWidgetText(const QString &a_text) +void Wizard::setWidgetText(const TQString &a_text) { setCaption(a_text); emit widgetTextChanged(a_text); @@ -95,7 +95,7 @@ void Wizard::setWidgetText(const QString &a_text) void Wizard::initialize() { setFinishEnabled(page(pageCount() - 1), true); - const QStringList assoc = associatedText(); + const TQStringList assoc = associatedText(); if (assoc.count() > 1 && !assoc[1].isEmpty()) { MyProcess proc(this); @@ -105,7 +105,7 @@ void Wizard::initialize() void Wizard::destroy() { - const QStringList assoc = associatedText(); + const TQStringList assoc = associatedText(); if (assoc.count() > 2 && !assoc[2].isEmpty()) { MyProcess proc(this); @@ -115,13 +115,13 @@ void Wizard::destroy() void Wizard::exec() { - QWizard::exec(); + TQWizard::exec(); emit finished(); } void Wizard::show() { - QWizard::show(); + TQWizard::show(); if (!inEditor) initialize(); } @@ -137,7 +137,7 @@ void Wizard::runHelp() else if (helpAction() == Dialog) { KommanderFactory::loadPlugins(); - QDialog *dialog = (QDialog *)KommanderFactory::create(helpActionText()); + TQDialog *dialog = (TQDialog *)KommanderFactory::create(helpActionText()); dialog->exec(); delete dialog; } @@ -153,31 +153,31 @@ void Wizard::setHelpAction(HelpAction a_helpAction) m_helpAction = a_helpAction; } -QString Wizard::helpActionText() const +TQString Wizard::helpActionText() const { return m_helpActionText; } -void Wizard::setHelpActionText(const QString& a_helpActionText) +void Wizard::setHelpActionText(const TQString& a_helpActionText) { m_helpActionText = a_helpActionText; } -void Wizard::showEvent(QShowEvent *e) +void Wizard::showEvent(TQShowEvent *e) { - QWizard::showEvent(e); + TQWizard::showEvent(e); emit widgetOpened(); } -void Wizard::contextMenuEvent( QContextMenuEvent * e ) +void Wizard::contextMenuEvent( TQContextMenuEvent * e ) { e->accept(); - QPoint p = e->globalPos(); + TQPoint p = e->globalPos(); emit contextMenuRequested(p.x(), p.y()); } -QString Wizard::handleDCOP(int function, const QStringList& args) +TQString Wizard::handleDCOP(int function, const TQStringList& args) { switch (function) { case DCOP::setEnabled: @@ -186,7 +186,7 @@ QString Wizard::handleDCOP(int function, const QStringList& args) default: return KommanderWidget::handleDCOP(function, args); } - return QString(); + return TQString(); } diff --git a/kommander/widgets/wizard.h b/kommander/widgets/wizard.h index 868a14bc..131c6dd6 100644 --- a/kommander/widgets/wizard.h +++ b/kommander/widgets/wizard.h @@ -19,7 +19,7 @@ /* KDE INCLUDES */ /* QT INCLUDES */ -#include +#include /* OTHER INCLUDES */ #include @@ -27,37 +27,37 @@ #include class QShowEvent; -class KOMMANDER_EXPORT Wizard : public QWizard, public KommanderWidget +class KOMMANDER_EXPORT Wizard : public TQWizard, 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(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false) + Q_PROPERTY(TQStringList 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) + Q_PROPERTY(TQString helpActionText READ helpActionText WRITE setHelpActionText) public: - Wizard(QWidget *, const char *, bool = true, int = 0); + Wizard(TQWidget *, 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 void setAssociatedText(const TQStringList&); + virtual TQStringList associatedText() const; + virtual TQString currentState() const; + virtual TQString populationText() const; + virtual void setPopulationText(const TQString&); - virtual QString handleDCOP(int function, const QStringList& args); + virtual TQString handleDCOP(int function, const TQStringList& args); enum HelpAction { None, Command, Dialog }; HelpAction helpAction() const; void setHelpAction(HelpAction); - QString helpActionText() const; - void setHelpActionText(const QString&); + TQString helpActionText() const; + void setHelpActionText(const TQString&); public slots: - virtual void setWidgetText(const QString &); + virtual void setWidgetText(const TQString &); virtual void exec(); virtual void show(); virtual void runHelp(); @@ -68,15 +68,15 @@ protected slots: signals: void widgetOpened(); - void widgetTextChanged(const QString &); + void widgetTextChanged(const TQString &); void finished(); void contextMenuRequested(int xpos, int ypos); protected: - void showEvent( QShowEvent *e ); - void contextMenuEvent( QContextMenuEvent * e ); + void showEvent( TQShowEvent *e ); + void contextMenuEvent( TQContextMenuEvent * e ); HelpAction m_helpAction; - QString m_helpActionText; + TQString m_helpActionText; }; #endif diff --git a/kommander/working/plugintemplate/plugin.cpp b/kommander/working/plugintemplate/plugin.cpp index e6b506cc..b6e1a0a0 100644 --- a/kommander/working/plugintemplate/plugin.cpp +++ b/kommander/working/plugintemplate/plugin.cpp @@ -11,15 +11,15 @@ class %{APPNAME}Plugin : public KommanderPlugin { public: %{APPNAME}Plugin(); - virtual QWidget *create( const QString &className, QWidget *parent = 0, const char *name = 0); + virtual TQWidget *create( const TQString &className, TQWidget *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)) ); + addWidget( "%{APPNAME}", "Custom", i18n("Kommander %{APPNAME} plugin."), new TQIconSet(KGlobal::iconLoader()->loadIcon("%{APPNAMELC}", KIcon::NoGroup, KIcon::SizeMedium)) ); } -QWidget *%{APPNAME}Plugin::create( const QString &className, QWidget *parent, const char *name) +TQWidget *%{APPNAME}Plugin::create( const TQString &className, TQWidget *parent, const char *name) { if (className == "%{APPNAME}") return new %{APPNAME}(parent, name); diff --git a/kommander/working/plugintemplate/widget.cpp b/kommander/working/plugintemplate/widget.cpp index 73ec0278..2378e87a 100644 --- a/kommander/working/plugintemplate/widget.cpp +++ b/kommander/working/plugintemplate/widget.cpp @@ -16,10 +16,10 @@ enum Functions { LastFunction }; -%{APPNAME}::%{APPNAME}(QWidget *parent, const char *name) - : QWidget(parent, name), KommanderWidget(this) +%{APPNAME}::%{APPNAME}(TQWidget *parent, const char *name) + : TQWidget(parent, name), KommanderWidget(this) { - QStringList states; + TQStringList states; states << "default"; setStates(states); setDisplayStates(states); @@ -29,7 +29,7 @@ enum Functions { if (KommanderWidget::inEditor) { setPixmap(KGlobal::iconLoader()->loadIcon("%{APPNAMELC}", KIcon::NoGroup, KIcon::SizeMedium)); - setFrameStyle(QFrame::Box | QFrame::Plain); + setFrameStyle(TQFrame::Box | TQFrame::Plain); setLineWidth(1); setAlignment(Qt::AlignCenter); } @@ -40,8 +40,8 @@ enum Functions { 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); + KommanderPlugin::registerFunction(Function1, "function1(TQString widget, TQString arg1, int arg2)", i18n("Call function1 with two arguments, second is optional."), 2, 3); + KommanderPlugin::registerFunction(Function2, "function2(TQString widget)", i18n("Get a TQString as a result of function2."), 1); } @@ -49,9 +49,9 @@ enum Functions { { } -QString %{APPNAME}::currentState() const +TQString %{APPNAME}::currentState() const { - return QString("default"); + return TQString("default"); } bool %{APPNAME}::isKommanderWidget() const @@ -59,22 +59,22 @@ bool %{APPNAME}::isKommanderWidget() const return true; } -QStringList %{APPNAME}::associatedText() const +TQStringList %{APPNAME}::associatedText() const { return KommanderWidget::associatedText(); } -void %{APPNAME}::setAssociatedText(const QStringList& a_atext) +void %{APPNAME}::setAssociatedText(const TQStringList& a_atext) { KommanderWidget::setAssociatedText(a_atext); } -void %{APPNAME}::setPopulationText(const QString& a_text) +void %{APPNAME}::setPopulationText(const TQString& a_text) { KommanderWidget::setPopulationText(a_text); } -QString %{APPNAME}::populationText() const +TQString %{APPNAME}::populationText() const { return KommanderWidget::populationText(); } @@ -84,10 +84,10 @@ void %{APPNAME}::populate() KommanderWidget::evalAssociatedText(populationText()); } -void %{APPNAME}::contextMenuEvent( QContextMenuEvent * e ) +void %{APPNAME}::contextMenuEvent( TQContextMenuEvent * e ) { e->accept(); - QPoint p = e->globalPos(); + TQPoint p = e->globalPos(); emit contextMenuRequested(p.x(), p.y()); } @@ -97,7 +97,7 @@ 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) +TQString %{APPNAME}::handleDCOP(int function, const TQStringList& args) { switch (function) { @@ -110,7 +110,7 @@ QString %{APPNAME}::handleDCOP(int function, const QStringList& args) default: return KommanderWidget::handleDCOP(function, args); } - return QString::null; + return TQString::null; } #include "%{APPNAMELC}.moc" diff --git a/kommander/working/plugintemplate/widget.h b/kommander/working/plugintemplate/widget.h index 56e87f91..1ec87a5e 100644 --- a/kommander/working/plugintemplate/widget.h +++ b/kommander/working/plugintemplate/widget.h @@ -2,8 +2,8 @@ #ifndef %{APPNAMEUC}_WIDGET_H #define %{APPNAMEUC}_WIDGET_H -#include -#include +#include +#include #include @@ -11,35 +11,35 @@ class QStringList; -//replace QWidget with the widget you want to derive from -class %{APPNAME}: public QWidget, public KommanderWidget +//replace TQWidget with the widget you want to derive from +class %{APPNAME}: public TQWidget, 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(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false) + Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false) Q_PROPERTY(bool KommanderWidget READ isKommanderWidget) public: - %{APPNAME}(QWidget *parent, const char* name); + %{APPNAME}(TQWidget *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 setAssociatedText(const TQStringList&); + virtual TQStringList associatedText() const; + virtual TQString currentState() const; + virtual TQString populationText() const; + virtual void setPopulationText(const TQString&); virtual void populate(); - virtual QString handleDCOP(int function, const QStringList& args); + virtual TQString handleDCOP(int function, const TQStringList& args); virtual bool isFunctionSupported(int function); signals: void contextMenuRequested(int xpos, int ypos); protected: - void contextMenuEvent( QContextMenuEvent * e ); + void contextMenuEvent( TQContextMenuEvent * e ); }; diff --git a/kxsldbg/kxsldbg.cpp b/kxsldbg/kxsldbg.cpp index c28325a3..e8982fed 100644 --- a/kxsldbg/kxsldbg.cpp +++ b/kxsldbg/kxsldbg.cpp @@ -29,7 +29,7 @@ KXsldbg::KXsldbg() // and a status bar statusBar()->show(); - statusBar()->setSizePolicy(QSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred)); + statusBar()->setSizePolicy(TQSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::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 @@ -52,8 +52,8 @@ KXsldbg::KXsldbg() // 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 ); + connectDCOPSignal(0, 0, "debuggerPositionChanged(TQString,int)", "newDebuggerPosition(TQString,int)", false ); + connectDCOPSignal(0, 0, "editorPositionChanged(TQString,int,int)", "newCursorPosition(TQString,int,int)", false ); } } @@ -90,14 +90,14 @@ bool KXsldbg::closeURL() void KXsldbg::setupActions() { - KAction *act = KStdAction::quit(kapp, SLOT(quit()), actionCollection()); - connect(act, SIGNAL(activated()), this, SLOT(quit())); + KAction *act = KStdAction::quit(kapp, TQT_SLOT(quit()), actionCollection()); + connect(act, TQT_SIGNAL(activated()), this, TQT_SLOT(quit())); - m_toolbarAction = KStdAction::showToolbar(this, SLOT(optionsShowToolbar()), actionCollection()); - m_statusbarAction = KStdAction::showStatusbar(this, SLOT(optionsShowStatusbar()), actionCollection()); + m_toolbarAction = KStdAction::showToolbar(this, TQT_SLOT(optionsShowToolbar()), actionCollection()); + m_statusbarAction = KStdAction::showStatusbar(this, TQT_SLOT(optionsShowStatusbar()), actionCollection()); - KStdAction::keyBindings(this, SLOT(optionsConfigureKeys()), actionCollection()); - KStdAction::configureToolbars(this, SLOT(optionsConfigureToolbars()), actionCollection()); + KStdAction::keyBindings(this, TQT_SLOT(optionsConfigureKeys()), actionCollection()); + KStdAction::configureToolbars(this, TQT_SLOT(optionsConfigureToolbars()), actionCollection()); } void KXsldbg::saveProperties(KConfig* /*config*/) @@ -147,8 +147,8 @@ void KXsldbg::optionsConfigureToolbars() // use the standard toolbar editor KEditToolbar dlg(factory()); - connect(&dlg, SIGNAL(newToolbarConfig()), - this, SLOT(applyNewToolbarConfig())); + connect(&dlg, TQT_SIGNAL(newToolbarConfig()), + this, TQT_SLOT(applyNewToolbarConfig())); dlg.exec(); } @@ -158,13 +158,13 @@ void KXsldbg::applyNewToolbarConfig() } -void KXsldbg::newCursorPosition(const QString &file, int lineNumber, int columnNumber) +void KXsldbg::newCursorPosition(const TQString &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) +void KXsldbg::newDebuggerPosition(const TQString &file, int lineNumber) { // maybe do something extra here later newCursorPosition(file, lineNumber); diff --git a/kxsldbg/kxsldbg.h b/kxsldbg/kxsldbg.h index 7c75629a..2380cb63 100644 --- a/kxsldbg/kxsldbg.h +++ b/kxsldbg/kxsldbg.h @@ -39,8 +39,8 @@ public: /** KxsldbgIf implementation */ - void newCursorPosition(const QString &file, int lineNumber, int columnNumber=0); - void newDebuggerPosition(const QString & file, int lineNumber); + void newCursorPosition(const TQString &file, int lineNumber, int columnNumber=0); + void newDebuggerPosition(const TQString & file, int lineNumber); protected: /** diff --git a/kxsldbg/kxsldbgif.h b/kxsldbg/kxsldbgif.h index a9942bfc..dad1b5ea 100644 --- a/kxsldbg/kxsldbgif.h +++ b/kxsldbg/kxsldbgif.h @@ -8,8 +8,8 @@ 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; + virtual void newCursorPosition(const TQString & file, int lineNumber, int columnNumber=0) = 0; + virtual void newDebuggerPosition(const TQString & file, int lineNumber) = 0; }; diff --git a/kxsldbg/kxsldbgpart/kxsldbg_part.cpp b/kxsldbg/kxsldbgpart/kxsldbg_part.cpp index 5c4742ab..c9023d07 100644 --- a/kxsldbg/kxsldbgpart/kxsldbg_part.cpp +++ b/kxsldbg/kxsldbgpart/kxsldbg_part.cpp @@ -13,15 +13,15 @@ #include #include -#include -#include +#include +#include #include "../kxsldbg.h" #include #include #include #include -#include +#include #include #include #if KDE_IS_VERSION(3,1,90) @@ -32,33 +32,33 @@ // Qxsldbg specific includes #include "qxsldbgdoc.h" -#include -#include -#include -#include -#include - - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include + + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include "xsldbgoutputview.h" #include "xsldbgconfigimpl.h" #include @@ -67,9 +67,9 @@ typedef KParts::GenericFactory KXsldbgPartFactory; K_EXPORT_COMPONENT_FACTORY( libkxsldbgpart, KXsldbgPartFactory ) -KXsldbgPart::KXsldbgPart( QWidget *parentWidget, const char * /*widgetName*/, - QObject *parent, const char *name, - const QStringList & /*args*/ ) +KXsldbgPart::KXsldbgPart( TQWidget *parentWidget, const char * /*widgetName*/, + TQObject *parent, const char *name, + const TQStringList & /*args*/ ) : DCOPObject("KXsldbgPart"), KParts::ReadOnlyPart(parent, name) { currentLineNo = 0; @@ -81,170 +81,170 @@ KXsldbgPart::KXsldbgPart( QWidget *parentWidget, const char * /*widgetName*/, // 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); + TQVBox *frame = new TQVBox(parentWidget); + TQHBox *h = new TQHBox(frame); + newXPath = new TQLineEdit(h); + xPathBtn = new TQPushButton(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 TQHBox(frame); + newSearch = new TQLineEdit(h); + searchBtn = new TQPushButton(i18n("Search"), h); */ - h = new QHBox(frame); - newEvaluate = new QLineEdit(h); - evaluateBtn = new QPushButton(i18n("Evaluate"), h); + h = new TQHBox(frame); + newEvaluate = new TQLineEdit(h); + evaluateBtn = new TQPushButton(i18n("Evaluate"), h); - QSplitter *splitter = new QSplitter(QSplitter::Vertical, frame); - mainView = new QWidgetStack(splitter); + TQSplitter *splitter = new TQSplitter(TQSplitter::Vertical, frame); + mainView = new TQWidgetStack(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()); + KStdAction::open(this, TQT_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()), + this, TQT_SLOT(configureEditorCmd_activated()), actionCollection(), "configureEditorCmd" ); (void) new KAction( i18n("Configure..."), "configure", Key_C, - this, SLOT(configureCmd_activated()), + this, TQT_SLOT(configureCmd_activated()), actionCollection(), "configureCmd" ); (void) new KAction( i18n("Inspect..."), "find", Key_I, - this, SLOT(inspectorCmd_activated()), + this, TQT_SLOT(inspectorCmd_activated()), actionCollection(), "inspectCmd" ); // Motions commands (void) new KAction( i18n("Run"), "run", Key_F5, - this, SLOT(runCmd_activated()), + this, TQT_SLOT(runCmd_activated()), actionCollection(), "runCmd" ); (void) new KAction( i18n("Continue"), "1downarrow", Key_F4, - this, SLOT(continueCmd_activated()), + this, TQT_SLOT(continueCmd_activated()), actionCollection(), "continueCmd" ); (void) new KAction( i18n("Step"), "step", Key_F8, - this, SLOT(stepCmd_activated()), + this, TQT_SLOT(stepCmd_activated()), actionCollection(), "stepCmd" ); (void) new KAction( i18n("Next"), "next", Key_F10, - this, SLOT(nextCmd_activated()), + this, TQT_SLOT(nextCmd_activated()), actionCollection(), "nextCmd" ); (void) new KAction( i18n("Step Up"), "xsldbg_stepup", Key_F6, - this, SLOT(stepupCmd_activated()), + this, TQT_SLOT(stepupCmd_activated()), actionCollection(), "stepupCmd" ); (void) new KAction( i18n("Step Down"), "xsldbg_stepdown", Key_F7, - this, SLOT(stepCmd_activated()), + this, TQT_SLOT(stepCmd_activated()), actionCollection(), "stepdownCmd" ); // Breakpoint commands (void) new KAction( i18n("Break"), "xsldbg_break", Key_F2, - this, SLOT(breakCmd_activated()), + this, TQT_SLOT(breakCmd_activated()), actionCollection(), "breakCmd" ); (void) new KAction( i18n("Enable/Disable"), "xsldbg_enable", Key_F3, - this, SLOT(enableCmd_activated()), + this, TQT_SLOT(enableCmd_activated()), actionCollection(), "enableCmd" ); (void) new KAction( i18n("Delete"), "xsldbg_delete", Key_Delete, - this, SLOT(deleteCmd_activated()), + this, TQT_SLOT(deleteCmd_activated()), actionCollection(), "deleteCmd" ); (void) new KAction( i18n("&Source"), "xsldbg_source", Key_S, - this, SLOT(sourceCmd_activated()), + this, TQT_SLOT(sourceCmd_activated()), actionCollection(), "sourceCmd" ); (void) new KAction( i18n("&Data"), "xsldbg_data", Key_D, - this, SLOT(dataCmd_activated()), + this, TQT_SLOT(dataCmd_activated()), actionCollection(), "dataCmd" ); (void) new KAction( i18n("&Output"), "xsldbg_output", Key_O, - this, SLOT(outputCmd_activated()), + this, TQT_SLOT(outputCmd_activated()), actionCollection(), "outputCmd" ); (void) new KAction( i18n("Reload Current File From Disk"), "xsldbg_refresh", CTRL + Key_F5, - this, SLOT(refreshCmd_activated()), + this, TQT_SLOT(refreshCmd_activated()), actionCollection(), "refreshCmd" ); /* tracing and walking */ (void) new KAction( i18n("Walk Through Stylesheet..."), Key_W, - this, SLOT(walkCmd_activated()), + this, TQT_SLOT(walkCmd_activated()), actionCollection(), "walkCmd" ); (void) new KAction( i18n("Stop Wal&king Through Stylesheet"), Key_K, - this, SLOT(walkStopCmd_activated()), + this, TQT_SLOT(walkStopCmd_activated()), actionCollection(), "walkStopCmd" ); (void) new KAction( i18n("Tr&ace Execution of Stylesheet"), Key_A, - this, SLOT(traceCmd_activated()), + this, TQT_SLOT(traceCmd_activated()), actionCollection(), "traceCmd" ); (void) new KAction( i18n("Stop Tracing of Stylesheet"), Key_K, - this, SLOT(traceStopCmd_activated()), + this, TQT_SLOT(traceStopCmd_activated()), actionCollection(), "traceStopCmd" ); (void) new KAction( i18n("&Evaluate Expression..."), Key_E, - this, SLOT(evaluateCmd_activated()), + this, TQT_SLOT(evaluateCmd_activated()), actionCollection(), "evaluateCmd" ); (void) new KAction( i18n("Goto &XPath..."), Key_X, - this, SLOT(gotoXPathCmd_activated()), + this, TQT_SLOT(gotoXPathCmd_activated()), actionCollection(), "gotoXPathCmd" ); (void) new KAction( i18n("Lookup SystemID..."), 0, - this, SLOT(slotLookupSystemID()), + this, TQT_SLOT(slotLookupSystemID()), actionCollection(), "lookupSystemID" ); (void) new KAction( i18n("Lookup PublicID..."), 0, - this, SLOT(slotLookupPublicID()), + this, TQT_SLOT(slotLookupPublicID()), actionCollection(), "lookupPublicID" ); (void) new KAction( i18n("Quit"), 0, CTRL + Key_Q, - this, SLOT(quit()), + this, TQT_SLOT(quit()), actionCollection(), "file_quit" ); /* (void) new KAction( i18n("Exit KXsldbg"), "xsldbg_output", CTRL + Key_Q, - this, SLOT(exitCmd_activated()), + this, TQT_SLOT(exitCmd_activated()), actionCollection(), "exitCmd" ); */ - connect( xPathBtn, SIGNAL( clicked() ), - this, SLOT( slotGotoXPath() ) ); - connect( evaluateBtn, SIGNAL( clicked() ), - this, SLOT( slotEvaluate() ) ); + connect( xPathBtn, TQT_SIGNAL( clicked() ), + this, TQT_SLOT( slotGotoXPath() ) ); + connect( evaluateBtn, TQT_SIGNAL( clicked() ), + this, TQT_SLOT( slotEvaluate() ) ); /* - connect( searchBtn, SIGNAL( clicked() ), - this, SLOT( slotSearch() ) ); + connect( searchBtn, TQT_SIGNAL( clicked() ), + this, TQT_SLOT( slotSearch() ) ); */ /* We must have a valid debugger and inspector */ createInspector(); @@ -304,7 +304,7 @@ bool KXsldbgPart::openURL(const KURL &url) /* Don't show the content of URL just loaded it into our data structures */ bool KXsldbgPart::fetchURL(const KURL &url) { - QString docID = url.prettyURL(); + TQString docID = url.prettyURL(); QXsldbgDoc *docPtr = docDictionary[docID]; if (!docPtr){ docPtr = new QXsldbgDoc(mainView, url); @@ -312,7 +312,7 @@ bool KXsldbgPart::fetchURL(const KURL &url) if (docPtr->kateView()){ mainView->addWidget(docPtr->kateView()); Kate::View *v = Kate::view((docPtr->kateView())); - connect(v, SIGNAL(cursorPositionChanged()), this, SLOT(cursorPositionChanged())); + connect(v, TQT_SIGNAL(cursorPositionChanged()), this, TQT_SLOT(cursorPositionChanged())); } } @@ -336,7 +336,7 @@ 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(); + TQString file_name = KFileDialog::getOpenFileName(); if (file_name.isEmpty() == false) openURL(KURL( file_name )); @@ -355,16 +355,16 @@ bool KXsldbgPart::checkDebugger() { bool result = debugger != 0L; if (!result){ - QMessageBox::information(0L, i18n("Debugger Not Ready"), + TQMessageBox::information(0L, i18n("Debugger Not Ready"), i18n("Configure and start the debugger first."), - QMessageBox::Ok); + TQMessageBox::Ok); } return result; } -void KXsldbgPart::lookupSystemID( QString systemID) +void KXsldbgPart::lookupSystemID( TQString systemID) { bool ok = false; if (!checkDebugger()) @@ -375,13 +375,13 @@ void KXsldbgPart::lookupSystemID( QString systemID) systemID = KInputDialog::getText( i18n( "Lookup SystemID" ), i18n( "Please enter SystemID to find:" ), - QString::null, &ok, + TQString::null, &ok, mainView); #else systemID = QInputDialog::getText( i18n( "Lookup SystemID" ), i18n( "Please enter SystemID to find:" ), - QLineEdit::Normal, QString::null, &ok, + TQLineEdit::Normal, TQString::null, &ok, mainView); #endif }else{ @@ -389,14 +389,14 @@ void KXsldbgPart::lookupSystemID( QString systemID) } if ( ok && !systemID.isEmpty() ){ // user entered something and pressed ok - QString msg(QString("system %1").arg(systemID)); // noTr + TQString msg(TQString("system %1").arg(systemID)); // noTr debugger->fakeInput(msg, true); } } -void KXsldbgPart::lookupPublicID(QString publicID) +void KXsldbgPart::lookupPublicID(TQString publicID) { bool ok = false; if (!checkDebugger()) @@ -407,19 +407,19 @@ void KXsldbgPart::lookupPublicID(QString publicID) publicID = KInputDialog::getText( i18n( "Lookup PublicID" ), i18n( "Please enter PublicID to find:" ), - QString::null, &ok, mainView ); + TQString::null, &ok, mainView ); #else publicID = QInputDialog::getText( i18n( "Lookup PublicID" ), i18n( "Please enter PublicID to find:" ), - QLineEdit::Normal, QString::null, &ok, mainView ); + TQLineEdit::Normal, TQString::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 + TQString msg(TQString("public %1").arg(publicID)); // noTr debugger->fakeInput(msg, true); } } @@ -470,13 +470,13 @@ void KXsldbgPart::createInspector() debugger = new XsldbgDebugger(); Q_CHECK_PTR( debugger ); if ( debugger != 0L ) { - connect(debugger, SIGNAL( debuggerReady()), - this, SLOT(debuggerStarted())); + connect(debugger, TQT_SIGNAL( debuggerReady()), + this, TQT_SLOT(debuggerStarted())); if (outputview){ connect(debugger, - SIGNAL( showMessage(QString /* msg*/)), + TQT_SIGNAL( showMessage(TQString /* msg*/)), outputview, - SLOT(slotProcShowMessage(QString /* msg*/))); + TQT_SLOT(slotProcShowMessage(TQString /* msg*/))); } inspector = new XsldbgInspector( debugger ); Q_CHECK_PTR( inspector ); @@ -484,42 +484,42 @@ void KXsldbgPart::createInspector() if (inspector != 0L){ /*process line number and/or file name changed */ connect(debugger, - SIGNAL(lineNoChanged - (QString /* fileName */ , + TQT_SIGNAL(lineNoChanged + (TQString /* fileName */ , int /* lineNumber */ , bool /* breakpoint */ ) ), this, - SLOT(lineNoChanged - ( QString /* fileName */ , + TQT_SLOT(lineNoChanged + ( TQString /* fileName */ , int /* lineNumber */ , bool /* breakpoint */ ) ) ); connect(debugger, - SIGNAL(breakpointItem(QString /* fileName*/, + TQT_SIGNAL(breakpointItem(TQString /* fileName*/, int /* lineNumber */, - QString /*templateName*/, - QString /* modeName */, + TQString /*templateName*/, + TQString /* modeName */, bool /* enabled */, int /* id */)), this, - SLOT( breakpointItem(QString /* fileName*/, + TQT_SLOT( breakpointItem(TQString /* fileName*/, int /* lineNumber */, - QString /*templateName*/, - QString /* modeName */, + TQString /*templateName*/, + TQString /* modeName */, bool /* enabled */, int /* id */))); - connect(debugger, SIGNAL(resolveItem(QString /*URI*/)), - this, SLOT(slotProcResolveItem(QString /*URI*/))); + connect(debugger, TQT_SIGNAL(resolveItem(TQString /*URI*/)), + this, TQT_SLOT(slotProcResolveItem(TQString /*URI*/))); } } } } -void KXsldbgPart::emitOpenFile(QString file, int line, int row) +void KXsldbgPart::emitOpenFile(TQString file, int line, int row) { - QByteArray params; - QDataStream stream(params, IO_WriteOnly); + TQByteArray params; + TQDataStream stream(params, IO_WriteOnly); stream << file << line << row; - emitDCOPSignal("openFile(QString,int,int)", params); + emitDCOPSignal("openFile(TQString,int,int)", params); } void KXsldbgPart::continueCmd_activated() { @@ -582,7 +582,7 @@ void KXsldbgPart::refreshCmd_activated() { if ( !currentFileName.isEmpty() ){ - QDictIterator it(docDictionary); + TQDictIterator it(docDictionary); QXsldbgDoc *docPtr; while (it.current()){ docPtr = it.current(); @@ -619,9 +619,9 @@ void KXsldbgPart::breakCmd_activated() void KXsldbgPart::evaluateCmd_activated() { #if KDE_IS_VERSION(3,1,90) - QString expression = KInputDialog::getText(i18n("Evalute Expression"), i18n("XPath:")); + TQString expression = KInputDialog::getText(i18n("Evalute Expression"), i18n("XPath:")); #else - QString expression = KLineEditDlg::getText(i18n("Evalute Expression"), i18n("XPath:")); + TQString expression = KLineEditDlg::getText(i18n("Evalute Expression"), i18n("XPath:")); #endif if (checkDebugger() && (expression.length() > 0)){ debugger->slotCatCmd( expression); @@ -631,9 +631,9 @@ void KXsldbgPart::evaluateCmd_activated() void KXsldbgPart::gotoXPathCmd_activated() { #if KDE_IS_VERSION(3,1,90) - QString xpath = KInputDialog::getText(i18n("Goto XPath"), i18n("XPath:")); + TQString xpath = KInputDialog::getText(i18n("Goto XPath"), i18n("XPath:")); #else - QString xpath = KLineEditDlg::getText(i18n("Goto XPath"), i18n("XPath:")); + TQString xpath = KLineEditDlg::getText(i18n("Goto XPath"), i18n("XPath:")); #endif if (checkDebugger() && xpath.length() > 0){ debugger->slotCdCmd( xpath ); @@ -641,7 +641,7 @@ void KXsldbgPart::gotoXPathCmd_activated() } void -KXsldbgPart::lineNoChanged(QString fileName, int lineNumber, bool breakpoint) +KXsldbgPart::lineNoChanged(TQString fileName, int lineNumber, bool breakpoint) { if ( fileName.isEmpty() ) { kdDebug() << "Empty file Name" << endl; // noTr @@ -651,7 +651,7 @@ KXsldbgPart::lineNoChanged(QString fileName, int lineNumber, bool breakpoint) openURL(fileName); QXsldbgDoc *docPtr; - QDictIterator it(docDictionary); + TQDictIterator it(docDictionary); while (it.current()){ docPtr = it.current(); // cause all Execution and BreakpointReached marks to be cleared @@ -661,10 +661,10 @@ KXsldbgPart::lineNoChanged(QString fileName, int lineNumber, bool breakpoint) /* 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); + TQByteArray params; + TQDataStream stream(params, IO_WriteOnly); stream << currentFileName << lineNumber; - emitDCOPSignal("debuggerPositionChanged(QString,int)", params); + emitDCOPSignal("debuggerPositionChanged(TQString,int)", params); }else { qWarning("Unable to retrieve document from internal cache"); } @@ -688,10 +688,10 @@ void KXsldbgPart::cursorPositionChanged() viewCurIf->cursorPosition(¤tLineNo, ¤tColumnNo); currentLineNo++; currentColumnNo++; - QByteArray params; - QDataStream stream(params, IO_WriteOnly); + TQByteArray params; + TQDataStream stream(params, IO_WriteOnly); stream << currentFileName << currentLineNo << currentColumnNo; - emitDCOPSignal("editorPositionChanged(QString,int,int)", params); + emitDCOPSignal("editorPositionChanged(TQString,int,int)", params); } } } @@ -708,14 +708,14 @@ void KXsldbgPart::debuggerStarted() KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); if (args){ int i=0, result=1, noFilesFound = 0; - QString expandedName; /* contains file name with path expansion if any */ + TQString 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))); + expandedName = TQString::fromUtf8((const char*)filesExpandName((const xmlChar*)args->arg(i))); if (expandedName.isEmpty()) { result = 0; break; @@ -774,7 +774,7 @@ void KXsldbgPart::deleteBreakPoint(int lineNumber) void KXsldbgPart::slotSearch() { if ((newSearch != 0L) && checkDebugger() ) { - QString msg(QString("search \"%1\"").arg(newSearch->text())); // noTr + TQString msg(TQString("search \"%1\"").arg(newSearch->text())); // noTr debugger->fakeInput(msg, false); } } @@ -796,23 +796,23 @@ void KXsldbgPart::slotGotoXPath() -void KXsldbgPart::slotProcResolveItem(QString URI) +void KXsldbgPart::slotProcResolveItem(TQString URI) { if (!URI.isEmpty()){ - QMessageBox::information(mainView, i18n("SystemID or PublicID Resolution Result"), + TQMessageBox::information(mainView, i18n("SystemID or PublicID Resolution Result"), i18n("SystemID or PublicID has been resolved to\n.%1").arg(URI), - QMessageBox::Ok); + TQMessageBox::Ok); } } -void KXsldbgPart::breakpointItem(QString fileName, int lineNumber , - QString /*templateName*/, QString /* modeName */, +void KXsldbgPart::breakpointItem(TQString fileName, int lineNumber , + TQString /*templateName*/, TQString /* modeName */, bool enabled , int /* id */) { if (fileName == 0L){ /* Go through all documents and remove all breakpoints */ - QDictIterator it(docDictionary); + TQDictIterator it(docDictionary); QXsldbgDoc *docPtr; while (it.current()){ docPtr = it.current(); diff --git a/kxsldbg/kxsldbgpart/kxsldbg_part.h b/kxsldbg/kxsldbgpart/kxsldbg_part.h index 1da5ceb8..117452ef 100644 --- a/kxsldbg/kxsldbgpart/kxsldbg_part.h +++ b/kxsldbg/kxsldbgpart/kxsldbg_part.h @@ -2,9 +2,9 @@ #define KXSLDBGKPART_H #include -#include -#include -#include +#include +#include +#include #include "xsldbgdebugger.h" #include "xsldbginspector.h" #include @@ -35,7 +35,7 @@ class KURL; class QMultiLineEdit; class KAboutData; -typedef QDict XsldbgDocDict; +typedef TQDict XsldbgDocDict; /** * This is a "Part". It that does all the real work in a KPart @@ -53,8 +53,8 @@ public: /** * Default constructor */ - KXsldbgPart(QWidget *parentWidget, const char *widgetName, - QObject *parent, const char *name, const QStringList &args); + KXsldbgPart(TQWidget *parentWidget, const char *widgetName, + TQObject *parent, const char *name, const TQStringList &args); /** * Destructor @@ -70,15 +70,15 @@ public: * @returns TRUE if debugger is ready, otherwise FALSE */ bool checkDebugger(); - void lookupSystemID(QString systemID); - void lookupPublicID(QString publicID); + void lookupSystemID(TQString systemID); + void lookupPublicID(TQString 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 emitOpenFile(TQString file, int line, int row); void slotLookupSystemID(); void slotLookupPublicID(); void walkCmd_activated(); @@ -110,7 +110,7 @@ public slots: /** Goto/display file XPath entered */ void gotoXPathCmd_activated(); - virtual void lineNoChanged( QString fileName, int lineNumber, + virtual void lineNoChanged( TQString fileName, int lineNumber, bool breakpoint ); void addBreakPoint(int lineNumber); @@ -127,11 +127,11 @@ public slots: void slotSearch(); /* Process the the URI for SystemID or PublicID requested */ - void slotProcResolveItem(QString URI); + void slotProcResolveItem(TQString URI); /* used to get breakpoint list notfication */ - void breakpointItem(QString fileName, int lineNumber , - QString /*templateName*/, QString /* modeName */, + void breakpointItem(TQString fileName, int lineNumber , + TQString /*templateName*/, TQString /* modeName */, bool enabled , int /* id */); void cursorPositionChanged(); @@ -151,18 +151,18 @@ protected slots: private: QXsldbgDoc *currentDoc; - QWidgetStack *mainView; + TQWidgetStack *mainView; - QPushButton *xPathBtn, *searchBtn, *evaluateBtn; - QLineEdit *newXPath, *newSearch, *newEvaluate; - QGridLayout* qxsldbgLayout; + TQPushButton *xPathBtn, *searchBtn, *evaluateBtn; + TQLineEdit *newXPath, *newSearch, *newEvaluate; + TQGridLayout* qxsldbgLayout; uint currentLineNo, currentColumnNo; XsldbgDocDict docDictionary; XsldbgInspector *inspector; XsldbgDebugger *debugger; XsldbgConfigImpl *configWidget; - QString currentFileName; + TQString currentFileName; XsldbgOutputView *outputview; }; diff --git a/kxsldbg/kxsldbgpart/libqtnotfier/qtnotifier2.cpp b/kxsldbg/kxsldbgpart/libqtnotfier/qtnotifier2.cpp index 6d4b7fcb..0db9d1f0 100644 --- a/kxsldbg/kxsldbgpart/libqtnotfier/qtnotifier2.cpp +++ b/kxsldbg/kxsldbgpart/libqtnotfier/qtnotifier2.cpp @@ -15,7 +15,7 @@ * * ***************************************************************************/ -#include +#include #include "../libxsldbg/xsldbgevent.h" #include "../libxsldbg/qtnotifier2.h" @@ -41,7 +41,7 @@ int qtNotifyXsldbgApp(XsldbgMessageEnum type, const void *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); + TQApplication::postEvent(_debugger, e); } } diff --git a/kxsldbg/kxsldbgpart/libqtnotfier/xsldbgdebuggerbase.cpp b/kxsldbg/kxsldbgpart/libqtnotfier/xsldbgdebuggerbase.cpp index 930be808..518aca00 100644 --- a/kxsldbg/kxsldbgpart/libqtnotfier/xsldbgdebuggerbase.cpp +++ b/kxsldbg/kxsldbgpart/libqtnotfier/xsldbgdebuggerbase.cpp @@ -18,15 +18,15 @@ * * ***************************************************************************/ -#include -#include -#include +#include +#include +#include #include #include "xsldbgdebuggerbase.h" XsldbgDebuggerBase::XsldbgDebuggerBase() - : QObject(0L, "XsldbgDebuggerBase") + : TQObject(0L, "XsldbgDebuggerBase") { initialized = false; updateTimerID = -1; @@ -40,31 +40,31 @@ XsldbgDebuggerBase::~XsldbgDebuggerBase() -QString XsldbgDebuggerBase::fromUTF8(const char *text) +TQString XsldbgDebuggerBase::fromUTF8(const char *text) { - QString result; + TQString result; if (text != 0L) result = (const char*)text; return result; } -QString XsldbgDebuggerBase::fromUTF8(const xmlChar *text) +TQString XsldbgDebuggerBase::fromUTF8(const xmlChar *text) { - QString result; + TQString result; if (text != 0L) - result = QString::fromUtf8((const char*)text); + result = TQString::fromUtf8((const char*)text); return result; } -QString XsldbgDebuggerBase::fromUTF8FileName(const char *text) +TQString XsldbgDebuggerBase::fromUTF8FileName(const char *text) { - QString result; + TQString result; if (text != 0L){ KURL url(((const char*)text)); if (url.isLocalFile()) - result = QString("file:") + url.path(); + result = TQString("file:") + url.path(); else result = url.prettyURL(); } @@ -72,13 +72,13 @@ QString XsldbgDebuggerBase::fromUTF8FileName(const char *text) } -QString XsldbgDebuggerBase::fromUTF8FileName(const xmlChar *text) +TQString XsldbgDebuggerBase::fromUTF8FileName(const xmlChar *text) { - QString result; + TQString result; if (text != 0L){ - KURL url(QString::fromUtf8((const char*)text)); + KURL url(TQString::fromUtf8((const char*)text)); if (url.isLocalFile()) - result = QString("file:") + url.path(); + result = TQString("file:") + url.path(); else result = url.prettyURL(); } @@ -86,7 +86,7 @@ QString XsldbgDebuggerBase::fromUTF8FileName(const xmlChar *text) } -void XsldbgDebuggerBase::queueMessage(const QString &text) +void XsldbgDebuggerBase::queueMessage(const TQString &text) { updateText += text; } diff --git a/kxsldbg/kxsldbgpart/libqtnotfier/xsldbgdebuggerbase.h b/kxsldbg/kxsldbgpart/libqtnotfier/xsldbgdebuggerbase.h index ff830495..fddc6034 100644 --- a/kxsldbg/kxsldbgpart/libqtnotfier/xsldbgdebuggerbase.h +++ b/kxsldbg/kxsldbgpart/libqtnotfier/xsldbgdebuggerbase.h @@ -30,8 +30,8 @@ # endif #endif -#include -#include +#include +#include #include class XsldbgEvent; @@ -59,85 +59,85 @@ class XsldbgDebuggerBase : public QObject 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 TQString */ + static TQString fromUTF8(const char *text); + static TQString fromUTF8FileName(const char *text); - /** Convert from libxslt UTF8 to a QString */ - static QString fromUTF8(const xmlChar *text); - static QString fromUTF8FileName(const xmlChar *text); + /** Convert from libxslt UTF8 to a TQString */ + static TQString fromUTF8(const xmlChar *text); + static TQString fromUTF8FileName(const xmlChar *text); /* list of command yet to be processed */ - QStringList commandQueue(void) {return _commandQueue ;}; + TQStringList commandQueue(void) {return _commandQueue ;}; - void queueMessage(const QString &text); + void queueMessage(const TQString &text); protected: - QString updateText; + TQString updateText; private: bool initialized; int updateTimerID; - QStringList _commandQueue; + TQStringList _commandQueue; signals: // Signals /** line number and/or file name changed */ - void lineNoChanged(QString /* fileName */, int /* lineNumber */, bool /* breakpoint */); + void lineNoChanged(TQString /* fileName */, int /* lineNumber */, bool /* breakpoint */); /** Show a message in debugger window */ - void showMessage(QString /* msg*/); + void showMessage(TQString /* msg*/); - /** Add breakpoint to view, First parameter is QString::null + /** Add breakpoint to view, First parameter is TQString::null to indicate start of breakpoint list notfication */ - void breakpointItem(QString /* fileName*/, int /* lineNumber */, - QString /*templateName*/, QString /* modeName */, + void breakpointItem(TQString /* fileName*/, int /* lineNumber */, + TQString /*templateName*/, TQString /* modeName */, bool /* enabled */, int /* id */); - /** Add global variable to view, First parameter is QString::null + /** Add global variable to view, First parameter is TQString::null to indicate start of global variable list notfication */ - void globalVariableItem(QString /* name */, QString /* fileName */, int /* lineNumber */); + void globalVariableItem(TQString /* name */, TQString /* fileName */, int /* lineNumber */); - /** Add local variable to view, First parameter is QString::null + /** Add local variable to view, First parameter is TQString::null to indicate start of local variable list notfication */ - void localVariableItem(QString /*name */, QString /* templateContext*/, - QString /* fileName */, int /*lineNumber */); + void localVariableItem(TQString /*name */, TQString /* templateContext*/, + TQString /* fileName */, int /*lineNumber */); - /** Add a variable to view, First parameter is QString::null + /** Add a variable to view, First parameter is TQString::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 */); + void variableItem(TQString /*name */, TQString /* templateContext*/, + TQString /* fileName */, int /*lineNumber */, + TQString /* select XPath */, int /* is it a local variable */); - /** Add template to view, First parameter is QString::null + /** Add template to view, First parameter is TQString::null to indicate start of template list notfication */ - void templateItem(QString /* name*/, QString /*mode*/, QString /* fileName */, int /* lineNumber */); + void templateItem(TQString /* name*/, TQString /*mode*/, TQString /* fileName */, int /* lineNumber */); - /** Add source to view, First parameter is QString::null + /** Add source to view, First parameter is TQString::null to indicate start of source list notfication */ - void sourceItem(QString /* fileName */, QString /* parentFileName */, int /*lineNumber */); + void sourceItem(TQString /* fileName */, TQString /* parentFileName */, int /*lineNumber */); - /** Add parameter to view, First parameter is QString::null + /** Add parameter to view, First parameter is TQString::null to indicate start of parameter list notfication */ - void parameterItem(QString /* name*/, QString /* value */); + void parameterItem(TQString /* name*/, TQString /* value */); - /** Add callStack to view, First parameter is QString::null + /** Add callStack to view, First parameter is TQString::null to indicate start of callstack list notfication */ - void callStackItem(QString /* tempalteName*/, QString /* fileName */, int /* lineNumber */); + void callStackItem(TQString /* tempalteName*/, TQString /* fileName */, int /* lineNumber */); - /** Add entity to view, First parameter is QString::null + /** Add entity to view, First parameter is TQString::null to indicate start of entity list notfication */ - void entityItem(QString /*SystemID*/, QString /*PublicID*/); + void entityItem(TQString /*SystemID*/, TQString /*PublicID*/); /* Show the URI for SystemID or PublicID requested */ - void resolveItem(QString /*URI*/); + void resolveItem(TQString /*URI*/); - /* Display a integer option value First parameter is QString::null + /* Display a integer option value First parameter is TQString::null to indicate start of option list notification */ - void intOptionItem(QString /* name*/, int /* value */); + void intOptionItem(TQString /* name*/, int /* value */); - /* Display a string option value. First parameter is QString::null + /* Display a string option value. First parameter is TQString::null to indicate start of option list notification */ - void stringOptionItem(QString /* name*/, QString /* value */); + void stringOptionItem(TQString /* name*/, TQString /* value */); /* Cause the names for source, data and output files to be reload from xsldbg */ void fileDetailsChanged(); diff --git a/kxsldbg/kxsldbgpart/libqtnotfier/xsldbgevent.cpp b/kxsldbg/kxsldbgpart/libqtnotfier/xsldbgevent.cpp index a424eaba..35878929 100644 --- a/kxsldbg/kxsldbgpart/libqtnotfier/xsldbgevent.cpp +++ b/kxsldbg/kxsldbgpart/libqtnotfier/xsldbgevent.cpp @@ -17,11 +17,11 @@ * * ***************************************************************************/ -#include -#include -#include +#include +#include +#include #include -#include +#include #include @@ -34,14 +34,14 @@ #include "../libxsldbg/options.h" #include "../libxsldbg/files.h" -QString updateText; +TQString updateText; XsldbgEventData::XsldbgEventData() { int column; for (column = 0; column < XSLDBGEVENT_COLUMNS; column++){ - textValues[column] = QString::null; + textValues[column] = TQString::null; } for (column = 0; column < XSLDBGEVENT_COLUMNS; column++){ @@ -54,19 +54,19 @@ XsldbgEventData::~XsldbgEventData() { } -void XsldbgEventData::setText(int column, QString text) +void XsldbgEventData::setText(int column, TQString text) { if ((column >= 0) && (column < XSLDBGEVENT_COLUMNS)) textValues[column] = text; } -QString XsldbgEventData::getText(int column) +TQString XsldbgEventData::getText(int column) { if ((column >= 0) && (column < XSLDBGEVENT_COLUMNS)) return textValues[column]; else - return QString::null; + return TQString::null; } @@ -87,7 +87,7 @@ int XsldbgEventData::getInt(int column) XsldbgEvent::XsldbgEvent(XsldbgMessageEnum type, const void *data) - : QEvent(QEvent::User) + : TQEvent(TQEvent::User) { XsldbgEventData *eventData; this->data = data; @@ -205,14 +205,14 @@ XsldbgEventData *XsldbgEvent::createEventData(XsldbgMessageEnum type, const void break; } - QString fileName = url.path(); - QString outputText; + TQString fileName = url.path(); + TQString outputText; if (!fileName.isNull()){ - QFile file (fileName); + TQFile file (fileName); if (file.open(IO_ReadOnly)){ - QTextStream textFile(&file); - QString textIn = ""; - textFile.setEncoding(QTextStream::UnicodeUTF8); + TQTextStream textFile(&file); + TQString textIn = ""; + textFile.setEncoding(TQTextStream::UnicodeUTF8); while (1){ textIn = textFile.readLine(); if (textIn.isNull()) @@ -327,8 +327,8 @@ void XsldbgEvent::emitMessage(XsldbgEventData *eventData) 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); + TQTimerEvent *e = new TQTimerEvent(debugger->getUpdateTimerID()); + TQApplication::postEvent(debugger, e); } if (!updateText.isEmpty()){ debugger->queueMessage(updateText); @@ -512,7 +512,7 @@ void XsldbgEvent::handleGlobalVariableItem(XsldbgEventData *eventData, const vo /* add our specific data to eventData*/ if (msgData != 0L){ xsltStackElemPtr item = (xsltStackElemPtr)msgData; - QString name, fileName, selectXPath; + TQString name, fileName, selectXPath; int lineNumber = -1; /* variable name*/ @@ -557,7 +557,7 @@ void XsldbgEvent::handleLocalVariableItem(XsldbgEventData *eventData, const voi /* add our specific data to eventData*/ if (msgData != 0L){ xsltStackElemPtr item = (xsltStackElemPtr)msgData; - QString name, templateContext, fileName, selectXPath; + TQString name, templateContext, fileName, selectXPath; int lineNumber = -1; xmlNodePtr varXmlNode; @@ -620,7 +620,7 @@ if (eventData != 0L){ /* add our specific data to eventData*/ if(msgData != 0L){ xsltTemplatePtr item = (xsltTemplatePtr)msgData; - QString name, mode, fileName; + TQString name, mode, fileName; int lineNumber = -1; if (item->nameURI) @@ -661,7 +661,7 @@ void XsldbgEvent::handleIncludedSourceItem(XsldbgEventData *eventData, const vo /* add our specific data to eventData*/ if (msgData != 0L){ xmlNodePtr item = (xmlNodePtr)msgData; - QString name, fileName; + TQString name, fileName; int lineNumber = -1; if (item->doc) @@ -691,7 +691,7 @@ void XsldbgEvent::handleSourceItem(XsldbgEventData *eventData, const void *msgD /* add our specific data to eventData*/ if (msgData != 0L){ xsltStylesheetPtr item = (xsltStylesheetPtr)msgData; - QString name, fileName; + TQString name, fileName; int lineNumber = -1; if (item->doc) @@ -722,7 +722,7 @@ void XsldbgEvent::handleParameterItem(XsldbgEventData *eventData, const void *m /* add our specific data to eventData*/ if (msgData != 0L){ parameterItemPtr paramItem = (parameterItemPtr)msgData; - QString name, value; + TQString name, value; name = XsldbgDebuggerBase::fromUTF8(paramItem->name); value = XsldbgDebuggerBase::fromUTF8(paramItem->value); @@ -746,7 +746,7 @@ void XsldbgEvent::handleCallStackItem(XsldbgEventData *eventData, const void *m /* add our specific data to eventData*/ if (msgData != 0L){ callPointPtr item = (callPointPtr)msgData; - QString templateName, fileName; + TQString templateName, fileName; int lineNumber = -1; /* template name */ @@ -776,7 +776,7 @@ void XsldbgEvent::handleEntityItem(XsldbgEventData *eventData, const void *msgD if (beenCreated == false){ /* add our specific data to eventData*/ if (msgData != 0L){ - QString SystemID, PublicID; + TQString SystemID, PublicID; entityInfoPtr info = (entityInfoPtr)msgData; SystemID = XsldbgDebuggerBase::fromUTF8FileName(info->SystemID); @@ -800,7 +800,7 @@ void XsldbgEvent::handleResolveItem(XsldbgEventData *eventData, const void *msg if (beenCreated == false){ /* add our specific data to eventData*/ if (msgData != 0L){ - QString URI = XsldbgDebuggerBase::fromUTF8FileName((const xmlChar*)msgData); + TQString URI = XsldbgDebuggerBase::fromUTF8FileName((const xmlChar*)msgData); eventData->setText(0, URI); } @@ -851,7 +851,7 @@ void XsldbgEvent::handleStringOptionItem(XsldbgEventData *eventData, const void -void XsldbgEventDataList::deleteItem( QPtrCollection::Item d ) +void XsldbgEventDataList::deleteItem( TQPtrCollection::Item d ) { if ( del_item ) delete (XsldbgEventData *)d; } diff --git a/kxsldbg/kxsldbgpart/libxsldbg/breakpoint_cmds.cpp b/kxsldbg/kxsldbgpart/libxsldbg/breakpoint_cmds.cpp index 7935ea8c..0bab6585 100644 --- a/kxsldbg/kxsldbgpart/libxsldbg/breakpoint_cmds.cpp +++ b/kxsldbg/kxsldbgpart/libxsldbg/breakpoint_cmds.cpp @@ -95,7 +95,7 @@ xslDbgShellFrameBreak(xmlChar * arg, int stepup) if (!filesGetStylesheet() || !filesGetMainDoc()) { xsldbgGenericErrorFunc(i18n("Error: Debugger has no files loaded. Try reloading files.\n")); - xsldbgGenericErrorFunc(QString("Error: %1.\n").arg(i18n(errorPrompt))); + xsldbgGenericErrorFunc(TQString("Error: %1.\n").arg(i18n(errorPrompt))); return result; } @@ -104,7 +104,7 @@ xslDbgShellFrameBreak(xmlChar * arg, int stepup) xsltGenericError(xsltGenericErrorContext, "Error: NULL argument provided\n"); #endif - xsldbgGenericErrorFunc(QString("Error: %1\n").arg(i18n(errorPrompt))); + xsldbgGenericErrorFunc(TQString("Error: %1\n").arg(i18n(errorPrompt))); return result; } @@ -126,7 +126,7 @@ xslDbgShellFrameBreak(xmlChar * arg, int stepup) } if (!result) - xsldbgGenericErrorFunc(QString("Error: %1\n").arg(i18n(errorPrompt))); + xsldbgGenericErrorFunc(TQString("Error: %1\n").arg(i18n(errorPrompt))); return result; } @@ -350,7 +350,7 @@ xslDbgShellBreak(xmlChar * arg, xsltStylesheetPtr style, 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))); + xsldbgGenericErrorFunc(TQString("Error: %1\n").arg(i18n(errorPrompt))); return result; }else{ orphanedBreakPoint = 1; @@ -373,7 +373,7 @@ xslDbgShellBreak(xmlChar * arg, xsltStylesheetPtr style, 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))); + xsldbgGenericErrorFunc(TQString("Error: %1\n").arg(i18n(errorPrompt))); return result; } else { /* try to guess whether we are looking for source or data @@ -628,7 +628,7 @@ xslDbgShellBreak(xmlChar * arg, xsltStylesheetPtr style, } else { result = 1; if (newBreakPoints){ - xsldbgGenericErrorFunc(i18n("Information: Added %n new breakpoint.", "Information: Added %n new breakpoints.", newBreakPoints) + QString("\n")); + xsldbgGenericErrorFunc(i18n("Information: Added %n new breakpoint.", "Information: Added %n new breakpoints.", newBreakPoints) + TQString("\n")); } } @@ -681,7 +681,7 @@ xslDbgShellDelete(xmlChar * arg) xsltGenericError(xsltGenericErrorContext, "Error: NULL argument provided\n"); #endif - xsldbgGenericErrorFunc(QString("Error: %1\n").arg(i18n(errorPrompt))); + xsldbgGenericErrorFunc(TQString("Error: %1\n").arg(i18n(errorPrompt))); return result; } @@ -749,7 +749,7 @@ xslDbgShellDelete(xmlChar * arg) } } if (!result) - xsldbgGenericErrorFunc(QString("Error: %1\n").arg(i18n(errorPrompt))); + xsldbgGenericErrorFunc(TQString("Error: %1\n").arg(i18n(errorPrompt))); return result; } @@ -798,7 +798,7 @@ xslDbgShellEnable(xmlChar * arg, int enableType) if (!filesGetStylesheet() || !filesGetMainDoc()) { xsldbgGenericErrorFunc(i18n("Error: Debugger has no files loaded. Try reloading files.\n")); - xsldbgGenericErrorFunc(QString("Error: %1\n").arg(i18n(errorPrompt))); + xsldbgGenericErrorFunc(TQString("Error: %1\n").arg(i18n(errorPrompt))); return result; } @@ -807,7 +807,7 @@ xslDbgShellEnable(xmlChar * arg, int enableType) xsltGenericError(xsltGenericErrorContext, "Error: NULL argument provided\n"); #endif - xsldbgGenericErrorFunc(QString("Error: %1\n").arg(i18n(errorPrompt))); + xsldbgGenericErrorFunc(TQString("Error: %1\n").arg(i18n(errorPrompt))); return result; } @@ -872,7 +872,7 @@ xslDbgShellEnable(xmlChar * arg, int enableType) } if (!result) - xsldbgGenericErrorFunc(QString("Error: %1\n").arg(i18n(errorPrompt))); + xsldbgGenericErrorFunc(TQString("Error: %1\n").arg(i18n(errorPrompt))); return result; } @@ -931,7 +931,7 @@ static int validateBreakPoint(breakPointPtr breakPtr, breakPointPtr copy) 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)); + xsldbgGenericErrorFunc(TQString("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 ) || diff --git a/kxsldbg/kxsldbgpart/libxsldbg/debugXSL.cpp b/kxsldbg/kxsldbgpart/libxsldbg/debugXSL.cpp index 39aea804..7088cf36 100644 --- a/kxsldbg/kxsldbgpart/libxsldbg/debugXSL.cpp +++ b/kxsldbg/kxsldbgpart/libxsldbg/debugXSL.cpp @@ -603,7 +603,7 @@ xslDbgCd(xsltTransformContextPtr styleCtxt, xmlShellCtxtPtr ctxt, } 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")); + 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)) + TQString("\n")); } else { xsldbgGenericErrorFunc(i18n("Warning: XPath %1 is an empty Node Set.\n").arg(xsldbgText(arg))); } @@ -1131,7 +1131,7 @@ debugXSLBreak(xmlNodePtr templ, xmlNodePtr node, xsltTemplatePtr root, } else { if ((xslDebugStatus == DEBUG_TRACE) || (xslDebugStatus == DEBUG_WALK)) { - QString message; + TQString message; if (root->match) message = i18n("\nReached template: \"%1\" mode: \"%2\"\n").arg(xsldbgText(root->match)).arg(xsldbgText(modeTemp)); else @@ -1279,7 +1279,7 @@ shellPrompt(xmlNodePtr source, xmlNodePtr doc, xmlChar * filename, * send this as the application will see the XSLDBG_MSG_LINE_CHANGED message */ if ((getThreadStatus() == XSLDBG_MSG_THREAD_NOTUSED) || (xslDebugStatus == DEBUG_TRACE)) { - QString messageTxt; + TQString messageTxt; if (!nextCommandActive && ctxt->node && ctxt->node && ctxt->node->doc && ctxt->node->doc->URL) { if (!showSource) { @@ -1612,7 +1612,7 @@ shellPrompt(xmlNodePtr source, xmlNodePtr doc, xmlChar * filename, 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")); + xsldbgGenericErrorFunc(i18n("\tTotal of %n breakpoint present.","\tTotal of %n breakpoints present.", printCount) + TQString("\n")); } cmdResult = 1; break; diff --git a/kxsldbg/kxsldbgpart/libxsldbg/file_cmds.cpp b/kxsldbg/kxsldbgpart/libxsldbg/file_cmds.cpp index 083b33b2..10abbaf7 100644 --- a/kxsldbg/kxsldbgpart/libxsldbg/file_cmds.cpp +++ b/kxsldbg/kxsldbgpart/libxsldbg/file_cmds.cpp @@ -77,7 +77,7 @@ xslDbgEntities(void) 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")); + xsldbgGenericErrorFunc(i18n("\tTotal of %n entity found.", "\tTotal of %n entities found.", arrayListCount(filesEntityList())) + TQString("\n")); } result = 1; diff --git a/kxsldbg/kxsldbgpart/libxsldbg/help_unix.cpp b/kxsldbg/kxsldbgpart/libxsldbg/help_unix.cpp index d3e91f92..db06ad2f 100644 --- a/kxsldbg/kxsldbgpart/libxsldbg/help_unix.cpp +++ b/kxsldbg/kxsldbgpart/libxsldbg/help_unix.cpp @@ -53,9 +53,9 @@ helpTop(const xmlChar * args) 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")); + TQString xsldbgVerTxt(i18n("xsldbg version")); + TQString helpDocVerTxt(i18n("Help document version")); + TQString helpErrorTxt(i18n("Help not found for command")); char buff[500], helpParam[100]; diff --git a/kxsldbg/kxsldbgpart/libxsldbg/options.cpp b/kxsldbg/kxsldbgpart/libxsldbg/options.cpp index 9f667eb3..28b8f44c 100644 --- a/kxsldbg/kxsldbgpart/libxsldbg/options.cpp +++ b/kxsldbg/kxsldbgpart/libxsldbg/options.cpp @@ -25,8 +25,8 @@ #include "utils.h" #include #include -#include -#include +#include +#include /* keep track of our integer/boolean options */ @@ -90,42 +90,42 @@ const char *optionNames[] = { // find the translated help documentation directory // langLookupDir code modified from langLookup function in kdebase/khelpcenter/view.cpp -static QString langLookupDir( const QString &fname ) +static TQString langLookupDir( const TQString &fname ) { - QStringList search; + TQStringList search; // assemble the local search paths - QStringList localDoc = KGlobal::dirs()->resourceDirs("html"); + TQStringList localDoc = KGlobal::dirs()->resourceDirs("html"); // also look in each of the KDEDIR paths - QString kdeDirs = getenv("KDEDIRS"); - QStringList kdeDirsList = QStringList::split(":", kdeDirs); + TQString kdeDirs = getenv("KDEDIRS"); + TQStringList kdeDirsList = TQStringList::split(":", kdeDirs); if (!kdeDirs.isEmpty() && !kdeDirsList.isEmpty()){ - for (QStringList::iterator it = kdeDirsList.begin(); it != kdeDirsList.end(); it++) + for (TQStringList::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(); + TQStringList langs = KGlobal::locale()->languageList(); langs.append( "en" ); langs.remove( "C" ); - QStringList::ConstIterator lang; + TQStringList::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)); + search.append(TQString("%1%2/%3/%4").arg(localDoc[id]).arg(*lang).arg("xsldbg").arg(fname)); } // try to locate the file - QStringList::Iterator it; + TQStringList::Iterator it; for (it = search.begin(); it != search.end(); ++it) { - QString baseDir = (*it).left((*it).findRev('/')) ; - QFileInfo info(baseDir + "/"+ fname); + TQString baseDir = (*it).left((*it).findRev('/')) ; + TQFileInfo info(baseDir + "/"+ fname); if (info.exists() && info.isFile() && info.isReadable()) return baseDir; } - return QString::null; + return TQString::null; } @@ -296,7 +296,7 @@ optionsSetIntOption(OptionTypeEnum optionType, int value) 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")); + xsldbgGenericErrorFunc(TQString("Error: Invalid arguments for the command %1.\n").arg("setoption")); #endif } result = 0; @@ -326,7 +326,7 @@ optionsGetIntOption(OptionTypeEnum optionType) 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")); + xsldbgGenericErrorFunc(TQString("Error: Invalid arguments for the command %1.\n").arg("options")); #endif } } @@ -368,7 +368,7 @@ optionsSetStringOption(OptionTypeEnum optionType, const xmlChar * value) 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")); + xsldbgGenericErrorFunc(TQString("Error: Invalid arguments for the command %1.\n").arg("setoption")); #endif } } @@ -399,7 +399,7 @@ optionsGetStringOption(OptionTypeEnum optionType) 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")); + xsldbgGenericErrorFunc(TQString("Error: Invalid arguments for the command %1.\n").arg("options")); #endif } } diff --git a/kxsldbg/kxsldbgpart/libxsldbg/param_cmds.cpp b/kxsldbg/kxsldbgpart/libxsldbg/param_cmds.cpp index e4255797..befa330d 100644 --- a/kxsldbg/kxsldbgpart/libxsldbg/param_cmds.cpp +++ b/kxsldbg/kxsldbgpart/libxsldbg/param_cmds.cpp @@ -72,7 +72,7 @@ xslDbgShellAddParam(xmlChar * arg) } } if (!result) - xsldbgGenericErrorFunc(QString("Error: %1\n").arg(i18n(errorPrompt))); + xsldbgGenericErrorFunc(TQString("Error: %1\n").arg(i18n(errorPrompt))); else { xsldbgGenericErrorFunc("\n"); } @@ -121,7 +121,7 @@ xslDbgShellDelParam(xmlChar * arg) } } if (!result) - xsldbgGenericErrorFunc(QString("Error: %1\n").arg(i18n(errorPrompt))); + xsldbgGenericErrorFunc(TQString("Error: %1\n").arg(i18n(errorPrompt))); else xsldbgGenericErrorFunc("\n"); @@ -168,7 +168,7 @@ xslDbgShellShowParam(xmlChar * arg) if (optionsPrintParamList()) result = 1; else - xsldbgGenericErrorFunc(QString("Error: %1\n").arg(i18n(errorPrompt))); + xsldbgGenericErrorFunc(TQString("Error: %1\n").arg(i18n(errorPrompt))); xsldbgGenericErrorFunc("\n"); } return result; diff --git a/kxsldbg/kxsldbgpart/libxsldbg/template_cmds.cpp b/kxsldbg/kxsldbgpart/libxsldbg/template_cmds.cpp index 10deb686..261c0ebe 100644 --- a/kxsldbg/kxsldbgpart/libxsldbg/template_cmds.cpp +++ b/kxsldbg/kxsldbgpart/libxsldbg/template_cmds.cpp @@ -134,7 +134,7 @@ printTemplateHelper(xsltTemplatePtr templ, int verbose, 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))); + xsldbgGenericErrorFunc(TQString("\"%s\" ").arg(xsldbgText(name))); if (modeTemp) xmlFree(modeTemp); } @@ -225,8 +225,8 @@ xslDbgShellPrintTemplateNames(xsltTransformContextPtr styleCtxt, 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")); + xsldbgGenericErrorFunc(i18n("\tTotal of %n XSLT template found", "\tTotal of %n XSLT templates found", templateCount) + TQString("\n")); + xsldbgGenericErrorFunc(i18n("\tTotal of %n XSLT template printed", "\tTotal of %n XSLT templates printed", printedTemplateCount) + TQString("\n")); } } @@ -322,7 +322,7 @@ xslDbgShellPrintStyleSheets(xmlChar * arg) 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")); + xsldbgGenericErrorFunc(i18n("\tTotal of %n XSLT stylesheet found.", "\tTotal of %n XSLT stylesheets found.", printCounter) + TQString("\n")); else /* strange but possible */ xsldbgGenericErrorFunc(i18n("\tNo XSLT stylesheets found.\n")); diff --git a/kxsldbg/kxsldbgpart/libxsldbg/xsldbg.cpp b/kxsldbg/kxsldbgpart/libxsldbg/xsldbg.cpp index 2afdb828..52066acf 100644 --- a/kxsldbg/kxsldbgpart/libxsldbg/xsldbg.cpp +++ b/kxsldbg/kxsldbgpart/libxsldbg/xsldbg.cpp @@ -101,7 +101,7 @@ #include #include -#include +#include #ifdef WIN32 #ifdef _MSC_VER @@ -254,7 +254,7 @@ startTimer(void) * type argument */ static void -endTimer(const QString& message) +endTimer(const TQString& message) { long msec; @@ -284,7 +284,7 @@ startTimer(void) begin = clock(); } static void -endTimer(const QString& message) +endTimer(const TQString& message) { long msec; @@ -310,7 +310,7 @@ startTimer(void) */ } static void -endTimer(const QString& message) +endTimer(const TQString& message) { /* * We can not do anything because we don't have a timing function @@ -539,7 +539,7 @@ xsldbgMain(int argc, char **argv) if (args){ - QString langChoice = args->getOption("lang"); + TQString langChoice = args->getOption("lang"); if (KGlobal::locale() && !langChoice.isEmpty() && result) KGlobal::locale()->setLanguage(langChoice); } @@ -645,11 +645,11 @@ xsldbgMain(int argc, char **argv) if (args->isSet("verbose") && result) xsltSetGenericDebugFunc(stderr, NULL); - QCString outFile = args->getOption("output"); + TQCString outFile = args->getOption("output"); if (!outFile.isEmpty() && result) - result = xslDbgShellOutput((const xmlChar *)QFile::encodeName(outFile).data()); + result = xslDbgShellOutput((const xmlChar *)TQFile::encodeName(outFile).data()); - QCString maxDepth = args->getOption("maxdepth"); + TQCString maxDepth = args->getOption("maxdepth"); if (!maxDepth.isEmpty() && result){ bool OK; int value = maxDepth.toInt(&OK); @@ -666,7 +666,7 @@ xsldbgMain(int argc, char **argv) QCStringList xslParams(args->getOptionList("param")); QCStringList::iterator it; - QCString param, paramName, paramValue; + TQCString param, paramName, paramValue; int separatorIdx; bool paramOK; for ( it = xslParams.begin(); it != xslParams.end(); ++it){ @@ -692,9 +692,9 @@ xsldbgMain(int argc, char **argv) xsldbgGenericErrorFunc(i18n("Error: Argument \"%1\" to --param is not in the format :.\n").arg(param.data())); } - QCString cdPath = args->getOption("cd"); + TQCString cdPath = args->getOption("cd"); if (!cdPath.isEmpty() && result) - result = changeDir((const xmlChar *)QFile::encodeName(cdPath).data()); + result = changeDir((const xmlChar *)TQFile::encodeName(cdPath).data()); } @@ -997,7 +997,7 @@ xsldbgLoadXmlData(void) xslDebugStatus = DEBUG_STOP; } } else if (optionsGetIntOption(OPTIONS_TIMING)) - endTimer(QString("Parsing document %1").arg(xsldbgUrl(optionsGetStringOption(OPTIONS_DATA_FILE_NAME))).utf8().data()); + endTimer(TQString("Parsing document %1").arg(xsldbgUrl(optionsGetStringOption(OPTIONS_DATA_FILE_NAME))).utf8().data()); return doc; } @@ -1037,7 +1037,7 @@ xsldbgLoadXmlTemporary(const xmlChar * path) if (optionsGetIntOption(OPTIONS_TIMING) && (xslDebugStatus != DEBUG_QUIT)) { - endTimer(QString("Parsing document %1").arg(xsldbgUrl(path))); + endTimer(TQString("Parsing document %1").arg(xsldbgUrl(path))); } return doc; } @@ -1328,16 +1328,16 @@ xsldbgGenericErrorFunc(void *ctx, const char *msg, ...) va_end(args); } -void xsldbgGenericErrorFunc(QString const &text) +void xsldbgGenericErrorFunc(TQString const &text) { xsldbgGenericErrorFunc(0, "%s", text.utf8().data()); } -QString xsldbgUrl(const char *utf8fUrl) +TQString xsldbgUrl(const char *utf8fUrl) { - QString tempUrl(utf8fUrl); - QString fixedURI; + TQString tempUrl(utf8fUrl); + TQString fixedURI; KURL url(tempUrl); // May be provided with a URL that only has been encoded and has no protocol prefix ie a local file @@ -1349,19 +1349,19 @@ QString xsldbgUrl(const char *utf8fUrl) return fixedURI; } -QString xsldbgUrl(const xmlChar *utf8Url) +TQString xsldbgUrl(const xmlChar *utf8Url) { return xsldbgUrl((const char*)(utf8Url)); } -QString xsldbgText(const char *utf8Text) +TQString xsldbgText(const char *utf8Text) { - return QString::fromUtf8(utf8Text); + return TQString::fromUtf8(utf8Text); } -QString xsldbgText(const xmlChar *utf8Text) +TQString xsldbgText(const xmlChar *utf8Text) { - return QString::fromUtf8((const char *)utf8Text); + return TQString::fromUtf8((const char *)utf8Text); } diff --git a/kxsldbg/kxsldbgpart/libxsldbg/xsldbg.h b/kxsldbg/kxsldbgpart/libxsldbg/xsldbg.h index 6972fc12..26abeb49 100644 --- a/kxsldbg/kxsldbgpart/libxsldbg/xsldbg.h +++ b/kxsldbg/kxsldbgpart/libxsldbg/xsldbg.h @@ -80,7 +80,7 @@ #include #include -#include +#include #include #include "breakpoint.h" @@ -179,10 +179,10 @@ int xsldbgMain(int argc, char **argv); } #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); +void xsldbgGenericErrorFunc(TQString const &text); +TQString xsldbgUrl(const char *utf8Url); +TQString xsldbgUrl(const xmlChar *utf8Url); +TQString xsldbgText(const char *utf8Text); +TQString xsldbgText(const xmlChar *utf8Text); #endif diff --git a/kxsldbg/kxsldbgpart/libxsldbg/xsldbgevent.h b/kxsldbg/kxsldbgpart/libxsldbg/xsldbgevent.h index 85b1827f..86bd2e4f 100644 --- a/kxsldbg/kxsldbgpart/libxsldbg/xsldbgevent.h +++ b/kxsldbg/kxsldbgpart/libxsldbg/xsldbgevent.h @@ -25,8 +25,8 @@ #include #endif -#include -#include +#include +#include #include "xsldbgmsg.h" @@ -40,50 +40,50 @@ class XsldbgEventDataList : public QGList { public: XsldbgEventDataList(void) {} - XsldbgEventDataList( const XsldbgEventDataList &l ) : QGList(l) {} + XsldbgEventDataList( const XsldbgEventDataList &l ) : TQGList(l) {} ~XsldbgEventDataList(void) { clear(); } XsldbgEventDataList &operator=(const XsldbgEventDataList &l) - { return (XsldbgEventDataList&)QGList::operator=(l); } + { return (XsldbgEventDataList&)TQGList::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); } + { return TQGList::operator==( list ); } + uint count(void) const { return TQGList::count(); } + bool isEmpty(void) const { return TQGList::count() == 0; } + bool insert( uint i, const XsldbgEventData *d){ return TQGList::insertAt(i,(TQPtrCollection::Item)d); } + void inSort( const XsldbgEventData *d ) { TQGList::inSort((TQPtrCollection::Item)d); } + void prepend( const XsldbgEventData *d ) { TQGList::insertAt(0,(TQPtrCollection::Item)d); } + void append( const XsldbgEventData *d ) { TQGList::append((TQPtrCollection::Item)d); } + bool remove( uint i ) { return TQGList::removeAt(i); } + bool remove(void) { return TQGList::remove((TQPtrCollection::Item)0); } + bool remove( const XsldbgEventData *d ) { return TQGList::remove((TQPtrCollection::Item)d); } + bool removeRef( const XsldbgEventData *d ) { return TQGList::removeRef((TQPtrCollection::Item)d); } + void removeNode( TQLNode *n ) { TQGList::removeNode(n); } + bool removeFirst(void) { return TQGList::removeFirst(); } + bool removeLast(void) { return TQGList::removeLast(); } + XsldbgEventData *take( uint i ) { return (XsldbgEventData *)TQGList::takeAt(i); } + XsldbgEventData *take(void) { return (XsldbgEventData *)TQGList::take(); } + XsldbgEventData *takeNode( TQLNode *n ) { return (XsldbgEventData *)TQGList::takeNode(n); } + void clear(void) { TQGList::clear(); } + void sort(void) { TQGList::sort(); } + int find( const XsldbgEventData *d ) { return TQGList::find((TQPtrCollection::Item)d); } + int findNext( const XsldbgEventData *d ) { return TQGList::find((TQPtrCollection::Item)d,FALSE); } + int findRef( const XsldbgEventData *d ) { return TQGList::findRef((TQPtrCollection::Item)d); } + int findNextRef( const XsldbgEventData *d ){ return TQGList::findRef((TQPtrCollection::Item)d,FALSE);} + uint contains( const XsldbgEventData *d ) const { return TQGList::contains((TQPtrCollection::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); } + { return TQGList::containsRef((TQPtrCollection::Item)d); } + XsldbgEventData *at( uint i ) { return (XsldbgEventData *)TQGList::at(i); } + int at(void) const { return TQGList::at(); } + XsldbgEventData *current(void) const { return (XsldbgEventData *)TQGList::get(); } + TQLNode *currentNode(void) const { return TQGList::currentNode(); } + XsldbgEventData *getFirst(void) const { return (XsldbgEventData *)TQGList::cfirst(); } + XsldbgEventData *getLast(void) const { return (XsldbgEventData *)TQGList::clast(); } + XsldbgEventData *first(void) { return (XsldbgEventData *)TQGList::first(); } + XsldbgEventData *last(void) { return (XsldbgEventData *)TQGList::last(); } + XsldbgEventData *next(void) { return (XsldbgEventData *)TQGList::next(); } + XsldbgEventData *prev(void) { return (XsldbgEventData *)TQGList::prev(); } + void toVector( TQGVector *vec )const{ TQGList::toVector(vec); } private: - void deleteItem( QPtrCollection::Item d ); + void deleteItem( TQPtrCollection::Item d ); }; @@ -111,18 +111,18 @@ class XsldbgEventData { * @param column 0 =< @p column < XSLDBGEVENT_COLUMNS * @param text The text value to store in column indicated */ - void setText(int column, QString text); + void setText(int column, TQString text); /** * Get the text from the column specified * - * @returns QString::null if invalid column number + * @returns TQString::null if invalid column number * * @param column 0 =< @p column < XSLDBGEVENT_COLUMNS * */ - QString getText(int column); + TQString getText(int column); /** @@ -146,10 +146,10 @@ class XsldbgEventData { private: /** Below are the messages that this class will support - Values are mapped left to right ie the first QString value maps + Values are mapped left to right ie the first TQString value maps to textValues[0], the second mapps to textValues[1] the third maps to textValues[2] etc.. */ - QString textValues[XSLDBGEVENT_COLUMNS]; + TQString textValues[XSLDBGEVENT_COLUMNS]; /** Both int and bool values are mapped to intValues in the same manner as @@ -158,65 +158,65 @@ class XsldbgEventData { /** - - - - - - The message/signal types supported - - - - - - */ // /** line number and/or file name changed */ - // void lineNoChanged(QString /* fileName */, int /* lineNumber */, bool /* breakpoint */); + // void lineNoChanged(TQString /* 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*/); + // void showMessage(TQString /* msg*/); // These data item is mapped to the text attribute - // /** Add breakpoint to view, First parameter is QString::null + // /** Add breakpoint to view, First parameter is TQString::null // to indicate start of breakpoint list notfication */ - // void breakpointItem(QString /* fileName*/, int /* lineNumber */, QString /*templateName*/, + // void breakpointItem(TQString /* fileName*/, int /* lineNumber */, TQString /*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 + // /** Add global variable to view, First parameter is TQString::null // to indicate start of global variable list notfication */ - // void globalVariableItem(QString /* name */, QString /* fileName */, int /* lineNumber */); + // void globalVariableItem(TQString /* name */, TQString /* 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 + // /** Add local variable to view, First parameter is TQString::null // to indicate start of local variable list notfication */ - // void localVariableItem(QString /*name */, QString /* templateContext*/, - // QString /* fileName */, int /*lineNumber */); + // void localVariableItem(TQString /*name */, TQString /* templateContext*/, + // TQString /* 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 + // /** Add template to view, First parameter is TQString::null // to indicate start of template list notfication */ - // void templateItem(QString /* name*/, QString /*mode*/, QString /* fileName */, int /* lineNumber */); + // void templateItem(TQString /* name*/, TQString /*mode*/, TQString /* fileName */, int /* lineNumber */); - // /** Add source to view, First parameter is QString::null + // /** Add source to view, First parameter is TQString::null // to indicate start of source list notfication */ - // void sourceItem(QString /* fileName */, QString /* parentFileName */, int /*lineNumber */); + // void sourceItem(TQString /* fileName */, TQString /* parentFileName */, int /*lineNumber */); - // /** Add parameter to view, First parameter is QString::null + // /** Add parameter to view, First parameter is TQString::null // to indicate start of parameter list notfication */ - // void parameterItem(QString /* name*/, QString /* value */); + // void parameterItem(TQString /* name*/, TQString /* value */); - // /** Add callStack to view, First parameter is QString::null + // /** Add callStack to view, First parameter is TQString::null // to indicate start of callstack list notfication */ - // void callStackItem(QString /* tempalteName*/, QString /* fileName */, int /* lineNumber */); + // void callStackItem(TQString /* tempalteName*/, TQString /* fileName */, int /* lineNumber */); - // /** Add entity to view, First parameter is QString::null + // /** Add entity to view, First parameter is TQString::null // to indicate start of entity list notfication */ - // void entityItem(QString /*SystemID*/, QString /*PublicID*/); + // void entityItem(TQString /*SystemID*/, TQString /*PublicID*/); // /* Show the URI for SystemID or PublicID requested */ - // void resolveItem(QString /*URI*/); + // void resolveItem(TQString /*URI*/); - // /* Display a integer option value First parameter is QString::null + // /* Display a integer option value First parameter is TQString::null // to indicate start of option list notification */ - // void intOptionItem(QString /* name*/, int /* value */); + // void intOptionItem(TQString /* name*/, int /* value */); - // /* Display a string option value. First parameter is QString::null + // /* Display a string option value. First parameter is TQString::null // to indicate start of option list notification */ - // void stringOptionItem(QString /* name*/, QString /* value */); + // void stringOptionItem(TQString /* name*/, TQString /* value */); }; @@ -230,7 +230,7 @@ class XsldbgEventData { * * @author Keith Isdale */ -class XsldbgEvent : public QEvent { +class XsldbgEvent : public TQEvent { public: XsldbgEvent(XsldbgMessageEnum type, const void *data); @@ -252,7 +252,7 @@ class XsldbgEvent : public QEvent { /** The following functions are directly related to the eventual signals that will be emitted ie the signal - lineNoChanged(QString, int bool) + lineNoChanged(TQString, int bool) is mapped to handleLineNoChanged(XsldbgEventData *, void *) */ diff --git a/kxsldbg/kxsldbgpart/qxsldbgdoc.cpp b/kxsldbg/kxsldbgpart/qxsldbgdoc.cpp index 69105338..1b8d2df3 100644 --- a/kxsldbg/kxsldbgpart/qxsldbgdoc.cpp +++ b/kxsldbg/kxsldbgpart/qxsldbgdoc.cpp @@ -8,26 +8,26 @@ #include "qxsldbgdoc.h" #include #include -#include -#include -#include -#include +#include +#include +#include +#include -QXsldbgDoc::QXsldbgDoc(QWidget *parent, KURL url) - : QObject(0L, "QXsldbgDoc"), kDoc(0L),kView(0L), locked(false) +QXsldbgDoc::QXsldbgDoc(TQWidget *parent, KURL url) + : TQObject(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())); + connect(kDoc, TQT_SIGNAL(started(KIO::Job *)), this, TQT_SLOT(lockDoc())); + connect(kDoc, TQT_SIGNAL(completed()), this, TQT_SLOT(unlockDoc())); if (kDoc){ kView = kDoc->createView(parent, "QXsldbgDocView"); KURL cleanUrl; // convert paths relative to PWD into a absolute path - QString relUrl = url.prettyURL(); + TQString relUrl = url.prettyURL(); if (!relUrl.contains(":/")){ if (!(relUrl.left(1) == "/")) - relUrl.prepend(QDir::currentDirPath() + "/"); + relUrl.prepend(TQDir::currentDirPath() + "/"); cleanUrl.setFileName(relUrl); }else{ cleanUrl = url; @@ -121,7 +121,7 @@ void QXsldbgDoc::clearMarks(bool allMarkTypes) KTextEditor::MarkInterface *markIf = KTextEditor::markInterface(kDoc); if (markIf){ if (!allMarkTypes){ - QPtrList marks = markIf->marks(); + TQPtrList marks = markIf->marks(); while ( marks.current()) { markIf->removeMark(marks.current()->line, KTextEditor::MarkInterface::Execution); markIf->removeMark(marks.current()->line, KTextEditor::MarkInterface::BreakpointReached); diff --git a/kxsldbg/kxsldbgpart/qxsldbgdoc.h b/kxsldbg/kxsldbgpart/qxsldbgdoc.h index ec126aa6..abc04448 100644 --- a/kxsldbg/kxsldbgpart/qxsldbgdoc.h +++ b/kxsldbg/kxsldbgpart/qxsldbgdoc.h @@ -10,18 +10,18 @@ #define QXSLDBGDOC_H #include -#include -#include -#include +#include +#include +#include #include #include -class QXsldbgDoc : public QObject { +class QXsldbgDoc : public TQObject { Q_OBJECT public: - QXsldbgDoc(QWidget *parent=0, KURL url=QString::null); + QXsldbgDoc(TQWidget *parent=0, KURL url=TQString::null); ~QXsldbgDoc(); void enableBreakPoint(uint lineNumber, bool state); @@ -48,8 +48,8 @@ private slots: void unlockDoc(); private: - QGuardedPtr kDoc; - QGuardedPtr kView; + TQGuardedPtr kDoc; + TQGuardedPtr kView; bool locked; }; diff --git a/kxsldbg/kxsldbgpart/xsldbgbreakpointlistitem.cpp b/kxsldbg/kxsldbgpart/xsldbgbreakpointlistitem.cpp index 9e0c7130..a94e3a0f 100644 --- a/kxsldbg/kxsldbgpart/xsldbgbreakpointlistitem.cpp +++ b/kxsldbg/kxsldbgpart/xsldbgbreakpointlistitem.cpp @@ -18,14 +18,14 @@ #include #include "xsldbgbreakpointlistitem.h" -XsldbgBreakpointListItem::XsldbgBreakpointListItem(QListView *parent, - QString fileName, int lineNumber, - QString templateName, QString modeName, +XsldbgBreakpointListItem::XsldbgBreakpointListItem(TQListView *parent, + TQString fileName, int lineNumber, + TQString templateName, TQString modeName, bool enabled, int id) : XsldbgListItem(parent, 3, fileName, lineNumber) { this->id = id; - setText(0, QString::number(id)); + setText(0, TQString::number(id)); this->templateName = templateName; setText(1, templateName); diff --git a/kxsldbg/kxsldbgpart/xsldbgbreakpointlistitem.h b/kxsldbg/kxsldbgpart/xsldbgbreakpointlistitem.h index 3c25395e..b54d888a 100644 --- a/kxsldbg/kxsldbgpart/xsldbgbreakpointlistitem.h +++ b/kxsldbg/kxsldbgpart/xsldbgbreakpointlistitem.h @@ -26,9 +26,9 @@ class XsldbgBreakpointListItem : public XsldbgListItem { public: - XsldbgBreakpointListItem(QListView *parent, - QString fileName, int lineNumber, - QString templateName, QString modeName, + XsldbgBreakpointListItem(TQListView *parent, + TQString fileName, int lineNumber, + TQString templateName, TQString modeName, bool enabled, int id); ~XsldbgBreakpointListItem(); @@ -36,14 +36,14 @@ public: bool getEnabled() {return __enabled; }; /** Returns the name of template for this breakpoiint */ - QString getTemplateName() { return templateName;}; - QString getModeName() {return modeName;}; + TQString getTemplateName() { return templateName;}; + TQString getModeName() {return modeName;}; /** Return the breakpoint's id */ int getId() { return id;}; private: - QString templateName, modeName; + TQString templateName, modeName; bool __enabled; /*make sure the name does not clash with QT */ int id; }; diff --git a/kxsldbg/kxsldbgpart/xsldbgbreakpointsimpl.cpp b/kxsldbg/kxsldbgpart/xsldbgbreakpointsimpl.cpp index 81e83142..ba14d115 100644 --- a/kxsldbg/kxsldbgpart/xsldbgbreakpointsimpl.cpp +++ b/kxsldbg/kxsldbgpart/xsldbgbreakpointsimpl.cpp @@ -16,9 +16,9 @@ ************************************************************************************/ #include -#include -#include -#include +#include +#include +#include #include "xsldbgdebugger.h" #include "xsldbgbreakpointsimpl.h" #include "xsldbgbreakpointlistitem.h" @@ -26,20 +26,20 @@ XsldbgBreakpointsImpl::XsldbgBreakpointsImpl(XsldbgDebugger *debugger, - QWidget *parent /*=0*/, const char *name /*=0*/) + TQWidget *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*/, + connect(debugger, TQT_SIGNAL(breakpointItem(TQString /* file*/, + int /*line number */, TQString /*templateName*/, + TQString /* modeName*/, bool /* enabled */, int /* id */)), - this, SLOT(slotProcBreakpointItem(QString /* file*/, - int /*line number */, QString /*templateName*/, - QString /* modeName */, + this, TQT_SLOT(slotProcBreakpointItem(TQString /* file*/, + int /*line number */, TQString /*templateName*/, + TQString /* modeName */, bool /* enabled */, int /* id */))); - connect( breakpointListView, SIGNAL(selectionChanged(QListViewItem *)), - this, SLOT(selectionChanged(QListViewItem*))); + connect( breakpointListView, TQT_SIGNAL(selectionChanged(TQListViewItem *)), + this, TQT_SLOT(selectionChanged(TQListViewItem*))); show(); refresh(); } @@ -80,18 +80,18 @@ void XsldbgBreakpointsImpl::slotAddBreakpoint() if (!sourceFileEdit->text().isEmpty()){ debugger->slotBreakCmd(sourceFileEdit->text(), lineNo); }else { - QMessageBox::information(this, i18n("Operation Failed"), + TQMessageBox::information(this, i18n("Operation Failed"), i18n("A line number was provided without a file name."), - QMessageBox::Ok); + TQMessageBox::Ok); } }else if (!templateNameEdit->text().isEmpty() || !modeNameEdit->text().isEmpty()){ debugger->slotBreakCmd(templateNameEdit->text(), modeNameEdit->text()); }else{ - QMessageBox::information(this, i18n("Operation Failed"), + TQMessageBox::information(this, i18n("Operation Failed"), i18n("No details provided or an invalid line number was supplied."), - QMessageBox::Ok); + TQMessageBox::Ok); } } @@ -112,14 +112,14 @@ void XsldbgBreakpointsImpl::slotDeleteBreakpoint() if (!sourceFileEdit->text().isEmpty()){ debugger->slotDeleteCmd(sourceFileEdit->text(), lineNo); }else { - QMessageBox::information(this, i18n("Operation Failed"), + TQMessageBox::information(this, i18n("Operation Failed"), i18n("A line number was provided without a file name."), - QMessageBox::Ok); + TQMessageBox::Ok); } }else { - QMessageBox::information(this, i18n("Operation Failed"), + TQMessageBox::information(this, i18n("Operation Failed"), i18n("No details provided or an invalid line or ID was supplied."), - QMessageBox::Ok); + TQMessageBox::Ok); } } @@ -140,27 +140,27 @@ void XsldbgBreakpointsImpl::slotEnableBreakpoint() if (!sourceFileEdit->text().isEmpty()){ debugger->slotEnableCmd(sourceFileEdit->text(), lineNo); }else { - QMessageBox::information(this, i18n("Operation Failed"), + TQMessageBox::information(this, i18n("Operation Failed"), i18n("A line number was provided without a file name."), - QMessageBox::Ok); + TQMessageBox::Ok); } }else { - QMessageBox::information(this, i18n("Operation Failed"), + TQMessageBox::information(this, i18n("Operation Failed"), i18n("No details provided."), - QMessageBox::Ok); + TQMessageBox::Ok); } } -void XsldbgBreakpointsImpl::selectionChanged(QListViewItem *item) +void XsldbgBreakpointsImpl::selectionChanged(TQListViewItem *item) { XsldbgBreakpointListItem *breakItem = dynamic_cast(item); if (breakItem){ - idEdit->setText(QString::number(breakItem->getId())); + idEdit->setText(TQString::number(breakItem->getId())); templateNameEdit->setText(breakItem->getTemplateName()); modeNameEdit->setText(breakItem->getModeName()); sourceFileEdit->setText(breakItem->getFileName()); - lineNumberEdit->setText(QString::number(breakItem->getLineNumber())); } + lineNumberEdit->setText(TQString::number(breakItem->getLineNumber())); } } @@ -181,10 +181,10 @@ void XsldbgBreakpointsImpl::slotClear() lineNumberEdit->setText(""); } -void XsldbgBreakpointsImpl::slotProcBreakpointItem(QString fileName, +void XsldbgBreakpointsImpl::slotProcBreakpointItem(TQString fileName, int lineNumber , - QString templateName, - QString modeName, + TQString templateName, + TQString modeName, bool enabled, int id ) { if (fileName.isNull()) diff --git a/kxsldbg/kxsldbgpart/xsldbgbreakpointsimpl.h b/kxsldbg/kxsldbgpart/xsldbgbreakpointsimpl.h index 2dad57ca..5da172e7 100644 --- a/kxsldbg/kxsldbgpart/xsldbgbreakpointsimpl.h +++ b/kxsldbg/kxsldbgpart/xsldbgbreakpointsimpl.h @@ -32,7 +32,7 @@ class XsldbgBreakpointsImpl : public XsldbgBreakpoints, public XsldbgDialogBase Q_OBJECT public: - XsldbgBreakpointsImpl(XsldbgDebugger *debugger, QWidget *parent=0, const char *name=0); + XsldbgBreakpointsImpl(XsldbgDebugger *debugger, TQWidget *parent=0, const char *name=0); ~XsldbgBreakpointsImpl(); /* Return >= 0 if line number entered is valid */ @@ -49,12 +49,12 @@ public slots: void slotDeleteBreakpoint(); void slotDeleteAllBreakpoints(); void slotEnableBreakpoint(); - void selectionChanged(QListViewItem *item); + void selectionChanged(TQListViewItem *item); - /** Recieve notification about breakpoint to add to view, First parameter is QString::null + /** Recieve notification about breakpoint to add to view, First parameter is TQString::null to indicate start of breakpoint list notfication */ - void slotProcBreakpointItem(QString file, int lineNumber, - QString templateName, QString modeName, + void slotProcBreakpointItem(TQString file, int lineNumber, + TQString templateName, TQString modeName, bool enabled, int id ); /** refresh data from source */ diff --git a/kxsldbg/kxsldbgpart/xsldbgcallstackimpl.cpp b/kxsldbg/kxsldbgpart/xsldbgcallstackimpl.cpp index 5592e4e6..9a500b6c 100644 --- a/kxsldbg/kxsldbgpart/xsldbgcallstackimpl.cpp +++ b/kxsldbg/kxsldbgpart/xsldbgcallstackimpl.cpp @@ -14,23 +14,23 @@ * (at your option) any later version. * * * ***************************************************************************/ -#include -#include +#include +#include #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*/) + TQWidget *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*))); + connect(debugger, TQT_SIGNAL(callStackItem(TQString /* templateName*/, TQString /* fileName */, int /* lineNumber */)), + this, TQT_SLOT(slotProcCallStackItem(TQString /* templateName*/, TQString /* fileName */, int /* lineNumber */))); + connect( callStackListView, TQT_SIGNAL(selectionChanged(TQListViewItem *)), + this, TQT_SLOT(selectionChanged(TQListViewItem*))); show(); refresh(); @@ -40,7 +40,7 @@ XsldbgCallStackImpl::~XsldbgCallStackImpl(){ debugger = 0L; } -void XsldbgCallStackImpl::slotProcCallStackItem(QString templateName, QString fileName , int lineNumber ) +void XsldbgCallStackImpl::slotProcCallStackItem(TQString templateName, TQString fileName , int lineNumber ) { static int frameNo =0; if (templateName.isNull()){ @@ -49,12 +49,12 @@ void XsldbgCallStackImpl::slotProcCallStackItem(QString templateName, QString }else{ /* each stack entry will have a FRAME# prefix */ callStackListView->insertItem(new XsldbgGlobalListItem(callStackListView, - fileName, lineNumber, templateName.prepend(QString::number(frameNo++)+ "# "))); + fileName, lineNumber, templateName.prepend(TQString::number(frameNo++)+ "# "))); } } -void XsldbgCallStackImpl::selectionChanged(QListViewItem *item) +void XsldbgCallStackImpl::selectionChanged(TQListViewItem *item) { XsldbgGlobalListItem *callStackItem = dynamic_cast(item); if (callStackItem){ diff --git a/kxsldbg/kxsldbgpart/xsldbgcallstackimpl.h b/kxsldbg/kxsldbgpart/xsldbgcallstackimpl.h index 61200fe8..c105b54c 100644 --- a/kxsldbg/kxsldbgpart/xsldbgcallstackimpl.h +++ b/kxsldbg/kxsldbgpart/xsldbgcallstackimpl.h @@ -31,15 +31,15 @@ class XsldbgCallStackImpl : public XsldbgCallStack, public XsldbgDialogBase { Q_OBJECT public: - XsldbgCallStackImpl(XsldbgDebugger *debugger, QWidget *parent=0, const char *name=0); + XsldbgCallStackImpl(XsldbgDebugger *debugger, TQWidget *parent=0, const char *name=0); ~XsldbgCallStackImpl(); public slots: - void selectionChanged(QListViewItem *item); + void selectionChanged(TQListViewItem *item); - /** Process request to add callstack to view, First parameter is QString::null + /** Process request to add callstack to view, First parameter is TQString::null to indicate start of callstack list notfication */ - void slotProcCallStackItem(QString templateName, QString fileName , int lineNumber ); + void slotProcCallStackItem(TQString templateName, TQString fileName , int lineNumber ); /** refresh data from source */ void refresh(); diff --git a/kxsldbg/kxsldbgpart/xsldbgconfigimpl.cpp b/kxsldbg/kxsldbgpart/xsldbgconfigimpl.cpp index dd62b1ec..19c6bb66 100644 --- a/kxsldbg/kxsldbgpart/xsldbgconfigimpl.cpp +++ b/kxsldbg/kxsldbgpart/xsldbgconfigimpl.cpp @@ -18,17 +18,17 @@ #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include "xsldbgconfigimpl.h" #include "xsldbgdebugger.h" #include -LibxsltParam::LibxsltParam(const QString &name, const QString &value) - : QObject(0L, 0L) +LibxsltParam::LibxsltParam(const TQString &name, const TQString &value) + : TQObject(0L, 0L) { _name = name; _value = value; @@ -40,24 +40,24 @@ LibxsltParam::~LibxsltParam() } -QString LibxsltParam::getName() const +TQString LibxsltParam::getName() const { return _name; } -void LibxsltParam::setName(const QString &name) +void LibxsltParam::setName(const TQString &name) { _name = name; } -QString LibxsltParam::getValue() const +TQString LibxsltParam::getValue() const { return _value; } -void LibxsltParam::setValue(const QString & value) +void LibxsltParam::setValue(const TQString & value) { _value = value; } @@ -74,14 +74,14 @@ bool LibxsltParam::isValid() const XsldbgConfigImpl::XsldbgConfigImpl(XsldbgDebugger *debugger, - QWidget *parent /*=0*/, const char *name /*=0*/) + TQWidget *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())); + connect(debugger, TQT_SIGNAL(parameterItem(TQString /* name*/, TQString /* value */)), + this, TQT_SLOT(slotProcParameterItem(TQString /* name*/, TQString /* value */))); + connect(debugger, TQT_SIGNAL(fileDetailsChanged()), + this, TQT_SLOT(slotReloadFileNames())); paramIndex= 0; catalogs = false; debug = false; @@ -96,30 +96,30 @@ XsldbgConfigImpl::~XsldbgConfigImpl() } -QString XsldbgConfigImpl::getSourceFile() +TQString XsldbgConfigImpl::getSourceFile() { if (xslSourceEdit != 0L) return xslSourceEdit->text(); else - return QString(); + return TQString(); } -QString XsldbgConfigImpl::getDataFile() +TQString XsldbgConfigImpl::getDataFile() { if (xmlDataEdit != 0L) return xmlDataEdit->text(); else - return QString(); + return TQString(); } -QString XsldbgConfigImpl::getOutputFile() +TQString XsldbgConfigImpl::getOutputFile() { if (outputFileEdit != 0L) return outputFileEdit->text(); else - return QString(); + return TQString(); } @@ -128,7 +128,7 @@ LibxsltParam *XsldbgConfigImpl::getParam(int paramNumber) return paramList.at(paramNumber); } -LibxsltParam *XsldbgConfigImpl::getParam(QString name) +LibxsltParam *XsldbgConfigImpl::getParam(TQString name) { LibxsltParam *param = 0L; for (param = paramList.first(); param != 0L; param = paramList.next()) @@ -147,7 +147,7 @@ int XsldbgConfigImpl::getParamCount() } -void XsldbgConfigImpl::addParam(QString name, QString value) +void XsldbgConfigImpl::addParam(TQString name, TQString value) { LibxsltParam *param; if ((name.length() == 0) || (value.length() == 0)) @@ -165,7 +165,7 @@ void XsldbgConfigImpl::addParam(QString name, QString value) } -void XsldbgConfigImpl::deleteParam(QString name) +void XsldbgConfigImpl::deleteParam(TQString name) { bool isOk = false; LibxsltParam *param; @@ -177,13 +177,13 @@ void XsldbgConfigImpl::deleteParam(QString name) isOk = paramList.remove(param); if (isOk == false) - kdDebug() << QString(" Param %1 dosn't exist").arg(name) << endl; + kdDebug() << TQString(" Param %1 dosn't exist").arg(name) << endl; else kdDebug() << "Deleted param " << name << endl; } -bool XsldbgConfigImpl::isValid(QString &errorMsg) +bool XsldbgConfigImpl::isValid(TQString &errorMsg) { bool isOK = true; errorMsg = ""; @@ -205,7 +205,7 @@ bool XsldbgConfigImpl::isValid(QString &errorMsg) // make it a warning when parameters are invalid LibxsltParam *param; - QString emptyParams = ""; + TQString emptyParams = ""; for (param = paramList.first(); param != 0L; param = paramList.next()) { if (!param->isValid()){ @@ -228,7 +228,7 @@ bool XsldbgConfigImpl::isValid(QString &errorMsg) /*we previously said that isValid() == true so we must commit our changes */ void XsldbgConfigImpl::update() { - QString msg; + TQString msg; if (debugger == 0L) return; @@ -325,7 +325,7 @@ void XsldbgConfigImpl::refresh() } -void XsldbgConfigImpl::slotSourceFile(QString xslFile) +void XsldbgConfigImpl::slotSourceFile(TQString xslFile) { if (debugger->start() == false) return ; /* User has killed xsldbg and we can't restart it */ @@ -333,12 +333,12 @@ void XsldbgConfigImpl::slotSourceFile(QString xslFile) if (debugger->sourceFileName() == xslFile) return; - QString msg("source "); + TQString msg("source "); msg.append(XsldbgDebugger::fixLocalPaths(xslFile)); debugger->fakeInput(msg, true); } -void XsldbgConfigImpl::slotDataFile(QString xmlFile) +void XsldbgConfigImpl::slotDataFile(TQString xmlFile) { if (debugger->start() == false) return ; /* User has killed xsldbg and we can't restart it */ @@ -346,12 +346,12 @@ void XsldbgConfigImpl::slotDataFile(QString xmlFile) if (debugger->dataFileName() == xmlFile) return; - QString msg("data "); + TQString msg("data "); msg.append(XsldbgDebugger::fixLocalPaths(xmlFile)); debugger->fakeInput(msg, true); } -void XsldbgConfigImpl::slotOutputFile(QString outputFile) +void XsldbgConfigImpl::slotOutputFile(TQString outputFile) { if (debugger->start() == false) return ; /* User has killed xsldbg and we can't restart it */ @@ -359,16 +359,16 @@ void XsldbgConfigImpl::slotOutputFile(QString outputFile) if (debugger->outputFileName() == outputFile) return; - QString msg("output "); + TQString 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, + KURL url = KFileDialog::getOpenURL(TQString::null, "*.xsl; *.XSL; *.Xsl ; *.xslt; *.XSLT; *.Xslt \n *.*", this, i18n("Choose XSL Source to Debug")); - QString fileName = url.prettyURL(); + TQString fileName = url.prettyURL(); if ((!fileName.isNull()) && (fileName.length() > 0)){ xslSourceEdit->setText(XsldbgDebugger::fixLocalPaths(fileName)); @@ -378,9 +378,9 @@ void XsldbgConfigImpl::slotChooseSourceFile() void XsldbgConfigImpl::slotChooseDataFile() { - KURL url = KFileDialog::getOpenURL(QString::null, "*.xml; *.XML; *.Xml \n*.docbook \n *.html;*.HTML; *.htm ; *HTM \n *.*", this, + KURL url = KFileDialog::getOpenURL(TQString::null, "*.xml; *.XML; *.Xml \n*.docbook \n *.html;*.HTML; *.htm ; *HTM \n *.*", this, i18n("Choose XML Data to Debug")); - QString fileName = url.prettyURL(); + TQString fileName = url.prettyURL(); if ((!fileName.isNull()) && (fileName.length() > 0)) xmlDataEdit->setText(XsldbgDebugger::fixLocalPaths(fileName)); @@ -389,9 +389,9 @@ void XsldbgConfigImpl::slotChooseDataFile() void XsldbgConfigImpl::slotChooseOutputFile() { - KURL url = KFileDialog::getSaveURL(QString::null, "*.xml; *.XML; *.Xml \n*.docbook \n *.txt; *.TXT \n *.htm;*.HTM;*.htm;*.HTML \n*.*", this, + KURL url = KFileDialog::getSaveURL(TQString::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; + TQString fileName; if (url.isLocalFile()){ fileName = url.prettyURL(); @@ -456,7 +456,7 @@ void XsldbgConfigImpl::slotPrevParam() repaintParam(); } -void XsldbgConfigImpl::slotProcParameterItem(QString name, QString value) +void XsldbgConfigImpl::slotProcParameterItem(TQString name, TQString value) { if (name.isNull()){ paramList.clear(); @@ -478,15 +478,15 @@ void XsldbgConfigImpl::slotApply() { // Validate the users choices before applying it - QString msg; + TQString msg; if (isValid(msg)){ if (!msg.isEmpty()) - QMessageBox::information(this, i18n("Suspect Configuration"), - msg, QMessageBox::Ok); + TQMessageBox::information(this, i18n("Suspect Configuration"), + msg, TQMessageBox::Ok); update(); }else{ - QMessageBox::information(this, i18n("Incomplete or Invalid Configuration"), - msg, QMessageBox::Ok); + TQMessageBox::information(this, i18n("Incomplete or Invalid Configuration"), + msg, TQMessageBox::Ok); } } diff --git a/kxsldbg/kxsldbgpart/xsldbgconfigimpl.h b/kxsldbg/kxsldbgpart/xsldbgconfigimpl.h index ad207d7a..1c3aa21e 100644 --- a/kxsldbg/kxsldbgpart/xsldbgconfigimpl.h +++ b/kxsldbg/kxsldbgpart/xsldbgconfigimpl.h @@ -24,24 +24,24 @@ #include "xsldbgconfig.h" #include "xsldbgdialogbase.h" -#include +#include class LibxsltParam : public QObject { public: - LibxsltParam(const QString & name, const QString &value); + LibxsltParam(const TQString & name, const TQString &value); ~LibxsltParam(); - QString getName() const; - void setName(const QString &name); - QString getValue() const; - void setValue(const QString &value); + TQString getName() const; + void setName(const TQString &name); + TQString getValue() const; + void setValue(const TQString &value); bool isValid() const; private: - QString _name; - QString _value; + TQString _name; + TQString _value; }; @@ -51,19 +51,19 @@ class XsldbgConfigImpl : public XsldbgConfig, public XsldbgDialogBase { Q_OBJECT public: - XsldbgConfigImpl(XsldbgDebugger *debugger, QWidget *parent=0, const char *name=0); + XsldbgConfigImpl(XsldbgDebugger *debugger, TQWidget *parent=0, const char *name=0); ~XsldbgConfigImpl(); LibxsltParam *getParam(int paramNumber); - LibxsltParam *getParam(QString name); + LibxsltParam *getParam(TQString name); int getParamCount(); - void addParam(QString name, QString value); - void deleteParam(QString name); + void addParam(TQString name, TQString value); + void deleteParam(TQString name); void repaintParam(); - QString getSourceFile(); - QString getDataFile(); - QString getOutputFile(); + TQString getSourceFile(); + TQString getDataFile(); + TQString getOutputFile(); bool debugEnabled() const {return debug; }; bool catalogsEnabled() const {return catalogs; }; bool htmlEnabled() const {return html; }; @@ -76,7 +76,7 @@ public: /** return true if all data ok */ - bool isValid(QString &errorMsg); + bool isValid(TQString &errorMsg); /** Update changes to xsldbg*/ void update(); @@ -88,13 +88,13 @@ public: public slots: /** Set xsl source file*/ - void slotSourceFile(QString); + void slotSourceFile(TQString); /** Set xml data file*/ - void slotDataFile(QString); + void slotDataFile(TQString); /** Set file name for the default output of transformed data*/ - void slotOutputFile(QString); + void slotOutputFile(TQString); /**Choose the XSL source file */ void slotChooseSourceFile(); @@ -128,13 +128,13 @@ public slots: 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); + is TQString::null to indicate start of parameter list notfication */ + void slotProcParameterItem(TQString name, TQString value); private: int paramIndex; - QPtrList paramList; + TQPtrList paramList; XsldbgDebugger *debugger; diff --git a/kxsldbg/kxsldbgpart/xsldbgdebugger.cpp b/kxsldbg/kxsldbgpart/xsldbgdebugger.cpp index 69fcaeec..deead4fa 100644 --- a/kxsldbg/kxsldbgpart/xsldbgdebugger.cpp +++ b/kxsldbg/kxsldbgpart/xsldbgdebugger.cpp @@ -31,7 +31,7 @@ extern int xsldbgStop; #include "xsldbgwalkspeedimpl.h" -#include +#include #include XsldbgDebugger::XsldbgDebugger() @@ -67,13 +67,13 @@ void XsldbgDebugger::setInspector(XsldbgInspector *inspector) this->inspector = inspector; } -bool XsldbgDebugger::event(QEvent *e) +bool XsldbgDebugger::event(TQEvent *e) { if (e == 0L) return false; - if (e->type() != QEvent::User) - return QObject::event(e); + if (e->type() != TQEvent::User) + return TQObject::event(e); else{ static bool waitingFirstmessage = true; if (waitingFirstmessage){ @@ -91,7 +91,7 @@ bool XsldbgDebugger::event(QEvent *e) } -void XsldbgDebugger::timerEvent(QTimerEvent *e) +void XsldbgDebugger::timerEvent(TQTimerEvent *e) { /* This function runs in the application's thread */ @@ -100,14 +100,14 @@ void XsldbgDebugger::timerEvent(QTimerEvent *e) if ((getInputReady() == 0) && (getInputStatus() == XSLDBG_MSG_AWAITING_INPUT) && (commandQue.count() > 0)){ - QString msg = commandQue.first(); + TQString 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; + TQString msgCopy = updateText; updateText = ""; emit showMessage(msgCopy); lastType = XSLDBG_MSG_AWAITING_INPUT; @@ -116,13 +116,13 @@ void XsldbgDebugger::timerEvent(QTimerEvent *e) } -QString XsldbgDebugger::fixLocalPaths(QString & file) +TQString XsldbgDebugger::fixLocalPaths(TQString & file) { - QString result = file; + TQString result = file; if (file.left(6) == "file:/"){ xmlChar * tempResult = filesExpandName((xmlChar *)file.utf8().data()); - result = QString::fromUtf8((char*)tempResult); + result = TQString::fromUtf8((char*)tempResult); xmlFree(tempResult); } @@ -130,37 +130,37 @@ QString XsldbgDebugger::fixLocalPaths(QString & file) } -QString XsldbgDebugger::sourceFileName() +TQString XsldbgDebugger::sourceFileName() { - QString fileName; + TQString fileName; if (optionsGetStringOption(OPTIONS_SOURCE_FILE_NAME) != 0L) - fileName = QString::fromUtf8((const char*)optionsGetStringOption(OPTIONS_SOURCE_FILE_NAME)); + fileName = TQString::fromUtf8((const char*)optionsGetStringOption(OPTIONS_SOURCE_FILE_NAME)); return fileName; } -QString XsldbgDebugger::dataFileName() +TQString XsldbgDebugger::dataFileName() { - QString fileName; + TQString fileName; if (optionsGetStringOption(OPTIONS_DATA_FILE_NAME) != 0L) - fileName = QString::fromUtf8((const char*)optionsGetStringOption(OPTIONS_DATA_FILE_NAME)); + fileName = TQString::fromUtf8((const char*)optionsGetStringOption(OPTIONS_DATA_FILE_NAME)); return fileName; } -QString XsldbgDebugger::outputFileName() +TQString XsldbgDebugger::outputFileName() { - QString fileName; + TQString fileName; if (optionsGetStringOption(OPTIONS_OUTPUT_FILE_NAME) != 0L) - fileName = QString::fromUtf8((const char*)optionsGetStringOption(OPTIONS_OUTPUT_FILE_NAME)); + fileName = TQString::fromUtf8((const char*)optionsGetStringOption(OPTIONS_OUTPUT_FILE_NAME)); return fileName; } -void XsldbgDebugger::gotoLine(QString fileName, int lineNo, bool breakpoint /*= false*/) +void XsldbgDebugger::gotoLine(TQString fileName, int lineNo, bool breakpoint /*= false*/) { emit lineNoChanged(fileName, lineNo, breakpoint); } @@ -168,12 +168,12 @@ void XsldbgDebugger::gotoLine(QString fileName, int lineNo, bool breakpoint /*= void XsldbgDebugger::setOption(const char* name, bool value) { - QString msg = "setoption "; - msg.append(name).append(" ").append(QString::number(value)); + TQString msg = "setoption "; + msg.append(name).append(" ").append(TQString::number(value)); fakeInput(msg, true); } -void XsldbgDebugger::fakeInput(QString text, bool wait) +void XsldbgDebugger::fakeInput(TQString text, bool wait) { Q_UNUSED(wait); commandQue.append(text); @@ -213,7 +213,7 @@ void XsldbgDebugger::slotConfigure() if(inspector == 0L ){ inspector = new XsldbgInspector(this); - connect(inspector, SIGNAL(closedWindow()), this, SLOT(slotConfigClosed())); + connect(inspector, TQT_SIGNAL(closedWindow()), this, TQT_SLOT(slotConfigClosed())); } } @@ -258,8 +258,8 @@ void XsldbgDebugger::slotWalkSpeed(int speed) if (start()){ if (optionsGetIntOption(OPTIONS_WALK_SPEED) == WALKSPEED_STOP){ // start walking at speed requested - QString msg("walk "); - msg.append(QString::number(speed)); + TQString msg("walk "); + msg.append(TQString::number(speed)); fakeInput(msg, true); } else // This will take effect imediately @@ -291,17 +291,17 @@ void XsldbgDebugger::slotTraceCmd() fakeInput("trace", false); } -void XsldbgDebugger::slotBreakCmd(QString fileName, int lineNumber) +void XsldbgDebugger::slotBreakCmd(TQString fileName, int lineNumber) { if (outputFileActive == true){ - QMessageBox::information(0L, i18n("Operation Failed"), + TQMessageBox::information(0L, i18n("Operation Failed"), i18n("Cannot set/edit breakpoints on the output file."), - QMessageBox::Ok); + TQMessageBox::Ok); return ; } - QString msg("break -l \""); - msg.append(XsldbgDebugger::fixLocalPaths(fileName)).append("\" ").append(QString::number(lineNumber)); + TQString msg("break -l \""); + msg.append(XsldbgDebugger::fixLocalPaths(fileName)).append("\" ").append(TQString::number(lineNumber)); if (start()) fakeInput(msg, true); @@ -310,16 +310,16 @@ void XsldbgDebugger::slotBreakCmd(QString fileName, int lineNumber) inspector->refreshBreakpoints(); } -void XsldbgDebugger::slotBreakCmd(QString templateName, QString modeName) +void XsldbgDebugger::slotBreakCmd(TQString templateName, TQString modeName) { if (outputFileActive == true){ - QMessageBox::information(0L, i18n("Operation Failed"), + TQMessageBox::information(0L, i18n("Operation Failed"), i18n("Cannot set/edit breakpoints on the output file."), - QMessageBox::Ok); + TQMessageBox::Ok); return ; } - QString msg("break \""); + TQString msg("break \""); msg.append(templateName).append("\" \"").append(modeName).append("\""); if (start()) fakeInput(msg, true); @@ -328,18 +328,18 @@ void XsldbgDebugger::slotBreakCmd(QString templateName, QString modeName) inspector->refreshBreakpoints(); } -void XsldbgDebugger::slotEnableCmd(QString fileName, int lineNumber) +void XsldbgDebugger::slotEnableCmd(TQString fileName, int lineNumber) { if (outputFileActive == true){ - QMessageBox::information(0L, i18n("Operation Failed"), + TQMessageBox::information(0L, i18n("Operation Failed"), i18n("Cannot set/edit breakpoints on the output file."), - QMessageBox::Ok); + TQMessageBox::Ok); return ; } - QString msg("enable -l \""); - msg.append(XsldbgDebugger::fixLocalPaths(fileName)).append("\" ").append(QString::number(lineNumber)); + TQString msg("enable -l \""); + msg.append(XsldbgDebugger::fixLocalPaths(fileName)).append("\" ").append(TQString::number(lineNumber)); if (start()) fakeInput(msg, true); @@ -352,14 +352,14 @@ void XsldbgDebugger::slotEnableCmd(int id) { if (outputFileActive == true){ - QMessageBox::information(0L, i18n("Operation Failed"), + TQMessageBox::information(0L, i18n("Operation Failed"), i18n("Cannot set/edit breakpoints on the output file."), - QMessageBox::Ok); + TQMessageBox::Ok); return ; } - QString msg("enable "); - msg.append(QString::number(id)); + TQString msg("enable "); + msg.append(TQString::number(id)); if (start()) fakeInput(msg, true); @@ -368,18 +368,18 @@ void XsldbgDebugger::slotEnableCmd(int id) } -void XsldbgDebugger::slotDeleteCmd(QString fileName, int lineNumber) +void XsldbgDebugger::slotDeleteCmd(TQString fileName, int lineNumber) { if (outputFileActive == true){ - QMessageBox::information(0L, i18n("Operation Failed"), + TQMessageBox::information(0L, i18n("Operation Failed"), i18n("Cannot set/edit breakpoints on the output file."), - QMessageBox::Ok); + TQMessageBox::Ok); return ; } - QString msg("delete -l \""); - msg.append(XsldbgDebugger::fixLocalPaths(fileName)).append("\" ").append(QString::number(lineNumber)); + TQString msg("delete -l \""); + msg.append(XsldbgDebugger::fixLocalPaths(fileName)).append("\" ").append(TQString::number(lineNumber)); if (start()) fakeInput(msg, true); if (inspector != 0L) @@ -391,13 +391,13 @@ void XsldbgDebugger::slotDeleteCmd(int id) { if (outputFileActive == true){ - QMessageBox::information(0L, i18n("Operation Failed"), + TQMessageBox::information(0L, i18n("Operation Failed"), i18n("Cannot set/edit breakpoints on the output file."), - QMessageBox::Ok); + TQMessageBox::Ok); return ; } - QString msg("delete "); - msg.append(QString::number(id)); + TQString msg("delete "); + msg.append(TQString::number(id)); if (start()) fakeInput(msg, true); if (inspector != 0L) @@ -439,8 +439,8 @@ void XsldbgDebugger::slotExitCmd() } -void XsldbgDebugger::slotCatCmd(QString xPathExpression){ - QString msg("cat "); +void XsldbgDebugger::slotCatCmd(TQString xPathExpression){ + TQString msg("cat "); msg.append(xPathExpression); if (start()) @@ -449,17 +449,17 @@ void XsldbgDebugger::slotCatCmd(QString xPathExpression){ } -void XsldbgDebugger::slotCdCmd(QString xPathExpression){ - QString msg("cd "); +void XsldbgDebugger::slotCdCmd(TQString xPathExpression){ + TQString msg("cd "); msg.append(xPathExpression); if (start()) fakeInput(msg, true); } -void XsldbgDebugger::slotSetVariableCmd(QString variableName, QString xPathExpression) +void XsldbgDebugger::slotSetVariableCmd(TQString variableName, TQString xPathExpression) { if (!variableName.isEmpty() && !xPathExpression.isEmpty()){ - QString msg("set "); + TQString msg("set "); msg.append(variableName); msg.append(" \""); msg.append(xPathExpression); diff --git a/kxsldbg/kxsldbgpart/xsldbgdebugger.h b/kxsldbg/kxsldbgpart/xsldbgdebugger.h index 3e9c267f..b4be5b5e 100644 --- a/kxsldbg/kxsldbgpart/xsldbgdebugger.h +++ b/kxsldbg/kxsldbgpart/xsldbgdebugger.h @@ -18,7 +18,7 @@ #ifndef XSLDBGDEBUGGER_H #define XSLDBGDEBUGGER_H -#include +#include #include "libxsldbg/xsldbgmsg.h" /* needed for XsldbgMessageEnum */ #include "libqtnotfier/xsldbgdebuggerbase.h" @@ -44,27 +44,27 @@ public: void setInspector(XsldbgInspector *inspector); /** Get the name of source file from xsldbg*/ - QString sourceFileName(); + TQString sourceFileName(); /** Get the name of data file from xsldbg*/ - QString dataFileName(); + TQString dataFileName(); /** Get the name of output file from xsldbg*/ - QString outputFileName(); + TQString outputFileName(); /** Tell quanta to move its cursor to file and line number supplied */ - void gotoLine(QString fileName, int lineNo, bool breakpoint = false); + void gotoLine(TQString 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); + bool event(TQEvent *e); + void timerEvent(TQTimerEvent *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); + static TQString fixLocalPaths(TQString & file); private: /** */ @@ -78,7 +78,7 @@ public slots: bool stop(); /** send text to xsldbg, if wait is true then wait for the reply */ - void fakeInput(QString text, bool wait); + void fakeInput(TQString text, bool wait); /** Display configure dialog */ void slotConfigure(); @@ -112,19 +112,19 @@ public slots: void slotTraceCmd(); /** Add breakpoint at given file and line number */ - void slotBreakCmd(QString fileName, int lineNumber); + void slotBreakCmd(TQString fileName, int lineNumber); /** Add breakpoint at given template name*/ - void slotBreakCmd(QString templateName, QString modeName); + void slotBreakCmd(TQString templateName, TQString modeName); /** Toggle the enabling of break point at given file and line number */ - void slotEnableCmd(QString fileName, int lineNumber); + void slotEnableCmd(TQString 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); + void slotDeleteCmd(TQString fileName, int lineNumber); /** Delete break point for given breakpoint id */ void slotDeleteCmd(int id); @@ -142,13 +142,13 @@ public slots: void slotExitCmd(); /** Print the result of evaluating xPathExpression to the message window */ - void slotCatCmd(QString xPathExpression); + void slotCatCmd(TQString xPathExpression); /** Move to line specified by xPathExpression */ - void slotCdCmd(QString xPathExpression); + void slotCdCmd(TQString xPathExpression); /** Set a libxslt variable to xPathExpression */ - void slotSetVariableCmd(QString variableName, QString xPathExpression); + void slotSetVariableCmd(TQString variableName, TQString xPathExpression); signals: // Signals // generated after first message is received from xsldbg void debuggerReady(); @@ -169,7 +169,7 @@ private: int updateTimerID; bool addMsg; - QStringList commandQue; + TQStringList commandQue; }; diff --git a/kxsldbg/kxsldbgpart/xsldbgdialogbase.h b/kxsldbg/kxsldbgpart/xsldbgdialogbase.h index 4582ef3f..41393526 100644 --- a/kxsldbg/kxsldbgpart/xsldbgdialogbase.h +++ b/kxsldbg/kxsldbgpart/xsldbgdialogbase.h @@ -23,7 +23,7 @@ *@author Keith Isdale */ -#include +#include class XsldbgDialogBase { diff --git a/kxsldbg/kxsldbgpart/xsldbgdoc.cpp b/kxsldbg/kxsldbgpart/xsldbgdoc.cpp index 51b27dcb..0579a854 100644 --- a/kxsldbg/kxsldbgpart/xsldbgdoc.cpp +++ b/kxsldbg/kxsldbgpart/xsldbgdoc.cpp @@ -6,14 +6,14 @@ XsldbgDoc::XsldbgDoc() { - fileName = QString(); - text = QString(); + fileName = TQString(); + text = TQString(); row = 0; column = 0; } -XsldbgDoc::XsldbgDoc(const QString &fileName, const QString &text) +XsldbgDoc::XsldbgDoc(const TQString &fileName, const TQString &text) { this->fileName = fileName; this->text = text; @@ -28,13 +28,13 @@ XsldbgDoc::~XsldbgDoc() } -QString XsldbgDoc::getText() const +TQString XsldbgDoc::getText() const { return text; } -QString XsldbgDoc::getFileName() const +TQString XsldbgDoc::getFileName() const { return fileName; } diff --git a/kxsldbg/kxsldbgpart/xsldbgdoc.h b/kxsldbg/kxsldbgpart/xsldbgdoc.h index 26e4482a..105634a8 100644 --- a/kxsldbg/kxsldbgpart/xsldbgdoc.h +++ b/kxsldbg/kxsldbgpart/xsldbgdoc.h @@ -2,16 +2,16 @@ #ifndef XSLDBGDOC #define XSLDBGDOC -#include +#include class XsldbgDoc { public: XsldbgDoc(); - XsldbgDoc(const QString &fileName, const QString &text); + XsldbgDoc(const TQString &fileName, const TQString &text); ~XsldbgDoc(); - QString getText() const; - QString getFileName() const; + TQString getText() const; + TQString getFileName() const; void setRow(int row); int getRow(); @@ -19,8 +19,8 @@ class XsldbgDoc { int getColumn(); private: - QString text; - QString fileName; + TQString text; + TQString fileName; int row, column; }; diff --git a/kxsldbg/kxsldbgpart/xsldbgdocmap.h b/kxsldbg/kxsldbgpart/xsldbgdocmap.h index 189ddc1c..e6c79344 100644 --- a/kxsldbg/kxsldbgpart/xsldbgdocmap.h +++ b/kxsldbg/kxsldbgpart/xsldbgdocmap.h @@ -1,5 +1,5 @@ -#include +#include #include "qxsldbgdoc.h" -typedef QMap XsldbgDocMap; +typedef TQMap XsldbgDocMap; diff --git a/kxsldbg/kxsldbgpart/xsldbgentitiesimpl.cpp b/kxsldbg/kxsldbgpart/xsldbgentitiesimpl.cpp index f24e694f..03f21618 100644 --- a/kxsldbg/kxsldbgpart/xsldbgentitiesimpl.cpp +++ b/kxsldbg/kxsldbgpart/xsldbgentitiesimpl.cpp @@ -15,8 +15,8 @@ * * ************************************************************************************/ -#include -#include +#include +#include #include "xsldbgentitiesimpl.h" #include "xsldbgdebugger.h" @@ -24,20 +24,20 @@ XsldbgEntitiesImpl::XsldbgEntitiesImpl(XsldbgDebugger *debugger, - QWidget *parent /*=0*/, const char *name /*=0*/) + TQWidget *parent /*=0*/, const char *name /*=0*/) : XsldbgEntities(parent, name), XsldbgDialogBase() { this->debugger = debugger; connect(debugger, - SIGNAL(entityItem(QString /*SystemID*/, - QString /*PublicID*/)), + TQT_SIGNAL(entityItem(TQString /*SystemID*/, + TQString /*PublicID*/)), this, - SLOT(slotProcEntityItem(QString /*SystemID*/, - QString /*PublicID*/))); + TQT_SLOT(slotProcEntityItem(TQString /*SystemID*/, + TQString /*PublicID*/))); connect( entitiesListView, - SIGNAL(selectionChanged(QListViewItem *)), - this, SLOT(selectionChanged(QListViewItem*))); + TQT_SIGNAL(selectionChanged(TQListViewItem *)), + this, TQT_SLOT(selectionChanged(TQListViewItem*))); show(); } @@ -46,7 +46,7 @@ XsldbgEntitiesImpl::~XsldbgEntitiesImpl(){ } -void XsldbgEntitiesImpl::slotProcEntityItem(QString SystemID, QString PublicID) +void XsldbgEntitiesImpl::slotProcEntityItem(TQString SystemID, TQString PublicID) { if (SystemID.isNull()) entitiesListView->clear(); @@ -59,7 +59,7 @@ void XsldbgEntitiesImpl::slotProcEntityItem(QString SystemID, QString PublicID) } -void XsldbgEntitiesImpl::selectionChanged(QListViewItem *item) +void XsldbgEntitiesImpl::selectionChanged(TQListViewItem *item) { XsldbgGlobalListItem *globalItem = dynamic_cast(item); if (globalItem){ diff --git a/kxsldbg/kxsldbgpart/xsldbgentitiesimpl.h b/kxsldbg/kxsldbgpart/xsldbgentitiesimpl.h index 2c744001..220c09cd 100644 --- a/kxsldbg/kxsldbgpart/xsldbgentitiesimpl.h +++ b/kxsldbg/kxsldbgpart/xsldbgentitiesimpl.h @@ -31,15 +31,15 @@ class XsldbgEntitiesImpl : public XsldbgEntities, public XsldbgDialogBase { Q_OBJECT public: - XsldbgEntitiesImpl(XsldbgDebugger *debugger, QWidget *parent=0, const char *name=0); + XsldbgEntitiesImpl(XsldbgDebugger *debugger, TQWidget *parent=0, const char *name=0); ~XsldbgEntitiesImpl(); public slots: - /** Process request to add entity to view, First parameter is QString::null + /** Process request to add entity to view, First parameter is TQString::null to indicate start of entity list notfication */ - void slotProcEntityItem(QString SystemID, QString PublicID); + void slotProcEntityItem(TQString SystemID, TQString PublicID); - void selectionChanged(QListViewItem *item); + void selectionChanged(TQListViewItem *item); /** refresh data from source */ void refresh(); diff --git a/kxsldbg/kxsldbgpart/xsldbggloballistitem.cpp b/kxsldbg/kxsldbgpart/xsldbggloballistitem.cpp index b1fa76d9..3ad3ed81 100644 --- a/kxsldbg/kxsldbgpart/xsldbggloballistitem.cpp +++ b/kxsldbg/kxsldbgpart/xsldbggloballistitem.cpp @@ -17,8 +17,8 @@ #include "xsldbggloballistitem.h" -XsldbgGlobalListItem::XsldbgGlobalListItem(QListView *parent, - QString fileName, int lineNumber, QString globalName) +XsldbgGlobalListItem::XsldbgGlobalListItem(TQListView *parent, + TQString fileName, int lineNumber, TQString globalName) : XsldbgListItem(parent, 1, fileName, lineNumber) { varName = globalName; @@ -31,7 +31,7 @@ XsldbgGlobalListItem::~XsldbgGlobalListItem() } -QString XsldbgGlobalListItem::getVarName() +TQString XsldbgGlobalListItem::getVarName() { return varName; } diff --git a/kxsldbg/kxsldbgpart/xsldbggloballistitem.h b/kxsldbg/kxsldbgpart/xsldbggloballistitem.h index 325df028..fe3cd47f 100644 --- a/kxsldbg/kxsldbgpart/xsldbggloballistitem.h +++ b/kxsldbg/kxsldbgpart/xsldbggloballistitem.h @@ -27,15 +27,15 @@ class XsldbgGlobalListItem : public XsldbgListItem { public: - XsldbgGlobalListItem(QListView *parent, - QString fileName, int lineNumber, QString globalName); + XsldbgGlobalListItem(TQListView *parent, + TQString fileName, int lineNumber, TQString globalName); ~XsldbgGlobalListItem(); /** return the name of this variable */ - QString getVarName(); + TQString getVarName(); private: - QString varName; + TQString varName; }; #endif diff --git a/kxsldbg/kxsldbgpart/xsldbgglobalvariablesimpl.cpp b/kxsldbg/kxsldbgpart/xsldbgglobalvariablesimpl.cpp index 37083068..235c564a 100644 --- a/kxsldbg/kxsldbgpart/xsldbgglobalvariablesimpl.cpp +++ b/kxsldbg/kxsldbgpart/xsldbgglobalvariablesimpl.cpp @@ -15,8 +15,8 @@ * * ************************************************************************************/ -#include -#include +#include +#include #include "xsldbgglobalvariablesimpl.h" #include "xsldbgdebugger.h" @@ -24,14 +24,14 @@ XsldbgGlobalVariablesImpl::XsldbgGlobalVariablesImpl(XsldbgDebugger *debugger, - QWidget *parent /*=0*/, const char *name /*=0*/) + TQWidget *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*))); + connect(debugger, TQT_SIGNAL(globalVariableItem(TQString /*name */, TQString /* fileName */, int /*lineNumber */)), + this, TQT_SLOT(slotProcGlobalVariableItem(TQString /*name */, TQString /* fileName */, int /*lineNumber */))); + connect( varsListView, TQT_SIGNAL(selectionChanged(TQListViewItem *)), + this, TQT_SLOT(selectionChanged(TQListViewItem*))); show(); } @@ -40,7 +40,7 @@ XsldbgGlobalVariablesImpl::~XsldbgGlobalVariablesImpl(){ debugger = 0L; } -void XsldbgGlobalVariablesImpl::slotProcGlobalVariableItem(QString name , QString fileName, int lineNumber) +void XsldbgGlobalVariablesImpl::slotProcGlobalVariableItem(TQString name , TQString fileName, int lineNumber) { if (name.isNull()) varsListView->clear(); @@ -52,7 +52,7 @@ void XsldbgGlobalVariablesImpl::slotProcGlobalVariableItem(QString name , QStrin } -void XsldbgGlobalVariablesImpl::selectionChanged(QListViewItem *item) +void XsldbgGlobalVariablesImpl::selectionChanged(TQListViewItem *item) { XsldbgGlobalListItem *globalItem = dynamic_cast(item); if (globalItem != 0 && debugger != 0) { diff --git a/kxsldbg/kxsldbgpart/xsldbgglobalvariablesimpl.h b/kxsldbg/kxsldbgpart/xsldbgglobalvariablesimpl.h index 57d0c922..42a40968 100644 --- a/kxsldbg/kxsldbgpart/xsldbgglobalvariablesimpl.h +++ b/kxsldbg/kxsldbgpart/xsldbgglobalvariablesimpl.h @@ -31,15 +31,15 @@ class XsldbgGlobalVariablesImpl : public XsldbgGlobalVariables, public XsldbgDia Q_OBJECT public: - XsldbgGlobalVariablesImpl(XsldbgDebugger *debugger, QWidget *parent=0, const char *name=0); + XsldbgGlobalVariablesImpl(XsldbgDebugger *debugger, TQWidget *parent=0, const char *name=0); ~XsldbgGlobalVariablesImpl(); public slots: - /** Process request to add global variable to view, First parameter is QString::null + /** Process request to add global variable to view, First parameter is TQString::null to indicate start of global variable list notfication */ - void slotProcGlobalVariableItem(QString name , QString fileName, int lineNumber); + void slotProcGlobalVariableItem(TQString name , TQString fileName, int lineNumber); - void selectionChanged(QListViewItem *item); + void selectionChanged(TQListViewItem *item); /** refresh data from source */ void refresh(); diff --git a/kxsldbg/kxsldbgpart/xsldbginspector.cpp b/kxsldbg/kxsldbgpart/xsldbginspector.cpp index c36130c7..b6a8f6df 100644 --- a/kxsldbg/kxsldbgpart/xsldbginspector.cpp +++ b/kxsldbg/kxsldbgpart/xsldbginspector.cpp @@ -10,19 +10,19 @@ #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -34,13 +34,13 @@ #include "xsldbgsourcesimpl.h" #include "xsldbgentitiesimpl.h" -static QPixmap uic_load_pixmap_XsldbgInspector( const QString &name ) +static TQPixmap uic_load_pixmap_XsldbgInspector( const TQString &name ) { - const QMimeSource *m = QMimeSourceFactory::defaultFactory()->data( name ); + const TQMimeSource *m = TQMimeSourceFactory::defaultFactory()->data( name ); if ( !m ) - return QPixmap(); - QPixmap pix; - QImageDrag::decode( m, pix ); + return TQPixmap(); + TQPixmap pix; + TQImageDrag::decode( m, pix ); return pix; } /* @@ -50,9 +50,9 @@ static QPixmap uic_load_pixmap_XsldbgInspector( const QString &name ) * The dialog will by default be modeless, unless you set 'modal' to * true to construct a modal dialog. */ -XsldbgInspector::XsldbgInspector( XsldbgDebugger *debugger, QWidget* parent, +XsldbgInspector::XsldbgInspector( XsldbgDebugger *debugger, TQWidget* parent, const char* name, bool modal, WFlags fl ) - : QDialog( parent, name, modal, fl ) + : TQDialog( parent, name, modal, fl ) { Q_CHECK_PTR(debugger); this->debugger = debugger; @@ -67,10 +67,10 @@ XsldbgInspector::XsldbgInspector( XsldbgDebugger *debugger, QWidget* parent, resize( 597, 364 ); setCaption( i18n( "Xsldbg Inspector" ) ); setSizeGripEnabled( true ); - XsldbgInspectorLayout = new QGridLayout( this, 1, 1, 11, 6, + XsldbgInspectorLayout = new TQGridLayout( this, 1, 1, 11, 6, "XsldbgInspectorLayout"); - tabWidget = new QTabWidget( this, "tabWidget" ); + tabWidget = new TQTabWidget( this, "tabWidget" ); Q_CHECK_PTR( tabWidget ); breakpointWidget = new XsldbgBreakpointsImpl( debugger, tabWidget ); Q_CHECK_PTR( breakpointWidget ); @@ -79,41 +79,41 @@ XsldbgInspector::XsldbgInspector( XsldbgDebugger *debugger, QWidget* parent, localWidget = new XsldbgLocalVariablesImpl( debugger, tabWidget ); Q_CHECK_PTR( localWidget ); tabWidget->insertTab( localWidget, - QIconSet( uic_load_pixmap_XsldbgInspector( "xsldbg_source.png" ) ), + TQIconSet( 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" ) ), + TQIconSet( 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" ) ), + TQIconSet( 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" ) ), + TQIconSet( 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" ) ), + TQIconSet( uic_load_pixmap_XsldbgInspector( "xsldbg_data.png" ) ), i18n( "Entities" )); XsldbgInspectorLayout->addWidget( tabWidget, 0, 1 ); - Layout1 = new QHBoxLayout( 0, 0, 6, "Layout1"); + Layout1 = new TQHBoxLayout( 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 ); + TQSpacerItem* spacer = new TQSpacerItem( 20, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum ); Layout1->addItem( spacer ); buttonOk = new KPushButton( KStdGuiItem::ok(), this, "buttonOk" ); @@ -123,15 +123,15 @@ XsldbgInspector::XsldbgInspector( XsldbgDebugger *debugger, QWidget* parent, Layout1->addWidget( buttonOk ); buttonApply = new KPushButton( KStdGuiItem::apply(), this, "buttonApply" ); - QToolTip::add(buttonApply, i18n("Apply changes to xsldbg after restarting execution")); + TQToolTip::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 = new TQPushButton( this, "buttonRefresh" ); buttonRefresh->setText( i18n( "&Refresh" ) ); - QToolTip::add(buttonRefresh, i18n("Refresh values in inspectors from xsldbg")); + TQToolTip::add(buttonRefresh, i18n("Refresh values in inspectors from xsldbg")); buttonRefresh->setAccel( 0 ); buttonRefresh->setAutoDefault( true ); buttonRefresh->setDefault( true ); @@ -145,10 +145,10 @@ XsldbgInspector::XsldbgInspector( XsldbgDebugger *debugger, QWidget* parent, 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() ) ); + connect( buttonOk, TQT_SIGNAL( clicked() ), this, TQT_SLOT( accept() ) ); + connect( buttonApply, TQT_SIGNAL ( clicked() ), this, TQT_SLOT ( update() ) ); + connect( buttonRefresh, TQT_SIGNAL ( clicked() ), this, TQT_SLOT ( refresh() ) ); + connect( buttonCancel, TQT_SIGNAL( clicked() ), this, TQT_SLOT( reject() ) ); hide(); } @@ -165,12 +165,12 @@ XsldbgInspector::~XsldbgInspector() void XsldbgInspector::accept() { - QDialog::accept(); + TQDialog::accept(); } void XsldbgInspector::reject() { - QDialog::reject(); + TQDialog::reject(); } diff --git a/kxsldbg/kxsldbgpart/xsldbginspector.h b/kxsldbg/kxsldbgpart/xsldbginspector.h index c879af58..3b69a9e0 100644 --- a/kxsldbg/kxsldbgpart/xsldbginspector.h +++ b/kxsldbg/kxsldbgpart/xsldbginspector.h @@ -8,8 +8,8 @@ #ifndef XSLDBGINSPECTOR_H #define XSLDBGINSPECTOR_H -#include -#include +#include +#include class QVBoxLayout; class QHBoxLayout; class QGridLayout; @@ -33,14 +33,14 @@ class XsldbgInspector : public QDialog Q_OBJECT public: - XsldbgInspector( XsldbgDebugger *debugger, QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); + XsldbgInspector( XsldbgDebugger *debugger, TQWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); ~XsldbgInspector(); - QTabWidget* tabWidget; + TQTabWidget* tabWidget; KPushButton* buttonHelp; KPushButton* buttonOk; KPushButton* buttonApply; - QPushButton* buttonRefresh; + TQPushButton* buttonRefresh; KPushButton* buttonCancel; @@ -53,8 +53,8 @@ public slots: protected: - QGridLayout* XsldbgInspectorLayout; - QHBoxLayout* Layout1; + TQGridLayout* XsldbgInspectorLayout; + TQHBoxLayout* Layout1; XsldbgDebugger *debugger; XsldbgBreakpointsImpl *breakpointWidget; XsldbgLocalVariablesImpl *localWidget; diff --git a/kxsldbg/kxsldbgpart/xsldbglistitem.cpp b/kxsldbg/kxsldbgpart/xsldbglistitem.cpp index 9242994f..c04bc7b4 100644 --- a/kxsldbg/kxsldbgpart/xsldbglistitem.cpp +++ b/kxsldbg/kxsldbgpart/xsldbglistitem.cpp @@ -17,16 +17,16 @@ #include "xsldbglistitem.h" -XsldbgListItem::XsldbgListItem(QListView *parent, int columnOffset, - const QString & fileName, int lineNumber) - : QListViewItem(parent) +XsldbgListItem::XsldbgListItem(TQListView *parent, int columnOffset, + const TQString & fileName, int lineNumber) + : TQListViewItem(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)); + setText(columnOffset + 1, TQString::number(lineNumber)); } XsldbgListItem::~XsldbgListItem() @@ -34,7 +34,7 @@ XsldbgListItem::~XsldbgListItem() } -QString XsldbgListItem::getFileName() const +TQString XsldbgListItem::getFileName() const { return fileName; } diff --git a/kxsldbg/kxsldbgpart/xsldbglistitem.h b/kxsldbg/kxsldbgpart/xsldbglistitem.h index 35ad39c7..0d8ac6a7 100644 --- a/kxsldbg/kxsldbgpart/xsldbglistitem.h +++ b/kxsldbg/kxsldbgpart/xsldbglistitem.h @@ -24,21 +24,21 @@ */ -#include +#include -class XsldbgListItem : public QListViewItem { +class XsldbgListItem : public TQListViewItem { public: /** column offset is the index of the fileName column */ - XsldbgListItem(QListView *parent, int columnOffset, - const QString &fileName, int lineNumber); + XsldbgListItem(TQListView *parent, int columnOffset, + const TQString &fileName, int lineNumber); ~XsldbgListItem(); - QString getFileName() const; + TQString getFileName() const; int getLineNumber() const; private: - QString fileName; + TQString fileName; int lineNumber; }; diff --git a/kxsldbg/kxsldbgpart/xsldbglocallistitem.cpp b/kxsldbg/kxsldbgpart/xsldbglocallistitem.cpp index ccade6ac..0d27f916 100644 --- a/kxsldbg/kxsldbgpart/xsldbglocallistitem.cpp +++ b/kxsldbg/kxsldbgpart/xsldbglocallistitem.cpp @@ -18,8 +18,8 @@ #include "xsldbglocallistitem.h" #include -XsldbgLocalListItem::XsldbgLocalListItem(QListView *parent, QString fileName, int lineNumber, - QString localName, QString templateContext, QString selectXPath, bool localVariable) +XsldbgLocalListItem::XsldbgLocalListItem(TQListView *parent, TQString fileName, int lineNumber, + TQString localName, TQString templateContext, TQString selectXPath, bool localVariable) : XsldbgListItem(parent, 3, fileName, lineNumber) { varName = localName; @@ -38,17 +38,17 @@ XsldbgLocalListItem::~XsldbgLocalListItem() { } -QString XsldbgLocalListItem::getVarName() +TQString XsldbgLocalListItem::getVarName() { return varName; } -QString XsldbgLocalListItem::getContextName() +TQString XsldbgLocalListItem::getContextName() { return contextName; } -QString XsldbgLocalListItem::getXPath() +TQString XsldbgLocalListItem::getXPath() { return XPath; } diff --git a/kxsldbg/kxsldbgpart/xsldbglocallistitem.h b/kxsldbg/kxsldbgpart/xsldbglocallistitem.h index ee72ab1a..81c815e1 100644 --- a/kxsldbg/kxsldbgpart/xsldbglocallistitem.h +++ b/kxsldbg/kxsldbgpart/xsldbglocallistitem.h @@ -26,25 +26,25 @@ class XsldbgLocalListItem : public XsldbgListItem { public: - XsldbgLocalListItem(QListView *parent, QString fileName, int lineNumber, - QString localName, QString templateContext, QString selectXPath, bool localVariable); + XsldbgLocalListItem(TQListView *parent, TQString fileName, int lineNumber, + TQString localName, TQString templateContext, TQString selectXPath, bool localVariable); ~XsldbgLocalListItem(); /** return the name of this variable */ - QString getVarName(); + TQString getVarName(); /** return the template context for this variable */ - QString getContextName(); + TQString getContextName(); /** return the XPath for this variable */ - QString getXPath(); + TQString getXPath(); bool isLocalVariable(); private: - QString varName; - QString contextName; - QString XPath; + TQString varName; + TQString contextName; + TQString XPath; bool localVar; }; diff --git a/kxsldbg/kxsldbgpart/xsldbglocalvariablesimpl.cpp b/kxsldbg/kxsldbgpart/xsldbglocalvariablesimpl.cpp index bd39fcc8..fa8c756b 100644 --- a/kxsldbg/kxsldbgpart/xsldbglocalvariablesimpl.cpp +++ b/kxsldbg/kxsldbgpart/xsldbglocalvariablesimpl.cpp @@ -15,10 +15,10 @@ * * ***************************************************************************/ -#include -#include -#include -#include +#include +#include +#include +#include #include "xsldbglocalvariablesimpl.h" #include "xsldbglocallistitem.h" @@ -27,18 +27,18 @@ XsldbgLocalVariablesImpl::XsldbgLocalVariablesImpl(XsldbgDebugger *debugger, - QWidget *parent /*=0*/, const char *name /*=0*/) + TQWidget *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*))); + connect(debugger, TQT_SIGNAL(variableItem(TQString /*name */, TQString /* templateContext*/, + TQString /* fileName */, int /*lineNumber */, + TQString /* select XPath */, int /* is it a local variable */)), + this, TQT_SLOT(slotProcVariableItem(TQString /*name */, TQString /* templateContext*/, + TQString /* fileName */, int /*lineNumber */, + TQString /* select XPath */, int /* is it a local variable */))); + connect(varsListView, TQT_SIGNAL(selectionChanged(TQListViewItem *)), + this, TQT_SLOT(selectionChanged(TQListViewItem*))); show(); } @@ -48,9 +48,9 @@ XsldbgLocalVariablesImpl::~XsldbgLocalVariablesImpl() debugger = 0L; } -void XsldbgLocalVariablesImpl::slotProcVariableItem(QString name , QString templateContext, - QString fileName, int lineNumber, - QString selectXPath, int localVariable) +void XsldbgLocalVariablesImpl::slotProcVariableItem(TQString name , TQString templateContext, + TQString fileName, int lineNumber, + TQString selectXPath, int localVariable) { if (!name.isNull()){ @@ -60,7 +60,7 @@ void XsldbgLocalVariablesImpl::slotProcVariableItem(QString name , QString templ } -void XsldbgLocalVariablesImpl::selectionChanged(QListViewItem *item) +void XsldbgLocalVariablesImpl::selectionChanged(TQListViewItem *item) { XsldbgLocalListItem *localItem = dynamic_cast(item); if (localItem){ diff --git a/kxsldbg/kxsldbgpart/xsldbglocalvariablesimpl.h b/kxsldbg/kxsldbgpart/xsldbglocalvariablesimpl.h index 0f05b0ef..aa0156ee 100644 --- a/kxsldbg/kxsldbgpart/xsldbglocalvariablesimpl.h +++ b/kxsldbg/kxsldbgpart/xsldbglocalvariablesimpl.h @@ -31,18 +31,18 @@ class XsldbgLocalVariablesImpl : public XsldbgLocalVariables, public XsldbgDialo Q_OBJECT public: - XsldbgLocalVariablesImpl(XsldbgDebugger *debugger, QWidget *parent=0, const char *name=0); + XsldbgLocalVariablesImpl(XsldbgDebugger *debugger, TQWidget *parent=0, const char *name=0); ~XsldbgLocalVariablesImpl(); public slots: - /** Process request to add local varaible to view, First parameter is QString::null + /** Process request to add local varaible to view, First parameter is TQString::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 slotProcVariableItem(TQString /*name */, TQString /* templateContext*/, + TQString /* fileName */, int /*lineNumber */, + TQString /* select XPath */, int /* is it a local variable */); - void selectionChanged(QListViewItem *item); + void selectionChanged(TQListViewItem *item); /** refresh data from source */ void refresh(); diff --git a/kxsldbg/kxsldbgpart/xsldbgmsgdialogimpl.h b/kxsldbg/kxsldbgpart/xsldbgmsgdialogimpl.h index a801d49b..1c605e7e 100644 --- a/kxsldbg/kxsldbgpart/xsldbgmsgdialogimpl.h +++ b/kxsldbg/kxsldbgpart/xsldbgmsgdialogimpl.h @@ -15,16 +15,16 @@ */ #include "xsldbgmsgdialog.h" -#include +#include class XsldbgMsgDialogImpl : public XsldbgMsgDialog { public: - XsldbgMsgDialogImpl(QWidget *parent, - QMessageBox::Icon icon, - const QString & title, const QString &msg); + XsldbgMsgDialogImpl(TQWidget *parent, + TQMessageBox::Icon icon, + const TQString & title, const TQString &msg); - void append(const QString &text); + void append(const TQString &text); }; #endif diff --git a/kxsldbg/kxsldbgpart/xsldbgoutputview.cpp b/kxsldbg/kxsldbgpart/xsldbgoutputview.cpp index 6284ddec..72e25fb3 100644 --- a/kxsldbg/kxsldbgpart/xsldbgoutputview.cpp +++ b/kxsldbg/kxsldbgpart/xsldbgoutputview.cpp @@ -21,11 +21,11 @@ #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #if QT_VERSION >= 300 #include "xsldbgmsgdialogimpl.h" @@ -34,9 +34,9 @@ #endif -XsldbgMsgDialogImpl::XsldbgMsgDialogImpl(QWidget *parent, - QMessageBox::Icon icon, - const QString &title, const QString &msg) +XsldbgMsgDialogImpl::XsldbgMsgDialogImpl(TQWidget *parent, + TQMessageBox::Icon icon, + const TQString &title, const TQString &msg) #if QT_VERSION >= 300 : XsldbgMsgDialog(parent, "XsldbgMsgDialogImpl" , TRUE ) #else @@ -45,13 +45,13 @@ XsldbgMsgDialogImpl::XsldbgMsgDialogImpl(QWidget *parent, { setCaption(title); - QMessageBox tmpMsg; + TQMessageBox tmpMsg; tmpMsg.setIcon(icon); msgTextEdit->setText(msg); iconLbl->setPixmap(*tmpMsg.iconPixmap()); } -void XsldbgMsgDialogImpl::append(const QString &text) +void XsldbgMsgDialogImpl::append(const TQString &text) { msgTextEdit->append(text); } @@ -62,12 +62,12 @@ void XsldbgMsgDialogImpl::append(const QString &text) #include "xsldbgoutputview.h" -XsldbgOutputView::XsldbgOutputView(QWidget * parent) - : QTextEdit(parent, "outputview") +XsldbgOutputView::XsldbgOutputView(TQWidget * parent) + : TQTextEdit(parent, "outputview") { - new QBoxLayout(this, QBoxLayout::TopToBottom); - setSizePolicy(QSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred)); - setMinimumSize(QSize(500, 80)); + new TQBoxLayout(this, TQBoxLayout::TopToBottom); + setSizePolicy(TQSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Preferred)); + setMinimumSize(TQSize(500, 80)); setCaption(i18n("xsldbg Output")); setText(i18n("\t\txsldbg output capture ready\n\n")); dlg = 0L; @@ -79,12 +79,12 @@ XsldbgOutputView::XsldbgOutputView(QWidget * parent) #include "xsldbgoutputview2.h" -XsldbgOutputView::XsldbgOutputView(QWidget * parent) - : QTextView(parent, "outputview") +XsldbgOutputView::XsldbgOutputView(TQWidget * parent) + : TQTextView(parent, "outputview") { - new QBoxLayout(this, QBoxLayout::TopToBottom); - setSizePolicy(QSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred)); - setMinimumSize(QSize(500,80)); + new TQBoxLayout(this, TQBoxLayout::TopToBottom); + setSizePolicy(TQSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Preferred)); + setMinimumSize(TQSize(500,80)); setCaption(i18n("xsldbg Output")); setText(i18n("\t\txsldbg output capture ready\n\n")); dlg = 0L; @@ -92,15 +92,15 @@ XsldbgOutputView::XsldbgOutputView(QWidget * parent) } #endif // QT_VERSION -void XsldbgOutputView::slotProcShowMessage(QString msg) +void XsldbgOutputView::slotProcShowMessage(TQString 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 ((msg[0] == TQChar('=')) && (msg[1] == TQChar(' '))){ + int endPosition = msg.find(TQChar('\n')); if (endPosition >= 0){ processed = TRUE; - showDialog(QMessageBox::Information, i18n("Result of evaluation"), + showDialog(TQMessageBox::Information, i18n("Result of evaluation"), msg.mid(endPosition + 1)); } }else /* Is there some sort of error message in msg */ @@ -117,7 +117,7 @@ void XsldbgOutputView::slotProcShowMessage(QString msg) (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 "), + showDialog(TQMessageBox::Warning, i18n("Request Failed "), msg); processed = TRUE; } @@ -133,8 +133,8 @@ void XsldbgOutputView::slotClearView() { } -void XsldbgOutputView::showDialog(QMessageBox::Icon icon, QString title, - QString msg) +void XsldbgOutputView::showDialog(TQMessageBox::Icon icon, TQString title, + TQString msg) { if ( dlg ){ diff --git a/kxsldbg/kxsldbgpart/xsldbgoutputview.h b/kxsldbg/kxsldbgpart/xsldbgoutputview.h index 547ca907..0ae11fec 100644 --- a/kxsldbg/kxsldbgpart/xsldbgoutputview.h +++ b/kxsldbg/kxsldbgpart/xsldbgoutputview.h @@ -21,23 +21,23 @@ /** *@author Keith Isdale */ -#include -#include +#include +#include class QDialog; class XsldbgMsgDialogImpl; -class XsldbgOutputView : public QTextEdit { +class XsldbgOutputView : public TQTextEdit { Q_OBJECT public : - XsldbgOutputView(QWidget *parent = 0); + XsldbgOutputView(TQWidget *parent = 0); - void showDialog(QMessageBox::Icon icon, QString title, QString msg); + void showDialog(TQMessageBox::Icon icon, TQString title, TQString msg); public slots: /** Process a copy of mesage sent to message window */ - void slotProcShowMessage(QString msg); + void slotProcShowMessage(TQString msg); /** Clear message view window of its text */ void slotClearView(); diff --git a/kxsldbg/kxsldbgpart/xsldbgsourcesimpl.cpp b/kxsldbg/kxsldbgpart/xsldbgsourcesimpl.cpp index 1c0528f0..f291ab6d 100644 --- a/kxsldbg/kxsldbgpart/xsldbgsourcesimpl.cpp +++ b/kxsldbg/kxsldbgpart/xsldbgsourcesimpl.cpp @@ -15,8 +15,8 @@ * * ***************************************************************************/ -#include -#include +#include +#include #include "xsldbgsourcesimpl.h" #include "xsldbgdebugger.h" @@ -24,15 +24,15 @@ XsldbgSourcesImpl::XsldbgSourcesImpl(XsldbgDebugger *debugger, - QWidget *parent /*=0*/, const char *name /*=0*/) + TQWidget *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(debugger, TQT_SIGNAL(sourceItem(TQString /* fileName */, TQString /* parentFileName */, int /*lineNumber */)), + this, TQT_SLOT(slotProcSourceItem(TQString /* fileName */, TQString /* parentFileName */, int /*lineNumber */))); - connect( sourceListView, SIGNAL(selectionChanged(QListViewItem *)), - this, SLOT(selectionChanged(QListViewItem*))); + connect( sourceListView, TQT_SIGNAL(selectionChanged(TQListViewItem *)), + this, TQT_SLOT(selectionChanged(TQListViewItem*))); show(); refresh(); @@ -42,7 +42,7 @@ XsldbgSourcesImpl::~XsldbgSourcesImpl(){ debugger = 0L; } -void XsldbgSourcesImpl::slotProcSourceItem(QString fileName , QString parentFileName , int lineNumber ) +void XsldbgSourcesImpl::slotProcSourceItem(TQString fileName , TQString parentFileName , int lineNumber ) { if (fileName.isNull()){ sourceListView->clear(); @@ -53,7 +53,7 @@ void XsldbgSourcesImpl::slotProcSourceItem(QString fileName , QString parentFi } -void XsldbgSourcesImpl::selectionChanged(QListViewItem *item) +void XsldbgSourcesImpl::selectionChanged(TQListViewItem *item) { XsldbgGlobalListItem *sourceItem = dynamic_cast(item); if (sourceItem){ diff --git a/kxsldbg/kxsldbgpart/xsldbgsourcesimpl.h b/kxsldbg/kxsldbgpart/xsldbgsourcesimpl.h index b8afe34e..7b805de4 100644 --- a/kxsldbg/kxsldbgpart/xsldbgsourcesimpl.h +++ b/kxsldbg/kxsldbgpart/xsldbgsourcesimpl.h @@ -31,15 +31,15 @@ class XsldbgSourcesImpl : public XsldbgSources, public XsldbgDialogBase { Q_OBJECT public: - XsldbgSourcesImpl(XsldbgDebugger *debugger, QWidget *parent=0, const char *name=0); + XsldbgSourcesImpl(XsldbgDebugger *debugger, TQWidget *parent=0, const char *name=0); ~XsldbgSourcesImpl(); public slots: - void selectionChanged(QListViewItem *item); + void selectionChanged(TQListViewItem *item); - /** Process request to add source to view, First parameter is QString::null + /** Process request to add source to view, First parameter is TQString::null to indicate start of source list notfication */ - void slotProcSourceItem(QString fileName , QString parentFileName , int lineNumber ); + void slotProcSourceItem(TQString fileName , TQString parentFileName , int lineNumber ); /** refresh data from source */ void refresh(); diff --git a/kxsldbg/kxsldbgpart/xsldbgtemplatelistitem.cpp b/kxsldbg/kxsldbgpart/xsldbgtemplatelistitem.cpp index 8c58b9fc..cd07e89e 100644 --- a/kxsldbg/kxsldbgpart/xsldbgtemplatelistitem.cpp +++ b/kxsldbg/kxsldbgpart/xsldbgtemplatelistitem.cpp @@ -17,8 +17,8 @@ #include "xsldbgtemplatelistitem.h" -XsldbgTemplateListItem::XsldbgTemplateListItem(QListView *parent, - QString fileName, int lineNumber, QString templateName, QString modeName) +XsldbgTemplateListItem::XsldbgTemplateListItem(TQListView *parent, + TQString fileName, int lineNumber, TQString templateName, TQString modeName) : XsldbgListItem(parent, 2, fileName, lineNumber) { this->templateName = templateName; diff --git a/kxsldbg/kxsldbgpart/xsldbgtemplatelistitem.h b/kxsldbg/kxsldbgpart/xsldbgtemplatelistitem.h index 5a10a6ff..e1c0a8b6 100644 --- a/kxsldbg/kxsldbgpart/xsldbgtemplatelistitem.h +++ b/kxsldbg/kxsldbgpart/xsldbgtemplatelistitem.h @@ -25,19 +25,19 @@ class XsldbgTemplateListItem : public XsldbgListItem { public: - XsldbgTemplateListItem(QListView *parent, - QString fileName, int lineNumber, QString templateName, QString modeName); + XsldbgTemplateListItem(TQListView *parent, + TQString fileName, int lineNumber, TQString templateName, TQString modeName); ~XsldbgTemplateListItem(); /** return the name of this template */ - QString getTemplateName(); + TQString getTemplateName(); /** return the mode of this template */ - QString getModeName(); + TQString getModeName(); private: - QString templateName; - QString modeName; + TQString templateName; + TQString modeName; }; diff --git a/kxsldbg/kxsldbgpart/xsldbgtemplatesimpl.cpp b/kxsldbg/kxsldbgpart/xsldbgtemplatesimpl.cpp index ebc25bee..66cb9227 100644 --- a/kxsldbg/kxsldbgpart/xsldbgtemplatesimpl.cpp +++ b/kxsldbg/kxsldbgpart/xsldbgtemplatesimpl.cpp @@ -14,23 +14,23 @@ * (at your option) any later version. * * * ***************************************************************************/ -#include -#include +#include +#include #include "xsldbgdebugger.h" #include "xsldbgtemplatesimpl.h" #include "xsldbgtemplatelistitem.h" XsldbgTemplatesImpl::XsldbgTemplatesImpl(XsldbgDebugger *debugger, - QWidget *parent /*=0*/, const char *name /*=0*/) + TQWidget *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*))); + connect(debugger, TQT_SIGNAL(templateItem(TQString /* name*/, TQString /*mode*/, TQString /* fileName */, int /* lineNumber */)), + this, TQT_SLOT(slotProcTemplateItem(TQString /* name*/, TQString /*mode*/, TQString /* fileName */, int /* lineNumber */))); + connect( templatesListView, TQT_SIGNAL(selectionChanged(TQListViewItem *)), + this, TQT_SLOT(selectionChanged(TQListViewItem*))); show(); } @@ -40,7 +40,7 @@ XsldbgTemplatesImpl::~XsldbgTemplatesImpl(){ } -void XsldbgTemplatesImpl::slotProcTemplateItem(QString name, QString mode, QString fileName , int lineNumber ) +void XsldbgTemplatesImpl::slotProcTemplateItem(TQString name, TQString mode, TQString fileName , int lineNumber ) { if (name.isNull()) templatesListView->clear(); @@ -50,7 +50,7 @@ void XsldbgTemplatesImpl::slotProcTemplateItem(QString name, QString mode, QStr } -void XsldbgTemplatesImpl::selectionChanged(QListViewItem *item) +void XsldbgTemplatesImpl::selectionChanged(TQListViewItem *item) { XsldbgTemplateListItem *templateItem = dynamic_cast(item); if (templateItem){ diff --git a/kxsldbg/kxsldbgpart/xsldbgtemplatesimpl.h b/kxsldbg/kxsldbgpart/xsldbgtemplatesimpl.h index 1a9705fe..6d06cb6b 100644 --- a/kxsldbg/kxsldbgpart/xsldbgtemplatesimpl.h +++ b/kxsldbg/kxsldbgpart/xsldbgtemplatesimpl.h @@ -33,15 +33,15 @@ class XsldbgTemplatesImpl : public XsldbgTemplates, public XsldbgDialogBase { Q_OBJECT public: - XsldbgTemplatesImpl(XsldbgDebugger *debugger, QWidget *parent=0, const char *name=0); + XsldbgTemplatesImpl(XsldbgDebugger *debugger, TQWidget *parent=0, const char *name=0); ~XsldbgTemplatesImpl(); public slots: - void selectionChanged(QListViewItem *item); + void selectionChanged(TQListViewItem *item); - /** Process request to add template to view, First parameter is QString::null + /** Process request to add template to view, First parameter is TQString::null to indicate start of template list notfication */ - void slotProcTemplateItem(QString name, QString mode, QString fileName , int lineNumber ); + void slotProcTemplateItem(TQString name, TQString mode, TQString fileName , int lineNumber ); /** refresh data from source */ void refresh(); diff --git a/kxsldbg/kxsldbgpart/xsldbgwalkspeedimpl.cpp b/kxsldbg/kxsldbgpart/xsldbgwalkspeedimpl.cpp index 376fbfb7..58497cea 100644 --- a/kxsldbg/kxsldbgpart/xsldbgwalkspeedimpl.cpp +++ b/kxsldbg/kxsldbgpart/xsldbgwalkspeedimpl.cpp @@ -15,13 +15,13 @@ * * ************************************************************************************/ -#include +#include #include "xsldbgdebugger.h" #include "xsldbgwalkspeedimpl.h" XsldbgWalkSpeedImpl::XsldbgWalkSpeedImpl(XsldbgDebugger *debugger, - QWidget *parent /*=0 */, const char *name /*=0*/ ) + TQWidget *parent /*=0 */, const char *name /*=0*/ ) : XsldbgWalkSpeed(parent, name, false) { this->debugger = debugger; diff --git a/kxsldbg/kxsldbgpart/xsldbgwalkspeedimpl.h b/kxsldbg/kxsldbgpart/xsldbgwalkspeedimpl.h index dafe86d7..e0cbe69e 100644 --- a/kxsldbg/kxsldbgpart/xsldbgwalkspeedimpl.h +++ b/kxsldbg/kxsldbgpart/xsldbgwalkspeedimpl.h @@ -30,7 +30,7 @@ class XsldbgWalkSpeedImpl : public XsldbgWalkSpeed { Q_OBJECT public: - XsldbgWalkSpeedImpl(XsldbgDebugger *debugger, QWidget *parent=0, const char *name=0); + XsldbgWalkSpeedImpl(XsldbgDebugger *debugger, TQWidget *parent=0, const char *name=0); ~XsldbgWalkSpeedImpl(); public slots: diff --git a/kxsldbg/xsldbgmain.cpp b/kxsldbg/xsldbgmain.cpp index 23f6bb0b..bcc1852e 100644 --- a/kxsldbg/xsldbgmain.cpp +++ b/kxsldbg/xsldbgmain.cpp @@ -121,11 +121,11 @@ 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; + TQString xsldbgRunTimeInfo(i18n("Using libxml %1, libxslt %2 and libexslt %3\n").arg(xmlParserVersion).arg(xsltEngineVersion).arg(exsltLibraryVersion)); + TQString libxmlCompileTimeInfo(i18n("xsldbg was compiled against libxml %1, libxslt %2 and libexslt %3\n").arg(LIBXML_VERSION).arg(LIBXSLT_VERSION).arg(LIBEXSLT_VERSION)); + TQString libxsltCompileTimeInfo(i18n("libxslt %1 was compiled against libxml %2\n").arg(xsltLibxsltVersion).arg(xsltLibxmlVersion)); + TQString libexsltCompileTimeInfo(i18n("libexslt %1 was compiled against libxml %2\n").arg(exsltLibexsltVersion).arg(exsltLibxmlVersion)); + TQString 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" ); diff --git a/lib/compatibility/kmdi/qextmdi/kdelibs_export.h b/lib/compatibility/kmdi/qextmdi/kdelibs_export.h index d6244357..0ca49784 100644 --- a/lib/compatibility/kmdi/qextmdi/kdelibs_export.h +++ b/lib/compatibility/kmdi/qextmdi/kdelibs_export.h @@ -24,7 +24,7 @@ #include /* needed, because e.g. Q_OS_UNIX is so frequently used */ -#include +#include #ifdef Q_WS_WIN #include diff --git a/lib/compatibility/kmdi/qextmdi/kdockwidget.cpp b/lib/compatibility/kmdi/qextmdi/kdockwidget.cpp index 1a1e56ae..89417231 100644 --- a/lib/compatibility/kmdi/qextmdi/kdockwidget.cpp +++ b/lib/compatibility/kmdi/qextmdi/kdockwidget.cpp @@ -21,16 +21,16 @@ #include "kdockwidget_private.h" #include "kdockwidget_p.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #ifndef NO_KDE2 #include @@ -49,8 +49,8 @@ #endif #else -#include -#include +#include +#include #endif #include @@ -99,10 +99,10 @@ static const char* const not_close_xpm[]={ * * @author Max Judin. */ -KDockMainWindow::KDockMainWindow( QWidget* parent, const char *name, WFlags f) +KDockMainWindow::KDockMainWindow( TQWidget* parent, const char *name, WFlags f) :KMainWindow( parent, name, f ) { - QString new_name = QString(name) + QString("_DockManager"); + TQString new_name = TQString(name) + TQString("_DockManager"); dockManager = new KDockManager( this, new_name.latin1() ); mainDockWidget = 0L; } @@ -119,7 +119,7 @@ void KDockMainWindow::setMainDockWidget( KDockWidget* mdw ) dockManager->setMainDockWidget2(mdw); } -void KDockMainWindow::setView( QWidget *view ) +void KDockMainWindow::setView( TQWidget *view ) { if ( view->isA("KDockWidget") ){ if ( view->parent() != this ) ((KDockWidget*)view)->applyToWidget( this ); @@ -128,11 +128,11 @@ void KDockMainWindow::setView( QWidget *view ) #ifndef NO_KDE2 KMainWindow::setCentralWidget(view); #else - QMainWindow::setCentralWidget(view); + TQMainWindow::setCentralWidget(view); #endif } -KDockWidget* KDockMainWindow::createDockWidget( const QString& name, const QPixmap &pixmap, QWidget* parent, const QString& strCaption, const QString& strTabPageLabel) +KDockWidget* KDockMainWindow::createDockWidget( const TQString& name, const TQPixmap &pixmap, TQWidget* parent, const TQString& strCaption, const TQString& strTabPageLabel) { return new KDockWidget( dockManager, name.latin1(), pixmap, parent, strCaption, strTabPageLabel ); } @@ -149,28 +149,28 @@ void KDockMainWindow::makeDockInvisible( KDockWidget* dock ) dock->undock(); } -void KDockMainWindow::makeWidgetDockVisible( QWidget* widget ) +void KDockMainWindow::makeWidgetDockVisible( TQWidget* widget ) { makeDockVisible( dockManager->findWidgetParentDock(widget) ); } -void KDockMainWindow::writeDockConfig(QDomElement &base) +void KDockMainWindow::writeDockConfig(TQDomElement &base) { dockManager->writeConfig(base); } -void KDockMainWindow::readDockConfig(QDomElement &base) +void KDockMainWindow::readDockConfig(TQDomElement &base) { dockManager->readConfig(base); } #ifndef NO_KDE2 -void KDockMainWindow::writeDockConfig( KConfig* c, QString group ) +void KDockMainWindow::writeDockConfig( KConfig* c, TQString group ) { dockManager->writeConfig( c, group ); } -void KDockMainWindow::readDockConfig( KConfig* c, QString group ) +void KDockMainWindow::readDockConfig( KConfig* c, TQString group ) { dockManager->readConfig( c, group ); } @@ -178,7 +178,7 @@ void KDockMainWindow::readDockConfig( KConfig* c, QString group ) void KDockMainWindow::slotDockWidgetUndocked() { - QObject* pSender = (QObject*) sender(); + TQObject* pSender = (TQObject*) sender(); if (!pSender->inherits("KDockWidget")) return; KDockWidget* pDW = (KDockWidget*) pSender; emit dockWidgetHasUndocked( pDW); @@ -186,7 +186,7 @@ void KDockMainWindow::slotDockWidgetUndocked() /*************************************************************************/ KDockWidgetAbstractHeaderDrag::KDockWidgetAbstractHeaderDrag( KDockWidgetAbstractHeader* parent, KDockWidget* dock, const char* name ) -:QFrame( parent, name ) +:TQFrame( parent, name ) { dw = dock; installEventFilter( dock->dockManager() ); @@ -197,19 +197,19 @@ KDockWidgetHeaderDrag::KDockWidgetHeaderDrag( KDockWidgetAbstractHeader* parent, { } -void KDockWidgetHeaderDrag::paintEvent( QPaintEvent* ) +void KDockWidgetHeaderDrag::paintEvent( TQPaintEvent* ) { - QPainter paint; + TQPainter paint; paint.begin( this ); - style().drawPrimitive (QStyle::PE_DockWindowHandle, &paint, QRect(0,0,width(), height()), colorGroup()); + style().drawPrimitive (TQStyle::PE_DockWindowHandle, &paint, TQRect(0,0,width(), height()), colorGroup()); paint.end(); } /*************************************************************************/ KDockWidgetAbstractHeader::KDockWidgetAbstractHeader( KDockWidget* parent, const char* name ) -:QFrame( parent, name ) +:TQFrame( parent, name ) { } /*************************************************************************/ @@ -217,44 +217,44 @@ KDockWidgetHeader::KDockWidgetHeader( KDockWidget* parent, const char* name ) :KDockWidgetAbstractHeader( parent, name ) { #ifdef BORDERLESS_WINDOWS - setCursor(QCursor(ArrowCursor)); + setCursor(TQCursor(ArrowCursor)); #endif d = new KDockWidgetHeaderPrivate( this ); - layout = new QHBoxLayout( this ); - layout->setResizeMode( QLayout::Minimum ); + layout = new TQHBoxLayout( this ); + layout->setResizeMode( TQLayout::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)); + TQToolTip::add( closeButton, i18n("Close") ); + closeButton->setPixmap( style().stylePixmap (TQStyle::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())); + connect( closeButton, TQT_SIGNAL(clicked()), parent, TQT_SIGNAL(headerCloseButtonClicked())); + connect( closeButton, TQT_SIGNAL(clicked()), parent, TQT_SLOT(undock())); stayButton = new KDockButton_Private( this, "DockStayButton" ); - QToolTip::add( stayButton, i18n("Freeze the window geometry", "Freeze") ); + TQToolTip::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())); + connect( stayButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotStayClicked())); dockbackButton = new KDockButton_Private( this, "DockbackButton" ); - QToolTip::add( dockbackButton, i18n("Dock this window", "Dock") ); + TQToolTip::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())); + connect( dockbackButton, TQT_SIGNAL(clicked()), parent, TQT_SIGNAL(headerDockbackButtonClicked())); + connect( dockbackButton, TQT_SIGNAL(clicked()), parent, TQT_SLOT(dockBack())); d->toDesktopButton = new KDockButton_Private( this, "ToDesktopButton" ); - QToolTip::add( d->toDesktopButton, i18n("Detach") ); + TQToolTip::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())); + connect( d->toDesktopButton, TQT_SIGNAL(clicked()), parent, TQT_SLOT(toDesktop())); stayButton->hide(); - d->dummy = new QWidget( this ); + d->dummy = new TQWidget( this ); d->dummy->setFixedSize( 1,closeButton->pixmap()->height() ); @@ -296,7 +296,7 @@ void KDockWidgetHeader::setTopLevel( bool isTopLevel ) bool dontShowDummy=drag->isVisibleTo(this) || dockbackButton->isVisibleTo(this) || d->toDesktopButton->isVisibleTo(this) || stayButton->isVisibleTo(this) || closeButton->isVisibleTo(this); - for (QPtrListIterator it( d->btns );it.current();++it) { + for (TQPtrListIterator it( d->btns );it.current();++it) { dontShowDummy=dontShowDummy || (it.current()->isVisibleTo(this)); } if (dontShowDummy) d->dummy->hide(); else d->dummy->show(); @@ -319,13 +319,13 @@ void KDockWidgetHeader::setDragPanel( KDockWidgetHeaderDrag* nd ) if ( !nd ) return; delete layout; - layout = new QHBoxLayout( this ); - layout->setResizeMode( QLayout::Minimum ); + layout = new TQHBoxLayout( this ); + layout->setResizeMode( TQLayout::Minimum ); delete drag; drag = nd; if (drag->parentWidget()!=this) { - drag->reparent(this,QPoint(0,0)); + drag->reparent(this,TQPoint(0,0)); } @@ -337,7 +337,7 @@ void KDockWidgetHeader::setDragPanel( KDockWidgetHeaderDrag* nd ) bool dontShowDummy=drag->isVisibleTo(this) || dockbackButton->isVisibleTo(this) || d->toDesktopButton->isVisibleTo(this) || stayButton->isVisibleTo(this) || closeButton->isVisibleTo(this); - for (QPtrListIterator it( d->btns );it.current();++it) { + for (TQPtrListIterator it( d->btns );it.current();++it) { layout->addWidget(it.current()); dontShowDummy=dontShowDummy || (it.current()->isVisibleTo(this)); } @@ -355,7 +355,7 @@ void KDockWidgetHeader::addButton(KDockButton_Private* btn) { if (!btn) return; if (btn->parentWidget()!=this) { - btn->reparent(this,QPoint(0,0)); + btn->reparent(this,TQPoint(0,0)); } btn->setFixedSize(closeButton->pixmap()->width(),closeButton->pixmap()->height()); if (!d->btns.containsRef(btn)) d->btns.append(btn); @@ -363,8 +363,8 @@ void KDockWidgetHeader::addButton(KDockButton_Private* btn) { btn->show(); delete layout; - layout = new QHBoxLayout( this ); - layout->setResizeMode( QLayout::Minimum ); + layout = new TQHBoxLayout( this ); + layout->setResizeMode( TQLayout::Minimum ); layout->addWidget( drag ); layout->addWidget( dockbackButton ); @@ -374,7 +374,7 @@ void KDockWidgetHeader::addButton(KDockButton_Private* btn) { bool dontShowDummy=drag->isVisibleTo(this) || dockbackButton->isVisibleTo(this) || d->toDesktopButton->isVisibleTo(this) || stayButton->isVisibleTo(this) || closeButton->isVisibleTo(this); - for (QPtrListIterator it( d->btns );it.current();++it) { + for (TQPtrListIterator it( d->btns );it.current();++it) { layout->addWidget(it.current()); dontShowDummy=dontShowDummy || (it.current()->isVisibleTo(this)); } @@ -425,12 +425,12 @@ void KDockWidgetHeader::setDragEnabled(bool b) #ifndef NO_KDE2 void KDockWidgetHeader::saveConfig( KConfig* c ) { - c->writeEntry( QString("%1%2").arg(parent()->name()).arg(":stayButton"), stayButton->isOn() ); + c->writeEntry( TQString("%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 ) ); + setDragEnabled( !c->readBoolEntry( TQString("%1%2").arg(parent()->name()).arg(":stayButton"), false ) ); } #endif @@ -442,12 +442,12 @@ public: /** * This rectangle is used to highlight the current dockposition. It stores global screen coordinates. */ - QRect dragRect; + TQRect dragRect; /** * This rectangle is used to erase the previously highlighted dockposition. It stores global screen coordinates. */ - QRect oldDragRect; + TQRect oldDragRect; /** * This flag stores the information if dragging is ready to start. Used between mousePress and mouseMove event. @@ -457,7 +457,7 @@ public: /** * This variable stores the offset of the mouse cursor to the upper left edge of the current drag widget. */ - QPoint dragOffset; + TQPoint dragOffset; /** * These flags store information about the splitter behavior @@ -466,30 +466,30 @@ public: bool splitterKeepSize; bool splitterHighResolution; - QGuardedPtr mainDockWidget; + TQGuardedPtr mainDockWidget; - QObjectList containerDocks; + TQObjectList containerDocks; - QGuardedPtr leftContainer; - QGuardedPtr topContainer; - QGuardedPtr rightContainer; - QGuardedPtr bottomContainer; + TQGuardedPtr leftContainer; + TQGuardedPtr topContainer; + TQGuardedPtr rightContainer; + TQGuardedPtr bottomContainer; int m_readDockConfigMode; }; /*************************************************************************/ -KDockWidget::KDockWidget( KDockManager* dockManager, const char* name, const QPixmap &pixmap, QWidget* parent, const QString& strCaption, const QString& strTabPageLabel, WFlags f) +KDockWidget::KDockWidget( KDockManager* dockManager, const char* name, const TQPixmap &pixmap, TQWidget* parent, const TQString& strCaption, const TQString& strTabPageLabel, WFlags f) #ifdef BORDERLESS_WINDOWS -: QWidget( parent, name, f )//| WType_Dialog | WStyle_Customize | WStyle_NoBorder ) +: TQWidget( parent, name, f )//| WType_Dialog | WStyle_Customize | WStyle_NoBorder ) #else -: QWidget( parent, name, f ) +: TQWidget( parent, name, f ) #endif ,formerBrotherDockWidget(0L) ,currentDockPos(DockNone) ,formerDockPos(DockNone) ,widget(0L) - ,pix(new QPixmap(pixmap)) + ,pix(new TQPixmap(pixmap)) ,prevSideDockPosBeforeDrag(DockNone) ,isGroup(false) { @@ -497,8 +497,8 @@ KDockWidget::KDockWidget( KDockManager* dockManager, const char* name, const QPi d->_parent = parent; - layout = new QVBoxLayout( this ); - layout->setResizeMode( QLayout::Minimum ); + layout = new TQVBoxLayout( this ); + layout->setResizeMode( TQLayout::Minimum ); manager = dockManager; manager->childDock->append( this ); @@ -525,18 +525,18 @@ KDockWidget::KDockWidget( KDockManager* dockManager, const char* name, const QPi setIcon( pixmap); widget = 0L; - QObject::connect(this, SIGNAL(hasUndocked()), manager->main, SLOT(slotDockWidgetUndocked()) ); - applyToWidget( parent, QPoint(0,0) ); + TQObject::connect(this, TQT_SIGNAL(hasUndocked()), manager->main, TQT_SLOT(slotDockWidgetUndocked()) ); + applyToWidget( parent, TQPoint(0,0) ); } -void KDockWidget::setPixmap(const QPixmap& pixmap) { +void KDockWidget::setPixmap(const TQPixmap& pixmap) { delete pix; - pix=new QPixmap(pixmap); + pix=new TQPixmap(pixmap); setIcon(*pix); KDockTabGroup *dtg=parentDockTabGroup(); if (dtg) dtg->changeTab(this,pixmap,dtg->tabLabel(this)); - QWidget *contWid=parentDockContainer(); + TQWidget *contWid=parentDockContainer(); if (contWid) { KDockContainer *x = dynamic_cast(contWid); if (x) { @@ -545,7 +545,7 @@ void KDockWidget::setPixmap(const QPixmap& pixmap) { } } -const QPixmap& KDockWidget::pixmap() const { +const TQPixmap& KDockWidget::pixmap() const { return *pix; } @@ -572,25 +572,25 @@ KDockWidget::~KDockWidget() d=0; } -void KDockWidget::paintEvent(QPaintEvent* pe) +void KDockWidget::paintEvent(TQPaintEvent* pe) { - QWidget::paintEvent(pe); - QPainter paint; + TQWidget::paintEvent(pe); + TQPainter paint; paint.begin( this ); - style().drawPrimitive (QStyle::PE_Panel, &paint, QRect(0,0,width(), height()), colorGroup()); + style().drawPrimitive (TQStyle::PE_Panel, &paint, TQRect(0,0,width(), height()), colorGroup()); paint.end(); } -void KDockWidget::leaveEvent(QEvent *e) +void KDockWidget::leaveEvent(TQEvent *e) { - QWidget::leaveEvent(e); + TQWidget::leaveEvent(e); #ifdef BORDERLESS_WINDOWS if (parent()) return; -// setCursor(QCursor(ArrowCursor)); +// setCursor(TQCursor(ArrowCursor)); #endif } -void KDockWidget::mousePressEvent(QMouseEvent* mme) +void KDockWidget::mousePressEvent(TQMouseEvent* mme) { #ifdef BORDERLESS_WINDOWS if (!parent()) @@ -602,9 +602,9 @@ void KDockWidget::mousePressEvent(QMouseEvent* mme) bool bright; bool btop; int styleheight; - QPoint mp; + TQPoint mp; mp=mme->pos(); - styleheight=2*style().pixelMetric(QStyle::PM_DefaultFrameWidth,this); + styleheight=2*style().pixelMetric(TQStyle::PM_DefaultFrameWidth,this); bbottom=mp.y()>=height()-styleheight; btop=mp.y()<=styleheight; bleft=mp.x()<=styleheight; @@ -616,52 +616,52 @@ void KDockWidget::mousePressEvent(QMouseEvent* mme) if (btop) { d->resizeMode=KDockWidgetPrivate::ResizeTopRight; - d->resizePos=QPoint(width(),0)-mme->pos(); + d->resizePos=TQPoint(width(),0)-mme->pos(); } else { - d->resizePos=QPoint(width(),height())-mme->pos(); + d->resizePos=TQPoint(width(),height())-mme->pos(); if (bbottom) d->resizeMode=KDockWidgetPrivate::ResizeBottomRight; else d->resizeMode=KDockWidgetPrivate::ResizeRight; } } else if (bleft) { - if (btop) setCursor(QCursor(SizeFDiagCursor)); + if (btop) setCursor(TQCursor(SizeFDiagCursor)); else - if (bbottom) setCursor(QCursor(SizeBDiagCursor)); - else setCursor(QCursor(SizeHorCursor)); + if (bbottom) setCursor(TQCursor(SizeBDiagCursor)); + else setCursor(TQCursor(SizeHorCursor)); } else if (bbottom) { d->resizeMode=KDockWidgetPrivate::ResizeBottom; - d->resizePos=QPoint(0,height())-mme->pos(); + d->resizePos=TQPoint(0,height())-mme->pos(); } else - if (btop) setCursor(QCursor(SizeVerCursor)); + if (btop) setCursor(TQCursor(SizeVerCursor)); else d->resizing=false; if (d->resizing) grabMouse(cursor()); } #endif - QWidget::mousePressEvent(mme); + TQWidget::mousePressEvent(mme); } -void KDockWidget::mouseReleaseEvent(QMouseEvent* ev) +void KDockWidget::mouseReleaseEvent(TQMouseEvent* ev) { #ifdef BORDERLESS_WINDOWS d->resizing=false; releaseMouse(); #endif - QWidget::mouseReleaseEvent(ev); + TQWidget::mouseReleaseEvent(ev); } -void KDockWidget::mouseMoveEvent(QMouseEvent* mme) +void KDockWidget::mouseMoveEvent(TQMouseEvent* mme) { - QWidget::mouseMoveEvent(mme); + TQWidget::mouseMoveEvent(mme); #ifdef BORDERLESS_WINDOWS if (parent()) return; @@ -690,9 +690,9 @@ void KDockWidget::mouseMoveEvent(QMouseEvent* mme) bool bright; bool btop; int styleheight; - QPoint mp; + TQPoint mp; mp=mme->pos(); - styleheight=2*style().pixelMetric(QStyle::PM_DefaultFrameWidth,this); + styleheight=2*style().pixelMetric(TQStyle::PM_DefaultFrameWidth,this); bbottom=mp.y()>=height()-styleheight; btop=mp.y()<=styleheight; bleft=mp.x()<=styleheight; @@ -700,25 +700,25 @@ void KDockWidget::mouseMoveEvent(QMouseEvent* mme) kdDebug(282)<<"mousemovevent"<container)) return 0; if (dynamic_cast(d->container.operator->())) return d->container; @@ -750,8 +750,8 @@ void KDockWidget::setHeader( KDockWidgetAbstractHeader* h ) delete header; delete layout; header = h; - layout = new QVBoxLayout( this ); - layout->setResizeMode( QLayout::Minimum ); + layout = new TQVBoxLayout( this ); + layout->setResizeMode( TQLayout::Minimum ); layout->addWidget( header ); setWidget( widget ); } else { @@ -776,7 +776,7 @@ void KDockWidget::updateHeader() #ifdef BORDERLESS_WINDOWS layout->setMargin(0); setMouseTracking(false); - setCursor(QCursor(ArrowCursor)); + setCursor(TQCursor(ArrowCursor)); #endif if ( (parent() == manager->main) || isGroup || (eDocking == KDockWidget::DockNone) ){ @@ -792,18 +792,18 @@ void KDockWidget::updateHeader() header->setTopLevel( true ); header->show(); #ifdef BORDERLESS_WINDOWS - layout->setMargin(2*style().pixelMetric(QStyle::PM_DefaultFrameWidth,this)); + layout->setMargin(2*style().pixelMetric(TQStyle::PM_DefaultFrameWidth,this)); setMouseTracking(true); #endif } } -void KDockWidget::applyToWidget( QWidget* s, const QPoint& p ) +void KDockWidget::applyToWidget( TQWidget* s, const TQPoint& p ) { if ( parent() != s ) { hide(); - reparent(s, 0, QPoint(0,0), false); + reparent(s, 0, TQPoint(0,0), false); } if ( s && s->inherits("KDockMainWindow") ){ @@ -811,7 +811,7 @@ void KDockWidget::applyToWidget( QWidget* s, const QPoint& p ) } if ( manager && s == manager->main ){ - setGeometry( QRect(QPoint(0,0), manager->main->geometry().size()) ); + setGeometry( TQRect(TQPoint(0,0), manager->main->geometry().size()) ); } if ( !s ) @@ -847,10 +847,10 @@ void KDockWidget::show() if ( parent() ){ makeDockVisible(); } else { - QWidget::show(); + TQWidget::show(); } } else { - QWidget::show(); + TQWidget::show(); } } @@ -859,46 +859,46 @@ void KDockWidget::show() void KDockWidget::setDockWindowType (NET::WindowType windowType) { d->windowType = windowType; - applyToWidget( parentWidget(), QPoint(0,0) ); + applyToWidget( parentWidget(), TQPoint(0,0) ); } #endif -void KDockWidget::setDockWindowTransient (QWidget *parent, bool transientEnabled) +void KDockWidget::setDockWindowTransient (TQWidget *parent, bool transientEnabled) { d->_parent = parent; d->transient = transientEnabled; - applyToWidget( parentWidget(), QPoint(0,0) ); + applyToWidget( parentWidget(), TQPoint(0,0) ); } -QWidget *KDockWidget::transientTo() { +TQWidget *KDockWidget::transientTo() { if (d->transient && d->_parent) return d->_parent; else return 0; } -bool KDockWidget::event( QEvent *event ) +bool KDockWidget::event( TQEvent *event ) { switch ( event->type() ) { #undef FocusIn - case QEvent::FocusIn: + case TQEvent::FocusIn: if (widget && !d->pendingFocusInEvent) { d->pendingFocusInEvent = true; widget->setFocus(); } d->pendingFocusInEvent = false; break; - case QEvent::ChildRemoved: - if ( widget == ((QChildEvent*)event)->child() ) widget = 0L; + case TQEvent::ChildRemoved: + if ( widget == ((TQChildEvent*)event)->child() ) widget = 0L; break; - case QEvent::Show: + case TQEvent::Show: if ( widget ) widget->show(); emit manager->change(); break; - case QEvent::Hide: + case TQEvent::Hide: if ( widget ) widget->hide(); emit manager->change(); break; - case QEvent::CaptionChange: + case TQEvent::CaptionChange: if ( parentWidget() ){ if ( parent()->inherits("KDockSplitter") ){ ((KDockSplitter*)(parent()))->updateName(); @@ -909,13 +909,13 @@ bool KDockWidget::event( QEvent *event ) } } break; - case QEvent::Close: + case TQEvent::Close: emit iMBeingClosed(); break; default: break; } - return QWidget::event( event ); + return TQWidget::event( event ); } KDockWidget *KDockWidget::findNearestDockWidget(DockPosition pos) @@ -945,7 +945,7 @@ KDockWidget *KDockWidget::findNearestDockWidget(DockPosition pos) } -KDockWidget* KDockWidget::manualDock( KDockWidget* target, DockPosition dockPos, int spliPos, QPoint pos, bool check, int tabIndex ) +KDockWidget* KDockWidget::manualDock( KDockWidget* target, DockPosition dockPos, int spliPos, TQPoint pos, bool check, int tabIndex ) { if (this == target) return 0L; // docking to itself not possible @@ -1025,10 +1025,10 @@ KDockWidget* KDockWidget::manualDock( KDockWidget* target, DockPosition dockPos, if ( parentTab ){ // add to existing TabGroup applyToWidget( parentTab ); - parentTab->insertTab( this, icon() ? *icon() : QPixmap(), + parentTab->insertTab( this, icon() ? *icon() : TQPixmap(), tabPageLabel(), tabIndex ); - QWidget *wantTransient=parentTab->transientTo(); + TQWidget *wantTransient=parentTab->transientTo(); target->setDockWindowTransient(wantTransient,wantTransient); setDockTabName( parentTab ); @@ -1042,7 +1042,7 @@ KDockWidget* KDockWidget::manualDock( KDockWidget* target, DockPosition dockPos, else { // kdDebug(282)<<"Looking for KDockContainer"<parentDockContainer(); + TQWidget *contWid=target->parentDockContainer(); if (!contWid) contWid=target->widget; if (contWid) { @@ -1057,7 +1057,7 @@ KDockWidget* KDockWidget::manualDock( KDockWidget* target, DockPosition dockPos, } // kdDebug(282)<<"KDockContainerFound"<insertWidget( this, icon() ? *icon() : QPixmap(), + cont->insertWidget( this, icon() ? *icon() : TQPixmap(), tabPageLabel(), tabIndex ); setLatestKDockContainer(contWid); // setDockTabName( parentTab ); @@ -1073,8 +1073,8 @@ KDockWidget* KDockWidget::manualDock( KDockWidget* target, DockPosition dockPos, } // create a new dockwidget that will contain the target and this - QWidget* parentDock = target->parentWidget(); - KDockWidget* newDock = new KDockWidget( manager, "tempName", QPixmap(""), parentDock ); + TQWidget* parentDock = target->parentWidget(); + KDockWidget* newDock = new KDockWidget( manager, "tempName", TQPixmap(""), parentDock ); newDock->currentDockPos = target->currentDockPos; if ( dockPos == KDockWidget::DockCenter ){ @@ -1106,14 +1106,14 @@ KDockWidget* KDockWidget::manualDock( KDockWidget* target, DockPosition dockPos, if ( dockPos == KDockWidget::DockCenter ) { KDockTabGroup* tab = new KDockTabGroup( newDock, "_dock_tab"); - QObject::connect(tab, SIGNAL(currentChanged(QWidget*)), d, SLOT(slotFocusEmbeddedWidget(QWidget*))); + TQObject::connect(tab, TQT_SIGNAL(currentChanged(TQWidget*)), d, TQT_SLOT(slotFocusEmbeddedWidget(TQWidget*))); newDock->setWidget( tab ); target->applyToWidget( tab ); applyToWidget( tab ); - tab->insertTab( target, target->icon() ? *(target->icon()) : QPixmap(), + tab->insertTab( target, target->icon() ? *(target->icon()) : TQPixmap(), target->tabPageLabel() ); @@ -1121,11 +1121,11 @@ KDockWidget* KDockWidget::manualDock( KDockWidget* target, DockPosition dockPos, if( !target->toolTipString().isEmpty()) tab->setTabToolTip( target, target->toolTipString()); - tab->insertTab( this, icon() ? *icon() : QPixmap(), + tab->insertTab( this, icon() ? *icon() : TQPixmap(), tabPageLabel(), tabIndex ); - QRect geom=newDock->geometry(); - QWidget *wantTransient=tab->transientTo(); + TQRect geom=newDock->geometry(); + TQWidget *wantTransient=tab->transientTo(); newDock->setDockWindowTransient(wantTransient,wantTransient); newDock->setGeometry(geom); @@ -1200,15 +1200,15 @@ KDockWidget* KDockWidget::manualDock( KDockWidget* target, DockPosition dockPos, KDockTabGroup* KDockWidget::parentDockTabGroup() const { if ( !parent() ) return 0L; - QWidget* candidate = parentWidget()->parentWidget(); + TQWidget* candidate = parentWidget()->parentWidget(); if ( candidate && candidate->inherits("KDockTabGroup") ) return (KDockTabGroup*)candidate; return 0L; } -QWidget *KDockWidget::parentDockContainer() const +TQWidget *KDockWidget::parentDockContainer() const { if (!parent()) return 0L; - QWidget* candidate = parentWidget()->parentWidget(); + TQWidget* candidate = parentWidget()->parentWidget(); if (candidate && dynamic_cast(candidate)) return candidate; return 0L; } @@ -1256,7 +1256,7 @@ void KDockWidget::restoreFromForcedFixedSize() void KDockWidget::toDesktop() { - QPoint p = mapToGlobal( QPoint( -30, -30 ) ); + TQPoint p = mapToGlobal( TQPoint( -30, -30 ) ); if( p.x( ) < 0 ) p.setX( 0 ); if( p.y( ) < 0 ) @@ -1273,10 +1273,10 @@ void KDockWidget::undock() { // kdDebug(282)<<"KDockWidget::undock()"<d->dragRect = QRect (); + manager->d->dragRect = TQRect (); manager->drawDragRectangle (); - QWidget* parentW = parentWidget(); + TQWidget* parentW = parentWidget(); if ( !parentW ){ hide(); if (!d->blockHasUndockedSignal) @@ -1298,7 +1298,7 @@ void KDockWidget::undock() d->index = parentTab->indexOf( this); // memorize the page position in the tab widget parentTab->removePage( this ); /* - QWidget *wantTransient=parentTab->transientTo(); + TQWidget *wantTransient=parentTab->transientTo(); target->setDockWindowTransient(wantTransient,wantTransient); */ setFormerBrotherDockWidget((KDockWidget*)parentTab->page(0)); @@ -1308,7 +1308,7 @@ void KDockWidget::undock() // last subdock widget in the tab control KDockWidget* lastTab = (KDockWidget*)parentTab->page(0); parentTab->removePage( lastTab ); -/* QWidget *wantTransient=parentTab->transientTo(); +/* TQWidget *wantTransient=parentTab->transientTo(); target->setDockWindowTransient(wantTransient,wantTransient);*/ lastTab->applyToWidget( 0L ); @@ -1318,7 +1318,7 @@ void KDockWidget::undock() KDockWidget* parentOfTab = (KDockWidget*)parentTab->parent(); delete parentTab; // KDockTabGroup - QWidget* parentOfDockWidget = parentOfTab->parentWidget(); + TQWidget* parentOfDockWidget = parentOfTab->parentWidget(); if ( !parentOfDockWidget ){ if ( isV ) lastTab->show(); } else { @@ -1357,7 +1357,7 @@ void KDockWidget::undock() } } else { /*********************************************************************************************/ - //QWidget* containerWidget = (QWidget*)parent(); + //TQWidget* containerWidget = (TQWidget*)parent(); bool undockedFromContainer=false; if (d->container) { @@ -1386,7 +1386,7 @@ void KDockWidget::undock() secondWidget->applyToWidget( 0L, group->frameGeometry().topLeft() ); secondWidget->resize( group->width(), group->height() ); } else { - QWidget* obj = group->parentWidget(); + TQWidget* obj = group->parentWidget(); secondWidget->applyToWidget( obj ); if ( obj->inherits("KDockSplitter") ){ KDockSplitter* parentOfGroup = (KDockSplitter*)obj; @@ -1426,22 +1426,22 @@ void KDockWidget::undock() emit hasUndocked(); } -void KDockWidget::setWidget( QWidget* mw ) +void KDockWidget::setWidget( TQWidget* mw ) { if ( !mw ) return; if ( mw->parent() != this ){ - mw->reparent(this, 0, QPoint(0,0), false); + mw->reparent(this, 0, TQPoint(0,0), false); } #ifdef BORDERLESS_WINDOWS - if (!mw->ownCursor()) mw->setCursor(QCursor(ArrowCursor)); + if (!mw->ownCursor()) mw->setCursor(TQCursor(ArrowCursor)); #endif widget = mw; delete layout; - layout = new QVBoxLayout( this ); - layout->setResizeMode( QLayout::Minimum ); + layout = new TQVBoxLayout( this ); + layout->setResizeMode( TQLayout::Minimum ); KDockContainer* dc = dynamic_cast(widget); if (dc) @@ -1465,10 +1465,10 @@ void KDockWidget::setWidget( QWidget* mw ) void KDockWidget::setDockTabName( KDockTabGroup* tab ) { - QString listOfName; - QString listOfCaption; + TQString listOfName; + TQString listOfCaption; for ( int i = 0; i < tab->count(); ++i ) { - QWidget *w = tab->page( i ); + TQWidget *w = tab->page( i ); listOfCaption.append( w->caption() ).append(","); listOfName.append( w->name() ).append(","); } @@ -1518,7 +1518,7 @@ void KDockWidget::makeDockVisible() parentDockTabGroup()->showPage( this ); } if (parentDockContainer()) { - QWidget *contWid=parentDockContainer(); + TQWidget *contWid=parentDockContainer(); KDockContainer *x = dynamic_cast(contWid); if (x) { x->showWidget(this); @@ -1526,7 +1526,7 @@ void KDockWidget::makeDockVisible() } if ( isVisible() ) return; - QWidget* p = parentWidget(); + TQWidget* p = parentWidget(); while ( p ){ if ( !p->isVisible() ) p->show(); @@ -1541,15 +1541,15 @@ void KDockWidget::setFormerBrotherDockWidget(KDockWidget *dockWidget) { formerBrotherDockWidget = dockWidget; if( formerBrotherDockWidget ) - QObject::connect( formerBrotherDockWidget, SIGNAL(iMBeingClosed()), - this, SLOT(loseFormerBrotherDockWidget()) ); + TQObject::connect( formerBrotherDockWidget, TQT_SIGNAL(iMBeingClosed()), + this, TQT_SLOT(loseFormerBrotherDockWidget()) ); } void KDockWidget::loseFormerBrotherDockWidget() { if( formerBrotherDockWidget ) - QObject::disconnect( formerBrotherDockWidget, SIGNAL(iMBeingClosed()), - this, SLOT(loseFormerBrotherDockWidget()) ); + TQObject::disconnect( formerBrotherDockWidget, TQT_SIGNAL(iMBeingClosed()), + this, TQT_SLOT(loseFormerBrotherDockWidget()) ); formerBrotherDockWidget = 0L; repaint(); } @@ -1559,12 +1559,12 @@ 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; + TQObjectList* cl = queryList("KDockWidget"); + TQObjectListIt it( *cl ); + TQObject * obj; while ( !found && (obj=it.current()) != 0 ) { ++it; - QWidget* widg = (QWidget*)obj; + TQWidget* widg = (TQWidget*)obj; if( widg == formerBrotherDockWidget) found = true; } @@ -1572,7 +1572,7 @@ void KDockWidget::dockBack() if( !found) { // can dock back to the former brother dockwidget - manualDock( formerBrotherDockWidget, formerDockPos, d->splitPosInPercent, QPoint(0,0), false, d->index); + manualDock( formerBrotherDockWidget, formerDockPos, d->splitPosInPercent, TQPoint(0,0), false, d->index); formerBrotherDockWidget = 0L; makeDockVisible(); return; @@ -1580,7 +1580,7 @@ void KDockWidget::dockBack() } // else dockback to the dockmainwindow (default behavior) - manualDock( ((KDockMainWindow*)manager->main)->getMainDockWidget(), formerDockPos, d->splitPosInPercent, QPoint(0,0), false, d->index); + manualDock( ((KDockMainWindow*)manager->main)->getMainDockWidget(), formerDockPos, d->splitPosInPercent, TQPoint(0,0), false, d->index); formerBrotherDockWidget = 0L; if (parent()) makeDockVisible(); @@ -1597,8 +1597,8 @@ bool KDockWidget::isDockBackPossible() const /**************************************************************************************/ -KDockManager::KDockManager( QWidget* mainWindow , const char* name ) -:QObject( mainWindow, name ) +KDockManager::KDockManager( TQWidget* mainWindow , const char* name ) +:TQObject( mainWindow, name ) ,main(mainWindow) ,currentDragWidget(0L) ,currentMoveWidget(0L) @@ -1629,20 +1629,20 @@ KDockManager::KDockManager( QWidget* mainWindow , const char* name ) undockProcess = false; - menuData = new QPtrList; + menuData = new TQPtrList; menuData->setAutoDelete( true ); menuData->setAutoDelete( true ); #ifndef NO_KDE2 menu = new KPopupMenu(); #else - menu = new QPopupMenu(); + menu = new TQPopupMenu(); #endif - connect( menu, SIGNAL(aboutToShow()), SLOT(slotMenuPopup()) ); - connect( menu, SIGNAL(activated(int)), SLOT(slotMenuActivated(int)) ); + connect( menu, TQT_SIGNAL(aboutToShow()), TQT_SLOT(slotMenuPopup()) ); + connect( menu, TQT_SIGNAL(activated(int)), TQT_SLOT(slotMenuActivated(int)) ); - childDock = new QObjectList(); + childDock = new TQObjectList(); childDock->setAutoDelete( false ); } @@ -1657,7 +1657,7 @@ KDockManager::~KDockManager() delete menuData; delete menu; - QObjectListIt it( *childDock ); + TQObjectListIt it( *childDock ); KDockWidget * obj; while ( (obj=(KDockWidget*)it.current()) ) { @@ -1670,7 +1670,7 @@ KDockManager::~KDockManager() void KDockManager::activate() { - QObjectListIt it( *childDock ); + TQObjectListIt it( *childDock ); KDockWidget * obj; while ( (obj=(KDockWidget*)it.current()) ) { @@ -1680,17 +1680,17 @@ void KDockManager::activate() obj->show(); } } - if ( !main->inherits("QDialog") ) main->show(); + if ( !main->inherits("TQDialog") ) main->show(); } -bool KDockManager::eventFilter( QObject *obj, QEvent *event ) +bool KDockManager::eventFilter( TQObject *obj, TQEvent *event ) { if ( obj->inherits("KDockWidgetAbstractHeaderDrag") ){ KDockWidget* pDockWdgAtCursor = 0L; KDockWidget* curdw = ((KDockWidgetAbstractHeaderDrag*)obj)->dockWidget(); switch ( event->type() ){ - case QEvent::MouseButtonDblClick: + case TQEvent::MouseButtonDblClick: if (curdw->currentDockPos == KDockWidget::DockDesktop) curdw->dockBack(); else { @@ -1699,8 +1699,8 @@ bool KDockManager::eventFilter( QObject *obj, QEvent *event ) } break; - case QEvent::MouseButtonPress: - if ( ((QMouseEvent*)event)->button() == LeftButton ){ + case TQEvent::MouseButtonPress: + if ( ((TQMouseEvent*)event)->button() == LeftButton ){ if ( curdw->eDocking != (int)KDockWidget::DockNone ){ dropCancel = true; curdw->setFocus(); @@ -1708,24 +1708,24 @@ bool KDockManager::eventFilter( QObject *obj, QEvent *event ) currentDragWidget = curdw; currentMoveWidget = 0L; - childDockWidgetList = new QWidgetList(); + childDockWidgetList = new TQWidgetList(); 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->oldDragRect = TQRect(); should fix rectangle not erased problem + d->dragRect = TQRect(curdw->geometry()); + TQPoint p = curdw->mapToGlobal(TQPoint(0,0)); d->dragRect.moveTopLeft(p); drawDragRectangle(); d->readyToDrag = true; - d->dragOffset = QCursor::pos()-currentDragWidget->mapToGlobal(QPoint(0,0)); + d->dragOffset = TQCursor::pos()-currentDragWidget->mapToGlobal(TQPoint(0,0)); } } break; - case QEvent::MouseButtonRelease: - if ( ((QMouseEvent*)event)->button() == LeftButton ){ + case TQEvent::MouseButtonRelease: + if ( ((TQMouseEvent*)event)->button() == LeftButton ){ if ( dragging ){ if ( !dropCancel ) drop(); @@ -1734,9 +1734,9 @@ bool KDockManager::eventFilter( QObject *obj, QEvent *event ) } 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->oldDragRect = TQRect(); should fix rectangle not erased problem + d->dragRect = TQRect(curdw->geometry()); + TQPoint p = curdw->mapToGlobal(TQPoint(0,0)); d->dragRect.moveTopLeft(p); drawDragRectangle(); currentDragWidget = 0L; @@ -1747,7 +1747,7 @@ bool KDockManager::eventFilter( QObject *obj, QEvent *event ) dropCancel = true; } break; - case QEvent::MouseMove: + case TQEvent::MouseMove: if ( dragging ) { #ifdef BORDERLESS_WINDOWS @@ -1755,31 +1755,31 @@ bool KDockManager::eventFilter( QObject *obj, QEvent *event ) KDockWidget *oldMoveWidget; if (!curdw->parent()) { - curdw->move(QCursor::pos()-d->dragOffset); - pDockWdgAtCursor = findDockWidgetAt( QCursor::pos()-QPoint(0,d->dragOffset.y()+3) ); + curdw->move(TQCursor::pos()-d->dragOffset); + pDockWdgAtCursor = findDockWidgetAt( TQCursor::pos()-TQPoint(0,d->dragOffset.y()+3) ); oldMoveWidget = currentMoveWidget; } else { - pDockWdgAtCursor = findDockWidgetAt( QCursor::pos() ); + pDockWdgAtCursor = findDockWidgetAt( TQCursor::pos() ); oldMoveWidget = currentMoveWidget; } //END TEST #else - pDockWdgAtCursor = findDockWidgetAt( QCursor::pos() ); + pDockWdgAtCursor = findDockWidgetAt( TQCursor::pos() ); KDockWidget* oldMoveWidget = currentMoveWidget; #endif if ( currentMoveWidget && pDockWdgAtCursor == currentMoveWidget ) { //move - dragMove( currentMoveWidget, currentMoveWidget->mapFromGlobal( QCursor::pos() ) ); + dragMove( currentMoveWidget, currentMoveWidget->mapFromGlobal( TQCursor::pos() ) ); break; } else { if (dropCancel && curdw) { - d->dragRect = QRect(curdw->geometry()); - QPoint p = curdw->mapToGlobal(QPoint(0,0)); + d->dragRect = TQRect(curdw->geometry()); + TQPoint p = curdw->mapToGlobal(TQPoint(0,0)); d->dragRect.moveTopLeft(p); }else - d->dragRect = QRect(); + d->dragRect = TQRect(); drawDragRectangle(); } @@ -1803,7 +1803,7 @@ bool KDockManager::eventFilter( QObject *obj, QEvent *event ) if (d->readyToDrag) { d->readyToDrag = false; } - if ( (((QMouseEvent*)event)->state() == LeftButton) && + if ( (((TQMouseEvent*)event)->state() == LeftButton) && (curdw->eDocking != (int)KDockWidget::DockNone) ) { startDrag( curdw); } @@ -1813,10 +1813,10 @@ bool KDockManager::eventFilter( QObject *obj, QEvent *event ) break; } } - return QObject::eventFilter( obj, event ); + return TQObject::eventFilter( obj, event ); } -KDockWidget* KDockManager::findDockWidgetAt( const QPoint& pos ) +KDockWidget* KDockManager::findDockWidgetAt( const TQPoint& pos ) { dropCancel = true; @@ -1825,7 +1825,7 @@ KDockWidget* KDockManager::findDockWidgetAt( const QPoint& pos ) if (currentDragWidget->eDocking == (int)KDockWidget::DockNone ) return 0L; - QWidget* p = QApplication::widgetAt( pos ); + TQWidget* p = TQApplication::widgetAt( pos ); if ( !p ) { dropCancel = false; return 0L; @@ -1833,7 +1833,7 @@ KDockWidget* KDockManager::findDockWidgetAt( const QPoint& pos ) #if defined(_OS_WIN32_) || defined(Q_OS_WIN32) p = p->topLevelWidget(); #endif - QWidget* w = 0L; + TQWidget* w = 0L; findChildDockWidget( w, p, p->mapFromGlobal(pos) ); if ( !w ){ if ( !p->inherits("KDockWidget") ) { @@ -1855,7 +1855,7 @@ KDockWidget* KDockManager::findDockWidgetAt( const QPoint& pos ) return 0L; KDockWidget::DockPosition curPos = KDockWidget::DockDesktop; - QPoint cpos = www->mapFromGlobal( pos ); + TQPoint cpos = www->mapFromGlobal( pos ); int ww = www->widget->width() / 3; int hh = www->widget->height() / 3; @@ -1882,15 +1882,15 @@ KDockWidget* KDockManager::findDockWidgetAt( const QPoint& pos ) return www; } -void KDockManager::findChildDockWidget( QWidget*& ww, const QWidget* p, const QPoint& pos ) +void KDockManager::findChildDockWidget( TQWidget*& ww, const TQWidget* p, const TQPoint& pos ) { if ( p->children() ) { - QWidget *w; - QObjectListIt it( *p->children() ); + TQWidget *w; + TQObjectListIt it( *p->children() ); it.toLast(); while ( it.current() ) { if ( it.current()->isWidgetType() ) { - w = (QWidget*)it.current(); + w = (TQWidget*)it.current(); if ( w->isVisible() && w->geometry().contains(pos) ) { if ( w->inherits("KDockWidget") ) ww = w; findChildDockWidget( ww, w, w->mapFromParent(pos) ); @@ -1903,15 +1903,15 @@ void KDockManager::findChildDockWidget( QWidget*& ww, const QWidget* p, const QP return; } -void KDockManager::findChildDockWidget( const QWidget* p, QWidgetList*& list ) +void KDockManager::findChildDockWidget( const TQWidget* p, TQWidgetList*& list ) { if ( p->children() ) { - QWidget *w; - QObjectListIt it( *p->children() ); + TQWidget *w; + TQObjectListIt it( *p->children() ); it.toLast(); while ( it.current() ) { if ( it.current()->isWidgetType() ) { - w = (QWidget*)it.current(); + w = (TQWidget*)it.current(); if ( w->isVisible() ) { if ( w->inherits("KDockWidget") ) list->append( w ); findChildDockWidget( w, list ); @@ -1938,15 +1938,15 @@ void KDockManager::startDrag( KDockWidget* w ) curPos = KDockWidget::DockDesktop; dragging = true; - QApplication::setOverrideCursor(QCursor(sizeAllCursor)); + TQApplication::setOverrideCursor(TQCursor(sizeAllCursor)); } -void KDockManager::dragMove( KDockWidget* dw, QPoint pos ) +void KDockManager::dragMove( KDockWidget* dw, TQPoint pos ) { - QPoint p = dw->mapToGlobal( dw->widget->pos() ); + TQPoint p = dw->mapToGlobal( dw->widget->pos() ); KDockWidget::DockPosition oldPos = curPos; - QSize r = dw->widget->size(); + TQSize r = dw->widget->size(); if ( dw->parentDockTabGroup() ){ curPos = KDockWidget::DockCenter; if ( oldPos != curPos ) { @@ -1991,34 +1991,34 @@ void KDockManager::dragMove( KDockWidget* dw, QPoint pos ) void KDockManager::cancelDrop() { - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); delete childDockWidgetList; childDockWidgetList = 0L; - d->dragRect = QRect(); // cancel drawing + d->dragRect = TQRect(); // cancel drawing drawDragRectangle(); // only the old rect will be deleted } void KDockManager::drop() { - d->dragRect = QRect(); // cancel drawing + d->dragRect = TQRect(); // cancel drawing drawDragRectangle(); // only the old rect will be deleted - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); delete childDockWidgetList; childDockWidgetList = 0L; if ( dropCancel ) return; if ( !currentMoveWidget && (!(currentDragWidget->eDocking & (int)KDockWidget::DockDesktop)) ) { - d->dragRect = QRect(); // cancel drawing + d->dragRect = TQRect(); // cancel drawing drawDragRectangle(); // only the old rect will be deleted return; } if ( !currentMoveWidget && !currentDragWidget->parent() ) { - currentDragWidget->move( QCursor::pos() - d->dragOffset ); + currentDragWidget->move( TQCursor::pos() - d->dragOffset ); } else { int splitPos = currentDragWidget->d->splitPosInPercent; @@ -2032,63 +2032,63 @@ void KDockManager::drop() default: break; } } - currentDragWidget->manualDock( currentMoveWidget, curPos , splitPos, QCursor::pos() - d->dragOffset ); + currentDragWidget->manualDock( currentMoveWidget, curPos , splitPos, TQCursor::pos() - d->dragOffset ); currentDragWidget->makeDockVisible(); } } -static QDomElement createStringEntry(QDomDocument &doc, const QString &tagName, const QString &str) +static TQDomElement createStringEntry(TQDomDocument &doc, const TQString &tagName, const TQString &str) { - QDomElement el = doc.createElement(tagName); + TQDomElement el = doc.createElement(tagName); el.appendChild(doc.createTextNode(str)); return el; } -static QDomElement createBoolEntry(QDomDocument &doc, const QString &tagName, bool b) +static TQDomElement createBoolEntry(TQDomDocument &doc, const TQString &tagName, bool b) { - return createStringEntry(doc, tagName, QString::fromLatin1(b? "true" : "false")); + return createStringEntry(doc, tagName, TQString::fromLatin1(b? "true" : "false")); } -static QDomElement createNumberEntry(QDomDocument &doc, const QString &tagName, int n) +static TQDomElement createNumberEntry(TQDomDocument &doc, const TQString &tagName, int n) { - return createStringEntry(doc, tagName, QString::number(n)); + return createStringEntry(doc, tagName, TQString::number(n)); } -static QDomElement createRectEntry(QDomDocument &doc, const QString &tagName, const QRect &rect) +static TQDomElement createRectEntry(TQDomDocument &doc, const TQString &tagName, const TQRect &rect) { - QDomElement el = doc.createElement(tagName); + TQDomElement el = doc.createElement(tagName); - QDomElement xel = doc.createElement("x"); - xel.appendChild(doc.createTextNode(QString::number(rect.x()))); + TQDomElement xel = doc.createElement("x"); + xel.appendChild(doc.createTextNode(TQString::number(rect.x()))); el.appendChild(xel); - QDomElement yel = doc.createElement("y"); - yel.appendChild(doc.createTextNode(QString::number(rect.y()))); + TQDomElement yel = doc.createElement("y"); + yel.appendChild(doc.createTextNode(TQString::number(rect.y()))); el.appendChild(yel); - QDomElement wel = doc.createElement("width"); - wel.appendChild(doc.createTextNode(QString::number(rect.width()))); + TQDomElement wel = doc.createElement("width"); + wel.appendChild(doc.createTextNode(TQString::number(rect.width()))); el.appendChild(wel); - QDomElement hel = doc.createElement("height"); - hel.appendChild(doc.createTextNode(QString::number(rect.height()))); + TQDomElement hel = doc.createElement("height"); + hel.appendChild(doc.createTextNode(TQString::number(rect.height()))); el.appendChild(hel); return el; } -static QDomElement createListEntry(QDomDocument &doc, const QString &tagName, - const QString &subTagName, const QStrList &list) +static TQDomElement createListEntry(TQDomDocument &doc, const TQString &tagName, + const TQString &subTagName, const TQStrList &list) { - QDomElement el = doc.createElement(tagName); + TQDomElement el = doc.createElement(tagName); - QStrListIterator it(list); + TQStrListIterator it(list); for (; it.current(); ++it) { - QDomElement subel = doc.createElement(subTagName); - subel.appendChild(doc.createTextNode(QString::fromLatin1(it.current()))); + TQDomElement subel = doc.createElement(subTagName); + subel.appendChild(doc.createTextNode(TQString::fromLatin1(it.current()))); el.appendChild(subel); } @@ -2096,44 +2096,44 @@ static QDomElement createListEntry(QDomDocument &doc, const QString &tagName, } -static QString stringEntry(QDomElement &base, const QString &tagName) +static TQString stringEntry(TQDomElement &base, const TQString &tagName) { return base.namedItem(tagName).firstChild().toText().data(); } -static bool boolEntry(QDomElement &base, const QString &tagName) +static bool boolEntry(TQDomElement &base, const TQString &tagName) { return base.namedItem(tagName).firstChild().toText().data() == "true"; } -static int numberEntry(QDomElement &base, const QString &tagName) +static int numberEntry(TQDomElement &base, const TQString &tagName) { return stringEntry(base, tagName).toInt(); } -static QRect rectEntry(QDomElement &base, const QString &tagName) +static TQRect rectEntry(TQDomElement &base, const TQString &tagName) { - QDomElement el = base.namedItem(tagName).toElement(); + TQDomElement 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); + return TQRect(x, y, width, height); } -static QStrList listEntry(QDomElement &base, const QString &tagName, const QString &subTagName) +static TQStrList listEntry(TQDomElement &base, const TQString &tagName, const TQString &subTagName) { - QStrList list; + TQStrList list; - for( QDomNode n = base.namedItem(tagName).firstChild(); !n.isNull(); n = n.nextSibling() ) + for( TQDomNode n = base.namedItem(tagName).firstChild(); !n.isNull(); n = n.nextSibling() ) { - QDomElement subel = n.toElement(); + TQDomElement subel = n.toElement(); if (subel.tagName() == subTagName) list.append(subel.firstChild().toText().data().latin1()); } @@ -2142,28 +2142,28 @@ static QStrList listEntry(QDomElement &base, const QString &tagName, const QStri } -void KDockManager::writeConfig(QDomElement &base) +void KDockManager::writeConfig(TQDomElement &base) { // First of all, clear the tree under base while (!base.firstChild().isNull()) base.removeChild(base.firstChild()); - QDomDocument doc = base.ownerDocument(); + TQDomDocument doc = base.ownerDocument(); - QStrList nameList; - QString mainWidgetStr; + TQStrList nameList; + TQString mainWidgetStr; // collect widget names - QStringList nList; - QObjectListIt it(*childDock); + TQStringList nList; + TQObjectListIt it(*childDock); KDockWidget *obj1; while ( (obj1=(KDockWidget*)it.current()) ) { if ( obj1->parent() == main ) - mainWidgetStr = QString::fromLatin1(obj1->name()); + mainWidgetStr = TQString::fromLatin1(obj1->name()); nList.append(obj1->name()); ++it; } - for (QObjectListIt it(d->containerDocks);it.current();++it) + for (TQObjectListIt it(d->containerDocks);it.current();++it) { KDockContainer* dc = dynamic_cast(((KDockWidget*)it.current())->widget); if (dc) { @@ -2171,7 +2171,7 @@ void KDockManager::writeConfig(QDomElement &base) } } - QStringList::Iterator nListIt=nList.begin(); + TQStringList::Iterator nListIt=nList.begin(); while ( nListIt!=nList.end() ) { KDockWidget *obj = getDockWidgetFromName( *nListIt); if ((obj->isGroup && (!obj->d->isContainer)) && (nameList.find( obj->firstName.latin1() ) == -1 @@ -2183,7 +2183,7 @@ void KDockManager::writeConfig(QDomElement &base) continue; } - QDomElement groupEl; + TQDomElement groupEl; if (obj->d->isContainer) { KDockContainer* x = dynamic_cast(obj->widget); if (x) { @@ -2203,7 +2203,7 @@ void KDockManager::writeConfig(QDomElement &base) //// Save a tab group groupEl = doc.createElement("tabGroup"); - QStrList list; + TQStrList 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)); @@ -2223,10 +2223,10 @@ void KDockManager::writeConfig(QDomElement &base) } } - groupEl.appendChild(createStringEntry(doc, "name", QString::fromLatin1(obj->name()))); + groupEl.appendChild(createStringEntry(doc, "name", TQString::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(createRectEntry(doc, "geometry", TQRect(main->frameGeometry().topLeft(), main->size()))); groupEl.appendChild(createBoolEntry(doc, "visible", obj->isVisible())); } if (obj->header && obj->header->inherits("KDockWidgetHeader")) { @@ -2242,19 +2242,19 @@ void KDockManager::writeConfig(QDomElement &base) if (main->inherits("KDockMainWindow")) { KDockMainWindow *dmain = (KDockMainWindow*)main; - QString centralWidgetStr = QString(dmain->centralWidget()? dmain->centralWidget()->name() : ""); + TQString centralWidgetStr = TQString(dmain->centralWidget()? dmain->centralWidget()->name() : ""); base.appendChild(createStringEntry(doc, "centralWidget", centralWidgetStr)); - QString mainDockWidgetStr = QString(dmain->getMainDockWidget()? dmain->getMainDockWidget()->name() : ""); + TQString mainDockWidgetStr = TQString(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()))); + base.appendChild(createRectEntry(doc, "geometry", TQRect(main->frameGeometry().topLeft(), main->size()))); } -void KDockManager::readConfig(QDomElement &base) +void KDockManager::readConfig(TQDomElement &base) { if (base.namedItem("group").isNull() && base.namedItem("tabgroup").isNull() @@ -2264,13 +2264,13 @@ void KDockManager::readConfig(QDomElement &base) return; } - autoCreateDock = new QObjectList(); + autoCreateDock = new TQObjectList(); autoCreateDock->setAutoDelete( true ); bool isMainVisible = main->isVisible(); main->hide(); - QObjectListIt it(*childDock); + TQObjectListIt it(*childDock); KDockWidget *obj1; while ( (obj1=(KDockWidget*)it.current()) ) { if ( !obj1->isGroup && !obj1->isTabGroup ) { @@ -2283,9 +2283,9 @@ void KDockManager::readConfig(QDomElement &base) } // firstly, recreate all common dockwidgets - for( QDomNode n = base.firstChild(); !n.isNull(); n = n.nextSibling() ) + for( TQDomNode n = base.firstChild(); !n.isNull(); n = n.nextSibling() ) { - QDomElement childEl = n.toElement(); + TQDomElement childEl = n.toElement(); if (childEl.tagName() != "dock") continue; // Read an ordinary dock widget @@ -2294,12 +2294,12 @@ void KDockManager::readConfig(QDomElement &base) obj->setToolTipString(stringEntry(childEl, "tabToolTip")); if (!boolEntry(childEl, "hasParent")) { - QRect r = rectEntry(childEl, "geometry"); + TQRect r = rectEntry(childEl, "geometry"); obj = getDockWidgetFromName(stringEntry(childEl, "name")); obj->applyToWidget(0); obj->setGeometry(r); if (boolEntry(childEl, "visible")) - obj->QWidget::show(); + obj->TQWidget::show(); } if (obj && obj->header && obj->header->inherits("KDockWidgetHeader")) { @@ -2309,9 +2309,9 @@ void KDockManager::readConfig(QDomElement &base) } // 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() ) + for( TQDomNode n = base.firstChild(); !n.isNull(); n = n.nextSibling() ) { - QDomElement childEl = n.toElement(); + TQDomElement childEl = n.toElement(); if (childEl.isNull()) continue; KDockWidget *obj = 0; @@ -2335,9 +2335,9 @@ void KDockManager::readConfig(QDomElement &base) else if (childEl.tagName() == "splitGroup") { // Read a group - QString name = stringEntry(childEl, "name"); - QString firstName = stringEntry(childEl, "firstName"); - QString secondName = stringEntry(childEl, "secondName"); + TQString name = stringEntry(childEl, "name"); + TQString firstName = stringEntry(childEl, "firstName"); + TQString secondName = stringEntry(childEl, "secondName"); int orientation = numberEntry(childEl, "orientation"); int separatorPos = numberEntry(childEl, "separatorPos"); @@ -2352,8 +2352,8 @@ void KDockManager::readConfig(QDomElement &base) } } else if (childEl.tagName() == "tabGroup") { // Read a tab group - QString name = stringEntry(childEl, "name"); - QStrList list = listEntry(childEl, "tabs", "tab"); + TQString name = stringEntry(childEl, "name"); + TQStrList list = listEntry(childEl, "tabs", "tab"); KDockWidget *d1 = getDockWidgetFromName( list.first() ); list.next(); @@ -2378,12 +2378,12 @@ void KDockManager::readConfig(QDomElement &base) } if (!boolEntry(childEl, "hasParent")) { - QRect r = rectEntry(childEl, "geometry"); + TQRect r = rectEntry(childEl, "geometry"); obj = getDockWidgetFromName(stringEntry(childEl, "name")); obj->applyToWidget(0); obj->setGeometry(r); if (boolEntry(childEl, "visible")) - obj->QWidget::show(); + obj->TQWidget::show(); } if (obj && obj->header && obj->header->inherits("KDockWidgetHeader")) { @@ -2394,9 +2394,9 @@ void KDockManager::readConfig(QDomElement &base) // 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() ) + for( TQDomNode n = base.firstChild(); !n.isNull(); n = n.nextSibling() ) { - QDomElement childEl = n.toElement(); + TQDomElement childEl = n.toElement(); if (childEl.tagName() != "dock" && childEl.tagName() != "tabGroup") continue; @@ -2406,7 +2406,7 @@ void KDockManager::readConfig(QDomElement &base) if (!boolEntry(childEl, "hasParent")) { // Read a common toplevel dock widget obj = getDockWidgetFromName(stringEntry(childEl, "name")); - QString name = stringEntry(childEl, "dockBackTo"); + TQString name = stringEntry(childEl, "dockBackTo"); if (!name.isEmpty()) { obj->setFormerBrotherDockWidget(getDockWidgetFromName(name)); } @@ -2418,20 +2418,20 @@ void KDockManager::readConfig(QDomElement &base) if (main->inherits("KDockMainWindow")) { KDockMainWindow *dmain = (KDockMainWindow*)main; - QString mv = stringEntry(base, "centralWidget"); + TQString 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"); + TQString md = stringEntry(base, "mainDockWidget"); if (!md.isEmpty() && getDockWidgetFromName(md)) { KDockWidget *mvd = getDockWidgetFromName(md); dmain->setMainDockWidget(mvd); } } else { - QString mv = stringEntry(base, "mainWidget"); + TQString mv = stringEntry(base, "mainWidget"); if (!mv.isEmpty() && getDockWidgetFromName(mv)) { KDockWidget *mvd = getDockWidgetFromName(mv); mvd->applyToWidget(main); @@ -2439,7 +2439,7 @@ void KDockManager::readConfig(QDomElement &base) } // only resize + move non-mainwindows - QRect mr = rectEntry(base, "geometry"); + TQRect mr = rectEntry(base, "geometry"); main->move(mr.topLeft()); main->resize(mr.size()); } @@ -2472,7 +2472,7 @@ void KDockManager::setReadDockConfigMode(int mode) } #ifndef NO_KDE2 -void KDockManager::writeConfig( KConfig* c, QString group ) +void KDockManager::writeConfig( KConfig* c, TQString group ) { //debug("BEGIN Write Config"); if ( !c ) c = KGlobal::config(); @@ -2481,13 +2481,13 @@ void KDockManager::writeConfig( KConfig* c, QString group ) c->setGroup( group ); c->writeEntry( "Version", DOCK_CONFIG_VERSION ); - QStringList nameList; - QStringList findList; - QObjectListIt it( *childDock ); + TQStringList nameList; + TQStringList findList; + TQObjectListIt it( *childDock ); KDockWidget * obj; // collect KDockWidget's name - QStringList nList; + TQStringList nList; while ( (obj=(KDockWidget*)it.current()) ) { ++it; //debug(" +Add subdock %s", obj->name()); @@ -2496,21 +2496,21 @@ void KDockManager::writeConfig( KConfig* c, QString group ) c->writeEntry( "Main:view", obj->name() ); } -// kdDebug(282)<containerDocks);it.current();++it) +// kdDebug(282)<containerDocks);it.current();++it) { KDockContainer* dc = dynamic_cast(((KDockWidget*)it.current())->widget); if (dc) { dc->prepareSave(nList); } } -// kdDebug(282)<name(); + TQString cname = obj->name(); if ( obj->header ){ obj->header->saveConfig( c ); } @@ -2527,7 +2527,7 @@ void KDockManager::writeConfig( KConfig* c, QString group ) 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+":geometry", TQRect(obj->frameGeometry().topLeft(), obj->size()) ); c->writeEntry( cname+":visible", obj->isVisible()); } else { c->writeEntry( cname+":parent", "yes"); @@ -2559,14 +2559,14 @@ void KDockManager::writeConfig( KConfig* c, QString group ) 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+":geometry", TQRect(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; + TQStrList list; for ( int i = 0; i < ((KDockTabGroup*)obj->widget)->count(); ++i ) list.append( ((KDockTabGroup*)obj->widget)->page( i )->name() ); c->writeEntry( cname+":tabNames", list ); @@ -2583,7 +2583,7 @@ void KDockManager::writeConfig( KConfig* c, QString group ) 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+":geometry", TQRect(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); @@ -2600,7 +2600,7 @@ void KDockManager::writeConfig( KConfig* c, QString group ) } c->writeEntry( "NameList", nameList ); - c->writeEntry( "Main:Geometry", QRect(main->frameGeometry().topLeft(), main->size()) ); + c->writeEntry( "Main:Geometry", TQRect(main->frameGeometry().topLeft(), main->size()) ); c->writeEntry( "Main:visible", main->isVisible()); // curently nou use if ( main->inherits("KDockMainWindow") ){ @@ -2613,31 +2613,31 @@ void KDockManager::writeConfig( KConfig* c, QString group ) c->sync(); //debug("END Write Config"); } -#include -void KDockManager::readConfig( KConfig* c, QString group ) +#include +void KDockManager::readConfig( KConfig* c, TQString group ) { if ( !c ) c = KGlobal::config(); if ( group.isEmpty() ) group = "dock_setting_default"; c->setGroup( group ); - QStrList nameList; + TQStrList nameList; c->readListEntry( "NameList", nameList ); - QString ver = c->readEntry( "Version", "0.0.1" ); + TQString ver = c->readEntry( "Version", "0.0.1" ); nameList.first(); if ( !nameList.current() || ver != DOCK_CONFIG_VERSION ){ activate(); return; } - autoCreateDock = new QObjectList(); + autoCreateDock = new TQObjectList(); autoCreateDock->setAutoDelete( true ); bool isMainVisible = main->isVisible(); // if (isMainVisible) // CCC - //QMessageBox::information(0,"","hallo"); + //TQMessageBox::information(0,"","hallo"); //COMMENTED4TESTING main->hide(); - QObjectListIt it( *childDock ); + TQObjectListIt it( *childDock ); KDockWidget * obj; while ( (obj=(KDockWidget*)it.current()) ){ @@ -2652,13 +2652,13 @@ void KDockManager::readConfig( KConfig* c, QString group ) // they must be restored before e.g. tabgroups are restored nameList.first(); while ( nameList.current() ){ - QString oname = nameList.current(); + TQString oname = nameList.current(); c->setGroup( group ); - QString type = c->readEntry( oname + ":type" ); + TQString type = c->readEntry( oname + ":type" ); obj = 0L; if ( type == "NULL_DOCK" || c->readEntry( oname + ":parent") == "___null___" ){ - QRect r = c->readRectEntry( oname + ":geometry" ); + TQRect r = c->readRectEntry( oname + ":geometry" ); obj = getDockWidgetFromName( oname ); obj->applyToWidget( 0L ); obj->setGeometry(r); @@ -2667,7 +2667,7 @@ void KDockManager::readConfig( KConfig* c, QString group ) obj->setTabPageLabel(c->readEntry( oname + ":tabCaption" )); obj->setToolTipString(c->readEntry( oname + ":tabToolTip" )); if ( c->readBoolEntry( oname + ":visible" ) ){ - obj->QWidget::show(); + obj->TQWidget::show(); } } @@ -2690,9 +2690,9 @@ void KDockManager::readConfig( KConfig* c, QString group ) // secondly, after the common dockwidgets, restore the groups and tabgroups nameList.first(); while ( nameList.current() ){ - QString oname = nameList.current(); + TQString oname = nameList.current(); c->setGroup( group ); - QString type = c->readEntry( oname + ":type" ); + TQString type = c->readEntry( oname + ":type" ); obj = 0L; if ( type == "GROUP" ){ @@ -2710,7 +2710,7 @@ void KDockManager::readConfig( KConfig* c, QString group ) } if ( type == "TAB_GROUP" ){ - QStrList list; + TQStrList list; KDockWidget* tabDockGroup = 0L; c->readListEntry( oname+":tabNames", list ); KDockWidget* d1 = getDockWidgetFromName( list.first() ); @@ -2746,15 +2746,15 @@ void KDockManager::readConfig( KConfig* c, QString group ) // 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(); + TQString oname = nameList.current(); c->setGroup( group ); - QString type = c->readEntry( oname + ":type" ); + TQString 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" ); + TQString name = c->readEntry( oname + ":dockBackTo" ); if (!name.isEmpty()) { obj->setFormerBrotherDockWidget(getDockWidgetFromName( name )); } @@ -2768,7 +2768,7 @@ void KDockManager::readConfig( KConfig* c, QString group ) KDockMainWindow* dmain = (KDockMainWindow*)main; c->setGroup( group ); - QString mv = c->readEntry( "Main:view" ); + TQString mv = c->readEntry( "Main:view" ); if ( !mv.isEmpty() && getDockWidgetFromName( mv ) ){ KDockWidget* mvd = getDockWidgetFromName( mv ); mvd->applyToWidget( dmain ); @@ -2776,14 +2776,14 @@ void KDockManager::readConfig( KConfig* c, QString group ) dmain->setView( mvd ); } c->setGroup( group ); - QString md = c->readEntry( "Main:dock" ); + TQString 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" ); + TQString mv = c->readEntry( "Main:view" ); if ( !mv.isEmpty() && getDockWidgetFromName( mv ) ){ KDockWidget* mvd = getDockWidgetFromName( mv ); mvd->applyToWidget( main ); @@ -2798,7 +2798,7 @@ void KDockManager::readConfig( KConfig* c, QString group ) } c->setGroup( group ); - QRect mr = c->readRectEntry("Main:Geometry"); + TQRect mr = c->readRectEntry("Main:Geometry"); main->move(mr.topLeft()); main->resize(mr.size()); if ( isMainVisible ) main->show(); @@ -2807,7 +2807,7 @@ void KDockManager::readConfig( KConfig* c, QString group ) void KDockManager::dumpDockWidgets() { - QObjectListIt it( *childDock ); + TQObjectListIt it( *childDock ); KDockWidget * obj; while ( (obj=(KDockWidget*)it.current()) ) { ++it; @@ -2816,19 +2816,19 @@ void KDockManager::dumpDockWidgets() { } -KDockWidget* KDockManager::getDockWidgetFromName( const QString& dockName ) +KDockWidget* KDockManager::getDockWidgetFromName( const TQString& dockName ) { - QObjectListIt it( *childDock ); + TQObjectListIt it( *childDock ); KDockWidget * obj; while ( (obj=(KDockWidget*)it.current()) ) { ++it; - if ( QString(obj->name()) == dockName ) return obj; + if ( TQString(obj->name()) == dockName ) return obj; } KDockWidget* autoCreate = 0L; if ( autoCreateDock ){ kdDebug(282)<<"Autocreating dock: "<append( autoCreate ); } return autoCreate; @@ -2868,20 +2868,20 @@ void KDockManager::slotMenuPopup() menu->clear(); menuData->clear(); - QObjectListIt it( *childDock ); + TQObjectListIt 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++ ); + menu->insertItem( obj->icon() ? *(obj->icon()) : TQPixmap(), 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++ ); + menu->insertItem( obj->icon() ? *(obj->icon()) : TQPixmap(), i18n("Show %1").arg(obj->caption()), numerator++ ); menuData->append( new MenuDockData( obj, false ) ); } } @@ -2893,9 +2893,9 @@ void KDockManager::slotMenuActivated( int id ) data->dock->changeHideShowState(); } -KDockWidget* KDockManager::findWidgetParentDock( QWidget* w ) const +KDockWidget* KDockManager::findWidgetParentDock( TQWidget* w ) const { - QObjectListIt it( *childDock ); + TQObjectListIt it( *childDock ); KDockWidget * dock; KDockWidget * found = 0L; @@ -2915,7 +2915,7 @@ void KDockManager::drawDragRectangle() return; int i; - QRect oldAndNewDragRect[2]; + TQRect oldAndNewDragRect[2]; oldAndNewDragRect[0] = d->oldDragRect; oldAndNewDragRect[1] = d->dragRect; @@ -2924,7 +2924,7 @@ void KDockManager::drawDragRectangle() if (oldAndNewDragRect[i].isEmpty()) continue; - KDockWidget* pDockWdgAtRect = (KDockWidget*) QApplication::widgetAt( oldAndNewDragRect[i].topLeft(), true ); + KDockWidget* pDockWdgAtRect = (KDockWidget*) TQApplication::widgetAt( oldAndNewDragRect[i].topLeft(), true ); if (!pDockWdgAtRect) continue; @@ -2932,7 +2932,7 @@ void KDockManager::drawDragRectangle() bool unclipped; KDockMainWindow* pMain = 0L; KDockWidget* pTLDockWdg = 0L; - QWidget* topWdg; + TQWidget* topWdg; if (pDockWdgAtRect->topLevelWidget() == main) { isOverMainWdg = true; topWdg = pMain = (KDockMainWindow*) main; @@ -2946,7 +2946,7 @@ void KDockManager::drawDragRectangle() } // draw the rectangle unclipped over the main dock window - QPainter p; + TQPainter p; p.begin( topWdg ); if ( !unclipped ) { if (isOverMainWdg) @@ -2956,8 +2956,8 @@ void KDockManager::drawDragRectangle() } // draw the rectangle p.setRasterOp(Qt::NotXorROP); - QRect r = oldAndNewDragRect[i]; - r.moveTopLeft( r.topLeft() - topWdg->mapToGlobal(QPoint(0,0)) ); + TQRect r = oldAndNewDragRect[i]; + r.moveTopLeft( r.topLeft() - topWdg->mapToGlobal(TQPoint(0,0)) ); p.drawRect(r.x(), r.y(), r.width(), r.height()); p.end(); } @@ -2984,10 +2984,10 @@ void KDockManager::setSpecialBottomDockContainer(KDockWidget* container) { } -KDockArea::KDockArea( QWidget* parent, const char *name) -:QWidget( parent, name) +KDockArea::KDockArea( TQWidget* parent, const char *name) +:TQWidget( parent, name) { - QString new_name = QString(name) + QString("_DockManager"); + TQString new_name = TQString(name) + TQString("_DockManager"); dockManager = new KDockManager( this, new_name.latin1() ); mainDockWidget = 0L; } @@ -2997,7 +2997,7 @@ KDockArea::~KDockArea() delete dockManager; } -KDockWidget* KDockArea::createDockWidget( const QString& name, const QPixmap &pixmap, QWidget* parent, const QString& strCaption, const QString& strTabPageLabel) +KDockWidget* KDockArea::createDockWidget( const TQString& name, const TQPixmap &pixmap, TQWidget* parent, const TQString& strCaption, const TQString& strTabPageLabel) { return new KDockWidget( dockManager, name.latin1(), pixmap, parent, strCaption, strTabPageLabel ); } @@ -3014,44 +3014,44 @@ void KDockArea::makeDockInvisible( KDockWidget* dock ) dock->undock(); } -void KDockArea::makeWidgetDockVisible( QWidget* widget ) +void KDockArea::makeWidgetDockVisible( TQWidget* widget ) { makeDockVisible( dockManager->findWidgetParentDock(widget) ); } -void KDockArea::writeDockConfig(QDomElement &base) +void KDockArea::writeDockConfig(TQDomElement &base) { dockManager->writeConfig(base); } -void KDockArea::readDockConfig(QDomElement &base) +void KDockArea::readDockConfig(TQDomElement &base) { dockManager->readConfig(base); } void KDockArea::slotDockWidgetUndocked() { - QObject* pSender = (QObject*) sender(); + TQObject* pSender = (TQObject*) sender(); if (!pSender->inherits("KDockWidget")) return; KDockWidget* pDW = (KDockWidget*) pSender; emit dockWidgetHasUndocked( pDW); } -void KDockArea::resizeEvent(QResizeEvent *rsize) +void KDockArea::resizeEvent(TQResizeEvent *rsize) { - QWidget::resizeEvent(rsize); + TQWidget::resizeEvent(rsize); if (children()){ #ifndef NO_KDE2 // kdDebug(282)<<"KDockArea::resize"<setGeometry(QRect(QPoint(0,0),size())); + ((TQWidget*)obj)->setGeometry(TQRect(TQPoint(0,0),size())); break; } delete list; @@ -3059,12 +3059,12 @@ void KDockArea::resizeEvent(QResizeEvent *rsize) KDockSplitter *split; // for (unsigned int i=0;icount();i++) { -// QPtrList list(children()); -// QObject *obj=((QPtrList)children())->at(i); - QObject *obj=children()->getFirst(); +// TQPtrList list(children()); +// TQObject *obj=((TQPtrList)children())->at(i); + TQObject *obj=children()->getFirst(); if (split = dynamic_cast(obj)) { - split->setGeometry( QRect(QPoint(0,0), size() )); + split->setGeometry( TQRect(TQPoint(0,0), size() )); // break; } } @@ -3073,12 +3073,12 @@ void KDockArea::resizeEvent(QResizeEvent *rsize) } #ifndef NO_KDE2 -void KDockArea::writeDockConfig( KConfig* c, QString group ) +void KDockArea::writeDockConfig( KConfig* c, TQString group ) { dockManager->writeConfig( c, group ); } -void KDockArea::readDockConfig( KConfig* c, QString group ) +void KDockArea::readDockConfig( KConfig* c, TQString group ) { dockManager->readConfig( c, group ); } @@ -3145,17 +3145,17 @@ bool KDockContainer::isOverlapMode() { } -bool KDockContainer::dockDragEnter(KDockWidget*, QMouseEvent *) { return false;} -bool KDockContainer::dockDragMove(KDockWidget*, QMouseEvent *) { return false;} -bool KDockContainer::dockDragLeave(KDockWidget*, QMouseEvent *) { return false;} +bool KDockContainer::dockDragEnter(KDockWidget*, TQMouseEvent *) { return false;} +bool KDockContainer::dockDragMove(KDockWidget*, TQMouseEvent *) { return false;} +bool KDockContainer::dockDragLeave(KDockWidget*, TQMouseEvent *) { return false;} KDockWidget *KDockContainer::parentDockWidget(){return 0;} -QStringList KDockContainer::containedWidgets() const { - QStringList tmp; +TQStringList KDockContainer::containedWidgets() const { + TQStringList tmp; for (struct ListItem *it=m_childrenListBegin;it;it=it->next) { - tmp<data); + tmp<data); } return tmp; @@ -3164,7 +3164,7 @@ QStringList KDockContainer::containedWidgets() const { void KDockContainer::showWidget(KDockWidget *) { } -void KDockContainer::insertWidget (KDockWidget *dw, QPixmap, const QString &, int &) +void KDockContainer::insertWidget (KDockWidget *dw, TQPixmap, const TQString &, int &) { struct ListItem *it=new struct ListItem; it->data=strdup(dw->name()); @@ -3201,13 +3201,13 @@ void KDockContainer::removeWidget (KDockWidget *dw){ //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) +void KDockContainer::setToolTip(KDockWidget *, TQString &){;} +void KDockContainer::setPixmap(KDockWidget*,const TQPixmap&){;} +void KDockContainer::load (KConfig*, const TQString&){;} +void KDockContainer::save (KConfig*, const TQString&){;} +void KDockContainer::load (TQDomElement&){;} +void KDockContainer::save (TQDomElement&){;} +void KDockContainer::prepareSave(TQStringList &names) { for (struct ListItem *tmp=m_childrenListBegin;tmp; tmp=tmp->next) @@ -3219,11 +3219,11 @@ void KDockContainer::prepareSave(QStringList &names) } -QWidget *KDockTabGroup::transientTo() { - QWidget *tT=0; +TQWidget *KDockTabGroup::transientTo() { + TQWidget *tT=0; for (int i=0;i(page(i)->qt_cast("KDockWidget")); - QWidget *tmp; + TQWidget *tmp; if ((tmp=dw->transientTo())) { if (!tT) tT=tmp; else { diff --git a/lib/compatibility/kmdi/qextmdi/kdockwidget.h b/lib/compatibility/kmdi/qextmdi/kdockwidget.h index 8858b9ba..849669ce 100644 --- a/lib/compatibility/kmdi/qextmdi/kdockwidget.h +++ b/lib/compatibility/kmdi/qextmdi/kdockwidget.h @@ -48,18 +48,18 @@ #define _KDOCKWIDGET_2_2_ -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #ifndef NO_KDE2 #include #include #else -#include +#include #include "exportdockclass.h" #include "dummykmainwindow.h" #endif @@ -221,7 +221,7 @@ protected: /** * Draws the drag panel (a double line) */ - virtual void paintEvent( QPaintEvent* ); + virtual void paintEvent( TQPaintEvent* ); protected: virtual void virtual_hook( int id, void* data ); @@ -326,7 +326,7 @@ protected: /** * A layout manager for placing the embedded buttons (close and stay) */ - QHBoxLayout* layout; + TQHBoxLayout* layout; /** * a little button for closing (undocking and hiding) the dockwidget @@ -357,7 +357,7 @@ private: /** * 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. + * In general it is like TQTabWidget 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). @@ -369,15 +369,15 @@ public: /** * Constructs this. It just calls the method of the base class. */ - KDockTabGroup( QWidget *parent = 0, const char *name = 0 ) - :QTabWidget( parent, name ){}; + KDockTabGroup( TQWidget *parent = 0, const char *name = 0 ) + :TQTabWidget( parent, name ){}; /** * Destructs a KDockTabGroup. */ virtual ~KDockTabGroup(){}; - QWidget *transientTo(); + TQWidget *transientTo(); protected: virtual void virtual_hook( int id, void* data ); private: @@ -411,7 +411,7 @@ private: * ... * KDockWidget* dock = 0L; * dock = mainWidget->createDockWidget( "Any window caption", nicePixmap, 0L, i18n("window caption")); // 0L==no parent - * QWidget* actualWidget = new QWidget( dock); + * TQWidget* actualWidget = new TQWidget( dock); * dock->setWidget( actualWidget); // embed it * dock->setToolTipString(i18n("That's me")); // available when appearing as tab page * ... @@ -447,8 +447,8 @@ public: * @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); + const TQPixmap &pixmap, TQWidget* parent = 0L, const TQString& strCaption = TQString::null, + const TQString& strTabPageLabel = TQString::fromLatin1( " " ), WFlags f = 0); /** * Destructs a dockwidget. @@ -492,7 +492,7 @@ public: * @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); + KDockWidget* manualDock( KDockWidget* target, DockPosition dockPos, int spliPos = 50, TQPoint pos = TQPoint(0,0), bool check = false, int tabIndex = -1); /** * Specify where it is either possible or impossible for this to dock to another dockwidget. @@ -521,23 +521,23 @@ public: /** * Sets the embedded widget. * - * A QLayout takes care about proper resizing, automatically. + * A TQLayout takes care about proper resizing, automatically. * * @param w The pointer to the dockwidget's child widget. */ - void setWidget( QWidget* w); + void setWidget( TQWidget* 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; }; + TQWidget* getWidget() const { return widget; }; /** * Sets the header of this dockwidget. * - * A QLayout takes care about proper resizing, automatically. + * A TQLayout 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 @@ -591,12 +591,12 @@ public: * * @param ttStr A string for the tooltip on the tab. */ - void setToolTipString(const QString& ttStr) { toolTipStr = ttStr; }; + void setToolTipString(const TQString& 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; }; + const TQString& toolTipString() const { return toolTipStr; }; /** * @return result @p true, if a dockback is possible, otherwise @p false. @@ -607,20 +607,20 @@ public: * 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; }; + void setTabPageLabel( const TQString& 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; }; + const TQString& tabPageLabel() const { return tabPageTitle; }; /** - * Catches and processes some QWidget events that are interesting for dockwidgets. + * Catches and processes some TQWidget events that are interesting for dockwidgets. */ - virtual bool event( QEvent * ); + virtual bool event( TQEvent * ); /** - * Add dockwidget management actions to QWidget::show. + * Add dockwidget management actions to TQWidget::show. */ virtual void show(); /** @@ -629,7 +629,7 @@ public: KDockTabGroup* parentDockTabGroup() const; /// @since 3.1 - QWidget *parentDockContainer() const; + TQWidget *parentDockContainer() const; #ifndef NO_KDE2 @@ -642,13 +642,13 @@ public: #endif - void setDockWindowTransient (QWidget *parent, bool transientEnabled); + void setDockWindowTransient (TQWidget *parent, bool transientEnabled); /** * Returns the widget this dockwidget is set transient to, otherwise 0 * @since 3.2 */ - QWidget *transientTo(); + TQWidget *transientTo(); /** * Lookup the nearest dockwidget docked left/right/top/bottom to this one or return 0 @@ -664,14 +664,14 @@ public: * @param pixmap is the pixmap to set * @since 3.2 */ - void setPixmap(const QPixmap& pixmap=QPixmap()); + void setPixmap(const TQPixmap& pixmap=TQPixmap()); /** * Returns the dockwidget's associated caption/dock tab pixmap * * @since 3.2 */ - const QPixmap& pixmap() const; + const TQPixmap& pixmap() const; /** * @return the current dock position. @@ -739,9 +739,9 @@ protected: void updateHeader(); /// @since 3.1 - void setLatestKDockContainer(QWidget *); + void setLatestKDockContainer(TQWidget *); /// @since 3.1 - QWidget *latestKDockContainer(); + TQWidget *latestKDockContainer(); /// @since 3.2 void setFormerBrotherDockWidget(KDockWidget *); @@ -751,7 +751,7 @@ signals: *@since 3.2 *is emitted after the setWidget method has finished */ - void widgetSet(QWidget*); + void widgetSet(TQWidget*); /** * Emitted when another dock widget is docking to this. @@ -793,12 +793,12 @@ protected slots: */ void loseFormerBrotherDockWidget(); - virtual void paintEvent(QPaintEvent*); + virtual void paintEvent(TQPaintEvent*); - virtual void mousePressEvent(QMouseEvent*); - virtual void mouseReleaseEvent(QMouseEvent*); - virtual void mouseMoveEvent(QMouseEvent*); - virtual void leaveEvent(QEvent*); + virtual void mousePressEvent(TQMouseEvent*); + virtual void mouseReleaseEvent(TQMouseEvent*); + virtual void mouseMoveEvent(TQMouseEvent*); + virtual void leaveEvent(TQEvent*); protected: friend class KDockWidgetHeader; /** @@ -816,11 +816,11 @@ protected: /** * a string used as tooltip for the tab page header when in dock-centered mode. */ - QString toolTipStr; + TQString toolTipStr; /** * a string used as title of the tab page when in tab page mode */ - QString tabPageTitle; + TQString tabPageTitle; private: /** @@ -837,7 +837,7 @@ private: * @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) ); + void applyToWidget( TQWidget* s, const TQPoint& p = TQPoint(0,0) ); /** * A base class pointer to the header of this dockwidget @@ -847,12 +847,12 @@ private: /** * the embedded widget */ - QWidget* widget; + TQWidget* widget; /** * the layout manager that takes care about proper resizing and moving the embedded widget and the header */ - QVBoxLayout* layout; + TQVBoxLayout* layout; /** * the responsible dockmanager @@ -862,7 +862,7 @@ private: /** * an icon for the tab widget header */ - QPixmap* pix; + TQPixmap* pix; /** * Information about the ability for docking to another dockwidget. @@ -880,8 +880,8 @@ private: KDockWidget::DockPosition prevSideDockPosBeforeDrag; // GROUP data - QString firstName; - QString lastName; + TQString firstName; + TQString lastName; Orientation splitterOrientation; bool isGroup; bool isTabGroup; @@ -927,7 +927,7 @@ public: * @param mainWindow the main window controlled by this * @param name the internal QOject name */ - KDockManager( QWidget* mainWindow, const char* name = 0L ); + KDockManager( TQWidget* mainWindow, const char* name = 0L ); /** * Destructs a dockmanager. @@ -946,14 +946,14 @@ public: * @param c the KDE configuration saver * @param group the name of the section in KConfig */ - void writeConfig( KConfig* c = 0L, QString group = QString::null ); + void writeConfig( KConfig* c = 0L, TQString group = TQString::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 + * (TQObject::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, @@ -964,7 +964,7 @@ public: * @param c the KDE configuration saver * @param group the name of the section in KConfig */ - void readConfig ( KConfig* c = 0L, QString group = QString::null ); + void readConfig ( KConfig* c = 0L, TQString group = TQString::null ); #endif /// @since 3.1 @@ -973,11 +973,11 @@ public: /** * Saves the current dock window layout into a DOM tree below the given element. */ - void writeConfig(QDomElement &base); + void writeConfig(TQDomElement &base); /** * Reads the current dock window layout from a DOM tree below the given element. */ - void readConfig(QDomElement &base); + void readConfig(TQDomElement &base); /** * Shows all encapsulated widgets of all controlled dockwidgets and shows all dockwidgets which are @@ -993,7 +993,7 @@ public: * @param event the event * @return the return value of the method call of the base class method */ - virtual bool eventFilter( QObject * object, QEvent * event ); + virtual bool eventFilter( TQObject * object, TQEvent * event ); /** * This method finds out what a widgets' dockwidget is. That means the dockmanager has a look at all @@ -1002,25 +1002,25 @@ public: * @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; + KDockWidget* findWidgetParentDock( TQWidget* 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(); } + void makeWidgetDockVisible( TQWidget* w ){ findWidgetParentDock(w)->makeDockVisible(); } /** * @return the popupmenu for showing/hiding dockwidgets */ - QPopupMenu* dockHideShowMenu() const { return menu; } + TQPopupMenu* dockHideShowMenu() const { return menu; } /** - * @param dockName an internal QObject name - * @return the dockwidget that has got that internal QObject name + * @param dockName an internal TQObject name + * @return the dockwidget that has got that internal TQObject name */ - KDockWidget* getDockWidgetFromName( const QString& dockName ); + KDockWidget* getDockWidgetFromName( const TQString& dockName ); /** * Enables opaque resizing. Opaque resizing defaults to KGlobalSettings::opaqueResize(). @@ -1035,7 +1035,7 @@ public: /** * Try to preserve the widget's size. Works like KeepSize resize mode - * of QSplitter. Off by default. + * of TQSplitter. Off by default. * Call this method before you create any dock widgets! */ void setSplitterKeepSize(bool b=true); @@ -1131,16 +1131,16 @@ private: * @param pos global (desktop) position of the wanted dockwidget * @return the dockwidget at that position */ - KDockWidget* findDockWidgetAt( const QPoint& pos ); + KDockWidget* findDockWidgetAt( const TQPoint& pos ); /** - * Finds the QWidget recursively at the position given as parameter + * Finds the TQWidget 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 w a variable where the method puts the TQWidget 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 ); + void findChildDockWidget( TQWidget*& w, const TQWidget* p, const TQPoint& pos ); /** * Finds all dockwidgets which are child, grandchild and so on of p. @@ -1148,7 +1148,7 @@ private: * @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); + void findChildDockWidget( const TQWidget* p, TQWidgetList*& l); /** * Sets a dockwidget in drag mode. @@ -1161,7 +1161,7 @@ private: * @param d the dockwidget which is dragged * @param pos the new position of the dragged dockwidget */ - void dragMove( KDockWidget* d, QPoint pos ); + void dragMove( KDockWidget* d, TQPoint pos ); /** * Aborts the drag mode. Restores the cursor and hides the drag indicator. @@ -1179,7 +1179,7 @@ private: /** * Usually the KDockMainWindow but not necessarily. */ - QWidget* main; + TQWidget* main; /** * The dockwidget that is being dragged at the moment @@ -1194,7 +1194,7 @@ private: /** * It is of interest during the dock process. Then it contains all child dockwidgets. */ - QWidgetList* childDockWidgetList; + TQWidgetList* childDockWidgetList; /** * The dockposition where the dockwidget would be docked to, if we dropped it here. @@ -1205,12 +1205,12 @@ private: * A QList of all objects that are important for docking. * Some serve as group widgets of dockwidgets, others encapsulate normal widgets. */ - QObjectList* childDock; + TQObjectList* childDock; /** * Contains dockwidgets that are created automatically by the dockmanager. For internal use. */ - QObjectList* autoCreateDock; + TQObjectList* autoCreateDock; /** * For storing the width during the dragging of a dockwidget. @@ -1242,12 +1242,12 @@ private: * 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; + TQPopupMenu* menu; /** * An internal list containing data for the menuitems for the visibility popup menu. */ - QPtrList *menuData; + TQPtrList *menuData; protected: virtual void virtual_hook( int id, void* data ); @@ -1319,7 +1319,7 @@ public: * @param name internal object name * @param f Qt::WidgetFlags widget flags */ - KDockMainWindow( QWidget* parent = 0L, const char *name = 0L, WFlags f = WType_TopLevel | WDestructiveClose ); + KDockMainWindow( TQWidget* parent = 0L, const char *name = 0L, WFlags f = WType_TopLevel | WDestructiveClose ); /** * Destructs a dockmainwindow. @@ -1352,24 +1352,24 @@ public: * 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 name TQObject 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( " " ) ); + KDockWidget* createDockWidget( const TQString& name, const TQPixmap &pixmap, TQWidget* parent = 0L, + const TQString& strCaption = TQString::null, const TQString& strTabPageLabel = TQString::fromLatin1( " " ) ); /** * Saves the current dock window layout into a DOM tree below the given element. */ - void writeDockConfig(QDomElement &base); + void writeDockConfig(TQDomElement &base); /** * Reads the current dock window layout from a DOM tree below the given element. */ - void readDockConfig(QDomElement &base); + void readDockConfig(TQDomElement &base); #ifndef NO_KDE2 /** @@ -1378,7 +1378,7 @@ public: * @param c KDE class for saving configurations * @param group name of section to write to */ - void writeDockConfig( KConfig* c = 0L, QString group = QString::null ); + void writeDockConfig( KConfig* c = 0L, TQString group = TQString::null ); /** * It reads the current dock state from the given section of KConfig. @@ -1386,13 +1386,13 @@ public: * @param c KDE class for saving configurations * @param group name of section to read from */ - void readDockConfig ( KConfig* c = 0L, QString group = QString::null ); + void readDockConfig ( KConfig* c = 0L, TQString group = TQString::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. + * Additionally, if the main dockwidget is not a TQDialog, it will be shown. */ void activateDock(){ dockManager->activate(); } @@ -1402,7 +1402,7 @@ public: * * @return the wanted popup menu */ - QPopupMenu* dockHideShowMenu() const { return dockManager->dockHideShowMenu(); } + TQPopupMenu* dockHideShowMenu() const { return dockManager->dockHideShowMenu(); } /** * This method shows the given dockwidget. @@ -1424,7 +1424,7 @@ public: * 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 ); + void makeWidgetDockVisible( TQWidget* widget ); /** * This method calls the base class method. @@ -1432,7 +1432,7 @@ public: * * @param widget any widget that should become the main view */ - void setView( QWidget * widget ); + void setView( TQWidget * widget ); signals: /** @@ -1474,7 +1474,7 @@ friend class KDockManager; public: - KDockArea( QWidget* parent = 0L, const char *name = 0L); + KDockArea( TQWidget* parent = 0L, const char *name = 0L); virtual ~KDockArea(); @@ -1484,25 +1484,25 @@ public: 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( " " ) ); + KDockWidget* createDockWidget( const TQString& name, const TQPixmap &pixmap, TQWidget* parent = 0L, + const TQString& strCaption = TQString::null, const TQString& strTabPageLabel = TQString::fromLatin1( " " ) ); - void writeDockConfig(QDomElement &base); - void readDockConfig(QDomElement &base); + void writeDockConfig(TQDomElement &base); + void readDockConfig(TQDomElement &base); #ifndef NO_KDE2 - void writeDockConfig( KConfig* c = 0L, QString group = QString::null ); - void readDockConfig ( KConfig* c = 0L, QString group = QString::null ); + void writeDockConfig( KConfig* c = 0L, TQString group = TQString::null ); + void readDockConfig ( KConfig* c = 0L, TQString group = TQString::null ); #endif void activateDock(){ dockManager->activate(); } - QPopupMenu* dockHideShowMenu(){ return dockManager->dockHideShowMenu(); } + TQPopupMenu* dockHideShowMenu(){ return dockManager->dockHideShowMenu(); } void makeDockVisible( KDockWidget* dock ); void makeDockInvisible( KDockWidget* dock ); - void makeWidgetDockVisible( QWidget* widget ); - //void setView( QWidget* ); + void makeWidgetDockVisible( TQWidget* widget ); + //void setView( TQWidget* ); signals: /** @@ -1519,7 +1519,7 @@ protected slots: void slotDockWidgetUndocked(); public: - virtual void resizeEvent(QResizeEvent *); + virtual void resizeEvent(TQResizeEvent *); protected: virtual void virtual_hook( int id, void* data ); diff --git a/lib/compatibility/kmdi/qextmdi/kdockwidget_p.h b/lib/compatibility/kmdi/qextmdi/kdockwidget_p.h index 7c14394e..98af140f 100644 --- a/lib/compatibility/kmdi/qextmdi/kdockwidget_p.h +++ b/lib/compatibility/kmdi/qextmdi/kdockwidget_p.h @@ -37,7 +37,7 @@ COMPATIBLE. THIS HEADER IS ONLY INSTALLED, BECAUSE IT IS NEEDED IN #define KDOCKWIDGET_P_H #include -#include +#include // Add some describing comment !! class KDEUI_EXPORT KDockContainer @@ -46,24 +46,24 @@ public: KDockContainer(); virtual ~KDockContainer(); virtual KDockWidget *parentDockWidget(); - virtual void insertWidget (KDockWidget *, QPixmap, const QString &, int &); + virtual void insertWidget (KDockWidget *, TQPixmap, const TQString &, 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); + virtual void save(KConfig *cfg,const TQString& group_or_prefix); + virtual void save(TQDomElement& dockElement); + virtual void load(KConfig *cfg,const TQString& group_or_prefix); + virtual void load(TQDomElement& dockElement); + virtual void setToolTip (KDockWidget *, TQString &); + virtual void setPixmap(KDockWidget*,const TQPixmap&); + TQStringList containedWidgets() const; + virtual bool dockDragEnter(KDockWidget* dockWidget, TQMouseEvent *event); + virtual bool dockDragMove(KDockWidget* dockWidget, TQMouseEvent *event); + virtual bool dockDragLeave(KDockWidget* dockWidget, TQMouseEvent *event); protected: friend class KDockManager; friend class KDockSplitter; - void prepareSave(QStringList &names); + void prepareSave(TQStringList &names); void activateOverlapMode(int nonOverlapSize); void deactivateOverlapMode(); bool isOverlapMode(); diff --git a/lib/compatibility/kmdi/qextmdi/kdockwidget_private.cpp b/lib/compatibility/kmdi/qextmdi/kdockwidget_private.cpp index 3c4783f1..4106d101 100644 --- a/lib/compatibility/kmdi/qextmdi/kdockwidget_private.cpp +++ b/lib/compatibility/kmdi/qextmdi/kdockwidget_private.cpp @@ -20,14 +20,14 @@ #include "kdockwidget_p.h" #include "kdockwidget_private.h" -#include -#include +#include +#include #include -#include -#include +#include +#include -KDockSplitter::KDockSplitter(QWidget *parent, const char *name, Orientation orient, int pos, bool highResolution) -: QWidget(parent, name) +KDockSplitter::KDockSplitter(TQWidget *parent, const char *name, Orientation orient, int pos, bool highResolution) +: TQWidget(parent, name) { m_dontRecalc=false; divider = 0L; @@ -46,7 +46,7 @@ KDockSplitter::KDockSplitter(QWidget *parent, const char *name, Orientation orie initialised = false; } -void KDockSplitter::activate(QWidget *c0, QWidget *c1) +void KDockSplitter::activate(TQWidget *c0, TQWidget *c1) { if ( c0 ) child0 = c0; if ( c1 ) child1 = c1; @@ -54,15 +54,15 @@ void KDockSplitter::activate(QWidget *c0, QWidget *c1) setupMinMaxSize(); if (divider) delete divider; - divider = new QFrame(this, "pannerdivider"); - divider->setFrameStyle(QFrame::Panel | QFrame::Raised); + divider = new TQFrame(this, "pannerdivider"); + divider->setFrameStyle(TQFrame::Panel | TQFrame::Raised); divider->setLineWidth(1); divider->raise(); if (m_orientation == Horizontal) - divider->setCursor(QCursor(sizeVerCursor)); + divider->setCursor(TQCursor(sizeVerCursor)); else - divider->setCursor(QCursor(sizeHorCursor)); + divider->setCursor(TQCursor(sizeHorCursor)); divider->installEventFilter(this); @@ -76,25 +76,25 @@ void KDockSplitter::activate(QWidget *c0, QWidget *c1) if (((KDockWidget*)child0)->forcedFixedWidth()!=-1) { setForcedFixedWidth(((KDockWidget*)child0),((KDockWidget*)child0)->forcedFixedWidth()); - //QTimer::singleShot(100,this,SLOT(delayedResize())); + //TQTimer::singleShot(100,this,TQT_SLOT(delayedResize())); } else if (((KDockWidget*)child1)->forcedFixedWidth()!=-1) { setForcedFixedWidth(((KDockWidget*)child1),((KDockWidget*)child1)->forcedFixedWidth()); - //QTimer::singleShot(100,this,SLOT(delayedResize())); + //TQTimer::singleShot(100,this,TQT_SLOT(delayedResize())); } if (((KDockWidget*)child0)->forcedFixedHeight()!=-1) { setForcedFixedHeight(((KDockWidget*)child0),((KDockWidget*)child0)->forcedFixedHeight()); - //QTimer::singleShot(100,this,SLOT(delayedResize())); + //TQTimer::singleShot(100,this,TQT_SLOT(delayedResize())); } else if (((KDockWidget*)child1)->forcedFixedHeight()!=-1) { setForcedFixedHeight(((KDockWidget*)child1),((KDockWidget*)child1)->forcedFixedHeight()); - //QTimer::singleShot(100,this,SLOT(delayedResize())); + //TQTimer::singleShot(100,this,TQT_SLOT(delayedResize())); } @@ -230,7 +230,7 @@ int KDockSplitter::separatorPos() const return xpos; } -void KDockSplitter::resizeEvent(QResizeEvent *ev) +void KDockSplitter::resizeEvent(TQResizeEvent *ev) { // kdDebug(282)<<"ResizeEvent :"<< ((initialised) ? "initialised":"not initialised")<<", "<< ((ev) ? "real event":"")<< // ", "<<(isVisible() ?"visible":"")<type()) { - case QEvent::MouseMove: - mev= (QMouseEvent*)e; + case TQEvent::MouseMove: + mev= (TQMouseEvent*)e; child0->setUpdatesEnabled(mOpaqueResize); child1->setUpdatesEnabled(mOpaqueResize); if (m_orientation == Horizontal) { @@ -431,7 +431,7 @@ bool KDockSplitter::eventFilter(QObject *o, QEvent *e) handled=true; break; } if (!mOpaqueResize) { - int position = checkValue( mapFromGlobal(QCursor::pos()).x() ); + int position = checkValue( mapFromGlobal(TQCursor::pos()).x() ); divider->move( position, 0 ); } else { xpos = factor * checkValue( mapFromGlobal( mev->globalPos()).x() ) / width(); @@ -441,10 +441,10 @@ bool KDockSplitter::eventFilter(QObject *o, QEvent *e) } handled= true; break; - case QEvent::MouseButtonRelease: + case TQEvent::MouseButtonRelease: child0->setUpdatesEnabled(true); child1->setUpdatesEnabled(true); - mev= (QMouseEvent*)e; + mev= (TQMouseEvent*)e; if (m_orientation == Horizontal){ if ((fixedHeight0!=-1) || (fixedHeight1!=-1)) { @@ -467,20 +467,20 @@ bool KDockSplitter::eventFilter(QObject *o, QEvent *e) default: break; } - return (handled) ? true : QWidget::eventFilter( o, e ); + return (handled) ? true : TQWidget::eventFilter( o, e ); } -bool KDockSplitter::event( QEvent* e ) +bool KDockSplitter::event( TQEvent* e ) { - if ( e->type() == QEvent::LayoutHint ){ + if ( e->type() == TQEvent::LayoutHint ){ // change children min/max size setupMinMaxSize(); setSeparatorPos(xpos); } - return QWidget::event(e); + return TQWidget::event(e); } -QWidget* KDockSplitter::getAnother( QWidget* w ) const +TQWidget* KDockSplitter::getAnother( TQWidget* w ) const { return ( w == child0 ) ? child1 : child0; } @@ -489,7 +489,7 @@ void KDockSplitter::updateName() { if ( !initialised ) return; - QString new_name = QString( child0->name() ) + "," + child1->name(); + TQString new_name = TQString( child0->name() ) + "," + child1->name(); parentWidget()->setName( new_name.latin1() ); parentWidget()->setCaption( child0->caption() + "," + child1->caption() ); parentWidget()->repaint( false ); @@ -498,7 +498,7 @@ void KDockSplitter::updateName() ((KDockWidget*)parentWidget())->lastName = child1->name(); ((KDockWidget*)parentWidget())->splitterOrientation = m_orientation; - QWidget* p = parentWidget()->parentWidget(); + TQWidget* p = parentWidget()->parentWidget(); if ( p && p->inherits("KDockSplitter" ) ) ((KDockSplitter*)p)->updateName(); } @@ -540,8 +540,8 @@ bool KDockSplitter::highResolution() const /*************************************************************************/ -KDockButton_Private::KDockButton_Private( QWidget *parent, const char * name ) -:QPushButton( parent, name ) +KDockButton_Private::KDockButton_Private( TQWidget *parent, const char * name ) +:TQPushButton( parent, name ) { moveMouse = false; setFocusPolicy( NoFocus ); @@ -551,9 +551,9 @@ KDockButton_Private::~KDockButton_Private() { } -void KDockButton_Private::drawButton( QPainter* p ) +void KDockButton_Private::drawButton( TQPainter* p ) { - p->fillRect( 0,0, width(), height(), QBrush(colorGroup().brush(QColorGroup::Background)) ); + p->fillRect( 0,0, width(), height(), TQBrush(colorGroup().brush(TQColorGroup::Background)) ); p->drawPixmap( (width() - pixmap()->width()) / 2, (height() - pixmap()->height()) / 2, *pixmap() ); if ( moveMouse && !isDown() ){ p->setPen( white ); @@ -577,13 +577,13 @@ void KDockButton_Private::drawButton( QPainter* p ) } } -void KDockButton_Private::enterEvent( QEvent * ) +void KDockButton_Private::enterEvent( TQEvent * ) { moveMouse = true; repaint(); } -void KDockButton_Private::leaveEvent( QEvent * ) +void KDockButton_Private::leaveEvent( TQEvent * ) { moveMouse = false; repaint(); @@ -591,7 +591,7 @@ void KDockButton_Private::leaveEvent( QEvent * ) /*************************************************************************/ KDockWidgetPrivate::KDockWidgetPrivate() - : QObject() + : TQObject() ,index(-1) ,splitPosInPercent(50) ,pendingFocusInEvent(false) @@ -616,11 +616,11 @@ KDockWidgetPrivate::~KDockWidgetPrivate() { } -void KDockWidgetPrivate::slotFocusEmbeddedWidget(QWidget* w) +void KDockWidgetPrivate::slotFocusEmbeddedWidget(TQWidget* w) { if (w) { - QWidget* embeddedWdg = ((KDockWidget*)w)->getWidget(); - if (embeddedWdg && ((embeddedWdg->focusPolicy() == QWidget::ClickFocus) || (embeddedWdg->focusPolicy() == QWidget::StrongFocus))) { + TQWidget* embeddedWdg = ((KDockWidget*)w)->getWidget(); + if (embeddedWdg && ((embeddedWdg->focusPolicy() == TQWidget::ClickFocus) || (embeddedWdg->focusPolicy() == TQWidget::StrongFocus))) { embeddedWdg->setFocus(); } } diff --git a/lib/compatibility/kmdi/qextmdi/kdockwidget_private.h b/lib/compatibility/kmdi/qextmdi/kdockwidget_private.h index 0857bd7a..4ea30bd4 100644 --- a/lib/compatibility/kmdi/qextmdi/kdockwidget_private.h +++ b/lib/compatibility/kmdi/qextmdi/kdockwidget_private.h @@ -23,8 +23,8 @@ #ifndef KDOCKWIDGET_PRIVATE_H #define KDOCKWIDGET_PRIVATE_H -#include -#include +#include +#include #ifndef NO_KDE2 #include @@ -35,7 +35,7 @@ class KDockContainer; /** - * Like QSplitter but specially designed for dockwidgets stuff. + * Like TQSplitter but specially designed for dockwidgets stuff. * @internal * * @author Max Judin. @@ -44,10 +44,10 @@ 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); + KDockSplitter(TQWidget *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 activate(TQWidget *c0, TQWidget *c1 = 0L); void deactivate(); int separatorPos() const; @@ -63,12 +63,12 @@ public: // ### please come up with a nicer name void setSeparatorPosX(int pos, bool do_resize=false); - virtual bool eventFilter(QObject *, QEvent *); - virtual bool event( QEvent * ); + virtual bool eventFilter(TQObject *, TQEvent *); + virtual bool event( TQEvent * ); - QWidget* getFirst() const { return child0; } - QWidget* getLast() const { return child1; } - QWidget* getAnother( QWidget* ) const; + TQWidget* getFirst() const { return child0; } + TQWidget* getLast() const { return child1; } + TQWidget* getAnother( TQWidget* ) const; void updateName(); void setOpaqueResize(bool b=true); @@ -89,18 +89,18 @@ public: protected: friend class KDockContainer; int checkValue( int ) const; - int checkValueOverlapped( int ,QWidget*) const; - virtual void resizeEvent(QResizeEvent *); + int checkValueOverlapped( int ,TQWidget*) const; + virtual void resizeEvent(TQResizeEvent *); /* protected slots: void delayedResize();*/ private: void setupMinMaxSize(); - QWidget *child0, *child1; + TQWidget *child0, *child1; Orientation m_orientation; bool initialised; - QFrame* divider; + TQFrame* divider; int xpos, savedXPos; bool mOpaqueResize, mKeepSize, mHighResolution; int fixedWidth0,fixedWidth1; @@ -118,13 +118,13 @@ class KDEUI_EXPORT KDockButton_Private : public QPushButton { Q_OBJECT public: - KDockButton_Private( QWidget *parent=0, const char *name=0 ); + KDockButton_Private( TQWidget *parent=0, const char *name=0 ); ~KDockButton_Private(); protected: - virtual void drawButton( QPainter * ); - virtual void enterEvent( QEvent * ); - virtual void leaveEvent( QEvent * ); + virtual void drawButton( TQPainter * ); + virtual void enterEvent( TQEvent * ); + virtual void leaveEvent( TQEvent * ); private: bool moveMouse; @@ -150,7 +150,7 @@ public slots: /** * Especially used for Tab page docking. Switching the pages requires additional setFocus() for the embedded widget. */ - void slotFocusEmbeddedWidget(QWidget* w = 0L); + void slotFocusEmbeddedWidget(TQWidget* w = 0L); public: enum KDockWidgetResize @@ -169,12 +169,12 @@ public: NET::WindowType windowType; #endif - QWidget *_parent; + TQWidget *_parent; bool transient; - QGuardedPtr container; + TQGuardedPtr container; - QPoint resizePos; + TQPoint resizePos; bool resizing; KDockWidgetResize resizeMode; }; @@ -183,8 +183,8 @@ class KDEUI_EXPORT KDockWidgetHeaderPrivate : public QObject { public: - KDockWidgetHeaderPrivate( QObject* parent ) - : QObject( parent ) + KDockWidgetHeaderPrivate( TQObject* parent ) + : TQObject( parent ) { forceCloseButtonHidden=false; toDesktopButton = 0; @@ -196,9 +196,9 @@ public: bool showToDesktopButton; bool topLevel; - QPtrList btns; + TQPtrList btns; bool forceCloseButtonHidden; - QWidget *dummy; + TQWidget *dummy; }; #endif diff --git a/lib/compatibility/kmdi/qextmdi/kmdichildarea.cpp b/lib/compatibility/kmdi/qextmdi/kmdichildarea.cpp index 8074dac4..923b5537 100644 --- a/lib/compatibility/kmdi/qextmdi/kmdichildarea.cpp +++ b/lib/compatibility/kmdi/qextmdi/kmdichildarea.cpp @@ -36,7 +36,7 @@ #include #include -#include +#include /////////////////////////////////////////////////////////////////////////////// @@ -45,21 +45,21 @@ //============ KMdiChildArea ============// -KMdiChildArea::KMdiChildArea( QWidget *parent ) - : QFrame( parent, "kmdi_childarea" ) +KMdiChildArea::KMdiChildArea( TQWidget *parent ) + : TQFrame( parent, "kmdi_childarea" ) { - setFrameStyle( QFrame::Panel | QFrame::Sunken ); - m_captionFont = QFont(); - QFontMetrics fm( m_captionFont ); + setFrameStyle( TQFrame::Panel | TQFrame::Sunken ); + m_captionFont = TQFont(); + TQFontMetrics 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; + m_pZ = new TQPtrList; m_pZ->setAutoDelete( true ); setFocusPolicy( ClickFocus ); - m_defaultChildFrmSize = QSize( 400, 300 ); + m_defaultChildFrmSize = TQSize( 400, 300 ); } @@ -77,7 +77,7 @@ void KMdiChildArea::manageChild( KMdiChildFrm* child, bool show, bool cascade ) //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 + //TQPtrList::find* moves current() to the found item m_pZ->take(); while ( m_pZ->findNextRef( child ) != -1 ) m_pZ->take(); @@ -112,7 +112,7 @@ void KMdiChildArea::destroyChild( KMdiChildFrm *child, bool focusTop ) bool wasMaximized = ( child->state() == KMdiChildFrm::Maximized ); // destroy the old one - QObject::disconnect( child ); + TQObject::disconnect( child ); child->blockSignals( true ); m_pZ->setAutoDelete( false ); m_pZ->removeRef( child ); @@ -144,7 +144,7 @@ void KMdiChildArea::destroyChildButNotItsView( KMdiChildFrm* child, bool focusTo bool wasMaximized = ( child->state() == KMdiChildFrm::Maximized ); // destroy the old one - QObject::disconnect( child ); + TQObject::disconnect( child ); child->unsetClient(); m_pZ->setAutoDelete( false ); m_pZ->removeRef( child ); @@ -182,7 +182,7 @@ void KMdiChildArea::setTopChild( KMdiChildFrm* child, bool /* bSetFocus */ ) m_pZ->setAutoDelete( true ); //disable the labels of all the other children - QPtrListIterator it( *m_pZ ); + TQPtrListIterator it( *m_pZ ); for ( ; ( *it ); ++it ) ( *it )->m_pCaption->setActive( false ); @@ -218,13 +218,13 @@ void KMdiChildArea::setTopChild( KMdiChildFrm* child, bool /* bSetFocus */ ) else child->raise(); - QFocusEvent::setReason( QFocusEvent::Other ); + TQFocusEvent::setReason( TQFocusEvent::Other ); child->m_pClient->setFocus(); } } -void KMdiChildArea::resizeEvent( QResizeEvent* e ) +void KMdiChildArea::resizeEvent( TQResizeEvent* e ) { //If we have a maximized children at the top , adjust its size KMdiChildFrm* child = topChild(); @@ -241,12 +241,12 @@ void KMdiChildArea::resizeEvent( QResizeEvent* e ) } layoutMinimizedChildren(); - QWidget::resizeEvent( e ); + TQWidget::resizeEvent( e ); } //=============== mousePressEvent =============// -void KMdiChildArea::mousePressEvent( QMouseEvent *e ) +void KMdiChildArea::mousePressEvent( TQMouseEvent *e ) { //Popup the window menu if ( e->button() & RightButton ) @@ -255,7 +255,7 @@ void KMdiChildArea::mousePressEvent( QMouseEvent *e ) //=============== getCascadePoint ============// -QPoint KMdiChildArea::getCascadePoint( int indexOfWindow ) +TQPoint KMdiChildArea::getCascadePoint( int indexOfWindow ) { if ( indexOfWindow < 0 ) { @@ -264,10 +264,10 @@ QPoint KMdiChildArea::getCascadePoint( int indexOfWindow ) << indexOfWindow << " as new index" << endl; } - QPoint pnt( 0, 0 ); + TQPoint pnt( 0, 0 ); if ( indexOfWindow == 0 ) { - kdDebug( 760 ) << k_funcinfo << "No windows. Returning QPoint( 0, 0 ) as the cascade point" << endl; + kdDebug( 760 ) << k_funcinfo << "No windows. Returning TQPoint( 0, 0 ) as the cascade point" << endl; return pnt; } @@ -282,8 +282,8 @@ QPoint KMdiChildArea::getCascadePoint( int indexOfWindow ) //default values int step = 20; - int h = ( topLevelMode ? QApplication::desktop()->height() : height() ); - int w = ( topLevelMode ? QApplication::desktop()->width() : width() ); + int h = ( topLevelMode ? TQApplication::desktop()->height() : height() ); + int w = ( topLevelMode ? TQApplication::desktop()->width() : width() ); int availableHeight = h - m_defaultChildFrmSize.height(); int availableWidth = w - m_defaultChildFrmSize.width(); @@ -365,7 +365,7 @@ void KMdiChildArea::focusTopChild() if ( !lastChild->m_pClient->hasFocus() ) { //disable the labels of all the other children - QPtrListIterator it ( *m_pZ ); + TQPtrListIterator it ( *m_pZ ); for ( ; ( *it ); ++it ) { if ( ( *it ) != lastChild ) @@ -383,7 +383,7 @@ void KMdiChildArea::cascadeWindows() { kdDebug( 760 ) << k_funcinfo << "cascading windows but not changing their size" << endl; int idx = 0; - QPtrList list( *m_pZ ); + TQPtrList list( *m_pZ ); list.setAutoDelete( false ); while ( !list.isEmpty() ) { @@ -405,7 +405,7 @@ void KMdiChildArea::cascadeMaximized() { kdDebug( 760 ) << k_funcinfo << "cascading windows. will make sure they are minimum sized" << endl; int idx = 0; - QPtrList list( *m_pZ ); + TQPtrList list( *m_pZ ); list.setAutoDelete( false ); while ( !list.isEmpty() ) @@ -416,9 +416,9 @@ void KMdiChildArea::cascadeMaximized() if (childFrm->state() == KMdiChildFrm::Maximized ) childFrm->restorePressed(); - QPoint pnt( getCascadePoint( idx ) ); + TQPoint pnt( getCascadePoint( idx ) ); childFrm->move( pnt ); - QSize curSize( width() - pnt.x(), height() - pnt.y() ); + TQSize curSize( width() - pnt.x(), height() - pnt.y() ); if ( ( childFrm->minimumSize().width() > curSize.width() ) || ( childFrm->minimumSize().height() > curSize.height() ) ) @@ -439,7 +439,7 @@ void KMdiChildArea::expandVertical() { kdDebug( 760 ) << k_funcinfo << "expanding all child frames vertically" << endl; int idx = 0; - QPtrList list( *m_pZ ); + TQPtrList list( *m_pZ ); list.setAutoDelete( false ); while ( !list.isEmpty() ) { @@ -461,7 +461,7 @@ void KMdiChildArea::expandHorizontal() { kdDebug( 760 ) << k_funcinfo << "expanding all child frames horizontally" << endl; int idx = 0; - QPtrList list( *m_pZ ); + TQPtrList list( *m_pZ ); list.setAutoDelete( false ); while ( !list.isEmpty() ) { @@ -482,7 +482,7 @@ void KMdiChildArea::expandHorizontal() int KMdiChildArea::getVisibleChildCount() const { int visibleChildCount = 0; - QPtrListIterator it( *m_pZ ); + TQPtrListIterator it( *m_pZ ); for ( ; ( *it ); ++it ) { if ( ( *it )->state() != KMdiChildFrm::Minimized && ( *it )->isVisible() ) @@ -555,7 +555,7 @@ void KMdiChildArea::tileAllInternal( int maxWnds ) int curCol = 1; int curWin = 1; - QPtrListIterator it( *m_pZ ); + TQPtrListIterator it( *m_pZ ); for ( ; ( *it ); ++it ) { KMdiChildFrm* child = ( *it ); @@ -641,7 +641,7 @@ void KMdiChildArea::tileAnodine() // it's great when a kick-ass theory works!!! // Pragma :) int xQuantum = width() / numCols; int yQuantum = height() / numRows[numCurCol]; - QPtrListIterator it( *m_pZ ); + TQPtrListIterator it( *m_pZ ); for ( ; ( *it ); ++it ) { KMdiChildFrm* child = ( *it ); @@ -692,7 +692,7 @@ void KMdiChildArea::tileVertically() int posX = 0; int countVisible = 0; - QPtrListIterator it( *m_pZ ); + TQPtrListIterator it( *m_pZ ); for ( ; ( *it ); ++it ) { KMdiChildFrm* child = ( *it ); @@ -724,7 +724,7 @@ void KMdiChildArea::layoutMinimizedChildren() { int posX = 0; int posY = height(); - QPtrListIterator it( *m_pZ ); + TQPtrListIterator it( *m_pZ ); for ( ; ( *it ); ++it ) { KMdiChildFrm* child = *( it ); @@ -744,41 +744,41 @@ void KMdiChildArea::layoutMinimizedChildren() } -void KMdiChildArea::setMdiCaptionFont( const QFont& fnt ) +void KMdiChildArea::setMdiCaptionFont( const TQFont& fnt ) { m_captionFont = fnt; - QFontMetrics fm( m_captionFont ); + TQFontMetrics fm( m_captionFont ); m_captionFontLineSpacing = fm.lineSpacing(); - QPtrListIterator it( *m_pZ ); + TQPtrListIterator it( *m_pZ ); for ( ; ( *it ); ++it ) ( *it )->doResize(); } -void KMdiChildArea::setMdiCaptionActiveForeColor( const QColor& clr ) +void KMdiChildArea::setMdiCaptionActiveForeColor( const TQColor& clr ) { m_captionActiveForeColor = clr; } -void KMdiChildArea::setMdiCaptionActiveBackColor( const QColor& clr ) +void KMdiChildArea::setMdiCaptionActiveBackColor( const TQColor& clr ) { m_captionActiveBackColor = clr; } -void KMdiChildArea::setMdiCaptionInactiveForeColor( const QColor& clr ) +void KMdiChildArea::setMdiCaptionInactiveForeColor( const TQColor& clr ) { m_captionInactiveForeColor = clr; } -void KMdiChildArea::setMdiCaptionInactiveBackColor( const QColor& clr ) +void KMdiChildArea::setMdiCaptionInactiveBackColor( const TQColor& clr ) { m_captionInactiveBackColor = clr; } //KDE4: remove -void KMdiChildArea::getCaptionColors( const QPalette& /*pal*/, QColor& activeBG, - QColor& activeFG, QColor& inactiveBG, QColor& inactiveFG ) +void KMdiChildArea::getCaptionColors( const TQPalette& /*pal*/, TQColor& activeBG, + TQColor& activeFG, TQColor& inactiveBG, TQColor& inactiveFG ) { activeBG = KGlobalSettings::activeTitleColor(); activeFG = KGlobalSettings::activeTextColor(); diff --git a/lib/compatibility/kmdi/qextmdi/kmdichildarea.h b/lib/compatibility/kmdi/qextmdi/kmdichildarea.h index 3eaac559..4a074889 100644 --- a/lib/compatibility/kmdi/qextmdi/kmdichildarea.h +++ b/lib/compatibility/kmdi/qextmdi/kmdichildarea.h @@ -28,8 +28,8 @@ #ifndef _KMDI_CHILD_AREA_H_ #define _KMDI_CHILD_AREA_H_ -#include -#include +#include +#include #include "kmdichildfrm.h" #include "kmdichildview.h" @@ -61,37 +61,37 @@ public: /** * Z Order stack of KMdiChildFrm childframe windows (top=last) */ - QPtrList *m_pZ; //Auto delete enabled + TQPtrList *m_pZ; //Auto delete enabled /** * the default size of an newly created childframe */ - QSize m_defaultChildFrmSize; + TQSize m_defaultChildFrmSize; protected: /** * The MDI childframe window caption font */ - QFont m_captionFont; + TQFont m_captionFont; /** * The foreground color of the active MDI childframe window caption */ - QColor m_captionActiveBackColor; + TQColor m_captionActiveBackColor; /** * The background color of the active MDI childframe window captions */ - QColor m_captionActiveForeColor; + TQColor m_captionActiveForeColor; /** * The foreground color of inactive MDI childframe window captions */ - QColor m_captionInactiveBackColor; + TQColor m_captionInactiveBackColor; /** * The background color of inactive MDI childframe window captions */ - QColor m_captionInactiveForeColor; + TQColor m_captionInactiveForeColor; int m_captionFontLineSpacing; @@ -101,7 +101,7 @@ public: /** * Consruction. Note: This class needn't to know about KMdiMainFrm . */ - KMdiChildArea( QWidget *parent ); + KMdiChildArea( TQWidget *parent ); /** * Destructor : THERE should be no child windows anymore... @@ -152,37 +152,37 @@ public: * 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 ); + TQPoint 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 ); + void setMdiCaptionFont( const TQFont &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 ); + void setMdiCaptionActiveForeColor( const TQColor &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 ); + void setMdiCaptionActiveBackColor( const TQColor &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 ); + void setMdiCaptionInactiveForeColor( const TQColor &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 ); + void setMdiCaptionInactiveBackColor( const TQColor &clr ); /** * Gets all caption colors, consistent with current WM settings @@ -193,8 +193,8 @@ public: * @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; + static void getCaptionColors( const TQPalette &pal, TQColor &activeBG, TQColor &activeFG, + TQColor &inactiveBG, TQColor &inactiveFG ) KDE_DEPRECATED; public slots: /** @@ -253,12 +253,12 @@ protected: /** * Automatically resizes a maximized MDI view and layouts the positions of minimized MDI views. */ - virtual void resizeEvent( QResizeEvent * ); + virtual void resizeEvent( TQResizeEvent * ); /** * Shows the 'Window' popup menu on right mouse button click */ - void mousePressEvent( QMouseEvent *e ); + void mousePressEvent( TQMouseEvent *e ); /** * Internally used. Actions that are necessary when an MDI view gets minimized @@ -288,7 +288,7 @@ signals: * Signals a KMdiMainFrm that the 'Window' popup menu must be shown * @internal */ - void popupWindowMenu( QPoint ); + void popupWindowMenu( TQPoint ); /** * Signals that the last attached (docked) MDI view has been closed. diff --git a/lib/compatibility/kmdi/qextmdi/kmdichildfrm.cpp b/lib/compatibility/kmdi/qextmdi/kmdichildfrm.cpp index 1a30a601..5db71969 100644 --- a/lib/compatibility/kmdi/qextmdi/kmdichildfrm.cpp +++ b/lib/compatibility/kmdi/qextmdi/kmdichildfrm.cpp @@ -35,15 +35,15 @@ #include "kmdichildarea.h" #include "kmdimainfrm.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -85,13 +85,13 @@ #include "kde2laptop_undockbutton.xpm" -KMdiWin32IconButton::KMdiWin32IconButton( QWidget* parent, const char* name ) - : QLabel( parent, name ) +KMdiWin32IconButton::KMdiWin32IconButton( TQWidget* parent, const char* name ) + : TQLabel( parent, name ) {} //============ mousePressEvent ============// -void KMdiWin32IconButton::mousePressEvent( QMouseEvent* ) +void KMdiWin32IconButton::mousePressEvent( TQMouseEvent* ) { //emit pressed(); } @@ -99,7 +99,7 @@ void KMdiWin32IconButton::mousePressEvent( QMouseEvent* ) //============ KMdiChildFrm ============// KMdiChildFrm::KMdiChildFrm( KMdiChildArea *parent ) - : QFrame( parent, "kmdi_childfrm" ) + : TQFrame( parent, "kmdi_childfrm" ) , m_pClient( 0L ) , m_pManager( 0L ) , m_pCaption( 0L ) @@ -125,27 +125,27 @@ KMdiChildFrm::KMdiChildFrm( KMdiChildArea *parent ) , m_pSystemMenu( 0L ) , m_oldClientMinSize() , m_oldClientMaxSize() - , m_oldLayoutResizeMode( QLayout::Minimum ) + , m_oldLayoutResizeMode( TQLayout::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" ) ); + m_pUnixIcon = new TQToolButton( m_pCaption, "kmdi_toolbutton_icon" ); + m_pMinimize = new TQToolButton( m_pCaption, "kmdi_toolbutton_min" ); + m_pMaximize = new TQToolButton( m_pCaption, "kmdi_toolbutton_max" ); + m_pClose = new TQToolButton( m_pCaption, "kmdi_toolbutton_close" ); + m_pUndock = new TQToolButton( m_pCaption, "kmdi_toolbutton_undock" ); + + TQObject::connect( m_pMinimize, TQT_SIGNAL( clicked() ), this, TQT_SLOT( minimizePressed() ) ); + TQObject::connect( m_pMaximize, TQT_SIGNAL( clicked() ), this, TQT_SLOT( maximizePressed() ) ); + TQObject::connect( m_pClose, TQT_SIGNAL( clicked() ), this, TQT_SLOT( closePressed() ) ); + TQObject::connect( m_pUndock, TQT_SIGNAL( clicked() ), this, TQT_SLOT( undockPressed() ) ); + + m_pIconButtonPixmap = new TQPixmap( SmallIcon( "filenew" ) ); if ( m_pIconButtonPixmap->isNull() ) - * m_pIconButtonPixmap = QPixmap( filenew ); + * m_pIconButtonPixmap = TQPixmap( filenew ); redecorateButtons(); @@ -156,14 +156,14 @@ KMdiChildFrm::KMdiChildFrm( KMdiChildArea *parent ) m_pMaximize->setFocusPolicy( NoFocus ); m_pUndock->setFocusPolicy( NoFocus ); - setFrameStyle( QFrame::WinPanel | QFrame::Raised ); + setFrameStyle( TQFrame::WinPanel | TQFrame::Raised ); setFocusPolicy( NoFocus ); setMouseTracking( true ); setMinimumSize( KMDI_CHILDFRM_MIN_WIDTH, m_pCaption->heightHint() ); - m_pSystemMenu = new QPopupMenu(); + m_pSystemMenu = new TQPopupMenu(); } //============ ~KMdiChildFrm ============// @@ -180,12 +180,12 @@ KMdiChildFrm::~KMdiChildFrm() } //============ mousePressEvent =============// -void KMdiChildFrm::mousePressEvent( QMouseEvent *e ) +void KMdiChildFrm::mousePressEvent( TQMouseEvent *e ) { if ( m_bResizing ) { - if ( QApplication::overrideCursor() ) - QApplication::restoreOverrideCursor(); + if ( TQApplication::overrideCursor() ) + TQApplication::restoreOverrideCursor(); m_bResizing = false; releaseMouse(); @@ -201,24 +201,24 @@ void KMdiChildFrm::mousePressEvent( QMouseEvent *e ) //notify child view KMdiChildFrmResizeBeginEvent ue( e ); if ( m_pClient != 0L ) - QApplication::sendEvent( m_pClient, &ue ); + TQApplication::sendEvent( m_pClient, &ue ); } } //============ mouseReleaseEvent ==============// -void KMdiChildFrm::mouseReleaseEvent( QMouseEvent *e ) +void KMdiChildFrm::mouseReleaseEvent( TQMouseEvent *e ) { if ( m_bResizing ) { - if ( QApplication::overrideCursor() ) - QApplication::restoreOverrideCursor(); + if ( TQApplication::overrideCursor() ) + TQApplication::restoreOverrideCursor(); m_bResizing = false; //notify child view KMdiChildFrmResizeEndEvent ue( e ); if ( m_pClient != 0L ) - QApplication::sendEvent( m_pClient, &ue ); + TQApplication::sendEvent( m_pClient, &ue ); } } @@ -233,24 +233,24 @@ void KMdiChildFrm::setResizeCursor( int resizeCorner ) switch ( resizeCorner ) { case KMDI_NORESIZE: - if ( QApplication::overrideCursor() ) - QApplication::restoreOverrideCursor(); + if ( TQApplication::overrideCursor() ) + TQApplication::restoreOverrideCursor(); break; case KMDI_RESIZE_LEFT: case KMDI_RESIZE_RIGHT: - QApplication::setOverrideCursor( Qt::sizeHorCursor, true ); + TQApplication::setOverrideCursor( Qt::sizeHorCursor, true ); break; case KMDI_RESIZE_TOP: case KMDI_RESIZE_BOTTOM: - QApplication::setOverrideCursor( Qt::sizeVerCursor, true ); + TQApplication::setOverrideCursor( Qt::sizeVerCursor, true ); break; case KMDI_RESIZE_TOPLEFT: case KMDI_RESIZE_BOTTOMRIGHT: - QApplication::setOverrideCursor( Qt::sizeFDiagCursor, true ); + TQApplication::setOverrideCursor( Qt::sizeFDiagCursor, true ); break; case KMDI_RESIZE_BOTTOMLEFT: case KMDI_RESIZE_TOPRIGHT: - QApplication::setOverrideCursor( Qt::sizeBDiagCursor, true ); + TQApplication::setOverrideCursor( Qt::sizeBDiagCursor, true ); break; } } @@ -263,14 +263,14 @@ void KMdiChildFrm::unsetResizeCursor() { m_iResizeCorner = KMDI_NORESIZE; m_iLastCursorCorner = KMDI_NORESIZE; - if ( QApplication::overrideCursor() ) - QApplication::restoreOverrideCursor(); + if ( TQApplication::overrideCursor() ) + TQApplication::restoreOverrideCursor(); } } //============= mouseMoveEvent ===============// -void KMdiChildFrm::mouseMoveEvent( QMouseEvent *e ) +void KMdiChildFrm::mouseMoveEvent( TQMouseEvent *e ) { if ( m_state != Normal ) return; @@ -286,7 +286,7 @@ void KMdiChildFrm::mouseMoveEvent( QMouseEvent *e ) if ( !( e->state() & RightButton ) && !( e->state() & MidButton ) ) { // same as: if no button or left button pressed - QPoint p = parentWidget()->mapFromGlobal( e->globalPos() ); + TQPoint p = parentWidget()->mapFromGlobal( e->globalPos() ); resizeWindow( m_iResizeCorner, p.x(), p.y() ); } else @@ -301,24 +301,24 @@ void KMdiChildFrm::mouseMoveEvent( QMouseEvent *e ) //============= moveEvent ===============// -void KMdiChildFrm::moveEvent( QMoveEvent* me ) +void KMdiChildFrm::moveEvent( TQMoveEvent* me ) { // give its child view the chance to notify a childframe move KMdiChildFrmMoveEvent cfme( me ); if ( m_pClient != 0L ) - QApplication::sendEvent( m_pClient, &cfme ); + TQApplication::sendEvent( m_pClient, &cfme ); } //=============== leaveEvent ===============// -void KMdiChildFrm::leaveEvent( QEvent * ) +void KMdiChildFrm::leaveEvent( TQEvent * ) { unsetResizeCursor(); } void KMdiChildFrm::resizeWindow( int resizeCorner, int xPos, int yPos ) { - QRect resizeRect( x(), y(), width(), height() ); + TQRect resizeRect( x(), y(), width(), height() ); // Calculate the minimum width & height int minWidth = 0; @@ -349,7 +349,7 @@ void KMdiChildFrm::resizeWindow( int resizeCorner, int xPos, int yPos ) if ( maxHeight > maximumHeight() ) maxHeight = maximumHeight(); - QPoint mousePos( xPos, yPos ); + TQPoint mousePos( xPos, yPos ); // manipulate width switch ( resizeCorner ) @@ -511,7 +511,7 @@ void KMdiChildFrm::undockPressed() void KMdiChildFrm::setState( MdiWindowState state, bool /*bAnimate*/ ) { if ( m_state == Normal ) //save the current rect - m_restoredRect = QRect( x(), y(), width(), height() ); + m_restoredRect = TQRect( x(), y(), width(), height() ); switch ( state ) { @@ -540,8 +540,8 @@ void KMdiChildFrm::setState( MdiWindowState state, bool /*bAnimate*/ ) } 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() ) ); + TQObject::disconnect( m_pMinimize, TQT_SIGNAL( clicked() ), this, TQT_SLOT( restorePressed() ) ); + TQObject::connect( m_pMinimize, TQT_SIGNAL( clicked() ), this, TQT_SLOT( minimizePressed() ) ); setGeometry( m_restoredRect ); break; case Normal: @@ -566,8 +566,8 @@ void KMdiChildFrm::setState( MdiWindowState state, bool /*bAnimate*/ ) // 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() ) ); + TQObject::disconnect( m_pMinimize, TQT_SIGNAL( clicked() ), this, TQT_SLOT( restorePressed() ) ); + TQObject::connect( m_pMinimize, TQT_SIGNAL( clicked() ), this, TQT_SLOT( minimizePressed() ) ); int nFrameWidth = KMDI_CHILDFRM_DOUBLE_BORDER; int nFrameHeight = KMDI_CHILDFRM_DOUBLE_BORDER + KMDI_CHILDFRM_SEPARATOR + m_pCaption->heightHint(); @@ -587,7 +587,7 @@ void KMdiChildFrm::setState( MdiWindowState state, bool /*bAnimate*/ ) 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(), + TQRect maximizedFrmRect( -m_pClient->x(), -m_pClient->y(), m_pManager->width() + nFrameWidth, m_pManager->height() + nFrameHeight ); if ( geometry() != maximizedFrmRect ) @@ -618,7 +618,7 @@ void KMdiChildFrm::setState( MdiWindowState state, bool /*bAnimate*/ ) m_pClient->setMaximumSize( 0, 0 ); if ( m_pClient->layout() != 0L ) { - m_pClient->layout() ->setResizeMode( QLayout::FreeResize ); + m_pClient->layout() ->setResizeMode( TQLayout::FreeResize ); } switchToMinimizeLayout(); m_pManager->childMinimized( this, true ); @@ -638,7 +638,7 @@ void KMdiChildFrm::setState( MdiWindowState state, bool /*bAnimate*/ ) m_pClient->setMaximumSize( 0, 0 ); if ( m_pClient->layout() != 0L ) { - m_pClient->layout() ->setResizeMode( QLayout::FreeResize ); + m_pClient->layout() ->setResizeMode( TQLayout::FreeResize ); } switchToMinimizeLayout(); m_pManager->childMinimized( this, false ); @@ -670,21 +670,21 @@ void KMdiChildFrm::setState( MdiWindowState state, bool /*bAnimate*/ ) //============== restoreGeometry ================// -QRect KMdiChildFrm::restoreGeometry() const +TQRect KMdiChildFrm::restoreGeometry() const { return m_restoredRect; } //============== setRestoreGeometry ================// -void KMdiChildFrm::setRestoreGeometry( const QRect& newRestGeo ) +void KMdiChildFrm::setRestoreGeometry( const TQRect& newRestGeo ) { m_restoredRect = newRestGeo; } //============ setCaption ===============// -void KMdiChildFrm::setCaption( const QString& text ) +void KMdiChildFrm::setCaption( const TQString& text ) { m_pCaption->setCaption( text ); } @@ -699,13 +699,13 @@ void KMdiChildFrm::enableClose( bool bEnable ) //============ setIcon ==================// -void KMdiChildFrm::setIcon( const QPixmap& pxm ) +void KMdiChildFrm::setIcon( const TQPixmap& pxm ) { - QPixmap p = pxm; + TQPixmap p = pxm; if ( p.width() != 18 || p.height() != 18 ) { - QImage img = p.convertToImage(); - p = img.smoothScale( 18, 18, QImage::ScaleMin ); + TQImage img = p.convertToImage(); + p = img.smoothScale( 18, 18, TQImage::ScaleMin ); } const bool do_resize = m_pIconButtonPixmap->size() != p.size(); *m_pIconButtonPixmap = p; @@ -717,7 +717,7 @@ void KMdiChildFrm::setIcon( const QPixmap& pxm ) //============ icon =================// -QPixmap* KMdiChildFrm::icon() const +TQPixmap* KMdiChildFrm::icon() const { return m_pIconButtonPixmap; } @@ -732,7 +732,7 @@ void KMdiChildFrm::setClient( KMdiChildView *w, bool bAutomaticResize ) //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 ( bAutomaticResize || w->size().isEmpty() || ( w->size() == TQSize( 1, 1 ) ) ) { if ( m_pManager->topChild() ) { @@ -750,19 +750,19 @@ void KMdiChildFrm::setClient( KMdiChildView *w, bool bAutomaticResize ) } // memorize the focuses in a dictionary because they will get lost during reparenting - QDict* pFocPolDict = new QDict; + TQDict* pFocPolDict = new TQDict; pFocPolDict->setAutoDelete( true ); - QObjectList *list = m_pClient->queryList( "QWidget" ); - QObjectListIt it( *list ); // iterate over the buttons - QObject * obj; + TQObjectList *list = m_pClient->queryList( "TQWidget" ); + TQObjectListIt it( *list ); // iterate over the buttons + TQObject * obj; int i = 1; while ( ( obj = it.current() ) != 0 ) { // for each found object... ++it; - QWidget* widg = ( QWidget* ) obj; + TQWidget* widg = ( TQWidget* ) obj; if ( widg->name( 0 ) == 0 ) { - QString tmpStr; + TQString tmpStr; tmpStr.setNum( i ); tmpStr = "unnamed" + tmpStr; widg->setName( tmpStr.latin1() ); @@ -778,9 +778,9 @@ void KMdiChildFrm::setClient( KMdiChildView *w, bool bAutomaticResize ) 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(); + TQPoint pnt2( KMDI_CHILDFRM_BORDER, clientYPos ); + TQSize mincs = w->minimumSize(); + TQSize maxcs = w->maximumSize(); w->setMinimumSize( 0, 0 ); w->setMaximumSize( QWIDGETSIZE_MAX, QWIDGETSIZE_MAX ); @@ -795,7 +795,7 @@ void KMdiChildFrm::setClient( KMdiChildView *w, bool bAutomaticResize ) linkChildren( pFocPolDict ); - QObject::connect( m_pClient, SIGNAL( mdiParentNowMaximized( bool ) ), m_pManager, SIGNAL( nowMaximized( bool ) ) ); + TQObject::connect( m_pClient, TQT_SIGNAL( mdiParentNowMaximized( bool ) ), m_pManager, TQT_SIGNAL( nowMaximized( bool ) ) ); if ( m_pClient->minimumWidth() > m_pManager->m_defaultChildFrmSize.width() ) setMinimumWidth( m_pClient->minimumSize().width() + KMDI_CHILDFRM_DOUBLE_BORDER ); @@ -809,38 +809,38 @@ void KMdiChildFrm::setClient( KMdiChildView *w, bool bAutomaticResize ) //============ unsetClient ============// -void KMdiChildFrm::unsetClient( QPoint positionOffset ) +void KMdiChildFrm::unsetClient( TQPoint positionOffset ) { if ( !m_pClient ) return ; - QObject::disconnect( m_pClient, SIGNAL( mdiParentNowMaximized( bool ) ), m_pManager, SIGNAL( nowMaximized( bool ) ) ); + TQObject::disconnect( m_pClient, TQT_SIGNAL( mdiParentNowMaximized( bool ) ), m_pManager, TQT_SIGNAL( nowMaximized( bool ) ) ); //reparent to desktop widget , no flags , point , show it - QDict* pFocPolDict; + TQDict* pFocPolDict; pFocPolDict = unlinkChildren(); // get name of focused child widget - QWidget* focusedChildWidget = m_pClient->focusedChildWidget(); + TQWidget* focusedChildWidget = m_pClient->focusedChildWidget(); const char* nameOfFocusedWidget = ""; if ( focusedChildWidget != 0 ) nameOfFocusedWidget = focusedChildWidget->name(); - QSize mins = m_pClient->minimumSize(); - QSize maxs = m_pClient->maximumSize(); + TQSize mins = m_pClient->minimumSize(); + TQSize 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; + TQObjectList *list = m_pClient->queryList( "TQWidget" ); + TQObjectListIt it( *list ); // iterate over all child widgets of child frame + TQObject * obj; + TQWidget* firstFocusableChildWidget = 0; + TQWidget* lastFocusableChildWidget = 0; while ( ( obj = it.current() ) != 0 ) { // for each found object... - QWidget * widg = ( QWidget* ) obj; + TQWidget * widg = ( TQWidget* ) obj; ++it; FocusPolicy* pFocPol = pFocPolDict->find( widg->name() ); // remember the focus policy from before the reparent if ( pFocPol ) @@ -851,7 +851,7 @@ void KMdiChildFrm::unsetClient( QPoint positionOffset ) widg->setFocus(); // get first and last focusable widget - if ( ( widg->focusPolicy() == QWidget::StrongFocus ) || ( widg->focusPolicy() == QWidget::TabFocus ) ) + if ( ( widg->focusPolicy() == TQWidget::StrongFocus ) || ( widg->focusPolicy() == TQWidget::TabFocus ) ) { if ( firstFocusableChildWidget == 0 ) firstFocusableChildWidget = widg; // first widget @@ -860,7 +860,7 @@ void KMdiChildFrm::unsetClient( QPoint positionOffset ) } else { - if ( widg->focusPolicy() == QWidget::WheelFocus ) + if ( widg->focusPolicy() == TQWidget::WheelFocus ) { if ( firstFocusableChildWidget == 0 ) firstFocusableChildWidget = widg; // first widget @@ -877,29 +877,29 @@ void KMdiChildFrm::unsetClient( QPoint positionOffset ) m_pClient->setLastFocusableChildWidget( lastFocusableChildWidget ); // reset the focus policy of the view - m_pClient->setFocusPolicy( QWidget::ClickFocus ); + m_pClient->setFocusPolicy( TQWidget::ClickFocus ); // lose information about the view (because it's undocked now) m_pClient = 0; } //============== linkChildren =============// -void KMdiChildFrm::linkChildren( QDict* pFocPolDict ) +void KMdiChildFrm::linkChildren( TQDict* 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; + TQObjectList* list = m_pClient->queryList( "TQWidget" ); + TQObjectListIt it( *list ); // iterate over all child widgets of child frame + TQObject* obj; while ( ( obj = it.current() ) != 0 ) { // for each found object... - QWidget* widg = ( QWidget* ) obj; + TQWidget* widg = ( TQWidget* ) 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" ) ) ) + if ( !( widg->inherits( "TQPopupMenu" ) ) ) widg->installEventFilter( this ); } @@ -907,14 +907,14 @@ void KMdiChildFrm::linkChildren( QDict* pFocPolDict ) 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 ); + m_pWinIcon->setFocusPolicy( TQWidget::NoFocus ); + m_pUnixIcon->setFocusPolicy( TQWidget::NoFocus ); + m_pClient->setFocusPolicy( TQWidget::ClickFocus ); + m_pCaption->setFocusPolicy( TQWidget::NoFocus ); + m_pUndock->setFocusPolicy( TQWidget::NoFocus ); + m_pMinimize->setFocusPolicy( TQWidget::NoFocus ); + m_pMaximize->setFocusPolicy( TQWidget::NoFocus ); + m_pClose->setFocusPolicy( TQWidget::NoFocus ); // install the event filter (catch mouse clicks) for the rest m_pWinIcon->installEventFilter( this ); @@ -930,24 +930,24 @@ void KMdiChildFrm::linkChildren( QDict* pFocPolDict ) //============== unlinkChildren =============// -QDict* KMdiChildFrm::unlinkChildren() +TQDict* KMdiChildFrm::unlinkChildren() { // memorize the focuses in a dictionary because they will get lost during reparenting - QDict* pFocPolDict = new QDict; + TQDict* pFocPolDict = new TQDict; pFocPolDict->setAutoDelete( true ); - QObjectList *list = m_pClient->queryList( "QWidget" ); - QObjectListIt it( *list ); // iterate over all child widgets of child frame - QObject * obj; + TQObjectList *list = m_pClient->queryList( "TQWidget" ); + TQObjectListIt it( *list ); // iterate over all child widgets of child frame + TQObject * obj; int i = 1; while ( ( obj = it.current() ) != 0 ) { // for each found object... ++it; - QWidget* w = ( QWidget* ) obj; + TQWidget* w = ( TQWidget* ) obj; // get current widget object name if ( w->name( 0 ) == 0 ) { - QString tmpStr; + TQString tmpStr; tmpStr.setNum( i ); tmpStr = "unnamed" + tmpStr; w->setName( tmpStr.latin1() ); @@ -958,7 +958,7 @@ QDict* KMdiChildFrm::unlinkChildren() // memorize focus policy pFocPolDict->insert( w->name(), pFocPol ); // remove event filter - ( ( QWidget* ) obj ) ->removeEventFilter( this ); + ( ( TQWidget* ) obj ) ->removeEventFilter( this ); } delete list; // delete the list, not the objects @@ -979,7 +979,7 @@ QDict* KMdiChildFrm::unlinkChildren() //============== resizeEvent ===============// -void KMdiChildFrm::resizeEvent( QResizeEvent * ) +void KMdiChildFrm::resizeEvent( TQResizeEvent * ) { doResize(); // an extra method because it can also called directly } @@ -1002,7 +1002,7 @@ void KMdiChildFrm::doResize( bool captionOnly ) int frmIconHeight = m_pWinIcon->pixmap() ->height(); int frmIconWidth = m_pWinIcon->pixmap() ->width(); int frmIconOffset = 1; - QWidget* pIconWidget = m_pWinIcon; + TQWidget* pIconWidget = m_pWinIcon; m_pCaption->setGeometry( KMDI_CHILDFRM_BORDER, KMDI_CHILDFRM_BORDER, captionWidth, captionHeight ); //The buttons are caption children @@ -1054,7 +1054,7 @@ void KMdiChildFrm::doResize( bool captionOnly ) //Resize the client if ( !captionOnly && m_pClient ) { - QSize newClientSize( captionWidth, + TQSize newClientSize( captionWidth, height() - ( KMDI_CHILDFRM_DOUBLE_BORDER + captionHeight + KMDI_CHILDFRM_SEPARATOR ) ); if ( newClientSize != m_pClient->size() ) { @@ -1065,7 +1065,7 @@ void KMdiChildFrm::doResize( bool captionOnly ) } } -static bool hasParent( QObject* par, QObject* o ) +static bool hasParent( TQObject* par, TQObject* o ) { while ( o && o != par ) o = o->parent(); @@ -1074,15 +1074,15 @@ static bool hasParent( QObject* par, QObject* o ) //============= eventFilter ===============// -bool KMdiChildFrm::eventFilter( QObject *obj, QEvent *e ) +bool KMdiChildFrm::eventFilter( TQObject *obj, TQEvent *e ) { switch ( e->type() ) { - case QEvent::Enter: + case TQEvent::Enter: { // check if the receiver is really a child of this frame bool bIsChild = false; - QObject* pObj = obj; + TQObject* pObj = obj; while ( ( pObj != 0L ) && !bIsChild ) { bIsChild = ( pObj == this ); @@ -1093,19 +1093,19 @@ bool KMdiChildFrm::eventFilter( QObject *obj, QEvent *e ) unsetResizeCursor(); } break; - case QEvent::MouseButtonPress: + case TQEvent::MouseButtonPress: { if ( !hasParent( m_pClient, obj ) ) { bool bIsSecondClick = false; - if ( m_timeMeasure.elapsed() <= QApplication::doubleClickInterval() ) + if ( m_timeMeasure.elapsed() <= TQApplication::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 ); + TQFocusEvent* pFE = new TQFocusEvent( TQFocusEvent::FocusIn ); + TQApplication::sendEvent( qApp->mainWidget(), pFE ); if ( m_pClient ) { m_pClient->updateTimeStamp(); @@ -1114,8 +1114,8 @@ bool KMdiChildFrm::eventFilter( QObject *obj, QEvent *e ) if ( ( obj->parent() != m_pCaption ) && ( obj != m_pCaption ) ) { - QWidget* w = ( QWidget* ) obj; - if ( ( w->focusPolicy() == QWidget::ClickFocus ) || ( w->focusPolicy() == QWidget::StrongFocus ) ) + TQWidget* w = ( TQWidget* ) obj; + if ( ( w->focusPolicy() == TQWidget::ClickFocus ) || ( w->focusPolicy() == TQWidget::StrongFocus ) ) { w->setFocus(); } @@ -1124,7 +1124,7 @@ bool KMdiChildFrm::eventFilter( QObject *obj, QEvent *e ) if ( ( obj == m_pWinIcon ) || ( obj == m_pUnixIcon ) ) { // in case we clicked on the icon button - if ( m_timeMeasure.elapsed() > QApplication::doubleClickInterval() ) + if ( m_timeMeasure.elapsed() > TQApplication::doubleClickInterval() ) { showSystemMenu(); m_timeMeasure.start(); @@ -1137,33 +1137,33 @@ bool KMdiChildFrm::eventFilter( QObject *obj, QEvent *e ) } } break; - case QEvent::Resize: + case TQEvent::Resize: { - if ( ( ( QWidget* ) obj == m_pClient ) && ( m_state == Normal ) ) + if ( ( ( TQWidget* ) obj == m_pClient ) && ( m_state == Normal ) ) { - QResizeEvent* re = ( QResizeEvent* ) e; + TQResizeEvent* re = ( TQResizeEvent* ) e; int captionHeight = m_pCaption->heightHint(); - QSize newChildFrmSize( re->size().width() + KMDI_CHILDFRM_DOUBLE_BORDER, + TQSize 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: + case TQEvent::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"))*/ ) + TQObject* pLostChild = ( ( TQChildEvent* ) e )->child(); + if ( ( pLostChild != 0L ) /*&& (pLostChild->inherits("TQWidget"))*/ ) { - QObjectList* list = pLostChild->queryList(); + TQObjectList* 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; + TQObjectListIt it( *list ); // iterate over all lost child widgets + TQObject* obj; while ( ( obj = it.current() ) != 0 ) { // for each found object... - QWidget* widg = ( QWidget* ) obj; + TQWidget* widg = ( TQWidget* ) obj; ++it; widg->removeEventFilter( this ); } @@ -1171,24 +1171,24 @@ bool KMdiChildFrm::eventFilter( QObject *obj, QEvent *e ) } } break; - case QEvent::ChildInserted: + case TQEvent::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( pNewChild ) ) + TQObject* pNewChild = ( ( TQChildEvent* ) e ) ->child(); + if ( ( pNewChild != 0L ) && ::qt_cast( pNewChild ) ) { - QWidget * pNewWidget = static_cast( pNewChild ); - QObjectList *list = pNewWidget->queryList( "QWidget" ); + TQWidget * pNewWidget = static_cast( pNewChild ); + TQObjectList *list = pNewWidget->queryList( "TQWidget" ); 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; + TQObjectListIt it( *list ); // iterate over all new child widgets + TQObject * obj; while ( ( obj = it.current() ) != 0 ) { // for each found object... - QWidget * widg = ( QWidget* ) obj; + TQWidget * widg = ( TQWidget* ) obj; ++it; - if ( !::qt_cast( widg ) ) + if ( !::qt_cast( widg ) ) { widg->installEventFilter( this ); } @@ -1216,7 +1216,7 @@ void KMdiChildFrm::raiseAndActivate() void KMdiChildFrm::setMinimumSize ( int minw, int minh ) { - QWidget::setMinimumSize( minw, minh ); + TQWidget::setMinimumSize( minw, minh ); if ( m_state == Maximized ) { m_pManager->setMinimumSize( minw, minh ); @@ -1225,7 +1225,7 @@ void KMdiChildFrm::setMinimumSize ( int minw, int minh ) //============= systemMenu ===============// -QPopupMenu* KMdiChildFrm::systemMenu() const +TQPopupMenu* KMdiChildFrm::systemMenu() const { if ( m_pSystemMenu == 0 ) return 0; @@ -1234,11 +1234,11 @@ QPopupMenu* KMdiChildFrm::systemMenu() const 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() ) ); + m_pSystemMenu->insertItem( i18n( "&Restore" ), this, TQT_SLOT( restorePressed() ) ); + m_pSystemMenu->insertItem( i18n( "&Move" ), m_pCaption, TQT_SLOT( slot_moveViaSystemMenu() ) ); + m_pSystemMenu->insertItem( i18n( "R&esize" ), this, TQT_SLOT( slot_resizeViaSystemMenu() ) ); + m_pSystemMenu->insertItem( i18n( "M&inimize" ), this, TQT_SLOT( minimizePressed() ) ); + m_pSystemMenu->insertItem( i18n( "M&aximize" ), this, TQT_SLOT( maximizePressed() ) ); if ( state() == Normal ) m_pSystemMenu->setItemEnabled( m_pSystemMenu->idAt( 0 ), false ); else if ( state() == Maximized ) @@ -1256,20 +1256,20 @@ QPopupMenu* KMdiChildFrm::systemMenu() const else { if ( state() != Normal ) - m_pSystemMenu->insertItem( i18n( "&Restore" ), this, SLOT( restorePressed() ) ); + m_pSystemMenu->insertItem( i18n( "&Restore" ), this, TQT_SLOT( restorePressed() ) ); if ( state() != Maximized ) - m_pSystemMenu->insertItem( i18n( "&Maximize" ), this, SLOT( maximizePressed() ) ); + m_pSystemMenu->insertItem( i18n( "&Maximize" ), this, TQT_SLOT( maximizePressed() ) ); if ( state() != Minimized ) - m_pSystemMenu->insertItem( i18n( "&Minimize" ), this, SLOT( minimizePressed() ) ); + m_pSystemMenu->insertItem( i18n( "&Minimize" ), this, TQT_SLOT( minimizePressed() ) ); if ( state() != Maximized ) - m_pSystemMenu->insertItem( i18n( "M&ove" ), m_pCaption, SLOT( slot_moveViaSystemMenu() ) ); + m_pSystemMenu->insertItem( i18n( "M&ove" ), m_pCaption, TQT_SLOT( slot_moveViaSystemMenu() ) ); if ( state() == Normal ) - m_pSystemMenu->insertItem( i18n( "&Resize" ), this, SLOT( slot_resizeViaSystemMenu() ) ); + m_pSystemMenu->insertItem( i18n( "&Resize" ), this, TQT_SLOT( slot_resizeViaSystemMenu() ) ); } - m_pSystemMenu->insertItem( i18n( "&Undock" ), this, SLOT( undockPressed() ) ); + m_pSystemMenu->insertItem( i18n( "&Undock" ), this, TQT_SLOT( undockPressed() ) ); m_pSystemMenu->insertSeparator(); - m_pSystemMenu->insertItem( i18n( "&Close" ), this, SLOT( closePressed() ) ); + m_pSystemMenu->insertItem( i18n( "&Close" ), this, TQT_SLOT( closePressed() ) ); return m_pSystemMenu; } @@ -1280,15 +1280,15 @@ void KMdiChildFrm::showSystemMenu() if ( KMdiMainFrm::frameDecorOfAttachedViews() != KMdi::Win95Look ) m_pUnixIcon->setDown( false ); - QPoint popupmenuPosition; + TQPoint popupmenuPosition; - QRect iconGeom; + TQRect 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 ); + popupmenuPosition = TQPoint( iconGeom.x(), iconGeom.y() + captionHeight() + KMDI_CHILDFRM_BORDER ); systemMenu() ->popup( mapToGlobal( popupmenuPosition ) ); } @@ -1301,8 +1301,8 @@ void KMdiChildFrm::switchToMinimizeLayout() // 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() ) ); + TQObject::disconnect( m_pMinimize, TQT_SIGNAL( clicked() ), this, TQT_SLOT( minimizePressed() ) ); + TQObject::connect( m_pMinimize, TQT_SIGNAL( clicked() ), this, TQT_SLOT( restorePressed() ) ); // resizing resize( 300, minimumHeight() ); @@ -1329,35 +1329,35 @@ void KMdiChildFrm::redecorateButtons() 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 ); + m_pMinButtonPixmap = new TQPixmap( win_minbutton ); + m_pMaxButtonPixmap = new TQPixmap( win_maxbutton ); + m_pRestoreButtonPixmap = new TQPixmap( win_restorebutton ); + m_pCloseButtonPixmap = new TQPixmap( win_closebutton ); + m_pUndockButtonPixmap = new TQPixmap( 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 ); + m_pMinButtonPixmap = new TQPixmap( kde_minbutton ); + m_pMaxButtonPixmap = new TQPixmap( kde_maxbutton ); + m_pRestoreButtonPixmap = new TQPixmap( kde_restorebutton ); + m_pCloseButtonPixmap = new TQPixmap( kde_closebutton ); + m_pUndockButtonPixmap = new TQPixmap( 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 ); + m_pMinButtonPixmap = new TQPixmap( kde2_minbutton ); + m_pMaxButtonPixmap = new TQPixmap( kde2_maxbutton ); + m_pRestoreButtonPixmap = new TQPixmap( kde2_restorebutton ); + m_pCloseButtonPixmap = new TQPixmap( kde2_closebutton ); + m_pUndockButtonPixmap = new TQPixmap( 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_pMinButtonPixmap = new TQPixmap( kde2laptop_minbutton ); + m_pMaxButtonPixmap = new TQPixmap( kde2laptop_maxbutton ); + m_pRestoreButtonPixmap = new TQPixmap( kde2laptop_restorebutton ); + m_pCloseButtonPixmap = new TQPixmap( kde2laptop_closebutton ); + m_pUndockButtonPixmap = new TQPixmap( kde2laptop_undockbutton ); } m_pUnixIcon->setAutoRaise( true ); @@ -1392,16 +1392,16 @@ void KMdiChildFrm::redecorateButtons() m_pUndock->setPixmap( *m_pUndockButtonPixmap ); } -QRect KMdiChildFrm::mdiAreaContentsRect() const +TQRect KMdiChildFrm::mdiAreaContentsRect() const { - QFrame * p = ( QFrame* ) parentWidget(); + TQFrame * p = ( TQFrame* ) parentWidget(); if ( p ) { return p->contentsRect(); } else { - QRect empty; + TQRect empty; return empty; } } diff --git a/lib/compatibility/kmdi/qextmdi/kmdichildfrm.h b/lib/compatibility/kmdi/qextmdi/kmdichildfrm.h index 58959a42..c6d1a618 100644 --- a/lib/compatibility/kmdi/qextmdi/kmdichildfrm.h +++ b/lib/compatibility/kmdi/qextmdi/kmdichildfrm.h @@ -28,14 +28,14 @@ #ifndef _KMDI_CHILD_FRM_H_ #define _KMDI_CHILD_FRM_H_ -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include -#include +#include #include "kmdichildfrmcaption.h" @@ -53,8 +53,8 @@ class KMDI_EXPORT KMdiWin32IconButton : public QLabel { Q_OBJECT public: - KMdiWin32IconButton( QWidget* parent, const char* name = 0 ); - virtual void mousePressEvent( QMouseEvent* ); + KMdiWin32IconButton( TQWidget* parent, const char* name = 0 ); + virtual void mousePressEvent( TQMouseEvent* ); signals: void pressed(); @@ -65,58 +65,58 @@ signals: */ //------------------------------------------------------------------------------ /** - * @short a QCustomEvent for move + * @short a TQCustomEvent 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 ) {} + KMdiChildFrmMoveEvent( TQMoveEvent *e ) : TQCustomEvent( TQEvent::Type( TQEvent::User + int( KMdi::EV_Move ) ), e ) {} }; //------------------------------------------------------------------------------ /** - * @short a QCustomEvent for begin of dragging + * @short a TQCustomEvent 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 ) {} + KMdiChildFrmDragBeginEvent( TQMouseEvent *e ) : TQCustomEvent( TQEvent::Type( TQEvent::User + int( KMdi::EV_DragBegin ) ), e ) {} }; //------------------------------------------------------------------------------ /** - * @short a QCustomEvent for end of dragging + * @short a TQCustomEvent 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 ) {} + KMdiChildFrmDragEndEvent( TQMouseEvent *e ) : TQCustomEvent( TQEvent::Type( TQEvent::User + int( KMdi::EV_DragEnd ) ), e ) {} }; //------------------------------------------------------------------------------ /** - * @short a QCustomEvent for begin of resizing + * @short a TQCustomEvent 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 ) {} + KMdiChildFrmResizeBeginEvent( TQMouseEvent *e ) : TQCustomEvent( TQEvent::Type( TQEvent::User + int( KMdi::EV_ResizeBegin ) ), e ) {} }; //------------------------------------------------------------------------------ /** - * @short a QCustomEvent for end of resizing + * @short a TQCustomEvent 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 ) {} + KMdiChildFrmResizeEndEvent( TQMouseEvent *e ) : TQCustomEvent( TQEvent::Type( TQEvent::User + int( KMdi::EV_ResizeEnd ) ), e ) {} }; @@ -144,23 +144,23 @@ 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; + TQToolButton* m_pUnixIcon; + TQToolButton* m_pMinimize; + TQToolButton* m_pMaximize; + TQToolButton* m_pClose; + TQToolButton* m_pUndock; MdiWindowState m_state; - QRect m_restoredRect; + TQRect 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; + TQPixmap* m_pIconButtonPixmap; + TQPixmap* m_pMinButtonPixmap; + TQPixmap* m_pMaxButtonPixmap; + TQPixmap* m_pRestoreButtonPixmap; + TQPixmap* m_pCloseButtonPixmap; + TQPixmap* m_pUndockButtonPixmap; /** * Every child frame window has an temporary ID in the Window menu of the child area. @@ -170,12 +170,12 @@ protected: /** * Imitates a system menu for child frame windows */ - QPopupMenu* m_pSystemMenu; + TQPopupMenu* m_pSystemMenu; - QSize m_oldClientMinSize; - QSize m_oldClientMaxSize; - QLayout::ResizeMode m_oldLayoutResizeMode; - QTime m_timeMeasure; + TQSize m_oldClientMinSize; + TQSize m_oldClientMaxSize; + TQLayout::ResizeMode m_oldLayoutResizeMode; + TQTime m_timeMeasure; // methods public: @@ -202,17 +202,17 @@ public: * 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 ) ); + void unsetClient( TQPoint positionOffset = TQPoint( 0, 0 ) ); /** * Sets the window icon pointer. */ - void setIcon( const QPixmap &pxm ); + void setIcon( const TQPixmap &pxm ); /** * Returns the child frame icon. */ - QPixmap* icon() const; + TQPixmap* icon() const; /** * Enables or disables the close button @@ -222,12 +222,12 @@ public: /** * Sets the caption of this window */ - void setCaption( const QString& text ); + void setCaption( const TQString& text ); /** * Gets the caption of this mdi child. */ - const QString& caption() { return m_pCaption->m_szCaption; } + const TQString& caption() { return m_pCaption->m_szCaption; } /** * Minimizes, Maximizes, or restores the window. @@ -242,17 +242,17 @@ public: /** * Returns the inner client area of the parent of this (which is KMdiChildArea). */ - QRect mdiAreaContentsRect() const; + TQRect mdiAreaContentsRect() const; /** * Returns the geometry that will be restored by calling restore(). */ - QRect restoreGeometry() const; + TQRect restoreGeometry() const; /** * Sets the geometry that will be restored by calling restore(). */ - void setRestoreGeometry( const QRect& newRestGeo ); + void setRestoreGeometry( const TQRect& newRestGeo ); /** * Forces updating the rects of the caption and so... @@ -263,7 +263,7 @@ public: /** * Returns the system menu. */ - QPopupMenu* systemMenu() const; + TQPopupMenu* systemMenu() const; /** * Returns the caption bar height @@ -309,39 +309,39 @@ protected: * 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 * ); + virtual void resizeEvent( TQResizeEvent * ); /** * 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 ); + virtual void mouseMoveEvent( TQMouseEvent *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 ); + virtual void mousePressEvent( TQMouseEvent *e ); /** * Reimplemented from the base class. * Sets a normal cursor and leaves the resize mode. */ - virtual void mouseReleaseEvent( QMouseEvent * ); + virtual void mouseReleaseEvent( TQMouseEvent * ); /** * 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 ); + virtual void moveEvent( TQMoveEvent* me ); /** * Reimplemented from the base class. If not in resize mode, it sets the mouse cursor to normal appearance. */ - virtual void leaveEvent( QEvent * ); + virtual void leaveEvent( TQEvent * ); /** * Reimplemented from the base class. @@ -349,7 +349,7 @@ protected: * -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* ); + virtual bool eventFilter( TQObject*, TQEvent* ); /** * Calculates the new geometry from the new mouse position given as parameters @@ -422,13 +422,13 @@ 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* pFocPolDict ); + void linkChildren( TQDict* 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* unlinkChildren(); + TQDict* unlinkChildren(); /** * Calculates the corner id for the resize cursor. The return value can be tested for: diff --git a/lib/compatibility/kmdi/qextmdi/kmdichildfrmcaption.cpp b/lib/compatibility/kmdi/qextmdi/kmdichildfrmcaption.cpp index 815d07d4..65d348f3 100644 --- a/lib/compatibility/kmdi/qextmdi/kmdichildfrmcaption.cpp +++ b/lib/compatibility/kmdi/qextmdi/kmdichildfrmcaption.cpp @@ -28,11 +28,11 @@ #include "kmdichildfrmcaption.h" #include "kmdichildfrmcaption.moc" -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include "kmdidefines.h" #include "kmdichildfrm.h" @@ -66,7 +66,7 @@ //============== KMdiChildFrmCaption =============// KMdiChildFrmCaption::KMdiChildFrmCaption( KMdiChildFrm *parent ) - : QWidget( parent, "kmdi_childfrmcaption" ) + : TQWidget( parent, "kmdi_childfrmcaption" ) { m_szCaption = i18n( "Unnamed" ); m_bActive = false; @@ -83,14 +83,14 @@ KMdiChildFrmCaption::~KMdiChildFrmCaption() //============= mousePressEvent ==============// -void KMdiChildFrmCaption::mousePressEvent( QMouseEvent *e ) +void KMdiChildFrmCaption::mousePressEvent( TQMouseEvent *e ) { if ( e->button() == LeftButton ) { setMouseTracking( false ); if ( KMdiMainFrm::frameDecorOfAttachedViews() != KMdi::Win95Look ) { - QApplication::setOverrideCursor( Qt::sizeAllCursor, true ); + TQApplication::setOverrideCursor( Qt::sizeAllCursor, true ); } m_pParent->m_bDragging = true; m_offset = mapToParent( e->pos() ); @@ -103,12 +103,12 @@ void KMdiChildFrmCaption::mousePressEvent( QMouseEvent *e ) //============= mouseReleaseEvent ============// -void KMdiChildFrmCaption::mouseReleaseEvent( QMouseEvent *e ) +void KMdiChildFrmCaption::mouseReleaseEvent( TQMouseEvent *e ) { if ( e->button() == LeftButton ) { if ( KMdiMainFrm::frameDecorOfAttachedViews() != KMdi::Win95Look ) - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); releaseMouse(); if ( m_pParent->m_bDragging ) @@ -119,7 +119,7 @@ void KMdiChildFrmCaption::mouseReleaseEvent( QMouseEvent *e ) //notify child view KMdiChildFrmDragEndEvent ue( e ); if ( m_pParent->m_pClient != 0L ) - QApplication::sendEvent( m_pParent->m_pClient, &ue ); + TQApplication::sendEvent( m_pParent->m_pClient, &ue ); m_bChildInDrag = false; } @@ -128,7 +128,7 @@ void KMdiChildFrmCaption::mouseReleaseEvent( QMouseEvent *e ) } //============== mouseMoveEvent =============// -void KMdiChildFrmCaption::mouseMoveEvent( QMouseEvent *e ) +void KMdiChildFrmCaption::mouseMoveEvent( TQMouseEvent *e ) { if ( !m_pParent->m_bDragging ) return ; @@ -138,12 +138,12 @@ void KMdiChildFrmCaption::mouseMoveEvent( QMouseEvent *e ) //notify child view KMdiChildFrmDragBeginEvent ue( e ); if ( m_pParent->m_pClient != 0L ) - QApplication::sendEvent( m_pParent->m_pClient, &ue ); + TQApplication::sendEvent( m_pParent->m_pClient, &ue ); m_bChildInDrag = true; } - QPoint relMousePosInChildArea = m_pParent->m_pManager->mapFromGlobal( e->globalPos() ); + TQPoint 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 ) ) @@ -160,7 +160,7 @@ void KMdiChildFrmCaption::mouseMoveEvent( QMouseEvent *e ) if ( relMousePosInChildArea.y() > m_pParent->m_pManager->height() ) relMousePosInChildArea.ry() = m_pParent->m_pManager->height(); } - QPoint mousePosInChildArea = relMousePosInChildArea - m_offset; + TQPoint mousePosInChildArea = relMousePosInChildArea - m_offset; // set new child frame position parentWidget() ->move( mousePosInChildArea ); @@ -187,7 +187,7 @@ void KMdiChildFrmCaption::setActive( bool bActive ) //=============== setCaption ===============// -void KMdiChildFrmCaption::setCaption( const QString& text ) +void KMdiChildFrmCaption::setCaption( const TQString& text ) { m_szCaption = text; repaint( false ); @@ -224,10 +224,10 @@ int KMdiChildFrmCaption::heightHint() //=============== paintEvent ==============// -void KMdiChildFrmCaption::paintEvent( QPaintEvent * ) +void KMdiChildFrmCaption::paintEvent( TQPaintEvent * ) { - QPainter p( this ); - QRect r = rect(); + TQPainter p( this ); + TQRect r = rect(); p.setFont( m_pParent->m_pManager->m_captionFont ); if ( m_bActive ) @@ -252,15 +252,15 @@ void KMdiChildFrmCaption::paintEvent( QPaintEvent * ) 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 ); + TQString text = abbreviateText( m_szCaption, captionWidthForText ); p.drawText( r, AlignVCenter | AlignLeft | SingleLine, text ); } -QString KMdiChildFrmCaption::abbreviateText( QString origStr, int maxWidth ) +TQString KMdiChildFrmCaption::abbreviateText( TQString origStr, int maxWidth ) { - QFontMetrics fm = fontMetrics(); + TQFontMetrics fm = fontMetrics(); int actualWidth = fm.width( origStr ); int realLetterCount = origStr.length(); @@ -272,7 +272,7 @@ QString KMdiChildFrmCaption::abbreviateText( QString origStr, int maxWidth ) newLetterCount = realLetterCount; // should be 0 anyway int w = maxWidth + 1; - QString s = origStr; + TQString s = origStr; if ( newLetterCount <= 0 ) s = ""; @@ -291,7 +291,7 @@ QString KMdiChildFrmCaption::abbreviateText( QString origStr, int maxWidth ) s = origStr.left( 1 ); } } - QFontMetrics fm = fontMetrics(); + TQFontMetrics fm = fontMetrics(); w = fm.width( s ); newLetterCount--; } @@ -300,7 +300,7 @@ QString KMdiChildFrmCaption::abbreviateText( QString origStr, int maxWidth ) //============= mouseDoubleClickEvent ===========// -void KMdiChildFrmCaption::mouseDoubleClickEvent( QMouseEvent * ) +void KMdiChildFrmCaption::mouseDoubleClickEvent( TQMouseEvent * ) { m_pParent->maximizePressed(); } @@ -313,10 +313,10 @@ void KMdiChildFrmCaption::slot_moveViaSystemMenu() grabMouse(); if ( KMdiMainFrm::frameDecorOfAttachedViews() != KMdi::Win95Look ) - QApplication::setOverrideCursor( Qt::sizeAllCursor, true ); + TQApplication::setOverrideCursor( Qt::sizeAllCursor, true ); m_pParent->m_bDragging = true; - m_offset = mapFromGlobal( QCursor::pos() ); + m_offset = mapFromGlobal( TQCursor::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 index 158f76b0..4151f0c0 100644 --- a/lib/compatibility/kmdi/qextmdi/kmdichildfrmcaption.h +++ b/lib/compatibility/kmdi/qextmdi/kmdichildfrmcaption.h @@ -27,7 +27,7 @@ #ifndef _KMDI_CHILD_FRM_CAPTION_H_ #define _KMDI_CHILD_FRM_CAPTION_H_ -#include +#include #include "kmdidefines.h" @@ -63,7 +63,7 @@ public: /** * Repaint with a new caption bar title */ - void setCaption( const QString& text ); + void setCaption( const TQString& text ); /** * Returns the caption bar height depending on the used font @@ -80,40 +80,40 @@ protected: /** * Draws the caption bar and its title using the settings */ - virtual void paintEvent( QPaintEvent *e ); + virtual void paintEvent( TQPaintEvent *e ); /** * The same as KMdiChildFrmCaption::slot_moveViaSystemMenu */ - virtual void mousePressEvent( QMouseEvent * ); + virtual void mousePressEvent( TQMouseEvent * ); /** * Calls maximizePressed of the parent widget ( KMdiChildFrm ) */ - virtual void mouseDoubleClickEvent( QMouseEvent * ); + virtual void mouseDoubleClickEvent( TQMouseEvent * ); /** * Restore the normal mouse cursor, set the state variable back to 'not moving' */ - virtual void mouseReleaseEvent( QMouseEvent * ); + virtual void mouseReleaseEvent( TQMouseEvent * ); /** * Checks if out of move range of the KMdiChildArea and calls KMdiChildFrm::move */ - virtual void mouseMoveEvent( QMouseEvent *e ); + virtual void mouseMoveEvent( TQMouseEvent *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 ); + TQString abbreviateText( TQString origStr, int maxWidth ); // attributes public: /** * the title string shown in the caption bar */ - QString m_szCaption; + TQString m_szCaption; protected: // Protected attributes /** @@ -129,7 +129,7 @@ protected: // Protected attributes /** * the position offset related to its parent widget (internally used for translating mouse move positions */ - QPoint m_offset; + TQPoint m_offset; /** * True if the child knows that it is currently being dragged. diff --git a/lib/compatibility/kmdi/qextmdi/kmdichildview.cpp b/lib/compatibility/kmdi/qextmdi/kmdichildview.cpp index f09cbb3e..8fe116e1 100644 --- a/lib/compatibility/kmdi/qextmdi/kmdichildview.cpp +++ b/lib/compatibility/kmdi/qextmdi/kmdichildview.cpp @@ -32,20 +32,20 @@ #include "kmdichildview.h" #include "kmdichildview.moc" -#include -#include +#include +#include #include "kmdimainfrm.h" #include "kmdichildfrm.h" #include "kmdidefines.h" #include #include -#include +#include //============ KMdiChildView ============// -KMdiChildView::KMdiChildView( const QString& caption, QWidget* parentWidget, const char* name, WFlags f ) - : QWidget( parentWidget, name, f ) +KMdiChildView::KMdiChildView( const TQString& caption, TQWidget* parentWidget, const char* name, WFlags f ) + : TQWidget( parentWidget, name, f ) , m_focusedChildWidget( 0L ) , m_firstFocusableChildWidget( 0L ) , m_lastFocusableChildWidget( 0L ) @@ -73,8 +73,8 @@ KMdiChildView::KMdiChildView( const QString& caption, QWidget* parentWidget, con //============ KMdiChildView ============// -KMdiChildView::KMdiChildView( QWidget* parentWidget, const char* name, WFlags f ) - : QWidget( parentWidget, name, f ) +KMdiChildView::KMdiChildView( TQWidget* parentWidget, const char* name, WFlags f ) + : TQWidget( parentWidget, name, f ) , m_focusedChildWidget( 0L ) , m_firstFocusableChildWidget( 0L ) , m_lastFocusableChildWidget( 0L ) @@ -101,7 +101,7 @@ KMdiChildView::~KMdiChildView() kdDebug( 760 ) << k_funcinfo << endl; } -void KMdiChildView::trackIconAndCaptionChanges( QWidget *view ) +void KMdiChildView::trackIconAndCaptionChanges( TQWidget *view ) { m_trackChanges = view; } @@ -109,41 +109,41 @@ void KMdiChildView::trackIconAndCaptionChanges( QWidget *view ) //============== internal geometry ==============// -QRect KMdiChildView::internalGeometry() const +TQRect KMdiChildView::internalGeometry() const { if ( mdiParent() ) { // is attached // get the client area coordinates inside the MDI child frame - QRect posInFrame = geometry(); + TQRect 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 ); + TQPoint ptTopLeft = mdiParent() ->mapToParent( posInFrame.topLeft() ); + TQSize sz = size(); + return TQRect( ptTopLeft, sz ); } else { - QRect geo = geometry(); - QRect frameGeo = externalGeometry(); - return QRect( frameGeo.x(), frameGeo.y(), geo.width(), geo.height() ); + TQRect geo = geometry(); + TQRect frameGeo = externalGeometry(); + return TQRect( frameGeo.x(), frameGeo.y(), geo.width(), geo.height() ); // return geometry(); } } //============== set internal geometry ==============// -void KMdiChildView::setInternalGeometry( const QRect& newGeometry ) +void KMdiChildView::setInternalGeometry( const TQRect& newGeometry ) { if ( mdiParent() ) { // is attached // retrieve the frame size - QRect geo = internalGeometry(); - QRect frameGeo = externalGeometry(); + TQRect geo = internalGeometry(); + TQRect 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; + // create the new geometry that is accepted by the TQWidget::setGeometry() method + TQRect newGeoQt; newGeoQt.setX( newGeometry.x() - nFrameSizeLeft ); newGeoQt.setY( newGeometry.y() - nFrameSizeTop ); @@ -158,13 +158,13 @@ void KMdiChildView::setInternalGeometry( const QRect& newGeometry ) else { // retrieve the frame size - QRect geo = internalGeometry(); - QRect frameGeo = externalGeometry(); + TQRect geo = internalGeometry(); + TQRect 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; + // create the new geometry that is accepted by the TQWidget::setGeometry() method + TQRect newGeoQt; newGeoQt.setX( newGeometry.x() - nFrameSizeLeft ); newGeoQt.setY( newGeometry.y() - nFrameSizeTop ); @@ -179,14 +179,14 @@ void KMdiChildView::setInternalGeometry( const QRect& newGeometry ) //============== external geometry ==============// -QRect KMdiChildView::externalGeometry() const +TQRect KMdiChildView::externalGeometry() const { return mdiParent() ? mdiParent()->frameGeometry() : frameGeometry(); } //============== set external geometry ==============// -void KMdiChildView::setExternalGeometry( const QRect& newGeometry ) +void KMdiChildView::setExternalGeometry( const TQRect& newGeometry ) { if ( mdiParent() ) { // is attached @@ -195,16 +195,16 @@ void KMdiChildView::setExternalGeometry( const QRect& newGeometry ) else { // retrieve the frame size - QRect geo = internalGeometry(); - QRect frameGeo = externalGeometry(); + TQRect geo = internalGeometry(); + TQRect 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 + // create the new geometry that is accepted by the TQWidget::setGeometry() method // not attached => the window system makes the frame - QRect newGeoQt; + TQRect newGeoQt; newGeoQt.setX( newGeometry.x() + nFrameSizeLeft ); newGeoQt.setY( newGeometry.y() + nFrameSizeTop ); newGeoQt.setWidth( newGeometry.width() - nTotalFrameWidth ); @@ -233,7 +233,7 @@ void KMdiChildView::minimize( bool bAnimate ) void KMdiChildView::showMinimized() { emit isMinimizedNow(); - QWidget::showMinimized(); + TQWidget::showMinimized(); } //slot: @@ -261,7 +261,7 @@ void KMdiChildView::maximize( bool bAnimate ) void KMdiChildView::showMaximized() { emit isMaximizedNow(); - QWidget::showMaximized(); + TQWidget::showMaximized(); } //slot: @@ -272,7 +272,7 @@ void KMdiChildView::maximize() //============== restoreGeometry ================// -QRect KMdiChildView::restoreGeometry() +TQRect KMdiChildView::restoreGeometry() { if ( mdiParent() ) return mdiParent() ->restoreGeometry(); @@ -282,7 +282,7 @@ QRect KMdiChildView::restoreGeometry() //============== setRestoreGeometry ================// -void KMdiChildView::setRestoreGeometry( const QRect& newRestGeo ) +void KMdiChildView::setRestoreGeometry( const TQRect& newRestGeo ) { if ( mdiParent() ) mdiParent()->setRestoreGeometry( newRestGeo ); @@ -309,7 +309,7 @@ bool KMdiChildView::isMinimized() const if ( mdiParent() ) return ( mdiParent()->state() == KMdiChildFrm::Minimized ); else - return QWidget::isMinimized(); + return TQWidget::isMinimized(); } //============== isMaximized ? ==================// @@ -319,7 +319,7 @@ bool KMdiChildView::isMaximized() const if ( mdiParent() ) return ( mdiParent()->state() == KMdiChildFrm::Maximized ); else - return QWidget::isMaximized(); + return TQWidget::isMaximized(); } //============== restore ================// @@ -341,7 +341,7 @@ void KMdiChildView::restore() void KMdiChildView::showNormal() { emit isRestoredNow(); - QWidget::showNormal(); + TQWidget::showNormal(); } //=============== youAreAttached ============// @@ -362,28 +362,28 @@ void KMdiChildView::youAreDetached() if ( myIconPtr() ) setIcon( *( myIconPtr() ) ); - setFocusPolicy( QWidget::StrongFocus ); + setFocusPolicy( TQWidget::StrongFocus ); emit isDetachedNow(); } //================ setCaption ================// // this set the caption of only the window -void KMdiChildView::setCaption( const QString& szCaption ) +void KMdiChildView::setCaption( const TQString& 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 ); + TQWidget::setCaption( m_szCaption ); emit windowCaptionChanged( m_szCaption ); } //============== closeEvent ================// -void KMdiChildView::closeEvent( QCloseEvent *e ) +void KMdiChildView::closeEvent( TQCloseEvent *e ) { e->ignore(); //we ignore the event , and then close later if needed. emit childWindowCloseRequest( this ); @@ -391,19 +391,19 @@ void KMdiChildView::closeEvent( QCloseEvent *e ) //================ myIconPtr =================// -QPixmap* KMdiChildView::myIconPtr() +TQPixmap* KMdiChildView::myIconPtr() { return 0; } //============= focusInEvent ===============// -void KMdiChildView::focusInEvent( QFocusEvent *e ) +void KMdiChildView::focusInEvent( TQFocusEvent *e ) { - QWidget::focusInEvent( e ); + TQWidget::focusInEvent( e ); // every widget get a focusInEvent when a popup menu is opened!?! -> maybe bug of QT - if ( e && ( ( e->reason() ) == QFocusEvent::Popup ) ) + if ( e && ( ( e->reason() ) == TQFocusEvent::Popup ) ) return ; @@ -456,17 +456,17 @@ void KMdiChildView::activate() //============= focusOutEvent ===============// -void KMdiChildView::focusOutEvent( QFocusEvent* e ) +void KMdiChildView::focusOutEvent( TQFocusEvent* e ) { - QWidget::focusOutEvent( e ); + TQWidget::focusOutEvent( e ); emit lostFocus( this ); } //============= resizeEvent ===============// -void KMdiChildView::resizeEvent( QResizeEvent* e ) +void KMdiChildView::resizeEvent( TQResizeEvent* e ) { - QWidget::resizeEvent( e ); + TQWidget::resizeEvent( e ); if ( m_stateChanged ) { @@ -492,16 +492,16 @@ void KMdiChildView::slot_childDestroyed() // if we lost a child we uninstall ourself as event filter for the lost // child and its children - const QObject * pLostChild = QObject::sender(); + const TQObject * pLostChild = TQObject::sender(); if ( pLostChild && ( pLostChild->isWidgetType() ) ) { - QObjectList* list = ( ( QObject* ) ( pLostChild ) ) ->queryList( "QWidget" ); + TQObjectList* list = ( ( TQObject* ) ( pLostChild ) ) ->queryList( "TQWidget" ); 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; + TQObjectListIt it( *list ); // iterate over all lost child widgets + TQObject* obj; while ( ( obj = it.current() ) != 0 ) { // for each found object... - QWidget * widg = ( QWidget* ) obj; + TQWidget * widg = ( TQWidget* ) obj; ++it; widg->removeEventFilter( this ); if ( m_firstFocusableChildWidget == widg ) @@ -518,16 +518,16 @@ void KMdiChildView::slot_childDestroyed() } //============= eventFilter ===============// -bool KMdiChildView::eventFilter( QObject *obj, QEvent *e ) +bool KMdiChildView::eventFilter( TQObject *obj, TQEvent *e ) { - if ( e->type() == QEvent::KeyPress && isAttached() ) + if ( e->type() == TQEvent::KeyPress && isAttached() ) { - QKeyEvent* ke = ( QKeyEvent* ) e; + TQKeyEvent* ke = ( TQKeyEvent* ) e; if ( ke->key() == Qt::Key_Tab ) { - QWidget* w = ( QWidget* ) obj; + TQWidget* w = ( TQWidget* ) obj; FocusPolicy wfp = w->focusPolicy(); - if ( wfp == QWidget::StrongFocus || wfp == QWidget::TabFocus || w->focusPolicy() == QWidget::WheelFocus ) + if ( wfp == TQWidget::StrongFocus || wfp == TQWidget::TabFocus || w->focusPolicy() == TQWidget::WheelFocus ) { if ( m_lastFocusableChildWidget != 0 ) { @@ -540,13 +540,13 @@ bool KMdiChildView::eventFilter( QObject *obj, QEvent *e ) } } } - else if ( e->type() == QEvent::FocusIn ) + else if ( e->type() == TQEvent::FocusIn ) { if ( obj->isWidgetType() ) { - QObjectList * list = queryList( "QWidget" ); + TQObjectList * list = queryList( "TQWidget" ); if ( list->find( obj ) != -1 ) - m_focusedChildWidget = ( QWidget* ) obj; + m_focusedChildWidget = ( TQWidget* ) obj; delete list; // delete the list, not the objects } @@ -561,24 +561,24 @@ bool KMdiChildView::eventFilter( QObject *obj, QEvent *e ) } } } - else if ( e->type() == QEvent::ChildRemoved ) + else if ( e->type() == TQEvent::ChildRemoved ) { // if we lost a child we uninstall ourself as event filter for the lost // child and its children - QObject * pLostChild = ( ( QChildEvent* ) e ) ->child(); + TQObject * pLostChild = ( ( TQChildEvent* ) e ) ->child(); if ( ( pLostChild != 0L ) && ( pLostChild->isWidgetType() ) ) { - QObjectList * list = pLostChild->queryList( "QWidget" ); + TQObjectList * list = pLostChild->queryList( "TQWidget" ); 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; + TQObjectListIt it( *list ); // iterate over all lost child widgets + TQObject * o; while ( ( o = it.current() ) != 0 ) { // for each found object... - QWidget * widg = ( QWidget* ) o; + TQWidget * widg = ( TQWidget* ) o; ++it; widg->removeEventFilter( this ); FocusPolicy wfp = widg->focusPolicy(); - if ( wfp == QWidget::StrongFocus || wfp == QWidget::TabFocus || widg->focusPolicy() == QWidget::WheelFocus ) + if ( wfp == TQWidget::StrongFocus || wfp == TQWidget::TabFocus || widg->focusPolicy() == TQWidget::WheelFocus ) { if ( m_firstFocusableChildWidget == widg ) m_firstFocusableChildWidget = 0L; // reset first widget @@ -590,29 +590,29 @@ bool KMdiChildView::eventFilter( QObject *obj, QEvent *e ) delete list; // delete the list, not the objects } } - else if ( e->type() == QEvent::ChildInserted ) + else if ( e->type() == TQEvent::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(); + TQObject * pNewChild = ( ( TQChildEvent* ) e ) ->child(); if ( ( pNewChild != 0L ) && ( pNewChild->isWidgetType() ) ) { - QWidget * pNewWidget = ( QWidget* ) pNewChild; + TQWidget * pNewWidget = ( TQWidget* ) pNewChild; if ( pNewWidget->testWFlags( Qt::WType_Dialog | Qt::WShowModal ) ) return false; - QObjectList *list = pNewWidget->queryList( "QWidget" ); + TQObjectList *list = pNewWidget->queryList( "TQWidget" ); 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; + TQObjectListIt it( *list ); // iterate over all new child widgets + TQObject * o; while ( ( o = it.current() ) != 0 ) { // for each found object... - QWidget * widg = ( QWidget* ) o; + TQWidget * widg = ( TQWidget* ) o; ++it; widg->installEventFilter( this ); - connect( widg, SIGNAL( destroyed() ), this, SLOT( slot_childDestroyed() ) ); + connect( widg, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( slot_childDestroyed() ) ); FocusPolicy wfp = widg->focusPolicy(); - if ( wfp == QWidget::StrongFocus || wfp == QWidget::TabFocus || widg->focusPolicy() == QWidget::WheelFocus ) + if ( wfp == TQWidget::StrongFocus || wfp == TQWidget::TabFocus || widg->focusPolicy() == TQWidget::WheelFocus ) { if ( m_firstFocusableChildWidget == 0 ) m_firstFocusableChildWidget = widg; // first widge @@ -625,15 +625,15 @@ bool KMdiChildView::eventFilter( QObject *obj, QEvent *e ) } else { - if ( e->type() == QEvent::IconChange ) + if ( e->type() == TQEvent::IconChange ) { - // qDebug("KMDiChildView:: QEvent:IconChange intercepted\n"); + // qDebug("KMDiChildView:: TQEvent:IconChange intercepted\n"); if ( obj == this ) - iconUpdated( this, icon() ? ( *icon() ) : QPixmap() ); + iconUpdated( this, icon() ? ( *icon() ) : TQPixmap() ); else if ( obj == m_trackChanges ) - setIcon( m_trackChanges->icon() ? ( *( m_trackChanges->icon() ) ) : QPixmap() ); + setIcon( m_trackChanges->icon() ? ( *( m_trackChanges->icon() ) ) : TQPixmap() ); } - if ( e->type() == QEvent::CaptionChange ) + if ( e->type() == TQEvent::CaptionChange ) { if ( obj == this ) captionUpdated( this, caption() ); @@ -646,41 +646,41 @@ bool KMdiChildView::eventFilter( QObject *obj, QEvent *e ) /** 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; + TQObjectList* list = queryList( "TQWidget" ); + TQObjectListIt it( *list ); // iterate over all child widgets + TQObject* obj; while ( ( obj = it.current() ) != 0 ) { // for each found object... - QWidget* widg = ( QWidget* ) obj; + TQWidget* widg = ( TQWidget* ) obj; ++it; widg->removeEventFilter( this ); } delete list; // delete the list, not the objects } -QWidget* KMdiChildView::focusedChildWidget() +TQWidget* KMdiChildView::focusedChildWidget() { return m_focusedChildWidget; } -void KMdiChildView::setFirstFocusableChildWidget( QWidget* firstFocusableChildWidget ) +void KMdiChildView::setFirstFocusableChildWidget( TQWidget* firstFocusableChildWidget ) { m_firstFocusableChildWidget = firstFocusableChildWidget; } -void KMdiChildView::setLastFocusableChildWidget( QWidget* lastFocusableChildWidget ) +void KMdiChildView::setLastFocusableChildWidget( TQWidget* lastFocusableChildWidget ) { m_lastFocusableChildWidget = lastFocusableChildWidget; } /** Set a new value of the task bar button caption */ -void KMdiChildView::setTabCaption ( const QString& stbCaption ) +void KMdiChildView::setTabCaption ( const TQString& stbCaption ) { m_sTabCaption = stbCaption; emit tabCaptionChanged( m_sTabCaption ); } -void KMdiChildView::setMDICaption ( const QString& caption ) +void KMdiChildView::setMDICaption ( const TQString& caption ) { setCaption( caption ); setTabCaption( caption ); @@ -713,7 +713,7 @@ void KMdiChildView::slot_clickedInDockMenu() void KMdiChildView::setMinimumSize( int minw, int minh ) { - QWidget::setMinimumSize( minw, minh ); + TQWidget::setMinimumSize( minw, minh ); if ( mdiParent() && mdiParent()->state() != KMdiChildFrm::Minimized ) { mdiParent() ->setMinimumSize( minw + KMDI_CHILDFRM_DOUBLE_BORDER, @@ -737,7 +737,7 @@ void KMdiChildView::setMaximumSize( int maxw, int maxh ) mdiParent()->setMaximumSize( w, h ); } - QWidget::setMaximumSize( maxw, maxh ); + TQWidget::setMaximumSize( maxw, maxh ); } //============= show ===============// @@ -747,7 +747,7 @@ void KMdiChildView::show() if ( mdiParent() ) mdiParent()->show(); - QWidget::show(); + TQWidget::show(); } //============= hide ===============// @@ -757,7 +757,7 @@ void KMdiChildView::hide() if ( mdiParent() ) mdiParent()->hide(); - QWidget::hide(); + TQWidget::hide(); } //============= raise ===============// @@ -767,7 +767,7 @@ void KMdiChildView::raise() if ( mdiParent() ) //TODO Check Z-order mdiParent()->raise(); - QWidget::raise(); + TQWidget::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 index fda0b95b..656c17fd 100644 --- a/lib/compatibility/kmdi/qextmdi/kmdichildview.h +++ b/lib/compatibility/kmdi/qextmdi/kmdichildview.h @@ -31,11 +31,11 @@ #ifndef _KMDI_CHILD_VIEW_H_ #define _KMDI_CHILD_VIEW_H_ -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include "kmdichildfrm.h" @@ -65,18 +65,18 @@ class KMdiChildViewPrivate; * or you wrap them by a KMdiChildView somehow like this: * * \code - * void DocViewMan::addKMdiFrame(QWidget* pNewView, bool bShow, const QPixmap& icon) + * void DocViewMan::addKMdiFrame(TQWidget* pNewView, bool bShow, const TQPixmap& 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)); + * TQBoxLayout* pLayout = new TQHBoxLayout( pMDICover, 0, -1, "layout"); + * pNewView->reparent( pMDICover, TQPoint(0,0)); * pLayout->addWidget( pNewView); * pMDICover->setName( pNewView->name()); * // captions - * QString shortName = pNewView->caption(); + * TQString shortName = pNewView->caption(); * int length = shortName.length(); * shortName = shortName.right(length - (shortName.findRev('/') +1)); * pMDICover->setTabCaption( shortName); @@ -94,7 +94,7 @@ class KMdiChildViewPrivate; * 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*)) ); + * connect( m_pParent, TQT_SIGNAL(childViewIsDetachedNow(TQWidget*)), this, TQT_SLOT(initKeyAccel(TQWidget*)) ); * * m_pParent->addWindow( pMDICover, flags); * // correct the default settings of KMdi ('cause we haven't a tab order for subwidget focuses) @@ -116,27 +116,27 @@ protected: /** * See KMdiChildView::caption */ - QString m_szCaption; + TQString m_szCaption; /** * See KMdiChildView::tabCaption */ - QString m_sTabCaption; + TQString m_sTabCaption; /** * See KMdiChildView::focusedChildWidget */ - QWidget* m_focusedChildWidget; + TQWidget* m_focusedChildWidget; /** * See KMdiChildView::setFirstFocusableChildWidget */ - QWidget* m_firstFocusableChildWidget; + TQWidget* m_firstFocusableChildWidget; /** * See KMdiChildView::setLastFocusableChildWidget */ - QWidget* m_lastFocusableChildWidget; + TQWidget* m_lastFocusableChildWidget; /** * Every child view window has an temporary ID in the Window menu of the main frame. @@ -152,7 +152,7 @@ protected: /** * Holds the time when this view was activated (not only displayed) for the last time. */ - QDateTime m_time; + TQDateTime m_time; private: /** @@ -182,13 +182,13 @@ public: /** * Constructor */ - KMdiChildView( const QString& caption, QWidget* parentWidget = 0L, const char* name = 0L, WFlags f = 0 ); + KMdiChildView( const TQString& caption, TQWidget* 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 ); + KMdiChildView( TQWidget* parentWidget = 0L, const char* name = 0L, WFlags f = 0 ); /** * Destructor @@ -208,17 +208,17 @@ public: /** * Memorizes the first focusable child widget of this widget */ - void setFirstFocusableChildWidget( QWidget* ); + void setFirstFocusableChildWidget( TQWidget* ); /** * Memorizes the last focusable child widget of this widget */ - void setLastFocusableChildWidget( QWidget* ); + void setLastFocusableChildWidget( TQWidget* ); /** * Returns the current focused child widget of this widget */ - QWidget* focusedChildWidget(); + TQWidget* focusedChildWidget(); /** * Returns true if the MDI view is a child window within the MDI mainframe widget @@ -229,28 +229,28 @@ public: /** * Returns the caption of the child window (different from the caption on the button in the taskbar) */ - const QString& caption() const { return m_szCaption; } + const TQString& caption() const { return m_szCaption; } /** * Returns the caption of the button on the taskbar */ - const QString& tabCaption() const { return m_sTabCaption; } + const TQString& 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 ); + virtual void setCaption( const TQString& szCaption ); /** * Sets the caption of the button referring to this window */ - virtual void setTabCaption( const QString& caption ); + virtual void setTabCaption( const TQString& caption ); /** * Sets the caption of both the window and the button on the taskbar */ - virtual void setMDICaption( const QString &caption ); + virtual void setMDICaption( const TQString &caption ); /** * Returns the KMdiChildFrm parent widget (or 0 if the window is not attached) @@ -270,37 +270,37 @@ public: bool isMaximized() const; /** - * Returns the geometry of this MDI child window as QWidget::geometry() does. + * Returns the geometry of this MDI child window as TQWidget::geometry() does. */ - QRect internalGeometry() const; + TQRect 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()! + * differs from the behavior of TQWidget::setGeometry()! */ - void setInternalGeometry( const QRect& newGeomety ); + void setInternalGeometry( const TQRect& newGeomety ); /** * Returns the frame geometry of this window or of the parent if there is any... */ - QRect externalGeometry() const; + TQRect 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()! + * from the behavior of TQWidget::setGeometry()! */ - void setExternalGeometry( const QRect& newGeomety ); + void setExternalGeometry( const TQRect& newGeomety ); /** * You should override this function in the derived class. */ - virtual QPixmap* myIconPtr(); + virtual TQPixmap* myIconPtr(); /** * Minimizes this window when it is attached to the Mdi manager. @@ -317,12 +317,12 @@ public: /** * Returns the geometry that will be restored by calling restore(). */ - QRect restoreGeometry(); + TQRect restoreGeometry(); /** * Sets the geometry that will be restored by calling restore(). */ - void setRestoreGeometry( const QRect& newRestGeo ); + void setRestoreGeometry( const TQRect& newRestGeo ); /** * Switches interposing in event loop of all current child widgets off. @@ -358,14 +358,14 @@ public: */ inline void updateTimeStamp() { - m_time.setDate( QDate::currentDate() ); - m_time.setTime( QTime::currentTime() ); + m_time.setDate( TQDate::currentDate() ); + m_time.setTime( TQTime::currentTime() ); } /** * Recall a previously remembered time, i.e. the value of m_time */ - inline const QDateTime& getTimeStamp() const { return m_time; } + inline const TQDateTime& getTimeStamp() const { return m_time; } public slots: /** @@ -385,14 +385,14 @@ public slots: /** * 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 ). + * minimize of the underlying system ( TQWidget::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 ). + * If detached, it will use the minimize of the underlying system ( TQWidget::showMaximized ). */ virtual void maximize(); @@ -424,17 +424,17 @@ public slots: virtual void slot_clickedInDockMenu(); /** - * Calls QWidget::show but also for it's parent widget if attached + * Calls TQWidget::show but also for it's parent widget if attached */ virtual void show(); /** - * Calls QWidget::hide() or it's parent widget hide() if attached + * Calls TQWidget::hide() or it's parent widget hide() if attached */ virtual void hide(); /** - * Calls QWidget::raise() or it's parent widget raise() if attached + * Calls TQWidget::raise() or it's parent widget raise() if attached */ virtual void raise(); @@ -462,15 +462,15 @@ 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 ); + virtual void closeEvent( TQCloseEvent *e ); /** - * It only catches QEvent::KeyPress events there. If a Qt::Key_Tab is pressed, the internal MDI focus + * It only catches TQEvent::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 ); + virtual bool eventFilter( TQObject *obj, TQEvent *e ); /** * If attached, the childframe will be activated and the MDI taskbar button will be pressed. Additionally, the @@ -478,19 +478,19 @@ protected: * Sends the focusInEventOccurs signal before changing the focus and the * gotFocus signal after changing the focus. */ - virtual void focusInEvent( QFocusEvent *e ); + virtual void focusInEvent( TQFocusEvent *e ); /** * Send the lostFocus signal */ - virtual void focusOutEvent( QFocusEvent *e ); + virtual void focusOutEvent( TQFocusEvent *e ); /** * Internally used for the minimize/maximize/restore mechanism when in attach mode. */ - virtual void resizeEvent( QResizeEvent *e ); + virtual void resizeEvent( TQResizeEvent *e ); - void trackIconAndCaptionChanges( QWidget *view ); + void trackIconAndCaptionChanges( TQWidget *view ); protected slots: void slot_childDestroyed(); @@ -544,12 +544,12 @@ signals: /** * Emitted when the window caption is changed via KMdiChildView::setCaption or KMdiChildView::setMDICaption */ - void windowCaptionChanged( const QString& ); + void windowCaptionChanged( const TQString& ); /** * Emitted when the window caption is changed via KMdiChildView::setTabCaption or KMdiChildView::setMDICaption */ - void tabCaptionChanged( const QString& ); + void tabCaptionChanged( const TQString& ); /** * Internally used to send information to the mainframe that this MDI view is maximized now. @@ -592,18 +592,18 @@ signals: */ void isDetachedNow(); - void iconUpdated( QWidget*, QPixmap ); - void captionUpdated( QWidget*, const QString& ); + void iconUpdated( TQWidget*, TQPixmap ); + void captionUpdated( TQWidget*, const TQString& ); private: KMdiChildViewPrivate *d; - QWidget *m_trackChanges; + TQWidget *m_trackChanges; }; inline KMdiChildFrm *KMdiChildView::mdiParent() const { - QWidget * pw = parentWidget(); + TQWidget * pw = parentWidget(); if ( pw != 0L ) if ( pw->inherits( "KMdiChildFrm" ) ) return ( KMdiChildFrm * ) pw; diff --git a/lib/compatibility/kmdi/qextmdi/kmdidefines.h b/lib/compatibility/kmdi/qextmdi/kmdidefines.h index 50343235..16be290a 100644 --- a/lib/compatibility/kmdi/qextmdi/kmdidefines.h +++ b/lib/compatibility/kmdi/qextmdi/kmdidefines.h @@ -41,10 +41,10 @@ namespace KMdi { /** extent Qt events - @see QCustomEvent, QEvent::User + @see TQCustomEvent, TQEvent::User \code - bool B_MyWidget::event( QEvent* e) { - if( e->type() == QEvent::Type(QEvent::User + int(KMdi::EV_Move))) { + bool B_MyWidget::event( TQEvent* e) { + if( e->type() == TQEvent::Type(TQEvent::User + int(KMdi::EV_Move))) { ... } ... diff --git a/lib/compatibility/kmdi/qextmdi/kmdidockcontainer.cpp b/lib/compatibility/kmdi/qextmdi/kmdidockcontainer.cpp index c1b1b03a..f541a824 100644 --- a/lib/compatibility/kmdi/qextmdi/kmdidockcontainer.cpp +++ b/lib/compatibility/kmdi/qextmdi/kmdidockcontainer.cpp @@ -23,10 +23,10 @@ #include "kdockwidget_private.h" -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -49,8 +49,8 @@ static const char* const kmdi_not_close_xpm[] = "#####" }; -KMdiDockContainer::KMdiDockContainer( QWidget *parent, QWidget *win, int position, int flags ) - : QWidget( parent ), KDockContainer() +KMdiDockContainer::KMdiDockContainer( TQWidget *parent, TQWidget *win, int position, int flags ) + : TQWidget( parent ), KDockContainer() { m_tabSwitching = false; m_block = false; @@ -65,14 +65,14 @@ KMdiDockContainer::KMdiDockContainer( QWidget *parent, QWidget *win, int positio m_startEvent = 0; kdDebug( 760 ) << k_funcinfo << endl; - QBoxLayout *l; + TQBoxLayout *l; m_horizontal = ( ( position == KDockWidget::DockTop ) || ( position == KDockWidget::DockBottom ) ); if ( m_horizontal ) - l = new QVBoxLayout( this ); //vertical layout for top and bottom docks + l = new TQVBoxLayout( this ); //vertical layout for top and bottom docks else - l = new QHBoxLayout( this ); //horizontal layout for left and right docks + l = new TQHBoxLayout( this ); //horizontal layout for left and right docks l->setAutoAdd( false ); @@ -102,9 +102,9 @@ KMdiDockContainer::KMdiDockContainer( QWidget *parent, QWidget *win, int positio } m_tb->setPosition( kmtbPos ); - m_ws = new QWidgetStack( this ); + m_ws = new TQWidgetStack( this ); - m_ws->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ) ); + m_ws->setSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Expanding ) ); //layout the tabbar if ( position == KDockWidget::DockLeft || position == KDockWidget::DockTop ) @@ -133,7 +133,7 @@ void KMdiDockContainer::setStyle( int style ) KMdiDockContainer::~KMdiDockContainer() { - QMap::iterator it; + TQMap::iterator it; while ( m_map.count() ) { it = m_map.begin(); @@ -180,7 +180,7 @@ KDockWidget* KMdiDockContainer::parentDockWidget() return ( ( KDockWidget* ) parent() ); } -void KMdiDockContainer::insertWidget ( KDockWidget *dwdg, QPixmap pixmap, const QString &text, int & ) +void KMdiDockContainer::insertWidget ( KDockWidget *dwdg, TQPixmap pixmap, const TQString &text, int & ) { kdDebug( 760 ) << k_funcinfo << "Adding a dockwidget to the dock container" << endl; KDockWidget* w = dwdg; @@ -212,7 +212,7 @@ void KMdiDockContainer::insertWidget ( KDockWidget *dwdg, QPixmap pixmap, const KDockWidgetHeader *hdr = static_cast( 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" ) ); + TQToolTip::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 ) ); @@ -220,7 +220,7 @@ void KMdiDockContainer::insertWidget ( KDockWidget *dwdg, QPixmap pixmap, const m_overlapButtons.insert( w, btn ); btn->setOn( !isOverlapMode() ); - connect( btn, SIGNAL( clicked() ), this, SLOT( changeOverlapMode() ) ); + connect( btn, TQT_SIGNAL( clicked() ), this, TQT_SLOT( changeOverlapMode() ) ); } m_tb->appendTab( pixmap.isNull() ? SmallIcon( "misc" ) : pixmap, tab, w->tabPageLabel() ); @@ -228,7 +228,7 @@ void KMdiDockContainer::insertWidget ( KDockWidget *dwdg, QPixmap pixmap, const 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 ) ) ); + connect( m_tb->tab( tab ), TQT_SIGNAL( clicked( int ) ), this, TQT_SLOT( tabClicked( int ) ) ); mTabCnt++; m_inserted = tab; @@ -243,11 +243,11 @@ void KMdiDockContainer::insertWidget ( KDockWidget *dwdg, QPixmap pixmap, const } -bool KMdiDockContainer::eventFilter( QObject *obj, QEvent *event ) +bool KMdiDockContainer::eventFilter( TQObject *obj, TQEvent *event ) { switch ( event->type() ) { - case QEvent::MouseButtonPress: + case TQEvent::MouseButtonPress: { KMultiTabBarTab* kmtbTab = dynamic_cast( obj ); if ( !obj ) @@ -283,21 +283,21 @@ bool KMdiDockContainer::eventFilter( QObject *obj, QEvent *event ) m_movingState = WaitingForMoveStart; delete m_startEvent; - m_startEvent = new QMouseEvent( * ( ( QMouseEvent* ) event ) ); + m_startEvent = new TQMouseEvent( * ( ( TQMouseEvent* ) event ) ); } break; - case QEvent::MouseButtonRelease: + case TQEvent::MouseButtonRelease: if ( m_movingState == Moving ) { m_movingState = NotMoving; - QApplication::postEvent( m_dragPanel, new QMouseEvent( * ( ( QMouseEvent* ) event ) ) ); + TQApplication::postEvent( m_dragPanel, new TQMouseEvent( * ( ( TQMouseEvent* ) event ) ) ); delete m_startEvent; m_startEvent = 0; } - case QEvent::MouseMove: + case TQEvent::MouseMove: if ( m_movingState == WaitingForMoveStart ) { - QPoint p( ( ( QMouseEvent* ) event )->pos() - m_startEvent->pos() ); + TQPoint p( ( ( TQMouseEvent* ) event )->pos() - m_startEvent->pos() ); if ( p.manhattanLength() > KGlobalSettings::dndEventDelay() ) { m_dockManager->eventFilter( m_dragPanel, m_startEvent ); @@ -349,7 +349,7 @@ void KMdiDockContainer::changeOverlapMode() deactivateOverlapMode(); } - QMap::iterator it; + TQMap::iterator it; for ( it = m_overlapButtons.begin(); it != m_overlapButtons.end(); ++it ) it.data()->setOn( !isOverlapMode() ); } @@ -491,16 +491,16 @@ void KMdiDockContainer::tabClicked( int t ) m_tabSwitching = false; } -void KMdiDockContainer::setToolTip ( KDockWidget* w, QString &s ) +void KMdiDockContainer::setToolTip ( KDockWidget* w, TQString &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 ); + TQToolTip::remove( mbTab ); + TQToolTip::add( mbTab, s ); } -void KMdiDockContainer::setPixmap( KDockWidget* widget , const QPixmap& pixmap ) +void KMdiDockContainer::setPixmap( KDockWidget* widget , const TQPixmap& pixmap ) { int id = m_ws->id( widget ); if ( id == -1 ) @@ -509,25 +509,25 @@ void KMdiDockContainer::setPixmap( KDockWidget* widget , const QPixmap& pixmap ) tab->setIcon( pixmap.isNull() ? SmallIcon( "misc" ) : pixmap ); } -void KMdiDockContainer::save( QDomElement& dockEl ) +void KMdiDockContainer::save( TQDomElement& dockEl ) { - QDomDocument doc = dockEl.ownerDocument(); - QDomElement el; + TQDomDocument doc = dockEl.ownerDocument(); + TQDomElement el; el = doc.createElement( "name" ); - el.appendChild( doc.createTextNode( QString( "%1" ).arg( parent() ->name() ) ) ); + el.appendChild( doc.createTextNode( TQString( "%1" ).arg( parent() ->name() ) ) ); dockEl.appendChild( el ); el = doc.createElement( "overlapMode" ); el.appendChild( doc.createTextNode( isOverlapMode() ? "true" : "false" ) ); dockEl.appendChild( el ); - QPtrList* tl = m_tb->tabs(); - QPtrListIterator it( *tl ); - QStringList::Iterator it2 = itemNames.begin(); + TQPtrList* tl = m_tb->tabs(); + TQPtrListIterator it( *tl ); + TQStringList::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 ]; + el.setAttribute( "pos", TQString( "%1" ).arg( i ) ); + TQString s = tabCaptions[ *it2 ]; if ( !s.isEmpty() ) { el.setAttribute( "tabCaption", s ); @@ -541,7 +541,7 @@ void KMdiDockContainer::save( QDomElement& dockEl ) dockEl.appendChild( el ); if ( m_tb->isTabRaised( it.current() ->id() ) ) { - QDomElement el2 = doc.createElement( "raised" ); + TQDomElement el2 = doc.createElement( "raised" ); el2.appendChild( doc.createTextNode( m_ws->widget( it.current() ->id() ) ->name() ) ); el.appendChild( el2 ); } @@ -551,13 +551,13 @@ void KMdiDockContainer::save( QDomElement& dockEl ) } -void KMdiDockContainer::load( QDomElement& dockEl ) +void KMdiDockContainer::load( TQDomElement& dockEl ) { - QString raise; + TQString raise; - for ( QDomNode n = dockEl.firstChild();!n.isNull();n = n.nextSibling() ) + for ( TQDomNode n = dockEl.firstChild();!n.isNull();n = n.nextSibling() ) { - QDomElement el = n.toElement(); + TQDomElement el = n.toElement(); if ( el.isNull() ) continue; if ( el.tagName() == "overlapMode" ) @@ -585,8 +585,8 @@ void KMdiDockContainer::load( QDomElement& dockEl ) } } - QPtrList* tl = m_tb->tabs(); - QPtrListIterator it1( *tl ); + TQPtrList* tl = m_tb->tabs(); + TQPtrListIterator it1( *tl ); m_ws->hide(); if ( !m_horizontal ) parentDockWidget()->setForcedFixedWidth( m_tb->width() ); @@ -599,18 +599,18 @@ void KMdiDockContainer::load( QDomElement& dockEl ) kapp->syncX(); m_delayedRaise = -1; - for ( QMap::iterator it = m_overlapButtons.begin(); + for ( TQMap::iterator it = m_overlapButtons.begin(); it != m_overlapButtons.end();++it ) it.data() ->setOn( !isOverlapMode() ); if ( !raise.isEmpty() ) { - for ( QMap::iterator it = m_map.begin();it != m_map.end();++it ) + for ( TQMap::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() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( delayedRaise() ) ); kdDebug( 760 ) << k_funcinfo << "raising " << it.key()->name() << endl; break; } @@ -618,14 +618,14 @@ void KMdiDockContainer::load( QDomElement& dockEl ) } if ( m_delayedRaise == -1 ) - QTimer::singleShot( 0, this, SLOT( init() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( init() ) ); } -void KMdiDockContainer::save( KConfig* cfg, const QString& group_or_prefix ) +void KMdiDockContainer::save( KConfig* cfg, const TQString& 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() ) ); + TQString grp = cfg->group(); + cfg->deleteGroup( group_or_prefix + TQString( "::%1" ).arg( parent() ->name() ) ); + cfg->setGroup( group_or_prefix + TQString( "::%1" ).arg( parent() ->name() ) ); if ( isOverlapMode() ) cfg->writeEntry( "overlapMode", "true" ); @@ -641,23 +641,23 @@ void KMdiDockContainer::save( KConfig* cfg, const QString& group_or_prefix ) cfg->writeEntry( "separatorPos", m_separatorPos ); } - QPtrList* tl = m_tb->tabs(); - QPtrListIterator it( *tl ); - QStringList::Iterator it2 = itemNames.begin(); + TQPtrList* tl = m_tb->tabs(); + TQPtrListIterator it( *tl ); + TQStringList::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 ]; + // cfg->writeEntry(TQString("widget%1").arg(i),m_ws->widget(it.current()->id())->name()); + cfg->writeEntry( TQString( "widget%1" ).arg( i ), ( *it2 ) ); + TQString s = tabCaptions[ *it2 ]; if ( !s.isEmpty() ) { - cfg->writeEntry( QString( "widget%1-tabCaption" ).arg( i ), s ); + cfg->writeEntry( TQString( "widget%1-tabCaption" ).arg( i ), s ); } s = tabTooltips[ *it2 ]; if ( !s.isEmpty() ) { - cfg->writeEntry( QString( "widget%1-tabTooltip" ).arg( i ), s ); + cfg->writeEntry( TQString( "widget%1-tabTooltip" ).arg( i ), s ); } // kdDebug(760)<<"****************************************Saving: "<widget(it.current()->id())->name()<isTabRaised( it.current() ->id() ) ) @@ -669,10 +669,10 @@ void KMdiDockContainer::save( KConfig* cfg, const QString& group_or_prefix ) } -void KMdiDockContainer::load( KConfig* cfg, const QString& group_or_prefix ) +void KMdiDockContainer::load( KConfig* cfg, const TQString& group_or_prefix ) { - QString grp = cfg->group(); - cfg->setGroup( group_or_prefix + QString( "::%1" ).arg( parent() ->name() ) ); + TQString grp = cfg->group(); + cfg->setGroup( group_or_prefix + TQString( "::%1" ).arg( parent() ->name() ) ); if ( cfg->readEntry( "overlapMode" ) != "false" ) activateOverlapMode( m_tb->width() ); @@ -682,22 +682,22 @@ void KMdiDockContainer::load( KConfig* cfg, const QString& group_or_prefix ) m_separatorPos = cfg->readNumEntry( "separatorPos", 18 ); int i = 0; - QString raise; + TQString raise; while ( true ) { - QString dwn = cfg->readEntry( QString( "widget%1" ).arg( i ) ); + TQString dwn = cfg->readEntry( TQString( "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 ) ); + TQString s = cfg->readEntry( TQString( "widget%1-tabCaption" ).arg( i ) ); if ( !s.isEmpty() ) { dw->setTabPageLabel( s ); } - s = cfg->readEntry( QString( "widget%1-tabTooltip" ).arg( i ) ); + s = cfg->readEntry( TQString( "widget%1-tabTooltip" ).arg( i ) ); if ( !s.isEmpty() ) { dw->setToolTipString( s ); @@ -710,8 +710,8 @@ void KMdiDockContainer::load( KConfig* cfg, const QString& group_or_prefix ) } - QPtrList* tl = m_tb->tabs(); - QPtrListIterator it1( *tl ); + TQPtrList* tl = m_tb->tabs(); + TQPtrListIterator it1( *tl ); m_ws->hide(); if ( !m_horizontal ) parentDockWidget() ->setForcedFixedWidth( m_tb->width() ); @@ -724,13 +724,13 @@ void KMdiDockContainer::load( KConfig* cfg, const QString& group_or_prefix ) kapp->syncX(); m_delayedRaise = -1; - for ( QMap::iterator it = m_overlapButtons.begin(); + for ( TQMap::iterator it = m_overlapButtons.begin(); it != m_overlapButtons.end();++it ) it.data() ->setOn( !isOverlapMode() ); if ( !raise.isEmpty() ) { - for ( QMap::iterator it = m_map.begin();it != m_map.end();++it ) + for ( TQMap::iterator it = m_map.begin();it != m_map.end();++it ) { if ( it.key() ->name() == raise ) { @@ -742,7 +742,7 @@ void KMdiDockContainer::load( KConfig* cfg, const QString& group_or_prefix ) kapp->syncX();*/ m_delayedRaise = it.data(); - QTimer::singleShot( 0, this, SLOT( delayedRaise() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( delayedRaise() ) ); kdDebug( 760 ) << k_funcinfo << "raising" << it.key() ->name() << endl; break; } @@ -750,7 +750,7 @@ void KMdiDockContainer::load( KConfig* cfg, const QString& group_or_prefix ) } if ( m_delayedRaise == -1 ) - QTimer::singleShot( 0, this, SLOT( init() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( init() ) ); cfg->setGroup( grp ); } @@ -769,8 +769,8 @@ void KMdiDockContainer::collapseOverlapped() if ( isOverlapMode() ) { - QPtrList* tl = m_tb->tabs(); - QPtrListIterator it( *tl ); + TQPtrList* tl = m_tb->tabs(); + TQPtrListIterator it( *tl ); for ( ;it.current();++it ) { if ( it.current()->isOn() ) @@ -814,7 +814,7 @@ void KMdiDockContainer::toggle() void KMdiDockContainer::prevToolView() { kdDebug( 760 ) << k_funcinfo << endl; - QPtrList* tabs = m_tb->tabs(); + TQPtrList* tabs = m_tb->tabs(); int pos = tabs->findRef( m_tb->tab( oldtab ) ); if ( pos == -1 ) @@ -835,7 +835,7 @@ void KMdiDockContainer::prevToolView() void KMdiDockContainer::nextToolView() { kdDebug( 760 ) << k_funcinfo << endl; - QPtrList* tabs = m_tb->tabs(); + TQPtrList* tabs = m_tb->tabs(); int pos = tabs->findRef( m_tb->tab( oldtab ) ); if ( pos == -1 ) diff --git a/lib/compatibility/kmdi/qextmdi/kmdidockcontainer.h b/lib/compatibility/kmdi/qextmdi/kmdidockcontainer.h index 917dac4d..e13b7371 100644 --- a/lib/compatibility/kmdi/qextmdi/kmdidockcontainer.h +++ b/lib/compatibility/kmdi/qextmdi/kmdidockcontainer.h @@ -20,26 +20,26 @@ #ifndef _KMDI_DOCK_CONTAINER_ #define _KMDI_DOCK_CONTAINER_ -#include -#include +#include +#include #include -#include -#include +#include +#include # include -#include +#include class QWidgetStack; class KMultiTabBar; class KDockButton_Private; -class KMDI_EXPORT KMdiDockContainer: public QWidget, public KDockContainer +class KMDI_EXPORT KMdiDockContainer: public TQWidget, public KDockContainer { Q_OBJECT public: - KMdiDockContainer( QWidget *parent, QWidget *win, int position, int flags ); + KMdiDockContainer( TQWidget *parent, TQWidget *win, int position, int flags ); virtual ~KMdiDockContainer(); /** Get the KDockWidget that is our parent */ @@ -49,7 +49,7 @@ public: * Add a widget to this container * \param w the KDockWidget we are adding */ - virtual void insertWidget ( KDockWidget *w, QPixmap, const QString &, int & ); + virtual void insertWidget ( KDockWidget *w, TQPixmap, const TQString &, int & ); /** * Show a widget. @@ -64,12 +64,12 @@ public: * Set the tooltip for the widget. * Currently, this method does nothing */ - virtual void setToolTip ( KDockWidget *, QString & ); + virtual void setToolTip ( KDockWidget *, TQString & ); /** * Set the pixmap for the widget. */ - virtual void setPixmap( KDockWidget* widget, const QPixmap& pixmap ); + virtual void setPixmap( KDockWidget* widget, const TQPixmap& pixmap ); /** * Undock the widget from the container. @@ -94,7 +94,7 @@ public: * 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 ); + virtual void save( KConfig *, const TQString& group_or_prefix ); /** * Load the config using a KConfig object @@ -103,17 +103,17 @@ public: * 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 ); + virtual void load( KConfig *, const TQString& group_or_prefix ); /** * Save the config to a QDomElement */ - virtual void save( QDomElement& ); + virtual void save( TQDomElement& ); /** * Load the config from a QDomElement */ - virtual void load( QDomElement& ); + virtual void load( TQDomElement& ); /** * Set the style for the tabbar @@ -121,7 +121,7 @@ public: void setStyle( int ); protected: - bool eventFilter( QObject*, QEvent* ); + bool eventFilter( TQObject*, TQEvent* ); public slots: void init(); @@ -134,28 +134,28 @@ protected slots: void delayedRaise(); void changeOverlapMode(); private: - QWidget *m_mainWin; - QWidgetStack *m_ws; + TQWidget *m_mainWin; + TQWidgetStack *m_ws; KMultiTabBar *m_tb; int mTabCnt; int oldtab; int m_previousTab; int m_position; int m_separatorPos; - QMap m_map; - QMap m_revMap; - QMap m_overlapButtons; - QStringList itemNames; - QMap tabCaptions; - QMap tabTooltips; + TQMap m_map; + TQMap m_revMap; + TQMap m_overlapButtons; + TQStringList itemNames; + TQMap tabCaptions; + TQMap tabTooltips; int m_inserted; int m_delayedRaise; bool m_horizontal; bool m_block; bool m_tabSwitching; - QObject *m_dragPanel; + TQObject *m_dragPanel; KDockManager *m_dockManager; - QMouseEvent *m_startEvent; + TQMouseEvent *m_startEvent; enum MovingState {NotMoving = 0, WaitingForMoveStart, Moving} m_movingState; signals: void activated( KMdiDockContainer* ); diff --git a/lib/compatibility/kmdi/qextmdi/kmdidocumentviewtabwidget.cpp b/lib/compatibility/kmdi/qextmdi/kmdidocumentviewtabwidget.cpp index 8b88fb2c..b97830af 100644 --- a/lib/compatibility/kmdi/qextmdi/kmdidocumentviewtabwidget.cpp +++ b/lib/compatibility/kmdi/qextmdi/kmdidocumentviewtabwidget.cpp @@ -11,7 +11,7 @@ #include #include "kmdidocumentviewtabwidget.h" -KMdiDocumentViewTabWidget::KMdiDocumentViewTabWidget( QWidget* parent, const char* name ) : KTabWidget( parent, name ) +KMdiDocumentViewTabWidget::KMdiDocumentViewTabWidget( TQWidget* parent, const char* name ) : KTabWidget( parent, name ) { m_visibility = KMdi::ShowWhenMoreThanOneTab; tabBar() ->hide(); @@ -20,38 +20,38 @@ KMdiDocumentViewTabWidget::KMdiDocumentViewTabWidget( QWidget* parent, const cha setHoverCloseButton( true ); #endif - connect( this, SIGNAL( closeRequest( QWidget* ) ), this, SLOT( closeTab( QWidget* ) ) ); + connect( this, TQT_SIGNAL( closeRequest( TQWidget* ) ), this, TQT_SLOT( closeTab( TQWidget* ) ) ); } KMdiDocumentViewTabWidget::~KMdiDocumentViewTabWidget() {} -void KMdiDocumentViewTabWidget::closeTab( QWidget* w ) +void KMdiDocumentViewTabWidget::closeTab( TQWidget* w ) { w->close(); } -void KMdiDocumentViewTabWidget::addTab ( QWidget * child, const QString & label ) +void KMdiDocumentViewTabWidget::addTab ( TQWidget * child, const TQString & label ) { KTabWidget::addTab( child, label ); showPage( child ); maybeShow(); } -void KMdiDocumentViewTabWidget::addTab ( QWidget * child, const QIconSet & iconset, const QString & label ) +void KMdiDocumentViewTabWidget::addTab ( TQWidget * child, const TQIconSet & iconset, const TQString & label ) { KTabWidget::addTab( child, iconset, label ); showPage( child ); maybeShow(); } -void KMdiDocumentViewTabWidget::addTab ( QWidget * child, QTab * tab ) +void KMdiDocumentViewTabWidget::addTab ( TQWidget * child, TQTab * tab ) { KTabWidget::addTab( child, tab ); showPage( child ); maybeShow(); } -void KMdiDocumentViewTabWidget::insertTab ( QWidget * child, const QString & label, int index ) +void KMdiDocumentViewTabWidget::insertTab ( TQWidget * child, const TQString & label, int index ) { KTabWidget::insertTab( child, label, index ); showPage( child ); @@ -59,7 +59,7 @@ void KMdiDocumentViewTabWidget::insertTab ( QWidget * child, const QString & lab tabBar() ->repaint(); } -void KMdiDocumentViewTabWidget::insertTab ( QWidget * child, const QIconSet & iconset, const QString & label, int index ) +void KMdiDocumentViewTabWidget::insertTab ( TQWidget * child, const TQIconSet & iconset, const TQString & label, int index ) { KTabWidget::insertTab( child, iconset, label, index ); showPage( child ); @@ -67,7 +67,7 @@ void KMdiDocumentViewTabWidget::insertTab ( QWidget * child, const QIconSet & ic tabBar() ->repaint(); } -void KMdiDocumentViewTabWidget::insertTab ( QWidget * child, QTab * tab, int index ) +void KMdiDocumentViewTabWidget::insertTab ( TQWidget * child, TQTab * tab, int index ) { KTabWidget::insertTab( child, tab, index ); showPage( child ); @@ -75,18 +75,18 @@ void KMdiDocumentViewTabWidget::insertTab ( QWidget * child, QTab * tab, int ind tabBar() ->repaint(); } -void KMdiDocumentViewTabWidget::removePage ( QWidget * w ) +void KMdiDocumentViewTabWidget::removePage ( TQWidget * w ) { KTabWidget::removePage( w ); maybeShow(); } -void KMdiDocumentViewTabWidget::updateIconInView( QWidget *w, QPixmap icon ) +void KMdiDocumentViewTabWidget::updateIconInView( TQWidget *w, TQPixmap icon ) { changeTab( w, icon, tabLabel( w ) ); } -void KMdiDocumentViewTabWidget::updateCaptionInView( QWidget *w, const QString &caption ) +void KMdiDocumentViewTabWidget::updateCaptionInView( TQWidget *w, const TQString &caption ) { changeTab( w, caption ); } diff --git a/lib/compatibility/kmdi/qextmdi/kmdidocumentviewtabwidget.h b/lib/compatibility/kmdi/qextmdi/kmdidocumentviewtabwidget.h index b745bfa3..f24b7800 100644 --- a/lib/compatibility/kmdi/qextmdi/kmdidocumentviewtabwidget.h +++ b/lib/compatibility/kmdi/qextmdi/kmdidocumentviewtabwidget.h @@ -24,7 +24,7 @@ class KMDI_EXPORT KMdiDocumentViewTabWidget: { Q_OBJECT public: - KMdiDocumentViewTabWidget( QWidget* parent, const char* name = 0 ); + KMdiDocumentViewTabWidget( TQWidget* parent, const char* name = 0 ); ~KMdiDocumentViewTabWidget(); /** @@ -32,49 +32,49 @@ public: * \sa QTabWidget * \sa KTabWidget */ - virtual void addTab ( QWidget * child, const QString & label ); + virtual void addTab ( TQWidget * child, const TQString & label ); /** * Add a tab into the tabwidget * \sa QTabWidget * \sa KTabWidget */ - virtual void addTab ( QWidget * child, const QIconSet & iconset, const QString & label ); + virtual void addTab ( TQWidget * child, const TQIconSet & iconset, const TQString & label ); /** * Add a tab into the tabwidget * \sa QTabWidget * \sa KTabWidget */ - virtual void addTab ( QWidget * child, QTab * tab ); + virtual void addTab ( TQWidget * child, TQTab * 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 ); + virtual void insertTab ( TQWidget * child, const TQString & 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 ); + virtual void insertTab ( TQWidget * child, const TQIconSet & iconset, const TQString & label, int index = -1 ); /** * Inserts a tab into the tabwidget * \sa QTabWidget * \sa KTabWidget */ - virtual void insertTab ( QWidget * child, QTab * tab, int index = -1 ); + virtual void insertTab ( TQWidget * child, TQTab * tab, int index = -1 ); /** * Removes the tab from the tabwidget * \sa QTabWidget * \sa KTabWidget */ - virtual void removePage ( QWidget * w ); + virtual void removePage ( TQWidget * w ); /** * Set the tab widget's visibility and then make the change @@ -88,7 +88,7 @@ public: private slots: /** Close the tab specified by w */ - void closeTab( QWidget* w ); + void closeTab( TQWidget* w ); /** Moves a tab. Reimplemented for internal reasons. */ void moveTab( int from, int to ); @@ -96,10 +96,10 @@ private slots: public slots: /** Change the icon for the tab */ - void updateIconInView( QWidget*, QPixmap ); + void updateIconInView( TQWidget*, TQPixmap ); /** Change the caption for the tab */ - void updateCaptionInView( QWidget*, const QString& ); + void updateCaptionInView( TQWidget*, const TQString& ); private: diff --git a/lib/compatibility/kmdi/qextmdi/kmdifocuslist.cpp b/lib/compatibility/kmdi/qextmdi/kmdifocuslist.cpp index c5a7578c..471b9895 100644 --- a/lib/compatibility/kmdi/qextmdi/kmdifocuslist.cpp +++ b/lib/compatibility/kmdi/qextmdi/kmdifocuslist.cpp @@ -18,32 +18,32 @@ #include "kmdifocuslist.h" #include "kmdifocuslist.moc" -#include +#include #include -KMdiFocusList::KMdiFocusList( QObject *parent ) : QObject( parent ) +KMdiFocusList::KMdiFocusList( TQObject *parent ) : TQObject( parent ) {} KMdiFocusList::~KMdiFocusList() {} -void KMdiFocusList::addWidgetTree( QWidget* w ) +void KMdiFocusList::addWidgetTree( TQWidget* w ) { //this method should never be called twice on the same hierarchy m_list.insert( w, w->focusPolicy() ); - w->setFocusPolicy( QWidget::ClickFocus ); + w->setFocusPolicy( TQWidget::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; + connect( w, TQT_SIGNAL( destroyed( TQObject * ) ), this, TQT_SLOT( objectHasBeenDestroyed( TQObject* ) ) ); + TQObjectList *l = w->queryList( "TQWidget" ); + TQObjectListIt it( *l ); + TQObject *obj; while ( ( obj = it.current() ) != 0 ) { - QWidget * wid = ( QWidget* ) obj; + TQWidget * wid = ( TQWidget* ) obj; m_list.insert( wid, wid->focusPolicy() ); - wid->setFocusPolicy( QWidget::ClickFocus ); + wid->setFocusPolicy( TQWidget::ClickFocus ); kdDebug( 760 ) << "KMdiFocusList::addWidgetTree: adding widget" << endl; - connect( wid, SIGNAL( destroyed( QObject * ) ), this, SLOT( objectHasBeenDestroyed( QObject* ) ) ); + connect( wid, TQT_SIGNAL( destroyed( TQObject * ) ), this, TQT_SLOT( objectHasBeenDestroyed( TQObject* ) ) ); ++it; } delete l; @@ -52,10 +52,10 @@ void KMdiFocusList::addWidgetTree( QWidget* w ) void KMdiFocusList::restore() { #if (QT_VERSION-0 >= 0x030200) - for ( QMap::const_iterator it = m_list.constBegin();it != m_list.constEnd();++it ) + for ( TQMap::const_iterator it = m_list.constBegin();it != m_list.constEnd();++it ) { #else - for ( QMap::iterator it = m_list.begin();it != m_list.end();++it ) + for ( TQMap::iterator it = m_list.begin();it != m_list.end();++it ) { #endif it.key() ->setFocusPolicy( it.data() ); @@ -64,11 +64,11 @@ void KMdiFocusList::restore() } -void KMdiFocusList::objectHasBeenDestroyed( QObject * o ) +void KMdiFocusList::objectHasBeenDestroyed( TQObject * o ) { if ( !o || !o->isWidgetType() ) return ; - QWidget *w = ( QWidget* ) o; + TQWidget *w = ( TQWidget* ) o; m_list.remove( w ); } diff --git a/lib/compatibility/kmdi/qextmdi/kmdifocuslist.h b/lib/compatibility/kmdi/qextmdi/kmdifocuslist.h index fbc178d1..71e2f05c 100644 --- a/lib/compatibility/kmdi/qextmdi/kmdifocuslist.h +++ b/lib/compatibility/kmdi/qextmdi/kmdifocuslist.h @@ -18,23 +18,23 @@ #ifndef KMDI_FOCUS_LIST #define KMDI_FOCUS_LIST -#include -#include -#include +#include +#include +#include #include class KMDI_EXPORT KMdiFocusList: public QObject { Q_OBJECT public: - KMdiFocusList( QObject *parent ); + KMdiFocusList( TQObject *parent ); ~KMdiFocusList(); - void addWidgetTree( QWidget* ); + void addWidgetTree( TQWidget* ); void restore(); protected slots: - void objectHasBeenDestroyed( QObject* ); + void objectHasBeenDestroyed( TQObject* ); private: - QMap m_list; + TQMap m_list; }; diff --git a/lib/compatibility/kmdi/qextmdi/kmdiguiclient.cpp b/lib/compatibility/kmdi/qextmdi/kmdiguiclient.cpp index ec00ec78..6279253b 100644 --- a/lib/compatibility/kmdi/qextmdi/kmdiguiclient.cpp +++ b/lib/compatibility/kmdi/qextmdi/kmdiguiclient.cpp @@ -20,14 +20,14 @@ #include "kmdiguiclient.h" #include "kmdiguiclient.moc" -#include +#include #include #include #include #include #include #include -#include +#include #include #include #include @@ -57,15 +57,15 @@ using namespace KMDIPrivate; -ToggleToolViewAction::ToggleToolViewAction( const QString& text, const KShortcut& cut, KDockWidget *dw, KMdiMainFrm *mdiMainFrm, - QObject* parent, const char* name ) +ToggleToolViewAction::ToggleToolViewAction( const TQString& text, const KShortcut& cut, KDockWidget *dw, KMdiMainFrm *mdiMainFrm, + TQObject* 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() ) ); + connect( this, TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( slotToggled( bool ) ) ); + connect( m_dw->dockManager(), TQT_SIGNAL( change() ), this, TQT_SLOT( anDWChanged() ) ); + connect( m_dw, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( slotWidgetDestroyed() ) ); setChecked( m_dw->mayBeHide() ); } } @@ -104,20 +104,20 @@ void ToggleToolViewAction::slotToggled( bool t ) void ToggleToolViewAction::slotWidgetDestroyed() { - disconnect( m_dw->dockManager(), SIGNAL( change() ), this, SLOT( anDWChanged() ) ); - disconnect( this, SIGNAL( toggled( bool ) ), 0, 0 ); + disconnect( m_dw->dockManager(), TQT_SIGNAL( change() ), this, TQT_SLOT( anDWChanged() ) ); + disconnect( this, TQT_SIGNAL( toggled( bool ) ), 0, 0 ); unplugAll(); deleteLater(); } -KMDIGUIClient::KMDIGUIClient( KMdiMainFrm* mdiMainFrm, bool showMDIModeAction, const char* name ) : QObject( mdiMainFrm, name ), +KMDIGUIClient::KMDIGUIClient( KMdiMainFrm* mdiMainFrm, bool showMDIModeAction, const char* name ) : TQObject( mdiMainFrm, name ), KXMLGUIClient( mdiMainFrm ) { m_mdiMode = KMdi::ChildframeMode; m_mdiMainFrm = mdiMainFrm; - connect( mdiMainFrm->guiFactory(), SIGNAL( clientAdded( KXMLGUIClient * ) ), - this, SLOT( clientAdded( KXMLGUIClient * ) ) ); + connect( mdiMainFrm->guiFactory(), TQT_SIGNAL( clientAdded( KXMLGUIClient * ) ), + this, TQT_SLOT( clientAdded( KXMLGUIClient * ) ) ); /* re-use an existing resource file if it exists. can happen if the user launches the * toolbar editor */ @@ -128,7 +128,7 @@ KMDIGUIClient::KMDIGUIClient( KMdiMainFrm* mdiMainFrm, bool showMDIModeAction, c if ( domDocument().documentElement().isNull() ) { - QString completeDescription = QString::fromLatin1( guiDescription ) + TQString completeDescription = TQString::fromLatin1( guiDescription ) .arg( actionListName ); setXML( completeDescription, false /*merge*/ ); @@ -140,30 +140,30 @@ KMDIGUIClient::KMDIGUIClient( KMdiMainFrm* mdiMainFrm, bool showMDIModeAction, c if ( showMDIModeAction ) { m_mdiModeAction = new KSelectAction( i18n( "MDI Mode" ), 0, actionCollection() ); - QStringList modes; + TQStringList 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 ) ) ); + connect( m_mdiModeAction, TQT_SIGNAL( activated( int ) ), this, TQT_SLOT( changeViewMode( int ) ) ); } else m_mdiModeAction = 0; - connect( m_mdiMainFrm, SIGNAL( mdiModeHasBeenChangedTo( KMdi::MdiMode ) ), - this, SLOT( mdiModeHasBeenChangedTo( KMdi::MdiMode ) ) ); + connect( m_mdiMainFrm, TQT_SIGNAL( mdiModeHasBeenChangedTo( KMdi::MdiMode ) ), + this, TQT_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() ), + m_gotoToolDockMenu->insert( new KAction( i18n( "Switch Top Dock" ), ALT + CTRL + SHIFT + Key_T, this, TQT_SIGNAL( toggleTop() ), actionCollection(), "kmdi_activate_top" ) ); - m_gotoToolDockMenu->insert( new KAction( i18n( "Switch Left Dock" ), ALT + CTRL + SHIFT + Key_L, this, SIGNAL( toggleLeft() ), + m_gotoToolDockMenu->insert( new KAction( i18n( "Switch Left Dock" ), ALT + CTRL + SHIFT + Key_L, this, TQT_SIGNAL( toggleLeft() ), actionCollection(), "kmdi_activate_left" ) ); - m_gotoToolDockMenu->insert( new KAction( i18n( "Switch Right Dock" ), ALT + CTRL + SHIFT + Key_R, this, SIGNAL( toggleRight() ), + m_gotoToolDockMenu->insert( new KAction( i18n( "Switch Right Dock" ), ALT + CTRL + SHIFT + Key_R, this, TQT_SIGNAL( toggleRight() ), actionCollection(), "kmdi_activate_right" ) ); - m_gotoToolDockMenu->insert( new KAction( i18n( "Switch Bottom Dock" ), ALT + CTRL + SHIFT + Key_B, this, SIGNAL( toggleBottom() ), + m_gotoToolDockMenu->insert( new KAction( i18n( "Switch Bottom Dock" ), ALT + CTRL + SHIFT + Key_B, this, TQT_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() ), + m_gotoToolDockMenu->insert( new KAction( i18n( "Previous Tool View" ), ALT + CTRL + Key_Left, m_mdiMainFrm, TQT_SLOT( prevToolViewInDock() ), actionCollection(), "kmdi_prev_toolview" ) ); - m_gotoToolDockMenu->insert( new KAction( i18n( "Next Tool View" ), ALT + CTRL + Key_Right, m_mdiMainFrm, SLOT( nextToolViewInDock() ), + m_gotoToolDockMenu->insert( new KAction( i18n( "Next Tool View" ), ALT + CTRL + Key_Right, m_mdiMainFrm, TQT_SLOT( nextToolViewInDock() ), actionCollection(), "kmdi_next_toolview" ) ); actionCollection() ->readShortcutSettings( "Shortcuts", kapp->config() ); @@ -224,10 +224,10 @@ void KMDIGUIClient::setupActions() // m_toolBars = builder.toolBars(); - // m_toolViewActions.append(new KAction( "TESTKMDIGUICLIENT", QString::null, 0, - // this, SLOT(blah()),actionCollection(),"nothing")); + // m_toolViewActions.append(new KAction( "TESTKMDIGUICLIENT", TQString::null, 0, + // this, TQT_SLOT(blah()),actionCollection(),"nothing")); - QPtrList addList; + TQPtrList addList; if ( m_toolViewActions.count() < 3 ) for ( uint i = 0;i < m_toolViewActions.count();i++ ) addList.append( m_toolViewActions.at( i ) ); @@ -247,25 +247,25 @@ void KMDIGUIClient::addToolView( KMdiToolViewAccessor* mtva ) { kdDebug( 760 ) << "*****void KMDIGUIClient::addToolView(KMdiToolViewAccessor* mtva)*****" << endl; // kdDebug()<<"name: "<wrappedWidget()->name()<wrappedWidget() ->name(); + TQString aname = TQString( "kmdi_toolview_" ) + mtva->wrappedWidget() ->name(); // try to read the action shortcut KShortcut sc; KConfig *cfg = kapp->config(); - QString _grp = cfg->group(); + TQString _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( mtva->wrapperWidget() ), + /*TQString::null*/sc, dynamic_cast( 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* ) ) ); + connect( a, TQT_SIGNAL( destroyed( TQObject* ) ), this, TQT_SLOT( actionDeleted( TQObject* ) ) ); m_toolViewActions.append( a ); m_toolMenu->insert( a ); mtva->d->action = a; @@ -273,7 +273,7 @@ void KMDIGUIClient::addToolView( KMdiToolViewAccessor* mtva ) setupActions(); } -void KMDIGUIClient::actionDeleted( QObject* a ) +void KMDIGUIClient::actionDeleted( TQObject* a ) { m_toolViewActions.remove( static_cast( a ) ); /* if (!m_toolMenu.isNull()) m_toolMenu->remove(static_cast(a));*/ diff --git a/lib/compatibility/kmdi/qextmdi/kmdiguiclient.h b/lib/compatibility/kmdi/qextmdi/kmdiguiclient.h index a52db681..9c963431 100644 --- a/lib/compatibility/kmdi/qextmdi/kmdiguiclient.h +++ b/lib/compatibility/kmdi/qextmdi/kmdiguiclient.h @@ -19,8 +19,8 @@ #ifndef KMDIGUICLIENT_H #define KMDIGUICLIENT_H -#include -#include +#include +#include #include #include #include "kmdidefines.h" @@ -38,7 +38,7 @@ namespace KMDIPrivate * A class derived from KXMLGUIClient that handles the various * KMDI modes */ -class KMDI_EXPORT KMDIGUIClient : public QObject, +class KMDI_EXPORT KMDIGUIClient : public TQObject, public KXMLGUIClient { Q_OBJECT @@ -77,7 +77,7 @@ private slots: * One of our tool view toggle actions has been deleted. Redo the * tool views menu */ - void actionDeleted( QObject* ); + void actionDeleted( TQObject* ); /** * Updates the action that lets the user change the MDI mode to the @@ -103,9 +103,9 @@ private: KMDIGUIClientPrivate *d; KMdi::MdiMode m_mdiMode; - QGuardedPtr m_mdiMainFrm; - QPtrList m_toolViewActions; - QPtrList m_documentViewActions; + TQGuardedPtr m_mdiMainFrm; + TQPtrList m_toolViewActions; + TQPtrList m_documentViewActions; KActionMenu *m_docMenu; KActionMenu *m_toolMenu; @@ -123,8 +123,8 @@ 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 ); + ToggleToolViewAction( const TQString& text, const KShortcut& cut = KShortcut(), KDockWidget *dw = 0, KMdiMainFrm *mdiMainFrm = 0, + TQObject* parent = 0, const char* name = 0 ); virtual ~ToggleToolViewAction(); diff --git a/lib/compatibility/kmdi/qextmdi/kmdilistiterator.h b/lib/compatibility/kmdi/qextmdi/kmdilistiterator.h index 110fae7e..04c8af3b 100644 --- a/lib/compatibility/kmdi/qextmdi/kmdilistiterator.h +++ b/lib/compatibility/kmdi/qextmdi/kmdilistiterator.h @@ -38,9 +38,9 @@ template class KMdiListIterator : public KMdiIterator { public: - KMdiListIterator( QPtrList& list ) + KMdiListIterator( TQPtrList& list ) { - m_iterator = new QPtrListIterator( list ); + m_iterator = new TQPtrListIterator( list ); } virtual void first() { m_iterator->toFirst(); } @@ -53,7 +53,7 @@ public: virtual ~KMdiListIterator() { delete m_iterator; } private: - QPtrListIterator *m_iterator; + TQPtrListIterator *m_iterator; }; #endif // _KMDILISTITERATOR_H_ diff --git a/lib/compatibility/kmdi/qextmdi/kmdimainfrm.cpp b/lib/compatibility/kmdi/qextmdi/kmdimainfrm.cpp index 449ce6f9..cf4c094c 100644 --- a/lib/compatibility/kmdi/qextmdi/kmdimainfrm.cpp +++ b/lib/compatibility/kmdi/qextmdi/kmdimainfrm.cpp @@ -37,31 +37,31 @@ #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include #include #include -#include +#include #include #include #include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include #include "kmdimainfrm.h" #include "kmditaskbar.h" @@ -135,7 +135,7 @@ public: }; //============ constructor ============// -KMdiMainFrm::KMdiMainFrm( QWidget* parentWidget, const char* name, KMdi::MdiMode mdiMode, WFlags flags ) +KMdiMainFrm::KMdiMainFrm( TQWidget* parentWidget, const char* name, KMdi::MdiMode mdiMode, WFlags flags ) : KParts::DockMainWindow( parentWidget, name, flags ) , m_mdiMode( KMdi::UndefinedMode ) , m_pMdi( 0L ) @@ -178,9 +178,9 @@ KMdiMainFrm::KMdiMainFrm( QWidget* parentWidget, const char* name, KMdi::MdiMode { kdDebug(760) << k_funcinfo << endl; // Create the local lists of windows - m_pDocumentViews = new QPtrList; + m_pDocumentViews = new TQPtrList; m_pDocumentViews->setAutoDelete( false ); - m_pToolViews = new QMap; + m_pToolViews = new TQMap; // This seems to be needed (re-check it after Qt2.0 comed out) setFocusPolicy( ClickFocus ); @@ -189,7 +189,7 @@ KMdiMainFrm::KMdiMainFrm( QWidget* parentWidget, const char* name, KMdi::MdiMode createMdiManager(); // cover KMdi's childarea by a dockwidget - m_pDockbaseAreaOfDocumentViews = createDockWidget( "mdiAreaCover", QPixmap(), 0L, "mdi_area_cover" ); + m_pDockbaseAreaOfDocumentViews = createDockWidget( "mdiAreaCover", TQPixmap(), 0L, "mdi_area_cover" ); m_pDockbaseAreaOfDocumentViews->setDockWindowTransient( this, true ); m_pDockbaseAreaOfDocumentViews->setEnableDocking( KDockWidget::DockNone ); m_pDockbaseAreaOfDocumentViews->setDockSite( KDockWidget::DockCorner ); @@ -201,20 +201,20 @@ KMdiMainFrm::KMdiMainFrm( QWidget* parentWidget, const char* name, KMdi::MdiMode // Apply options for the MDI manager applyOptions(); - m_pTaskBarPopup = new QPopupMenu( this, "taskbar_popup_menu" ); - m_pWindowPopup = new QPopupMenu( this, "window_popup_menu" ); + m_pTaskBarPopup = new TQPopupMenu( this, "taskbar_popup_menu" ); + m_pWindowPopup = new TQPopupMenu( this, "window_popup_menu" ); - m_pWindowMenu = new QPopupMenu( this, "window_menu" ); + m_pWindowMenu = new TQPopupMenu( this, "window_menu" ); m_pWindowMenu->setCheckable( true ); - QObject::connect( m_pWindowMenu, SIGNAL( aboutToShow() ), this, SLOT( fillWindowMenu() ) ); + TQObject::connect( m_pWindowMenu, TQT_SIGNAL( aboutToShow() ), this, TQT_SLOT( fillWindowMenu() ) ); - m_pDockMenu = new QPopupMenu( this, "dock_menu" ); + m_pDockMenu = new TQPopupMenu( this, "dock_menu" ); m_pDockMenu->setCheckable( true ); - m_pMdiModeMenu = new QPopupMenu( this, "mdimode_menu" ); + m_pMdiModeMenu = new TQPopupMenu( this, "mdimode_menu" ); m_pMdiModeMenu->setCheckable( true ); - m_pPlacingMenu = new QPopupMenu( this, "placing_menu" ); + m_pPlacingMenu = new TQPopupMenu( this, "placing_menu" ); d->closeWindowAction = new KAction(i18n("&Close"), #ifdef Q_WS_WIN @@ -222,7 +222,7 @@ KMdiMainFrm::KMdiMainFrm( QWidget* parentWidget, const char* name, KMdi::MdiMode #else 0, #endif - this, SLOT(closeActiveView()), actionCollection(), "window_close"); + this, TQT_SLOT(closeActiveView()), actionCollection(), "window_close"); // the MDI view taskbar createTaskBar(); @@ -252,12 +252,12 @@ KMdiMainFrm::KMdiMainFrm( QWidget* parentWidget, const char* name, KMdi::MdiMode } // 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() ) ); + m_pDragEndTimer = new TQTimer(); + connect( m_pDragEndTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( dragEndTimeOut() ) ); + connect( guiFactory(), TQT_SIGNAL( clientAdded( KXMLGUIClient* ) ), + this, TQT_SLOT( verifyToplevelHeight() ) ); + connect( guiFactory(), TQT_SIGNAL( clientRemoved( KXMLGUIClient* ) ), + this, TQT_SLOT( verifyToplevelHeight() ) ); } void KMdiMainFrm::verifyToplevelHeight() @@ -275,21 +275,21 @@ void KMdiMainFrm::verifyToplevelHeight() 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() ) ); + connect( m_mdiGUIClient, TQT_SIGNAL( toggleTop() ), this, TQT_SIGNAL( toggleTop() ) ); + connect( m_mdiGUIClient, TQT_SIGNAL( toggleLeft() ), this, TQT_SIGNAL( toggleLeft() ) ); + connect( m_mdiGUIClient, TQT_SIGNAL( toggleRight() ), this, TQT_SIGNAL( toggleRight() ) ); + connect( m_mdiGUIClient, TQT_SIGNAL( toggleBottom() ), this, TQT_SIGNAL( toggleBottom() ) ); if ( m_mdiMode == KMdi::IDEAlMode ) { if ( m_topContainer ) - connect( this, SIGNAL( toggleTop() ), m_topContainer->getWidget(), SLOT( toggle() ) ); + connect( this, TQT_SIGNAL( toggleTop() ), m_topContainer->getWidget(), TQT_SLOT( toggle() ) ); if ( m_leftContainer ) - connect( this, SIGNAL( toggleLeft() ), m_leftContainer->getWidget(), SLOT( toggle() ) ); + connect( this, TQT_SIGNAL( toggleLeft() ), m_leftContainer->getWidget(), TQT_SLOT( toggle() ) ); if ( m_rightContainer ) - connect( this, SIGNAL( toggleRight() ), m_rightContainer->getWidget(), SLOT( toggle() ) ); + connect( this, TQT_SIGNAL( toggleRight() ), m_rightContainer->getWidget(), TQT_SLOT( toggle() ) ); if ( m_bottomContainer ) - connect( this, SIGNAL( toggleBottom() ), m_bottomContainer->getWidget(), SLOT( toggle() ) ); + connect( this, TQT_SIGNAL( toggleBottom() ), m_bottomContainer->getWidget(), TQT_SLOT( toggle() ) ); } emit mdiModeHasBeenChangedTo( m_mdiMode ); @@ -299,12 +299,12 @@ void KMdiMainFrm::setStandardMDIMenuEnabled( bool showModeMenu ) KMdiMainFrm::~KMdiMainFrm() { //save the children first to a list, as removing invalidates our iterator - QValueList children; + TQValueList children; for ( KMdiChildView * w = m_pDocumentViews->first();w;w = m_pDocumentViews->next() ) children.append( w ); // safely close the windows so properties are saved... - QValueListIterator childIt; + TQValueListIterator childIt; for ( childIt = children.begin(); childIt != children.end(); ++childIt ) { closeWindow( *childIt, false ); // without re-layout taskbar! @@ -339,10 +339,10 @@ KMdiMainFrm::~KMdiMainFrm() //FIXME something wrong with this function. dunno what though void KMdiMainFrm::applyOptions() { - QPtrListIterator it( *m_pDocumentViews ); + TQPtrListIterator it( *m_pDocumentViews ); for ( ; ( *it ); ++it ) { - QWidget* childFrame = 0L; + TQWidget* childFrame = 0L; if ( ( *it )->mdiParent() ) { kdDebug(760) << k_funcinfo << "using child view's mdi parent for resize hack" << endl; @@ -367,22 +367,22 @@ 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() ) ); + TQObject::connect( m_pMdi, TQT_SIGNAL( nowMaximized( bool ) ), + this, TQT_SLOT( setEnableMaximizedChildFrmMode( bool ) ) ); + TQObject::connect( m_pMdi, TQT_SIGNAL( noMaximizedChildFrmLeft( KMdiChildFrm* ) ), + this, TQT_SLOT( switchOffMaximizeModeForMenu( KMdiChildFrm* ) ) ); + TQObject::connect( m_pMdi, TQT_SIGNAL( sysButtonConnectionsMustChange( KMdiChildFrm*, KMdiChildFrm* ) ), + this, TQT_SLOT( updateSysButtonConnections( KMdiChildFrm*, KMdiChildFrm* ) ) ); + TQObject::connect( m_pMdi, TQT_SIGNAL( popupWindowMenu( TQPoint ) ), + this, TQT_SLOT( popupWindowMenu( TQPoint ) ) ); + TQObject::connect( m_pMdi, TQT_SIGNAL( lastChildFrmClosed() ), + this, TQT_SIGNAL( lastChildFrmClosed() ) ); } //============ createTaskBar ==============// void KMdiMainFrm::createTaskBar() { - m_pTaskBar = new KMdiTaskBar( this, QMainWindow::DockBottom ); + m_pTaskBar = new KMdiTaskBar( this, TQMainWindow::DockBottom ); m_pTaskBar->installEventFilter( this ); } @@ -393,7 +393,7 @@ void KMdiMainFrm::slot_toggleTaskBar() m_pTaskBar->switchOn( !m_pTaskBar->isSwitchedOn() ); } -void KMdiMainFrm::resizeEvent( QResizeEvent *e ) +void KMdiMainFrm::resizeEvent( TQResizeEvent *e ) { if ( ( m_mdiMode == KMdi::ToplevelMode ) && !parentWidget() ) { @@ -417,20 +417,20 @@ void KMdiMainFrm::setMinimumSize( int minw, int minh ) //================ wrapper ===============// -KMdiChildView* KMdiMainFrm::createWrapper( QWidget *view, const QString& name, const QString& shortName ) +KMdiChildView* KMdiMainFrm::createWrapper( TQWidget *view, const TQString& name, const TQString& 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 ) ); + TQBoxLayout* pLayout = new TQHBoxLayout( pMDICover, 0, -1, "layout" ); + view->reparent( pMDICover, TQPoint( 0, 0 ) ); pLayout->addWidget( view ); // pMDICover->setName(name); pMDICover->setTabCaption( shortName ); pMDICover->setCaption( name ); - const QPixmap* wndIcon = view->icon(); + const TQPixmap* wndIcon = view->icon(); if ( wndIcon ) pMDICover->setIcon( *wndIcon ); @@ -462,14 +462,14 @@ void KMdiMainFrm::addWindow( KMdiChildView* pWnd, int flags, int index ) 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* ) ) ); + TQObject::connect( pWnd, TQT_SIGNAL( clickedInWindowMenu( int ) ), this, TQT_SLOT( windowMenuItemActivated( int ) ) ); + TQObject::connect( pWnd, TQT_SIGNAL( focusInEventOccurs( KMdiChildView* ) ), this, TQT_SLOT( activateView( KMdiChildView* ) ) ); + TQObject::connect( pWnd, TQT_SIGNAL( childWindowCloseRequest( KMdiChildView* ) ), this, TQT_SLOT( childWindowCloseRequest( KMdiChildView* ) ) ); + TQObject::connect( pWnd, TQT_SIGNAL( attachWindow( KMdiChildView*, bool ) ), this, TQT_SLOT( attachWindow( KMdiChildView*, bool ) ) ); + TQObject::connect( pWnd, TQT_SIGNAL( detachWindow( KMdiChildView*, bool ) ), this, TQT_SLOT( detachWindow( KMdiChildView*, bool ) ) ); + TQObject::connect( pWnd, TQT_SIGNAL( clickedInDockMenu( int ) ), this, TQT_SLOT( dockMenuItemActivated( int ) ) ); + TQObject::connect( pWnd, TQT_SIGNAL( activated( KMdiChildView* ) ), this, TQT_SIGNAL( viewActivated( KMdiChildView* ) ) ); + TQObject::connect( pWnd, TQT_SIGNAL( deactivated( KMdiChildView* ) ), this, TQT_SIGNAL( viewDeactivated( KMdiChildView* ) ) ); if ( index == -1 ) m_pDocumentViews->append( pWnd ); @@ -479,20 +479,20 @@ void KMdiMainFrm::addWindow( KMdiChildView* pWnd, int flags, int index ) if ( m_pTaskBar ) { KMdiTaskBarButton* but = m_pTaskBar->addWinButton( pWnd ); - QObject::connect( pWnd, SIGNAL( tabCaptionChanged( const QString& ) ), but, SLOT( setNewText( const QString& ) ) ); + TQObject::connect( pWnd, TQT_SIGNAL( tabCaptionChanged( const TQString& ) ), but, TQT_SLOT( setNewText( const TQString& ) ) ); } // embed the view depending on the current MDI mode if ( m_mdiMode == KMdi::TabPageMode || m_mdiMode == KMdi::IDEAlMode ) { - QPixmap pixmap; + TQPixmap 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& ) ) ); + connect( pWnd, TQT_SIGNAL( iconUpdated( TQWidget*, TQPixmap ) ), m_documentTabWidget, TQT_SLOT( updateIconInView( TQWidget*, TQPixmap ) ) ); + connect( pWnd, TQT_SIGNAL( captionUpdated( TQWidget*, const TQString& ) ), m_documentTabWidget, TQT_SLOT( updateCaptionInView( TQWidget*, const TQString& ) ) ); } else { @@ -528,7 +528,7 @@ void KMdiMainFrm::addWindow( KMdiChildView* pWnd, int flags, int index ) } //============ addWindow ============// -void KMdiMainFrm::addWindow( KMdiChildView* pWnd, QRect rectNormal, int flags ) +void KMdiMainFrm::addWindow( KMdiChildView* pWnd, TQRect rectNormal, int flags ) { addWindow( pWnd, flags ); if ( m_bMaximizedChildFrmMode && pWnd->isAttached() ) @@ -538,11 +538,11 @@ void KMdiMainFrm::addWindow( KMdiChildView* pWnd, QRect rectNormal, int flags ) } //============ addWindow ============// -void KMdiMainFrm::addWindow( KMdiChildView* pWnd, QPoint pos, int flags ) +void KMdiMainFrm::addWindow( KMdiChildView* pWnd, TQPoint pos, int flags ) { addWindow( pWnd, flags ); if ( m_bMaximizedChildFrmMode && pWnd->isAttached() ) - pWnd->setRestoreGeometry( QRect( pos, pWnd->restoreGeometry().size() ) ); + pWnd->setRestoreGeometry( TQRect( pos, pWnd->restoreGeometry().size() ) ); else pWnd->move( pos ); } @@ -555,7 +555,7 @@ KMdiToolViewAccessor *KMdiMainFrm::createToolWindow() } -void KMdiMainFrm::deleteToolWindow( QWidget* pWnd ) +void KMdiMainFrm::deleteToolWindow( TQWidget* pWnd ) { if ( m_pToolViews->contains( pWnd ) ) deleteToolWindow( ( *m_pToolViews ) [ pWnd ] ); @@ -567,10 +567,10 @@ void KMdiMainFrm::deleteToolWindow( KMdiToolViewAccessor *accessor ) } //============ addWindow ============// -KMdiToolViewAccessor *KMdiMainFrm::addToolWindow( QWidget* pWnd, KDockWidget::DockPosition pos, QWidget* pTargetWnd, - int percent, const QString& tabToolTip, const QString& tabCaption ) +KMdiToolViewAccessor *KMdiMainFrm::addToolWindow( TQWidget* pWnd, KDockWidget::DockPosition pos, TQWidget* pTargetWnd, + int percent, const TQString& tabToolTip, const TQString& tabCaption ) { - QWidget* tvta = pWnd; + TQWidget* tvta = pWnd; KDockWidget* pDW = dockManager->getDockWidgetFromName( pWnd->name() ); if ( pDW ) { @@ -586,7 +586,7 @@ KMdiToolViewAccessor *KMdiMainFrm::addToolWindow( QWidget* pWnd, KDockWidget::Do pWnd = pDW; } - QRect r = pWnd->geometry(); + TQRect r = pWnd->geometry(); KMdiToolViewAccessor *mtva = new KMdiToolViewAccessor( this, pWnd, tabToolTip, ( tabCaption == 0 ) ? pWnd->caption() : tabCaption ); m_pToolViews->insert( tvta, mtva ); @@ -610,11 +610,11 @@ void KMdiMainFrm::attachWindow( KMdiChildView *pWnd, bool bShow, bool bAutomatic // 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(); + TQApplication::sendPostedEvents(); + TQRect frameGeo = pWnd->frameGeometry(); + TQPoint topLeftScreen = pWnd->mapToGlobal( TQPoint( 0, 0 ) ); + TQPoint topLeftMdiChildArea = m_pMdi->mapFromGlobal( topLeftScreen ); + TQRect childAreaGeo = m_pMdi->geometry(); if ( topLeftMdiChildArea.x() < 0 || topLeftMdiChildArea.y() < 0 || ( topLeftMdiChildArea.x() + frameGeo.width() > childAreaGeo.width() ) || ( topLeftMdiChildArea.y() + frameGeo.height() > childAreaGeo.height() ) ) @@ -643,7 +643,7 @@ void KMdiMainFrm::attachWindow( KMdiChildView *pWnd, bool bShow, bool bAutomatic m_pMdi->manageChild( lpC, false, bCascade ); if ( m_pMdi->topChild() && m_pMdi->topChild() ->isMaximized() ) { - QRect r = lpC->geometry(); + TQRect 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 ); @@ -656,8 +656,8 @@ void KMdiMainFrm::attachWindow( KMdiChildView *pWnd, bool bShow, bool bAutomatic } #undef FocusIn - QFocusEvent fe( QEvent::FocusIn ); - QApplication::sendEvent( pWnd, &fe ); + TQFocusEvent fe( TQEvent::FocusIn ); + TQApplication::sendEvent( pWnd, &fe ); m_pCurrentWindow = pWnd; // required for checking the active item } @@ -677,10 +677,10 @@ void KMdiMainFrm::detachWindow( KMdiChildView *pWnd, bool bShow ) { if ( lpC->icon() ) { - QPixmap pixm( *( lpC->icon() ) ); + TQPixmap pixm( *( lpC->icon() ) ); pWnd->setIcon( pixm ); } - QString capt( lpC->caption() ); + TQString capt( lpC->caption() ); if ( !bShow ) lpC->hide(); lpC->unsetClient( m_undockPositioningOffset ); @@ -691,15 +691,15 @@ void KMdiMainFrm::detachWindow( KMdiChildView *pWnd, bool bShow ) } else { - if ( pWnd->size().isEmpty() || ( pWnd->size() == QSize( 1, 1 ) ) ) + if ( pWnd->size().isEmpty() || ( pWnd->size() == TQSize( 1, 1 ) ) ) { if ( m_pCurrentWindow ) { - pWnd->setGeometry( QRect( m_pMdi->getCascadePoint( m_pDocumentViews->count() - 1 ), m_pCurrentWindow->size() ) ); + pWnd->setGeometry( TQRect( m_pMdi->getCascadePoint( m_pDocumentViews->count() - 1 ), m_pCurrentWindow->size() ) ); } else { - pWnd->setGeometry( QRect( m_pMdi->getCascadePoint( m_pDocumentViews->count() - 1 ), defaultChildFrmSize() ) ); + pWnd->setGeometry( TQRect( m_pMdi->getCascadePoint( m_pDocumentViews->count() - 1 ), defaultChildFrmSize() ) ); } } #ifdef Q_WS_X11 @@ -740,19 +740,19 @@ void KMdiMainFrm::removeWindowFromMdi( KMdiChildView *pWnd ) 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 ) ) ); + TQObject::disconnect( pWnd, TQT_SIGNAL( attachWindow( KMdiChildView*, bool ) ), this, TQT_SLOT( attachWindow( KMdiChildView*, bool ) ) ); + TQObject::disconnect( pWnd, TQT_SIGNAL( detachWindow( KMdiChildView*, bool ) ), this, TQT_SLOT( detachWindow( KMdiChildView*, bool ) ) ); + TQObject::disconnect( pWnd, TQT_SIGNAL( focusInEventOccurs( KMdiChildView* ) ), this, TQT_SLOT( activateView( KMdiChildView* ) ) ); + TQObject::disconnect( pWnd, TQT_SIGNAL( childWindowCloseRequest( KMdiChildView* ) ), this, TQT_SLOT( childWindowCloseRequest( KMdiChildView* ) ) ); + TQObject::disconnect( pWnd, TQT_SIGNAL( clickedInWindowMenu( int ) ), this, TQT_SLOT( windowMenuItemActivated( int ) ) ); + TQObject::disconnect( pWnd, TQT_SIGNAL( clickedInDockMenu( int ) ), this, TQT_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& ) ) ); + TQObject::disconnect( pWnd, TQT_SIGNAL( tabCaptionChanged( const TQString& ) ), but, TQT_SLOT( setNewText( const TQString& ) ) ); } m_pTaskBar->removeWinButton( pWnd ); } @@ -763,7 +763,7 @@ void KMdiMainFrm::removeWindowFromMdi( KMdiChildView *pWnd ) { if ( !m_pDockbaseAreaOfDocumentViews ) { - m_pDockbaseAreaOfDocumentViews = createDockWidget( "mdiAreaCover", QPixmap(), 0L, "mdi_area_cover" ); + m_pDockbaseAreaOfDocumentViews = createDockWidget( "mdiAreaCover", TQPixmap(), 0L, "mdi_area_cover" ); m_pDockbaseAreaOfDocumentViews->setDockWindowTransient( this, true ); m_pDockbaseAreaOfDocumentViews->setWidget( m_pMdi ); @@ -777,11 +777,11 @@ void KMdiMainFrm::removeWindowFromMdi( KMdiChildView *pWnd ) m_pClose->hide(); } KDockWidget* pDockW = ( KDockWidget* ) pWnd->parentWidget(); - pWnd->reparent( 0L, QPoint( 0, 0 ) ); + pWnd->reparent( 0L, TQPoint( 0, 0 ) ); pDockW->setWidget( 0L ); if ( pDockW == m_pDockbaseOfTabPage ) { - QTabWidget * pTab = ( QTabWidget* ) pDockW->parentWidget() ->parentWidget(); + TQTabWidget * pTab = ( TQTabWidget* ) pDockW->parentWidget() ->parentWidget(); int cnt = pTab->count(); m_pDockbaseOfTabPage = ( KDockWidget* ) pTab->page( cnt - 2 ); if ( pDockW == m_pDockbaseOfTabPage ) @@ -849,7 +849,7 @@ void KMdiMainFrm::closeWindow( KMdiChildView *pWnd, bool layoutTaskBar ) return ; //oops if ( m_pDocumentViews->count() == 0 ) m_pClose->hide(); - pWnd->reparent( 0L, QPoint( 0, 0 ) ); + pWnd->reparent( 0L, TQPoint( 0, 0 ) ); kdDebug(760) << "-------- 1" << endl; if ( m_pDocumentViews->count() == 1 ) { @@ -862,7 +862,7 @@ void KMdiMainFrm::closeWindow( KMdiChildView *pWnd, bool layoutTaskBar ) { if ( !m_pDockbaseAreaOfDocumentViews ) { - m_pDockbaseAreaOfDocumentViews = createDockWidget( "mdiAreaCover", QPixmap(), 0L, "mdi_area_cover" ); + m_pDockbaseAreaOfDocumentViews = createDockWidget( "mdiAreaCover", TQPixmap(), 0L, "mdi_area_cover" ); m_pDockbaseAreaOfDocumentViews->setDockWindowTransient( this, true ); m_pDockbaseAreaOfDocumentViews->setWidget( m_pMdi ); setMainDockWidget( m_pDockbaseAreaOfDocumentViews ); @@ -879,11 +879,11 @@ void KMdiMainFrm::closeWindow( KMdiChildView *pWnd, bool layoutTaskBar ) } #if 0 KDockWidget* pDockW = ( KDockWidget* ) pWnd->parentWidget(); - pWnd->reparent( 0L, QPoint( 0, 0 ) ); + pWnd->reparent( 0L, TQPoint( 0, 0 ) ); pDockW->setWidget( 0L ); if ( pDockW == m_pDockbaseOfTabPage ) { - QTabWidget * pTab = ( QTabWidget* ) pDockW->parentWidget() ->parentWidget(); + TQTabWidget * pTab = ( TQTabWidget* ) pDockW->parentWidget() ->parentWidget(); int cnt = pTab->count(); m_pDockbaseOfTabPage = ( KDockWidget* ) pTab->page( cnt - 2 ); if ( pDockW == m_pDockbaseOfTabPage ) @@ -941,9 +941,9 @@ void KMdiMainFrm::closeWindow( KMdiChildView *pWnd, bool layoutTaskBar ) } //================== findWindow =================// -KMdiChildView* KMdiMainFrm::findWindow( const QString& caption ) +KMdiChildView* KMdiMainFrm::findWindow( const TQString& caption ) { - QPtrListIterator it( *m_pDocumentViews ); + TQPtrListIterator it( *m_pDocumentViews ); for ( ; ( *it ); ++it ) { if ( ( *it )->caption() == caption ) @@ -975,7 +975,7 @@ bool KMdiMainFrm::windowExists( KMdiChildView *pWnd, ExistsAs as ) return false; } -QPopupMenu * KMdiMainFrm::windowPopup( KMdiChildView * pWnd, bool bIncludeTaskbarPopup ) +TQPopupMenu * KMdiMainFrm::windowPopup( KMdiChildView * pWnd, bool bIncludeTaskbarPopup ) { m_pWindowPopup->clear(); if ( bIncludeTaskbarPopup ) @@ -987,32 +987,32 @@ QPopupMenu * KMdiMainFrm::windowPopup( KMdiChildView * pWnd, bool bIncludeTaskba } //================ taskBarPopup =================// -QPopupMenu* KMdiMainFrm::taskBarPopup( KMdiChildView *pWnd, bool /*bIncludeWindowPopup*/ ) +TQPopupMenu* 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->insertItem( i18n( "Undock" ), pWnd, TQT_SLOT( detach() ) ); m_pTaskBarPopup->insertSeparator(); if ( pWnd->isMinimized() || pWnd->isMaximized() ) - m_pTaskBarPopup->insertItem( i18n( "Restore" ), pWnd, SLOT( restore() ) ); + m_pTaskBarPopup->insertItem( i18n( "Restore" ), pWnd, TQT_SLOT( restore() ) ); if ( !pWnd->isMaximized() ) - m_pTaskBarPopup->insertItem( i18n( "Maximize" ), pWnd, SLOT( maximize() ) ); + m_pTaskBarPopup->insertItem( i18n( "Maximize" ), pWnd, TQT_SLOT( maximize() ) ); if ( !pWnd->isMinimized() ) - m_pTaskBarPopup->insertItem( i18n( "Minimize" ), pWnd, SLOT( minimize() ) ); + m_pTaskBarPopup->insertItem( i18n( "Minimize" ), pWnd, TQT_SLOT( minimize() ) ); } else - m_pTaskBarPopup->insertItem( i18n( "Dock" ), pWnd, SLOT( attach() ) ); + m_pTaskBarPopup->insertItem( i18n( "Dock" ), pWnd, TQT_SLOT( attach() ) ); m_pTaskBarPopup->insertSeparator(); - m_pTaskBarPopup->insertItem( i18n( "Close" ), pWnd, SLOT( close() ) ); + m_pTaskBarPopup->insertItem( i18n( "Close" ), pWnd, TQT_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 ) +void KMdiMainFrm::slotDocCurrentChanged( TQWidget* pWidget ) { KMdiChildView * pWnd = static_cast( pWidget ); pWnd->m_bMainframesActivateViewIsPending = true; @@ -1110,19 +1110,19 @@ void KMdiMainFrm::activateView( KMdiChildView* pWnd ) void KMdiMainFrm::taskbarButtonRightClicked( KMdiChildView *pWnd ) { activateView( pWnd ); // set focus - //QApplication::sendPostedEvents(); - taskBarPopup( pWnd, true ) ->popup( QCursor::pos() ); + //TQApplication::sendPostedEvents(); + taskBarPopup( pWnd, true ) ->popup( TQCursor::pos() ); } void KMdiMainFrm::childWindowCloseRequest( KMdiChildView *pWnd ) { KMdiViewCloseEvent * ce = new KMdiViewCloseEvent( pWnd ); - QApplication::postEvent( this, ce ); + TQApplication::postEvent( this, ce ); } -bool KMdiMainFrm::event( QEvent* e ) +bool KMdiMainFrm::event( TQEvent* e ) { - if ( e->type() == QEvent::User ) + if ( e->type() == TQEvent::User ) { KMdiChildView * pWnd = ( KMdiChildView* ) ( ( KMdiViewCloseEvent* ) e )->data(); if ( pWnd != 0L ) @@ -1143,7 +1143,7 @@ bool KMdiMainFrm::event( QEvent* e ) // 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 ) + else if ( isVisible() && e->type() == TQEvent::Move ) { if ( m_pDragEndTimer->isActive() ) { @@ -1153,11 +1153,11 @@ bool KMdiMainFrm::event( QEvent* e ) else { // this is the first move -> send the drag begin to all concerned views - QPtrListIterator it( *m_pDocumentViews ); + TQPtrListIterator it( *m_pDocumentViews ); for ( ; ( *it ); ++it ) { KMdiChildFrmDragBeginEvent dragBeginEvent( 0L ); - QApplication::sendEvent( ( *it ), &dragBeginEvent ); + TQApplication::sendEvent( ( *it ), &dragBeginEvent ); } } m_pDragEndTimer->start( 200, true ); // single shot after 200 ms @@ -1166,18 +1166,18 @@ bool KMdiMainFrm::event( QEvent* e ) return DockMainWindow::event( e ); } -bool KMdiMainFrm::eventFilter( QObject * /*obj*/, QEvent *e ) +bool KMdiMainFrm::eventFilter( TQObject * /*obj*/, TQEvent *e ) { - if ( e->type() == QEvent::Resize && m_mdiMode == KMdi::ToplevelMode ) + if ( e->type() == TQEvent::Resize && m_mdiMode == KMdi::ToplevelMode ) { verifyToplevelHeight(); return false; //let the rest of the resize magic do its work } - if ( e->type() == QEvent::FocusIn ) + if ( e->type() == TQEvent::FocusIn ) { - QFocusEvent * pFE = ( QFocusEvent* ) e; - if ( pFE->reason() == QFocusEvent::ActiveWindow ) + TQFocusEvent * pFE = ( TQFocusEvent* ) e; + if ( pFE->reason() == TQFocusEvent::ActiveWindow ) { if ( m_pCurrentWindow && !m_pCurrentWindow->isHidden() && !m_pCurrentWindow->isAttached() && m_pMdi->topChild() ) @@ -1196,7 +1196,7 @@ bool KMdiMainFrm::eventFilter( QObject * /*obj*/, QEvent *e ) } } } - else if ( e->type() == QEvent::KeyRelease ) + else if ( e->type() == TQEvent::KeyRelease ) { if ( switching() ) { @@ -1207,14 +1207,14 @@ bool KMdiMainFrm::eventFilter( QObject * /*obj*/, QEvent *e ) 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 ); + int state = ( ( TQKeyEvent * ) e ) ->state(); + KKey key2( ( TQKeyEvent * ) 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() && + if ( state != ( ( TQKeyEvent * ) 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 ) ) @@ -1239,12 +1239,12 @@ bool KMdiMainFrm::eventFilter( QObject * /*obj*/, QEvent *e ) void KMdiMainFrm::closeAllViews() { //save the children first to a list, as removing invalidates our iterator - QValueList children; + TQValueList children; for ( KMdiChildView * w = m_pDocumentViews->first();w;w = m_pDocumentViews->next() ) { children.append( w ); } - QValueListIterator childIt; + TQValueListIterator childIt; for ( childIt = children.begin(); childIt != children.end(); ++childIt ) { ( *childIt )->close(); @@ -1258,7 +1258,7 @@ void KMdiMainFrm::closeAllViews() void KMdiMainFrm::iconifyAllViews() { kdDebug(760) << k_funcinfo << "minimizing all the views" << endl; - QPtrListIterator it( *m_pDocumentViews ); + TQPtrListIterator it( *m_pDocumentViews ); for ( ; ( *it ); ++it ) ( *it )->minimize(); } @@ -1274,7 +1274,7 @@ void KMdiMainFrm::closeActiveView() } /** find the root dockwidgets and store their geometry */ -void KMdiMainFrm::findRootDockWidgets( QPtrList* rootDockWidgetList, QValueList* positionList ) +void KMdiMainFrm::findRootDockWidgets( TQPtrList* rootDockWidgetList, TQValueList* positionList ) { //nothing is valid if ( !rootDockWidgetList && !positionList ) @@ -1284,18 +1284,18 @@ void KMdiMainFrm::findRootDockWidgets( QPtrList* rootDockWidgetList const int frameBorderWidth = 7; // @todo: Can we / do we need to ask the window manager? const int windowTitleHeight = 10; // @todo: -"- - QObjectList* pObjList = queryList( "KDockWidget" ); + TQObjectList* pObjList = queryList( "KDockWidget" ); if ( pObjList->isEmpty() ) pObjList = queryList( "KDockWidget_Compat::KDockWidget" ); - QObjectListIt it( *pObjList ); + TQObjectListIt 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( ( *it ) ); + TQWidget* pW = static_cast( ( *it ) ); // find the oldest ancestor of the current dockwidget that can be undocked while ( !pW->isTopLevel() ) @@ -1315,7 +1315,7 @@ void KMdiMainFrm::findRootDockWidgets( QPtrList* rootDockWidgetList bool found = false; if ( !rootDockWidgetList->isEmpty() ) { - QPtrListIterator it2( *rootDockWidgetList ); + TQPtrListIterator it2( *rootDockWidgetList ); for ( ; it2.current() && !found; ++it2 ) { dockWindow = it2.current(); @@ -1329,8 +1329,8 @@ void KMdiMainFrm::findRootDockWidgets( QPtrList* rootDockWidgetList 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(), + TQPoint p = rootDockWindow->mapToGlobal( rootDockWindow->pos() ) - rootDockWindow->pos(); + TQRect r( p.x(), p.y() + m_undockPositioningOffset.y(), rootDockWindow->width() - windowTitleHeight - frameBorderWidth * 2, rootDockWindow->height() - windowTitleHeight - frameBorderWidth * 2 ); positionList->append( r ); @@ -1355,11 +1355,11 @@ void KMdiMainFrm::switchToToplevelMode() 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 ) ); + setUndockPositioningOffset( TQPoint( 0, ( m_pTaskBar ? m_pTaskBar->height() : 0 ) + frameBorderWidth ) ); // 1.) select the dockwidgets to be undocked and store their geometry - QPtrList rootDockWidgetList; - QValueList positionList; + TQPtrList rootDockWidgetList; + TQValueList positionList; // 2.) undock the MDI views of KMDI switch( oldMdiMode ) @@ -1379,7 +1379,7 @@ void KMdiMainFrm::switchToToplevelMode() } // 3.) undock all these found oldest ancestors (being KDockWidgets) - QPtrListIterator kdwit( rootDockWidgetList ); + TQPtrListIterator kdwit( rootDockWidgetList ); for ( ; ( *kdwit ); ++kdwit ) ( *kdwit )->undock(); @@ -1388,7 +1388,7 @@ void KMdiMainFrm::switchToToplevelMode() { if ( !m_pDockbaseAreaOfDocumentViews ) { - m_pDockbaseAreaOfDocumentViews = createDockWidget( "mdiAreaCover", QPixmap(), 0L, "mdi_area_cover" ); + m_pDockbaseAreaOfDocumentViews = createDockWidget( "mdiAreaCover", TQPixmap(), 0L, "mdi_area_cover" ); m_pDockbaseAreaOfDocumentViews->setDockWindowTransient( this, true ); m_pDockbaseAreaOfDocumentViews->setEnableDocking( KDockWidget::DockNone ); m_pDockbaseAreaOfDocumentViews->setDockSite( KDockWidget::DockCorner ); @@ -1398,7 +1398,7 @@ void KMdiMainFrm::switchToToplevelMode() setView( m_pDockbaseAreaOfDocumentViews ); setMainDockWidget( m_pDockbaseAreaOfDocumentViews ); } - // QApplication::sendPostedEvents(); //why do we need to empty the event queue? + // TQApplication::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 ) @@ -1422,7 +1422,7 @@ void KMdiMainFrm::switchToToplevelMode() //FIXME although i don't know what to fix // 5. show the child views again - QPtrListIterator kmdicvit( *m_pDocumentViews ); + TQPtrListIterator kmdicvit( *m_pDocumentViews ); for ( kmdicvit.toFirst(); ( *kmdicvit ); ++kmdicvit ) { #ifdef Q_WS_X11 @@ -1432,8 +1432,8 @@ void KMdiMainFrm::switchToToplevelMode() } // 6.) reset all memorized positions of the undocked ones and show them again - QValueList::Iterator qvlqrit; - QValueList::Iterator qvlEnd = positionList.end(); + TQValueList::Iterator qvlqrit; + TQValueList::Iterator qvlEnd = positionList.end(); for ( kmdicvit.toFirst(), qvlqrit = positionList.begin() ; ( *kmdicvit ) && qvlqrit != qvlEnd; ++kmdicvit, ++qvlqrit ) { ( *kmdicvit )->setGeometry( ( *qvlqrit ) ); @@ -1464,8 +1464,8 @@ void KMdiMainFrm::switchToChildframeMode() return ; } - QPtrList rootDockWidgetList; - QValueList positionList; + TQPtrList rootDockWidgetList; + TQValueList positionList; if ( m_mdiMode == KMdi::TabPageMode ) { @@ -1475,7 +1475,7 @@ void KMdiMainFrm::switchToChildframeMode() kdDebug(760) << k_funcinfo << "Found " << rootDockWidgetList.count() << " widgets to undock" << endl; // undock all these found oldest ancestors (being KDockWidgets) - QPtrListIterator it( rootDockWidgetList ); + TQPtrListIterator it( rootDockWidgetList ); for ( ; ( *it ) ; ++it ) ( *it )->undock(); @@ -1495,7 +1495,7 @@ void KMdiMainFrm::switchToChildframeMode() kdDebug(760) << k_funcinfo << "Found " << rootDockWidgetList.count() << " widgets to undock" << endl; // undock all these found oldest ancestors (being KDockWidgets) - QPtrListIterator it( rootDockWidgetList ); + TQPtrListIterator it( rootDockWidgetList ); for ( ; ( *it ) ; ++it ) ( *it )->undock(); @@ -1507,7 +1507,7 @@ void KMdiMainFrm::switchToChildframeMode() if ( !m_pDockbaseAreaOfDocumentViews ) { // cover KMdi's childarea by a dockwidget - m_pDockbaseAreaOfDocumentViews = createDockWidget( "mdiAreaCover", QPixmap(), 0L, "mdi_area_cover" ); + m_pDockbaseAreaOfDocumentViews = createDockWidget( "mdiAreaCover", TQPixmap(), 0L, "mdi_area_cover" ); m_pDockbaseAreaOfDocumentViews->setDockWindowTransient( this, true ); m_pDockbaseAreaOfDocumentViews->setEnableDocking( KDockWidget::DockNone ); m_pDockbaseAreaOfDocumentViews->setDockSite( KDockWidget::DockCorner ); @@ -1530,7 +1530,7 @@ void KMdiMainFrm::switchToChildframeMode() if ( ( m_mdiMode == KMdi::TabPageMode ) || ( m_mdiMode == KMdi::IDEAlMode ) ) { kdDebug(760) << k_funcinfo << "trying to dock back the undock toolviews" << endl; - QPtrListIterator it( rootDockWidgetList ); + TQPtrListIterator it( rootDockWidgetList ); for ( ; ( *it ); ++it ) ( *it )->dockBack(); } @@ -1539,7 +1539,7 @@ void KMdiMainFrm::switchToChildframeMode() { // 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(); + TQDomElement oldDockState = m_pTempDockSession->namedItem( "cur_dock_state" ).toElement(); readDockConfig( oldDockState ); } @@ -1547,7 +1547,7 @@ void KMdiMainFrm::switchToChildframeMode() m_mdiMode = KMdi::ChildframeMode; //FIXME although i don't know what to fix. - QPtrListIterator it( *m_pDocumentViews ); + TQPtrListIterator it( *m_pDocumentViews ); for ( ; ( *it ); ++it ) { KMdiChildView* pView = ( *it ); @@ -1577,14 +1577,14 @@ 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 = new TQDomDocument( "docksession" ); + TQDomElement 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 it( *m_pDocumentViews ); + TQPtrListIterator it( *m_pDocumentViews ); for ( ; ( *it ); ++it ) { KMdiChildView* pView = ( *it ); @@ -1637,7 +1637,7 @@ void KMdiMainFrm::switchToTabPageMode() if ( m_pClose ) { - QObject::connect( m_pClose, SIGNAL( clicked() ), this, SLOT( closeViewButtonPressed() ) ); + TQObject::connect( m_pClose, TQT_SIGNAL( clicked() ), this, TQT_SLOT( closeViewButtonPressed() ) ); if ( m_pDocumentViews->count() > 0 ) m_pClose->show(); } @@ -1654,20 +1654,20 @@ void KMdiMainFrm::finishTabPageMode() if ( m_mdiMode == KMdi::TabPageMode ) { m_pClose->hide(); - QObject::disconnect( m_pClose, SIGNAL( clicked() ), this, SLOT( closeViewButtonPressed() ) ); + TQObject::disconnect( m_pClose, TQT_SIGNAL( clicked() ), this, TQT_SLOT( closeViewButtonPressed() ) ); - QPtrListIterator it( *m_pDocumentViews ); + TQPtrListIterator 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 ); + TQSize mins = pView->minimumSize(); + TQSize maxs = pView->maximumSize(); + TQSize sz = pView->size(); + TQWidget* pParent = pView->parentWidget(); + TQPoint p( pParent->mapToGlobal( pParent->pos() ) - pParent->pos() + m_undockPositioningOffset ); m_documentTabWidget->removePage( pView ); pView->reparent( 0, 0, p ); // pView->reparent(0,0,p); @@ -1700,12 +1700,12 @@ void KMdiMainFrm::setupTabbedDocumentViewSpace() m_oldMainFrmHeight = 0; //qDebug("TopLevelMode off"); emit leftTopLevelMode(); - QApplication::sendPostedEvents(); + TQApplication::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(); + TQDomElement oldDockState = m_pTempDockSession->namedItem( "cur_dock_state" ).toElement(); readDockConfig( oldDockState ); } } @@ -1719,20 +1719,20 @@ void KMdiMainFrm::setupTabbedDocumentViewSpace() #endif delete m_documentTabWidget; m_documentTabWidget = new KMdiDocumentViewTabWidget( m_pDockbaseAreaOfDocumentViews ); - connect( m_documentTabWidget, SIGNAL( currentChanged( QWidget* ) ), this, SLOT( slotDocCurrentChanged( QWidget* ) ) ); + connect( m_documentTabWidget, TQT_SIGNAL( currentChanged( TQWidget* ) ), this, TQT_SLOT( slotDocCurrentChanged( TQWidget* ) ) ); m_pDockbaseAreaOfDocumentViews->setWidget( m_documentTabWidget ); m_documentTabWidget->show(); - QPtrListIterator it4( *m_pDocumentViews ); + TQPtrListIterator it4( *m_pDocumentViews ); for ( ; it4.current(); ++it4 ) { KMdiChildView* pView = it4.current(); - m_documentTabWidget->addTab( pView, pView->icon() ? *( pView->icon() ) : QPixmap(), pView->tabCaption() ); + m_documentTabWidget->addTab( pView, pView->icon() ? *( pView->icon() ) : TQPixmap(), pView->tabCaption() ); /* - connect(pView,SIGNAL(iconOrCaptionUdpated(QWidget*,QPixmap,const QString&)), - m_documentTabWidget,SLOT(updateView(QWidget*,QPixmap,const QString&))); + connect(pView,TQT_SIGNAL(iconOrCaptionUdpated(TQWidget*,TQPixmap,const TQString&)), + m_documentTabWidget,TQT_SLOT(updateView(TQWidget*,TQPixmap,const TQString&))); */ - 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& ) ) ); + connect( pView, TQT_SIGNAL( iconUpdated( TQWidget*, TQPixmap ) ), m_documentTabWidget, TQT_SLOT( updateIconInView( TQWidget*, TQPixmap ) ) ); + connect( pView, TQT_SIGNAL( captionUpdated( TQWidget*, const TQString& ) ), m_documentTabWidget, TQT_SLOT( updateCaptionInView( TQWidget*, const TQString& ) ) ); } } @@ -1778,7 +1778,7 @@ void KMdiMainFrm::setToolviewStyle( int flag ) } d->m_toolviewStyle = flag; bool toolviewExists = false; - QMap::Iterator it; + TQMap::Iterator it; for ( it = m_pToolViews->begin(); it != m_pToolViews->end(); ++it ) { KDockWidget *dockWidget = dynamic_cast( it.data()->wrapperWidget() ); @@ -1787,7 +1787,7 @@ void KMdiMainFrm::setToolviewStyle( int flag ) switch ( flag ) { case KMdi::IconOnly: - dockWidget->setTabPageLabel( QString::null ); + dockWidget->setTabPageLabel( TQString::null ); dockWidget->setPixmap( *( it.data()->wrappedWidget()->icon() ) ); break; case KMdi::TextOnly: @@ -1862,7 +1862,7 @@ void KMdiMainFrm::switchToIDEAlMode() if ( m_pClose ) { - QObject::connect( m_pClose, SIGNAL( clicked() ), this, SLOT( closeViewButtonPressed() ) ); + TQObject::connect( m_pClose, TQT_SIGNAL( clicked() ), this, TQT_SLOT( closeViewButtonPressed() ) ); if ( m_pDocumentViews->count() > 0 ) m_pClose->show(); } @@ -1875,9 +1875,9 @@ void KMdiMainFrm::switchToIDEAlMode() } -void KMdiMainFrm::dockToolViewsIntoContainers( QPtrList& widgetsToReparent, KDockWidget *container ) +void KMdiMainFrm::dockToolViewsIntoContainers( TQPtrList& widgetsToReparent, KDockWidget *container ) { - QPtrListIterator it( widgetsToReparent ); + TQPtrListIterator it( widgetsToReparent ); for ( ; ( *it ); ++it ) { ( *it )->manualDock( container, KDockWidget::DockCenter, 20 ); @@ -1885,7 +1885,7 @@ void KMdiMainFrm::dockToolViewsIntoContainers( QPtrList& widgetsToR } } -void KMdiMainFrm::findToolViewsDockedToMain( QPtrList* list, KDockWidget::DockPosition dprtmw ) +void KMdiMainFrm::findToolViewsDockedToMain( TQPtrList* list, KDockWidget::DockPosition dprtmw ) { KDockWidget* mainDock = getMainDockWidget(); if ( mainDock->parentDockTabGroup() ) @@ -1937,10 +1937,10 @@ void KMdiMainFrm::setupToolViewsForIDEALMode() if ( mainDock->parentDockTabGroup() ) w = static_cast( mainDock->parentDockTabGroup()->parent() ); - QPtrList leftReparentWidgets; - QPtrList rightReparentWidgets; - QPtrList bottomReparentWidgets; - QPtrList topReparentWidgets; + TQPtrList leftReparentWidgets; + TQPtrList rightReparentWidgets; + TQPtrList bottomReparentWidgets; + TQPtrList topReparentWidgets; if ( mainDock->parentDockTabGroup() ) mainDock = static_cast( mainDock->parentDockTabGroup() ->parent() ); @@ -1960,40 +1960,40 @@ void KMdiMainFrm::setupToolViewsForIDEALMode() 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* ) ) ); + connect ( this, TQT_SIGNAL( toggleLeft() ), tmpDC, TQT_SLOT( toggle() ) ); + connect( this, TQT_SIGNAL( collapseOverlapContainers() ), tmpDC, TQT_SLOT( collapseOverlapped() ) ); + connect( tmpDC, TQT_SIGNAL( activated( KMdiDockContainer* ) ), this, TQT_SLOT( setActiveToolDock( KMdiDockContainer* ) ) ); + connect( tmpDC, TQT_SIGNAL( deactivated( KMdiDockContainer* ) ), this, TQT_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* ) ) ); + connect ( this, TQT_SIGNAL( toggleRight() ), tmpDC, TQT_SLOT( toggle() ) ); + connect( this, TQT_SIGNAL( collapseOverlapContainers() ), tmpDC, TQT_SLOT( collapseOverlapped() ) ); + connect( tmpDC, TQT_SIGNAL( activated( KMdiDockContainer* ) ), this, TQT_SLOT( setActiveToolDock( KMdiDockContainer* ) ) ); + connect( tmpDC, TQT_SIGNAL( deactivated( KMdiDockContainer* ) ), this, TQT_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* ) ) ); + connect ( this, TQT_SIGNAL( toggleTop() ), tmpDC, TQT_SLOT( toggle() ) ); + connect( this, TQT_SIGNAL( collapseOverlapContainers() ), tmpDC, TQT_SLOT( collapseOverlapped() ) ); + connect( tmpDC, TQT_SIGNAL( activated( KMdiDockContainer* ) ), this, TQT_SLOT( setActiveToolDock( KMdiDockContainer* ) ) ); + connect( tmpDC, TQT_SIGNAL( deactivated( KMdiDockContainer* ) ), this, TQT_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* ) ) ); + connect ( this, TQT_SIGNAL( toggleBottom() ), tmpDC, TQT_SLOT( toggle() ) ); + connect( this, TQT_SIGNAL( collapseOverlapContainers() ), tmpDC, TQT_SLOT( collapseOverlapped() ) ); + connect( tmpDC, TQT_SIGNAL( activated( KMdiDockContainer* ) ), this, TQT_SLOT( setActiveToolDock( KMdiDockContainer* ) ) ); + connect( tmpDC, TQT_SIGNAL( deactivated( KMdiDockContainer* ) ), this, TQT_SLOT( removeFromActiveDockList( KMdiDockContainer* ) ) ); m_leftContainer->setDockSite( KDockWidget::DockCenter ); m_rightContainer->setDockSite( KDockWidget::DockCenter ); @@ -2028,22 +2028,22 @@ void KMdiMainFrm::finishIDEAlMode( bool full ) { assert( m_pClose ); m_pClose->hide(); - QObject::disconnect( m_pClose, SIGNAL( clicked() ), this, SLOT( closeViewButtonPressed() ) ); + TQObject::disconnect( m_pClose, TQT_SIGNAL( clicked() ), this, TQT_SLOT( closeViewButtonPressed() ) ); - QStringList leftNames; + TQStringList leftNames; leftNames = prepareIdealToTabs( m_leftContainer ); int leftWidth = m_leftContainer->width(); - QStringList rightNames; + TQStringList rightNames; rightNames = prepareIdealToTabs( m_rightContainer ); int rightWidth = m_rightContainer->width(); - QStringList topNames; + TQStringList topNames; topNames = prepareIdealToTabs( m_topContainer ); int topHeight = m_topContainer->height(); - QStringList bottomNames; + TQStringList bottomNames; bottomNames = prepareIdealToTabs( m_bottomContainer ); int bottomHeight = m_bottomContainer->height(); @@ -2068,22 +2068,22 @@ void KMdiMainFrm::finishIDEAlMode( bool full ) idealToolViewsToStandardTabs( rightNames, KDockWidget::DockRight, rightWidth ); idealToolViewsToStandardTabs( topNames, KDockWidget::DockTop, topHeight ); - QApplication::sendPostedEvents(); + TQApplication::sendPostedEvents(); if ( !full ) return ; - QPtrListIterator it( *m_pDocumentViews ); + TQPtrListIterator 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 ); + TQSize mins = pView->minimumSize(); + TQSize maxs = pView->maximumSize(); + TQSize sz = pView->size(); + TQWidget* pParent = pView->parentWidget(); + TQPoint p( pParent->mapToGlobal( pParent->pos() ) - pParent->pos() + m_undockPositioningOffset ); pView->reparent( 0, 0, p ); pView->reparent( 0, 0, p ); pView->resize( sz ); @@ -2120,11 +2120,11 @@ void KMdiMainFrm::finishIDEAlMode( bool full ) } -QStringList KMdiMainFrm::prepareIdealToTabs( KDockWidget* container ) +TQStringList KMdiMainFrm::prepareIdealToTabs( KDockWidget* container ) { KDockContainer * pDW = dynamic_cast( container->getWidget() ); - QStringList widgetNames = ( ( KMdiDockContainer* ) pDW ) ->containedWidgets(); - for ( QStringList::iterator it = widgetNames.begin();it != widgetNames.end();++it ) + TQStringList widgetNames = ( ( KMdiDockContainer* ) pDW ) ->containedWidgets(); + for ( TQStringList::iterator it = widgetNames.begin();it != widgetNames.end();++it ) { KDockWidget* dw = ( KDockWidget* ) manager() ->getDockWidgetFromName( *it ); dw->undock(); @@ -2134,7 +2134,7 @@ QStringList KMdiMainFrm::prepareIdealToTabs( KDockWidget* container ) return widgetNames; } -void KMdiMainFrm::idealToolViewsToStandardTabs( QStringList widgetNames, KDockWidget::DockPosition pos, int size ) +void KMdiMainFrm::idealToolViewsToStandardTabs( TQStringList widgetNames, KDockWidget::DockPosition pos, int size ) { Q_UNUSED( size ) @@ -2146,7 +2146,7 @@ void KMdiMainFrm::idealToolViewsToStandardTabs( QStringList widgetNames, KDockWi if ( widgetNames.count() > 0 ) { - QStringList::iterator it = widgetNames.begin(); + TQStringList::iterator it = widgetNames.begin(); KDockWidget *dwpd = manager() ->getDockWidgetFromName( *it ); if ( !dwpd ) { @@ -2167,7 +2167,7 @@ void KMdiMainFrm::idealToolViewsToStandardTabs( QStringList widgetNames, KDockWi } #if 0 - QWidget *wid = dwpd->parentDockTabGroup(); + TQWidget *wid = dwpd->parentDockTabGroup(); if ( !wid ) wid = dwpd; wid->setGeometry( 0, 0, 20, 20 ); @@ -2199,13 +2199,13 @@ void KMdiMainFrm::setMenuForSDIModeSysButtons( KMenuBar* pMenuBar ) return ; // use setMenuForSDIModeSysButtons( 0L) for unsetting the external main menu! if ( !m_pUndock ) - m_pUndock = new QToolButton( pMenuBar ); + m_pUndock = new TQToolButton( pMenuBar ); if ( !m_pRestore ) - m_pRestore = new QToolButton( pMenuBar ); + m_pRestore = new TQToolButton( pMenuBar ); if ( !m_pMinimize ) - m_pMinimize = new QToolButton( pMenuBar ); + m_pMinimize = new TQToolButton( pMenuBar ); if ( !m_pClose ) - m_pClose = new QToolButton( pMenuBar ); + m_pClose = new TQToolButton( pMenuBar ); m_pUndock->setAutoRaise( false ); m_pMinimize->setAutoRaise( false ); m_pRestore->setAutoRaise( false ); @@ -2220,17 +2220,17 @@ void KMdiMainFrm::setMenuForSDIModeSysButtons( KMenuBar* pMenuBar ) // 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 ); + m_pUndockButtonPixmap = new TQPixmap( win_undockbutton ); + m_pMinButtonPixmap = new TQPixmap( win_minbutton ); + m_pRestoreButtonPixmap = new TQPixmap( win_restorebutton ); + m_pCloseButtonPixmap = new TQPixmap( 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_pUndockButtonPixmap = new TQPixmap( kde_undockbutton ); + m_pMinButtonPixmap = new TQPixmap( kde_minbutton ); + m_pRestoreButtonPixmap = new TQPixmap( kde_restorebutton ); + m_pCloseButtonPixmap = new TQPixmap( kde_closebutton ); m_pUndock->setAutoRaise( true ); m_pMinimize->setAutoRaise( true ); m_pRestore->setAutoRaise( true ); @@ -2238,17 +2238,17 @@ void KMdiMainFrm::setMenuForSDIModeSysButtons( KMenuBar* pMenuBar ) } 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 ); + m_pUndockButtonPixmap = new TQPixmap( kde2_undockbutton ); + m_pMinButtonPixmap = new TQPixmap( kde2_minbutton ); + m_pRestoreButtonPixmap = new TQPixmap( kde2_restorebutton ); + m_pCloseButtonPixmap = new TQPixmap( 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_pUndockButtonPixmap = new TQPixmap( kde2laptop_undockbutton ); + m_pMinButtonPixmap = new TQPixmap( kde2laptop_minbutton ); + m_pRestoreButtonPixmap = new TQPixmap( kde2laptop_restorebutton ); + m_pCloseButtonPixmap = new TQPixmap( kde2laptop_closebutton ); } m_pUndock->hide(); @@ -2351,7 +2351,7 @@ void KMdiMainFrm::activateFirstWin() { m_bSwitching= true; // flag that we are currently switching between windows KMdiIterator* it = createIterator(); - QMap m; + TQMap m; for ( it->first(); !it->isDone(); it->next() ) { m.insert( it->currentItem() ->getTimeStamp(), it->currentItem() ); @@ -2360,9 +2360,9 @@ void KMdiMainFrm::activateFirstWin() if ( !activeWindow() ) return ; - QDateTime current = activeWindow() ->getTimeStamp(); - QMap::iterator pos( m.find( current ) ); - QMap::iterator newPos = pos; + TQDateTime current = activeWindow() ->getTimeStamp(); + TQMap::iterator pos( m.find( current ) ); + TQMap::iterator newPos = pos; if ( pos != m.end() ) { ++newPos; @@ -2384,7 +2384,7 @@ void KMdiMainFrm::activateLastWin() { m_bSwitching= true; // flag that we are currently switching between windows KMdiIterator* it = createIterator(); - QMap m; + TQMap m; for ( it->first(); !it->isDone(); it->next() ) { m.insert( it->currentItem() ->getTimeStamp(), it->currentItem() ); @@ -2393,8 +2393,8 @@ void KMdiMainFrm::activateLastWin() if ( !activeWindow() ) return ; - QDateTime current = activeWindow() ->getTimeStamp(); - QMap::iterator pos( m.find( current ) ); + TQDateTime current = activeWindow() ->getTimeStamp(); + TQMap::iterator pos( m.find( current ) ); if ( pos != m.begin() ) { --pos; @@ -2436,23 +2436,23 @@ void KMdiMainFrm::setEnableMaximizedChildFrmMode( bool enableMaxChildFrameMode ) 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() ) ); + TQObject::connect( m_pUndock, TQT_SIGNAL( clicked() ), pCurrentChild, TQT_SLOT( undockPressed() ) ); + TQObject::connect( m_pMinimize, TQT_SIGNAL( clicked() ), pCurrentChild, TQT_SLOT( minimizePressed() ) ); + TQObject::connect( m_pRestore, TQT_SIGNAL( clicked() ), pCurrentChild, TQT_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 ); + m_pMainMenuBar->insertItem( TQPixmap( kde2laptop_closebutton_menu ), m_pMdi->topChild(), TQT_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() ) ); + TQObject::connect( m_pClose, TQT_SIGNAL( clicked() ), pCurrentChild, TQT_SLOT( closePressed() ) ); m_pClose->show(); } else @@ -2488,10 +2488,10 @@ void KMdiMainFrm::switchOffMaximizeModeForMenu( KMdiChildFrm* oldChild ) 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() ) ); + TQObject::disconnect( m_pUndock, TQT_SIGNAL( clicked() ), oldChild, TQT_SLOT( undockPressed() ) ); + TQObject::disconnect( m_pMinimize, TQT_SIGNAL( clicked() ), oldChild, TQT_SLOT( minimizePressed() ) ); + TQObject::disconnect( m_pRestore, TQT_SIGNAL( clicked() ), oldChild, TQT_SLOT( maximizePressed() ) ); + TQObject::disconnect( m_pClose, TQT_SIGNAL( clicked() ), oldChild, TQT_SLOT( closePressed() ) ); } m_pUndock->hide(); m_pMinimize->hide(); @@ -2510,7 +2510,7 @@ void KMdiMainFrm::updateSysButtonConnections( KMdiChildFrm* oldChild, KMdiChildF if ( newChild ) { if ( frameDecorOfAttachedViews() == KMdi::KDELaptopLook ) - m_pMainMenuBar->insertItem( QPixmap( kde2laptop_closebutton_menu ), newChild, SLOT( closePressed() ), 0, -1, 0 ); + m_pMainMenuBar->insertItem( TQPixmap( kde2laptop_closebutton_menu ), newChild, TQT_SLOT( closePressed() ), 0, -1, 0 ); else m_pMainMenuBar->insertItem( *newChild->icon(), newChild->systemMenu(), -1, 0 ); } @@ -2519,18 +2519,18 @@ void KMdiMainFrm::updateSysButtonConnections( KMdiChildFrm* oldChild, KMdiChildF { 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() ) ); + TQObject::disconnect( m_pUndock, TQT_SIGNAL( clicked() ), oldChild, TQT_SLOT( undockPressed() ) ); + TQObject::disconnect( m_pMinimize, TQT_SIGNAL( clicked() ), oldChild, TQT_SLOT( minimizePressed() ) ); + TQObject::disconnect( m_pRestore, TQT_SIGNAL( clicked() ), oldChild, TQT_SLOT( maximizePressed() ) ); + TQObject::disconnect( m_pClose, TQT_SIGNAL( clicked() ), oldChild, TQT_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() ) ); + TQObject::connect( m_pUndock, TQT_SIGNAL( clicked() ), newChild, TQT_SLOT( undockPressed() ) ); + TQObject::connect( m_pMinimize, TQT_SIGNAL( clicked() ), newChild, TQT_SLOT( minimizePressed() ) ); + TQObject::connect( m_pRestore, TQT_SIGNAL( clicked() ), newChild, TQT_SLOT( maximizePressed() ) ); + TQObject::connect( m_pClose, TQT_SIGNAL( clicked() ), newChild, TQT_SLOT( closePressed() ) ); } } @@ -2578,7 +2578,7 @@ void KMdiMainFrm::fillWindowMenu() d->closeWindowAction->plug(m_pWindowMenu); - int closeAllId = m_pWindowMenu->insertItem( i18n( "Close &All" ), this, SLOT( closeAllViews() ) ); + int closeAllId = m_pWindowMenu->insertItem( i18n( "Close &All" ), this, TQT_SLOT( closeAllViews() ) ); if ( noViewOpened ) { d->closeWindowAction->setEnabled(false); @@ -2587,7 +2587,7 @@ void KMdiMainFrm::fillWindowMenu() if ( !tabPageMode && !IDEAlMode ) { - int iconifyId = m_pWindowMenu->insertItem( i18n( "&Minimize All" ), this, SLOT( iconifyAllViews() ) ); + int iconifyId = m_pWindowMenu->insertItem( i18n( "&Minimize All" ), this, TQT_SLOT( iconifyAllViews() ) ); if ( noViewOpened ) m_pWindowMenu->setItemEnabled( iconifyId, false ); } @@ -2595,10 +2595,10 @@ void KMdiMainFrm::fillWindowMenu() 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() ) ); + m_pMdiModeMenu->insertItem( i18n( "&Toplevel Mode" ), this, TQT_SLOT( switchToToplevelMode() ) ); + m_pMdiModeMenu->insertItem( i18n( "C&hildframe Mode" ), this, TQT_SLOT( switchToChildframeMode() ) ); + m_pMdiModeMenu->insertItem( i18n( "Ta&b Page Mode" ), this, TQT_SLOT( switchToTabPageMode() ) ); + m_pMdiModeMenu->insertItem( i18n( "I&DEAl Mode" ), this, TQT_SLOT( switchToIDEAlMode() ) ); switch ( m_mdiMode ) { case KMdi::ToplevelMode: @@ -2622,13 +2622,13 @@ void KMdiMainFrm::fillWindowMenu() { 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() ) ); + m_pPlacingMenu->insertItem( i18n( "Ca&scade Windows" ), m_pMdi, TQT_SLOT( cascadeWindows() ) ); + m_pPlacingMenu->insertItem( i18n( "Cascade &Maximized" ), m_pMdi, TQT_SLOT( cascadeMaximized() ) ); + m_pPlacingMenu->insertItem( i18n( "Expand &Vertically" ), m_pMdi, TQT_SLOT( expandVertical() ) ); + m_pPlacingMenu->insertItem( i18n( "Expand &Horizontally" ), m_pMdi, TQT_SLOT( expandHorizontal() ) ); + m_pPlacingMenu->insertItem( i18n( "Tile &Non-Overlapped" ), m_pMdi, TQT_SLOT( tileAnodine() ) ); + m_pPlacingMenu->insertItem( i18n( "Tile Overla&pped" ), m_pMdi, TQT_SLOT( tilePragma() ) ); + m_pPlacingMenu->insertItem( i18n( "Tile V&ertically" ), m_pMdi, TQT_SLOT( tileVertically() ) ); if ( m_mdiMode == KMdi::ToplevelMode ) { m_pWindowMenu->setItemEnabled( placMenuId, false ); @@ -2648,19 +2648,19 @@ void KMdiMainFrm::fillWindowMenu() // 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 it( *m_pDocumentViews ); - QValueList timeStamps; + TQPtrListIterator it( *m_pDocumentViews ); + TQValueList timeStamps; for ( ; it.current(); ++it ) { pView = it.current(); - QDateTime timeStamp( pView->getTimeStamp() ); + TQDateTime timeStamp( pView->getTimeStamp() ); if ( pView->isToolView() ) { continue; } - QString item; + TQString item; // set titles of minimized windows in brackets if ( pView->isMinimized() ) { @@ -2678,8 +2678,8 @@ void KMdiMainFrm::fillWindowMenu() unsigned int indx; unsigned int windowItemCount = m_pWindowMenu->count() - entryCount; bool inserted = false; - QString tmpString; - QValueList::iterator timeStampIterator = timeStamps.begin(); + TQString tmpString; + TQValueList::iterator timeStampIterator = timeStamps.begin(); for ( indx = 0; indx <= windowItemCount; indx++, ++timeStampIterator ) { bool putHere = false; @@ -2690,7 +2690,7 @@ void KMdiMainFrm::fillWindowMenu() } if ( putHere ) { - m_pWindowMenu->insertItem( item, pView, SLOT( slot_clickedInWindowMenu() ), 0, -1, indx + entryCount ); + m_pWindowMenu->insertItem( item, pView, TQT_SLOT( slot_clickedInWindowMenu() ), 0, -1, indx + entryCount ); if ( pView == m_pCurrentWindow ) { m_pWindowMenu->setItemChecked( m_pWindowMenu->idAt( indx + entryCount ), true ); @@ -2698,7 +2698,7 @@ void KMdiMainFrm::fillWindowMenu() pView->setWindowMenuID( i ); if ( !tabPageMode ) { - m_pDockMenu->insertItem( item, pView, SLOT( slot_clickedInDockMenu() ), 0, -1, indx ); + m_pDockMenu->insertItem( item, pView, TQT_SLOT( slot_clickedInDockMenu() ), 0, -1, indx ); if ( pView->isAttached() ) { m_pDockMenu->setItemChecked( m_pDockMenu->idAt( indx ), true ); @@ -2711,7 +2711,7 @@ void KMdiMainFrm::fillWindowMenu() } if ( !inserted ) { // append it - m_pWindowMenu->insertItem( item, pView, SLOT( slot_clickedInWindowMenu() ), 0, -1, windowItemCount + entryCount ); + m_pWindowMenu->insertItem( item, pView, TQT_SLOT( slot_clickedInWindowMenu() ), 0, -1, windowItemCount + entryCount ); if ( pView == m_pCurrentWindow ) { m_pWindowMenu->setItemChecked( m_pWindowMenu->idAt( windowItemCount + entryCount ), true ); @@ -2719,7 +2719,7 @@ void KMdiMainFrm::fillWindowMenu() pView->setWindowMenuID( i ); if ( !tabPageMode ) { - m_pDockMenu->insertItem( item, pView, SLOT( slot_clickedInDockMenu() ), 0, -1, windowItemCount ); + m_pDockMenu->insertItem( item, pView, TQT_SLOT( slot_clickedInDockMenu() ), 0, -1, windowItemCount ); if ( pView->isAttached() ) { m_pDockMenu->setItemChecked( m_pDockMenu->idAt( windowItemCount ), true ); @@ -2780,7 +2780,7 @@ void KMdiMainFrm::dockMenuItemActivated( int id ) //================ popupWindowMenu ===============// -void KMdiMainFrm::popupWindowMenu( QPoint p ) +void KMdiMainFrm::popupWindowMenu( TQPoint p ) { if ( !isFakingSDIApplication() ) { @@ -2796,7 +2796,7 @@ void KMdiMainFrm::dragEndTimeOut() for ( m_pDocumentViews->first(); ( pView = m_pDocumentViews->current() ) != 0L; m_pDocumentViews->next() ) { KMdiChildFrmDragEndEvent dragEndEvent( 0L ); - QApplication::sendEvent( pView, &dragEndEvent ); + TQApplication::sendEvent( pView, &dragEndEvent ); } } @@ -2823,7 +2823,7 @@ void KMdiMainFrm::setFrameDecorOfAttachedViews( int frameDecor ) break; } setMenuForSDIModeSysButtons( m_pMainMenuBar ); - QPtrListIterator it( *m_pDocumentViews ); + TQPtrListIterator it( *m_pDocumentViews ); for ( ; it.current(); ++it ) { KMdiChildView* pView = it.current(); diff --git a/lib/compatibility/kmdi/qextmdi/kmdimainfrm.h b/lib/compatibility/kmdi/qextmdi/kmdimainfrm.h index 24a956cf..9de6d8b7 100644 --- a/lib/compatibility/kmdi/qextmdi/kmdimainfrm.h +++ b/lib/compatibility/kmdi/qextmdi/kmdimainfrm.h @@ -35,11 +35,11 @@ #include #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include "kmditaskbar.h" #include "kmdichildarea.h" @@ -72,7 +72,7 @@ class KMdiMainFrmPrivate; class KMDI_EXPORT KMdiViewCloseEvent : public QCustomEvent { public: - KMdiViewCloseEvent( KMdiChildView* pWnd ) : QCustomEvent( QEvent::User, pWnd ) {} + KMdiViewCloseEvent( KMdiChildView* pWnd ) : TQCustomEvent( TQEvent::User, pWnd ) {} }; /** @@ -123,7 +123,7 @@ public: * setMenuForSDIModeSysButtons( menuBar() ); * } * ... - * void B_MainModuleWidget::resizeEvent ( QResizeEvent *e ) + * void B_MainModuleWidget::resizeEvent ( TQResizeEvent *e ) * { * KMdiMainFrm::resizeEvent( e ); * setSysButtonsAtMenuPosition(); @@ -230,7 +230,7 @@ public: * } * else * { - * m_pMdiMainFrm->addWindow( pWnd, QPoint(20, 20), KMdi::AddWindowFlags(mdiFlags)); + * m_pMdiMainFrm->addWindow( pWnd, TQPoint(20, 20), KMdi::AddWindowFlags(mdiFlags)); * return; * } * m_pMdiMainFrm->addWindow( pWnd, KMdi::AddWindowFlags(mdiFlags)); @@ -248,27 +248,27 @@ protected: KMdi::MdiMode m_mdiMode; KMdiChildArea *m_pMdi; KMdiTaskBar *m_pTaskBar; - QPtrList *m_pDocumentViews; - QMap *m_pToolViews; + TQPtrList *m_pDocumentViews; + TQMap *m_pToolViews; KMdiChildView *m_pCurrentWindow; - QPopupMenu *m_pWindowPopup; - QPopupMenu *m_pTaskBarPopup; - QPopupMenu *m_pWindowMenu; - QPopupMenu *m_pDockMenu; - QPopupMenu *m_pMdiModeMenu; - QPopupMenu *m_pPlacingMenu; + TQPopupMenu *m_pWindowPopup; + TQPopupMenu *m_pTaskBarPopup; + TQPopupMenu *m_pWindowMenu; + TQPopupMenu *m_pDockMenu; + TQPopupMenu *m_pMdiModeMenu; + TQPopupMenu *m_pPlacingMenu; KMenuBar *m_pMainMenuBar; - QPixmap *m_pUndockButtonPixmap; - QPixmap *m_pMinButtonPixmap; - QPixmap *m_pRestoreButtonPixmap; - QPixmap *m_pCloseButtonPixmap; + TQPixmap *m_pUndockButtonPixmap; + TQPixmap *m_pMinButtonPixmap; + TQPixmap *m_pRestoreButtonPixmap; + TQPixmap *m_pCloseButtonPixmap; - QToolButton *m_pUndock; - QToolButton *m_pMinimize; - QToolButton *m_pRestore; - QToolButton *m_pClose; - QPoint m_undockPositioningOffset; + TQToolButton *m_pUndock; + TQToolButton *m_pMinimize; + TQToolButton *m_pRestore; + TQToolButton *m_pClose; + TQPoint m_undockPositioningOffset; bool m_bMaximizedChildFrmMode; int m_oldMainFrmHeight; int m_oldMainFrmMinHeight; @@ -276,10 +276,10 @@ protected: static KMdi::FrameDecor m_frameDecoration; bool m_bSDIApplication; KDockWidget* m_pDockbaseAreaOfDocumentViews; - QDomDocument* m_pTempDockSession; + TQDomDocument* m_pTempDockSession; bool m_bClearingOfWindowMenuBlocked; - QTimer* m_pDragEndTimer; + TQTimer* m_pDragEndTimer; bool m_bSwitching; @@ -296,7 +296,7 @@ private: // methods public: - KMdiMainFrm( QWidget* parentWidget, const char* name = "", KMdi::MdiMode mdiMode = KMdi::ChildframeMode, WFlags flags = WType_TopLevel | WDestructiveClose ); + KMdiMainFrm( TQWidget* parentWidget, const char* name = "", KMdi::MdiMode mdiMode = KMdi::ChildframeMode, WFlags flags = WType_TopLevel | WDestructiveClose ); virtual ~KMdiMainFrm(); /** @@ -329,13 +329,13 @@ public: * Undock/Dock, Restore/Maximize/Minimize, Close and an empty sub-popup ( windowPopup() ) * menu called Operations. */ - virtual QPopupMenu * taskBarPopup( KMdiChildView *pWnd, bool bIncludeWindowPopup = false ); + virtual TQPopupMenu * 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 ); + virtual TQPopupMenu * windowPopup( KMdiChildView *pWnd, bool bIncludeTaskbarPopup = true ); /** * Called in the constructor (forces a resize of all MDI views) @@ -345,7 +345,7 @@ public: /** * Returns the KMdiChildView belonging to the given caption string. */ - KMdiChildView * findWindow( const QString& caption ); + KMdiChildView * findWindow( const TQString& caption ); enum ExistsAs {DocumentView, ToolView, AnyView}; /** @@ -363,9 +363,9 @@ public: * 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. + * This method calls TQMainWindow::event , additionally. */ - virtual bool event( QEvent* e ); + virtual bool event( TQEvent* e ); /** * If there's a main menubar given, it will create the 4 maximize mode buttons there (undock, minimize, restore, close). @@ -381,7 +381,7 @@ public: * 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; } + virtual void setUndockPositioningOffset( TQPoint offset ) { m_undockPositioningOffset = offset; } /** * If you don't want to know about the inner structure of the KMdi system, you can use @@ -414,28 +414,28 @@ public: * 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; }; + TQPopupMenu* 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 ); } + virtual void setBackgroundColor( const TQColor &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 ); } + virtual void setBackgroundPixmap( const TQPixmap &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; } + void setDefaultChildFrmSize( const TQSize& sz ) { m_pMdi->m_defaultChildFrmSize = sz; } /** * Returns the default size for a newly added KMdiChildView. See setDefaultChildFrmSize() . */ - QSize defaultChildFrmSize() { return m_pMdi->m_defaultChildFrmSize; } + TQSize defaultChildFrmSize() { return m_pMdi->m_defaultChildFrmSize; } /** * Do nothing when in Toplevel mode @@ -472,8 +472,8 @@ public: */ bool isFakingSDIApplication() const { return m_bSDIApplication; } - virtual bool eventFilter( QObject *obj, QEvent *e ); - void findRootDockWidgets( QPtrList* pRootDockWidgetList, QValueList* pPositionList ); + virtual bool eventFilter( TQObject *obj, TQEvent *e ); + void findRootDockWidgets( TQPtrList* pRootDockWidgetList, TQValueList* pPositionList ); /** We're switching something.*/ void setSwitching( const bool switching ) { m_bSwitching = switching; } @@ -481,10 +481,10 @@ public: public slots: /** - * addWindow demands a KMdiChildView. This method wraps every QWidget in such an object and + * addWindow demands a KMdiChildView. This method wraps every TQWidget 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 ); + KMdiChildView* createWrapper( TQWidget *view, const TQString& name, const TQString& shortName ); /** * Adds a KMdiChildView to the MDI system. The main frame takes control of it. @@ -521,7 +521,7 @@ public slots: * \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 ); + virtual void addWindow( KMdiChildView* pView, TQPoint pos, int flags = KMdi::StandardAdd ); /** * Adds a KMdiChildView to the MDI system. The main frame takes control of it. @@ -533,17 +533,17 @@ public slots: * \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 ); + virtual void addWindow( KMdiChildView* pView, TQRect 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 KMdiToolViewAccessor *addToolWindow( TQWidget* pWnd, KDockWidget::DockPosition pos = KDockWidget::DockNone, + TQWidget* pTargetWnd = 0L, int percent = 50, const TQString& tabToolTip = 0, + const TQString& tabCaption = 0 ); - virtual void deleteToolWindow( QWidget* pWnd ); + virtual void deleteToolWindow( TQWidget* pWnd ); virtual void deleteToolWindow( KMdiToolViewAccessor *accessor ); /** @@ -738,7 +738,7 @@ private: protected: - virtual void resizeEvent( QResizeEvent * ); + virtual void resizeEvent( TQResizeEvent * ); /** * Creates a new MDI taskbar (showing the MDI views as taskbar entries) and shows it. @@ -756,10 +756,10 @@ protected: */ void blockClearingOfWindowMenu( bool bBlocked ) { m_bClearingOfWindowMenuBlocked = bBlocked; } - void findToolViewsDockedToMain( QPtrList* list, KDockWidget::DockPosition dprtmw ); - void dockToolViewsIntoContainers( QPtrList& widgetsToReparent, KDockWidget *container ); - QStringList prepareIdealToTabs( KDockWidget* container ); - void idealToolViewsToStandardTabs( QStringList widgetNames, KDockWidget::DockPosition pos, int sizee ); + void findToolViewsDockedToMain( TQPtrList* list, KDockWidget::DockPosition dprtmw ); + void dockToolViewsIntoContainers( TQPtrList& widgetsToReparent, KDockWidget *container ); + TQStringList prepareIdealToTabs( KDockWidget* container ); + void idealToolViewsToStandardTabs( TQStringList widgetNames, KDockWidget::DockPosition pos, int sizee ); /** Get tabwidget visibility */ KMdi::TabWidgetVisibility tabWidgetVisibility(); @@ -806,7 +806,7 @@ protected slots: // Protected slots /** * Popups the "Window" menu. See also windowPopup() . */ - void popupWindowMenu( QPoint p ); + void popupWindowMenu( TQPoint p ); /** * The timer for main widget moving has elapsed -> send drag end to all concerned views. @@ -837,7 +837,7 @@ signals: /** * Signals that a child view has been detached (undocked to desktop) */ - void childViewIsDetachedNow( QWidget* ); + void childViewIsDetachedNow( TQWidget* ); /** Signals we need to collapse the overlapped containers */ void collapseOverlapContainers(); @@ -855,7 +855,7 @@ public slots: private slots: void setActiveToolDock( KMdiDockContainer* ); void removeFromActiveDockList( KMdiDockContainer* ); - void slotDocCurrentChanged( QWidget* ); + void slotDocCurrentChanged( TQWidget* ); void verifyToplevelHeight(); #define protected public signals: diff --git a/lib/compatibility/kmdi/qextmdi/kmditaskbar.cpp b/lib/compatibility/kmdi/qextmdi/kmditaskbar.cpp index 2b86c0c8..71c3de45 100644 --- a/lib/compatibility/kmdi/qextmdi/kmditaskbar.cpp +++ b/lib/compatibility/kmdi/qextmdi/kmditaskbar.cpp @@ -33,12 +33,12 @@ #include "kmdichildview.h" #include "kmdidefines.h" -#include -#include -#include -#include +#include +#include +#include +#include -#include +#include /* @quickhelp: KMdiTaskBar @@ -56,12 +56,12 @@ // //#################################################################### KMdiTaskBarButton::KMdiTaskBarButton( KMdiTaskBar *pTaskBar, KMdiChildView *win_ptr ) - : QPushButton( pTaskBar ), + : TQPushButton( pTaskBar ), m_actualText( "" ) { setToggleButton( true ); m_pWindow = win_ptr; - QToolTip::add + TQToolTip::add ( this, win_ptr->caption() ); setFocusPolicy( NoFocus ); } @@ -69,14 +69,14 @@ KMdiTaskBarButton::KMdiTaskBarButton( KMdiTaskBar *pTaskBar, KMdiChildView *win_ KMdiTaskBarButton::~KMdiTaskBarButton() {} -void KMdiTaskBarButton::mousePressEvent( QMouseEvent* e ) +void KMdiTaskBarButton::mousePressEvent( TQMouseEvent* e ) { switch ( e->button() ) { - case QMouseEvent::LeftButton: + case TQMouseEvent::LeftButton: emit leftMouseButtonClicked( m_pWindow ); break; - case QMouseEvent::RightButton: + case TQMouseEvent::RightButton: emit rightMouseButtonClicked( m_pWindow ); break; default: @@ -86,27 +86,27 @@ void KMdiTaskBarButton::mousePressEvent( QMouseEvent* e ) } /** slot version of setText */ -void KMdiTaskBarButton::setNewText( const QString& s ) +void KMdiTaskBarButton::setNewText( const TQString& s ) { setText( s ); emit buttonTextChanged( 0 ); } -void KMdiTaskBarButton::setText( const QString& s ) +void KMdiTaskBarButton::setText( const TQString& s ) { m_actualText = s; - QButton::setText( s ); + TQButton::setText( s ); } -void KMdiTaskBarButton::fitText( const QString& origStr, int newWidth ) +void KMdiTaskBarButton::fitText( const TQString& origStr, int newWidth ) { - QButton::setText( m_actualText ); + TQButton::setText( m_actualText ); int actualWidth = sizeHint().width(); int realLetterCount = origStr.length(); int newLetterCount = ( newWidth * realLetterCount ) / actualWidth; int w = newWidth + 1; - QString s = origStr; + TQString s = origStr; while ( ( w > newWidth ) && ( newLetterCount >= 1 ) ) { if ( newLetterCount < realLetterCount ) @@ -121,15 +121,15 @@ void KMdiTaskBarButton::fitText( const QString& origStr, int newWidth ) s = origStr.left( 1 ); } } - QFontMetrics fm = fontMetrics(); + TQFontMetrics fm = fontMetrics(); w = fm.width( s ); newLetterCount--; } - QButton::setText( s ); + TQButton::setText( s ); } -QString KMdiTaskBarButton::actualText() const +TQString KMdiTaskBarButton::actualText() const { return m_actualText; } @@ -140,7 +140,7 @@ QString KMdiTaskBarButton::actualText() const // //#################################################################### -KMdiTaskBar::KMdiTaskBar( KMdiMainFrm *parent, QMainWindow::ToolBarDock dock ) +KMdiTaskBar::KMdiTaskBar( KMdiMainFrm *parent, TQMainWindow::ToolBarDock dock ) : KToolBar( parent, "KMdiTaskBar", /*honor_style*/ false, /*readConfig*/ true ) , m_pCurrentFocusedWindow( 0 ) , m_pStretchSpace( 0 ) @@ -148,9 +148,9 @@ KMdiTaskBar::KMdiTaskBar( KMdiMainFrm *parent, QMainWindow::ToolBarDock dock ) , m_bSwitchedOn( false ) { m_pFrm = parent; - m_pButtonList = new QPtrList; + m_pButtonList = new TQPtrList; m_pButtonList->setAutoDelete( true ); - //QT30 setFontPropagation(QWidget::SameFont); + //QT30 setFontPropagation(TQWidget::SameFont); setMinimumWidth( 1 ); setFocusPolicy( NoFocus ); parent->moveToolBar( this, dock ); //XXX obsolete! @@ -171,18 +171,18 @@ KMdiTaskBarButton * KMdiTaskBar::addWinButton( KMdiChildView *win_ptr ) } 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 ) ) ); + TQObject::connect( b, TQT_SIGNAL( clicked() ), win_ptr, TQT_SLOT( setFocus() ) ); + TQObject::connect( b, TQT_SIGNAL( clicked( KMdiChildView* ) ), this, TQT_SLOT( setActiveButton( KMdiChildView* ) ) ); + TQObject::connect( b, TQT_SIGNAL( leftMouseButtonClicked( KMdiChildView* ) ), m_pFrm, TQT_SLOT( activateView( KMdiChildView* ) ) ); + TQObject::connect( b, TQT_SIGNAL( rightMouseButtonClicked( KMdiChildView* ) ), m_pFrm, TQT_SLOT( taskbarButtonRightClicked( KMdiChildView* ) ) ); + TQObject::connect( b, TQT_SIGNAL( buttonTextChanged( int ) ), this, TQT_SLOT( layoutTaskBar( int ) ) ); m_pButtonList->append( b ); b->setToggleButton( true ); b->setText( win_ptr->tabCaption() ); layoutTaskBar(); - m_pStretchSpace = new QLabel( this, "empty" ); + m_pStretchSpace = new TQLabel( this, "empty" ); m_pStretchSpace->setText( "" ); setStretchableWidget( m_pStretchSpace ); m_pStretchSpace->show(); @@ -325,9 +325,9 @@ void KMdiTaskBar::layoutTaskBar( int taskBarWidth ) 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 ); + TQFontMetrics fm = b->fontMetrics(); + TQString s = b->actualText(); + TQSize sz = fm.size( ShowPrefix, s ); int w = sz.width() + 6; int h = sz.height() + sz.height() / 8 + 10; w += h; @@ -337,8 +337,8 @@ void KMdiTaskBar::layoutTaskBar( int taskBarWidth ) // 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; + tbHandlePixel = style().pixelMetric( TQStyle::PM_DockWindowHandleExtent, this ); + int buttonAreaWidth = taskBarWidth - tbHandlePixel - style().pixelMetric( TQStyle::PM_DefaultFrameWidth, this ) - 5; if ( ( ( allButtonsWidthHint ) <= buttonAreaWidth ) || ( width() < parentWidget() ->width() ) ) { for ( b = m_pButtonList->first();b;b = m_pButtonList->next() ) @@ -375,7 +375,7 @@ void KMdiTaskBar::layoutTaskBar( int taskBarWidth ) m_layoutIsPending = false; } -void KMdiTaskBar::resizeEvent( QResizeEvent* rse ) +void KMdiTaskBar::resizeEvent( TQResizeEvent* rse ) { if ( !m_layoutIsPending ) { diff --git a/lib/compatibility/kmdi/qextmdi/kmditaskbar.h b/lib/compatibility/kmdi/qextmdi/kmditaskbar.h index f1aac814..c333070a 100644 --- a/lib/compatibility/kmdi/qextmdi/kmditaskbar.h +++ b/lib/compatibility/kmdi/qextmdi/kmditaskbar.h @@ -29,10 +29,10 @@ #define _KMDITASKBAR_H_ #include -#include -#include -#include -#include +#include +#include +#include +#include #include "kmdidefines.h" @@ -45,7 +45,7 @@ class KMdiTaskBarButtonPrivate; /** * @short Internal class. * - * It's a special kind of QPushButton catching mouse clicks. + * It's a special kind of TQPushButton catching mouse clicks. * And you have the ability to abbreviate the text that it fits in the button. */ class KMdiTaskBarButton : public QPushButton @@ -64,15 +64,15 @@ public: /** * text() returns the possibly abbreviated text including the dots in it. But actualText() returns the full text. */ - QString actualText() const; + TQString 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 ); + void fitText( const TQString&, int newWidth ); /** * Sets the text and avoids any abbreviation. Memorizes that text in m_actualText, too. */ - void setText( const QString& ); + void setText( const TQString& ); signals: /** * Emitted when the button has been clicked. Internally connected to setFocus of the according MDI view. @@ -94,12 +94,12 @@ public slots: /** * A slot version of setText */ - void setNewText( const QString& ); + void setNewText( const TQString& ); protected slots: /** * Reimplemented from its base class to catch right and left mouse button clicks */ - void mousePressEvent( QMouseEvent* ); + void mousePressEvent( TQMouseEvent* ); // attributes public: @@ -111,7 +111,7 @@ protected: /** * Internally we must remember the real text because the button text can be abbreviated. */ - QString m_actualText; + TQString m_actualText; private: KMdiTaskBarButtonPrivate *d; @@ -122,7 +122,7 @@ class KMdiTaskBarPrivate; /** * @short Internal class. * - * It's a special kind of QToolBar that acts as taskbar for child views. + * It's a special kind of TQToolBar that acts as taskbar for child views. * KMdiTaskBarButtons can be added or removed dynamically.
* The button sizes are adjusted dynamically, as well. */ @@ -131,9 +131,9 @@ class KMDI_EXPORT KMdiTaskBar : public KToolBar Q_OBJECT public: /** - * Constructor (NoFocus, minimum width = 1, an internal QPtrList of taskbar buttons (autodelete)) + * Constructor (NoFocus, minimum width = 1, an internal TQPtrList of taskbar buttons (autodelete)) */ - KMdiTaskBar( KMdiMainFrm *parent, QMainWindow::ToolBarDock dock ); + KMdiTaskBar( KMdiMainFrm *parent, TQMainWindow::ToolBarDock dock ); /** * Destructor (deletes the taskbar button list) */ @@ -173,7 +173,7 @@ protected: /** * Reimplemented from its base class to call layoutTaskBar, additionally. */ - void resizeEvent( QResizeEvent* ); + void resizeEvent( TQResizeEvent* ); protected slots: /** * Checks if all buttons fits into this. If not, it recalculates all button widths @@ -194,7 +194,7 @@ protected: * A list of taskbar buttons. * Note: Each button stands for one MDI view (toolviews doesn't have got a taskbar button). */ - QPtrList* m_pButtonList; + TQPtrList* m_pButtonList; /** * The belonging MDI mainframe (parent widget of this) */ @@ -206,7 +206,7 @@ protected: /** * A stretchable widget used as 'space' at the end of a half filled taskbar */ - QLabel* m_pStretchSpace; + TQLabel* m_pStretchSpace; bool m_layoutIsPending; bool m_bSwitchedOn; diff --git a/lib/compatibility/kmdi/qextmdi/kmditoolviewaccessor.cpp b/lib/compatibility/kmdi/qextmdi/kmditoolviewaccessor.cpp index f9921e18..1d2cce94 100644 --- a/lib/compatibility/kmdi/qextmdi/kmditoolviewaccessor.cpp +++ b/lib/compatibility/kmdi/qextmdi/kmditoolviewaccessor.cpp @@ -29,8 +29,8 @@ #include "kmditoolviewaccessor.h" #include "kmditoolviewaccessor_p.h" -KMdiToolViewAccessor::KMdiToolViewAccessor( KMdiMainFrm *parent, QWidget *widgetToWrap, const QString& tabToolTip, const QString& tabCaption ) - : QObject( parent ) +KMdiToolViewAccessor::KMdiToolViewAccessor( KMdiMainFrm *parent, TQWidget *widgetToWrap, const TQString& tabToolTip, const TQString& tabCaption ) + : TQObject( parent ) { mdiMainFrm = parent; d = new KMdiToolViewAccessorPrivate(); @@ -42,7 +42,7 @@ KMdiToolViewAccessor::KMdiToolViewAccessor( KMdiMainFrm *parent, QWidget *widget else { d->widget = widgetToWrap; - QString finalTabCaption; + TQString finalTabCaption; if ( tabCaption == 0 ) { finalTabCaption = widgetToWrap->caption(); @@ -56,7 +56,7 @@ KMdiToolViewAccessor::KMdiToolViewAccessor( KMdiMainFrm *parent, QWidget *widget finalTabCaption = tabCaption; } d->widgetContainer = parent->createDockWidget( widgetToWrap->name(), - ( widgetToWrap->icon() ? ( *( widgetToWrap->icon() ) ) : QPixmap() ), + ( widgetToWrap->icon() ? ( *( widgetToWrap->icon() ) ) : TQPixmap() ), 0L, // parent widgetToWrap->caption(), finalTabCaption ); @@ -90,32 +90,32 @@ KMdiToolViewAccessor::~KMdiToolViewAccessor() } -QWidget *KMdiToolViewAccessor::wrapperWidget() +TQWidget *KMdiToolViewAccessor::wrapperWidget() { if ( !d->widgetContainer ) { - d->widgetContainer = mdiMainFrm->createDockWidget( "KMdiToolViewAccessor::null", QPixmap() ); - connect( d->widgetContainer, SIGNAL( widgetSet( QWidget* ) ), this, SLOT( setWidgetToWrap( QWidget* ) ) ); + d->widgetContainer = mdiMainFrm->createDockWidget( "KMdiToolViewAccessor::null", TQPixmap() ); + connect( d->widgetContainer, TQT_SIGNAL( widgetSet( TQWidget* ) ), this, TQT_SLOT( setWidgetToWrap( TQWidget* ) ) ); } return d->widgetContainer; } -QWidget *KMdiToolViewAccessor::wrappedWidget() +TQWidget *KMdiToolViewAccessor::wrappedWidget() { return d->widget; } -void KMdiToolViewAccessor::setWidgetToWrap( QWidget *widgetToWrap, const QString& tabToolTip, const QString& tabCaption ) +void KMdiToolViewAccessor::setWidgetToWrap( TQWidget *widgetToWrap, const TQString& tabToolTip, const TQString& tabCaption ) { Q_ASSERT( !( d->widget ) ); Q_ASSERT( !widgetToWrap->inherits( "KDockWidget" ) ); - disconnect( d->widgetContainer, SIGNAL( widgetSet( QWidget* ) ), this, SLOT( setWidgetToWrap( QWidget* ) ) ); + disconnect( d->widgetContainer, TQT_SIGNAL( widgetSet( TQWidget* ) ), this, TQT_SLOT( setWidgetToWrap( TQWidget* ) ) ); delete d->widget; d->widget = widgetToWrap; KDockWidget *tmp = d->widgetContainer; - QString finalTabCaption; + TQString finalTabCaption; if ( tabCaption == 0 ) { finalTabCaption = widgetToWrap->caption(); @@ -132,7 +132,7 @@ void KMdiToolViewAccessor::setWidgetToWrap( QWidget *widgetToWrap, const QString if ( !tmp ) { tmp = mdiMainFrm->createDockWidget( widgetToWrap->name(), - widgetToWrap->icon() ? ( *( widgetToWrap->icon() ) ) : QPixmap(), + widgetToWrap->icon() ? ( *( widgetToWrap->icon() ) ) : TQPixmap(), 0L, // parent widgetToWrap->caption(), finalTabCaption ); @@ -146,7 +146,7 @@ void KMdiToolViewAccessor::setWidgetToWrap( QWidget *widgetToWrap, const QString { tmp->setCaption( widgetToWrap->caption() ); tmp->setTabPageLabel( finalTabCaption ); - tmp->setPixmap( widgetToWrap->icon() ? ( *( widgetToWrap->icon() ) ) : QPixmap() ); + tmp->setPixmap( widgetToWrap->icon() ? ( *( widgetToWrap->icon() ) ) : TQPixmap() ); tmp->setName( widgetToWrap->name() ); if ( tabToolTip != 0 ) { @@ -164,21 +164,21 @@ void KMdiToolViewAccessor::setWidgetToWrap( QWidget *widgetToWrap, const QString } -bool KMdiToolViewAccessor::eventFilter( QObject *, QEvent *e ) +bool KMdiToolViewAccessor::eventFilter( TQObject *, TQEvent *e ) { - if ( e->type() == QEvent::IconChange ) + if ( e->type() == TQEvent::IconChange ) { - d->widgetContainer->setPixmap( d->widget->icon() ? ( *d->widget->icon() ) : QPixmap() ); + d->widgetContainer->setPixmap( d->widget->icon() ? ( *d->widget->icon() ) : TQPixmap() ); } return false; } -void KMdiToolViewAccessor::placeAndShow( KDockWidget::DockPosition pos, QWidget* pTargetWnd , int percent ) +void KMdiToolViewAccessor::placeAndShow( KDockWidget::DockPosition pos, TQWidget* pTargetWnd , int percent ) { place( pos, pTargetWnd, percent ); show(); } -void KMdiToolViewAccessor::place( KDockWidget::DockPosition pos, QWidget* pTargetWnd , int percent ) +void KMdiToolViewAccessor::place( KDockWidget::DockPosition pos, TQWidget* pTargetWnd , int percent ) { Q_ASSERT( d->widgetContainer ); if ( !d->widgetContainer ) @@ -186,7 +186,7 @@ void KMdiToolViewAccessor::place( KDockWidget::DockPosition pos, QWidget* pTarge 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()); + d->widgetContainer->reparent( mdiMainFrm, Qt::WType_TopLevel | Qt::WType_Dialog, TQPoint( 0, 0 ), true ); //pToolView->isVisible()); } else { // add (and dock) the toolview as DockWidget view @@ -214,7 +214,7 @@ void KMdiToolViewAccessor::place( KDockWidget::DockPosition pos, QWidget* pTarge pTargetDock = mdiMainFrm->m_pDockbaseAreaOfDocumentViews; } } - // this is not inheriting QWidget*, its plain impossible that this condition is true + // this is not inheriting TQWidget*, its plain impossible that this condition is true //if (pTargetWnd == this) DockToOurself = true; if ( !DockToOurself ) if ( pTargetWnd != 0L ) diff --git a/lib/compatibility/kmdi/qextmdi/kmditoolviewaccessor.h b/lib/compatibility/kmdi/qextmdi/kmditoolviewaccessor.h index d5bd49a7..28241ea3 100644 --- a/lib/compatibility/kmdi/qextmdi/kmditoolviewaccessor.h +++ b/lib/compatibility/kmdi/qextmdi/kmditoolviewaccessor.h @@ -21,11 +21,11 @@ #ifndef _KMDITOOLVIEWACCESSOR_H_ #define _KMDITOOLVIEWACCESSOR_H_ -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include @@ -60,24 +60,24 @@ private: bool m_bFocusInEventIsPending; private: - KMdiToolViewAccessor( class KMdiMainFrm *parent , QWidget *widgetToWrap, const QString& tabToolTip = 0, const QString& tabCaption = 0 ); + KMdiToolViewAccessor( class KMdiMainFrm *parent , TQWidget *widgetToWrap, const TQString& tabToolTip = 0, const TQString& 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 ); + TQWidget *wrapperWidget(); + TQWidget *wrappedWidget(); + void place( KDockWidget::DockPosition pos = KDockWidget::DockNone, TQWidget* pTargetWnd = 0L, int percent = 50 ); + void placeAndShow( KDockWidget::DockPosition pos = KDockWidget::DockNone, TQWidget* pTargetWnd = 0L, int percent = 50 ); void show(); public slots: - void setWidgetToWrap( QWidget* widgetToWrap, const QString& tabToolTip = 0, const QString& tabCaption = 0 ); + void setWidgetToWrap( TQWidget* widgetToWrap, const TQString& tabToolTip = 0, const TQString& tabCaption = 0 ); void hide(); private: class KMdiToolViewAccessorPrivate *d; class KMdiMainFrm *mdiMainFrm; protected: - bool eventFilter( QObject *o, QEvent *e ); + bool eventFilter( TQObject *o, TQEvent *e ); }; diff --git a/lib/compatibility/kmdi/qextmdi/kmditoolviewaccessor_p.h b/lib/compatibility/kmdi/qextmdi/kmditoolviewaccessor_p.h index 913b8854..ecbaa76a 100644 --- a/lib/compatibility/kmdi/qextmdi/kmditoolviewaccessor_p.h +++ b/lib/compatibility/kmdi/qextmdi/kmditoolviewaccessor_p.h @@ -24,9 +24,9 @@ #define KMDI_TOOLVIEW_ACCESSOR_PRIVATE_H_ -#include +#include #include -#include +#include #include class KMDI_EXPORT KMdiToolViewAccessorPrivate { @@ -40,9 +40,9 @@ public: if (!widgetContainer.isNull()) widgetContainer->undock(); delete (KDockWidget*)widgetContainer; } - QGuardedPtr widgetContainer; - QWidget* widget; - QGuardedPtr action; + TQGuardedPtr widgetContainer; + TQWidget* widget; + TQGuardedPtr action; }; diff --git a/lib/compatibility/kmdi/qextmdi/kmultitabbar.cpp b/lib/compatibility/kmdi/qextmdi/kmultitabbar.cpp index 335f82db..853f8e8e 100644 --- a/lib/compatibility/kmdi/qextmdi/kmultitabbar.cpp +++ b/lib/compatibility/kmdi/qextmdi/kmultitabbar.cpp @@ -26,28 +26,28 @@ #include "kmultitabbar.moc" #include "kmultitabbar_p.h" #include "kmultitabbar_p.moc" -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include #include -#include +#include #include #define NEARBYINT(i) ((int(float(i) + 0.5))) class KMultiTabBarTabPrivate { public: - QPixmap pix; + TQPixmap pix; }; -KMultiTabBarInternal::KMultiTabBarInternal(QWidget *parent, KMultiTabBar::KMultiTabBarMode bm):QScrollView(parent) +KMultiTabBarInternal::KMultiTabBarInternal(TQWidget *parent, KMultiTabBar::KMultiTabBarMode bm):TQScrollView(parent) { m_expandedTabSize=-1; m_showActiveTabTexts=false; @@ -57,16 +57,16 @@ KMultiTabBarInternal::KMultiTabBarInternal(QWidget *parent, KMultiTabBar::KMulti setVScrollBarMode(AlwaysOff); if (bm==KMultiTabBar::Vertical) { - box=new QWidget(viewport()); - mainLayout=new QVBoxLayout(box); + box=new TQWidget(viewport()); + mainLayout=new TQVBoxLayout(box); mainLayout->setAutoAdd(true); box->setFixedWidth(24); setFixedWidth(24); } else { - box=new QWidget(viewport()); - mainLayout=new QHBoxLayout(box); + box=new TQWidget(viewport()); + mainLayout=new TQHBoxLayout(box); mainLayout->setAutoAdd(true); box->setFixedHeight(24); setFixedHeight(24); @@ -92,15 +92,15 @@ void KMultiTabBarInternal::setStyle(enum KMultiTabBar::KMultiTabBarStyle style) } else if (mainLayout==0) { if (m_barMode==KMultiTabBar::Vertical) { - box=new QWidget(viewport()); - mainLayout=new QVBoxLayout(box); + box=new TQWidget(viewport()); + mainLayout=new TQVBoxLayout(box); box->setFixedWidth(24); setFixedWidth(24); } else { - box=new QWidget(viewport()); - mainLayout=new QHBoxLayout(box); + box=new TQWidget(viewport()); + mainLayout=new TQHBoxLayout(box); box->setFixedHeight(24); setFixedHeight(24); } @@ -113,9 +113,9 @@ void KMultiTabBarInternal::setStyle(enum KMultiTabBar::KMultiTabBarStyle style) viewport()->repaint(); } -void KMultiTabBarInternal::drawContents ( QPainter * paint, int clipx, int clipy, int clipw, int cliph ) +void KMultiTabBarInternal::drawContents ( TQPainter * paint, int clipx, int clipy, int clipw, int cliph ) { - QScrollView::drawContents (paint , clipx, clipy, clipw, cliph ); + TQScrollView::drawContents (paint , clipx, clipy, clipw, cliph ); if (m_position==KMultiTabBar::Right) { @@ -159,12 +159,12 @@ void KMultiTabBarInternal::drawContents ( QPainter * paint, int clipx, int clipy } -void KMultiTabBarInternal::contentsMousePressEvent(QMouseEvent *ev) +void KMultiTabBarInternal::contentsMousePressEvent(TQMouseEvent *ev) { ev->ignore(); } -void KMultiTabBarInternal::mousePressEvent(QMouseEvent *ev) +void KMultiTabBarInternal::mousePressEvent(TQMouseEvent *ev) { ev->ignore(); } @@ -186,11 +186,11 @@ void KMultiTabBarInternal::mousePressEvent(QMouseEvent *ev) } else {diff=0; } -void KMultiTabBarInternal::resizeEvent(QResizeEvent *ev) { +void KMultiTabBarInternal::resizeEvent(TQResizeEvent *ev) { /* kdDebug()<<"KMultiTabBarInternal::resizeEvent"<geometry()< it(m_tabs);it.current();++it){ + for (TQPtrListIterator 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); +bool KMultiTabBarInternal::eventFilter(TQObject *, TQEvent *e) { + if (e->type()==TQEvent::Resize) resizeEvent(0); return false; } -int KMultiTabBarInternal::appendTab(const QPixmap &pic ,int id,const QString& text) +int KMultiTabBarInternal::appendTab(const TQPixmap &pic ,int id,const TQString& text) { KMultiTabBarTab *tab; m_tabs.append(tab= new KMultiTabBarTab(pic,text,id,box,m_position,m_style)); @@ -382,9 +382,9 @@ void KMultiTabBarInternal::setPosition(enum KMultiTabBar::KMultiTabBarPosition p } -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) +KMultiTabBarButton::KMultiTabBarButton(const TQPixmap& pic,const TQString& text, TQPopupMenu *popup, + int id,TQWidget *parent,KMultiTabBar::KMultiTabBarPosition pos,KMultiTabBar::KMultiTabBarStyle style) + :TQPushButton(TQIconSet(),text,parent),m_style(style) { setIconSet(pic); setText(text); @@ -394,13 +394,13 @@ KMultiTabBarButton::KMultiTabBarButton(const QPixmap& pic,const QString& text, Q setFixedHeight(24); setFixedWidth(24); m_id=id; - QToolTip::add(this,text); - connect(this,SIGNAL(clicked()),this,SLOT(slotClicked())); + TQToolTip::add(this,text); + connect(this,TQT_SIGNAL(clicked()),this,TQT_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) +KMultiTabBarButton::KMultiTabBarButton(const TQString& text, TQPopupMenu *popup, + int id,TQWidget *parent,KMultiTabBar::KMultiTabBarPosition pos,KMultiTabBar::KMultiTabBarStyle style) + :TQPushButton(TQIconSet(),text,parent),m_style(style) { setText(text); m_position=pos; @@ -409,8 +409,8 @@ KMultiTabBarButton::KMultiTabBarButton(const QString& text, QPopupMenu *popup, setFixedHeight(24); setFixedWidth(24); m_id=id; - QToolTip::add(this,text); - connect(this,SIGNAL(clicked()),this,SLOT(slotClicked())); + TQToolTip::add(this,text); + connect(this,TQT_SIGNAL(clicked()),this,TQT_SLOT(slotClicked())); } KMultiTabBarButton::~KMultiTabBarButton() { @@ -420,11 +420,11 @@ int KMultiTabBarButton::id() const{ return m_id; } -void KMultiTabBarButton::setText(const QString& text) +void KMultiTabBarButton::setText(const TQString& text) { - QPushButton::setText(text); + TQPushButton::setText(text); m_text=text; - QToolTip::add(this,text); + TQToolTip::add(this,text); } void KMultiTabBarButton::slotClicked() @@ -444,20 +444,20 @@ void KMultiTabBarButton::setStyle(KMultiTabBar::KMultiTabBarStyle style) repaint(); } -void KMultiTabBarButton::hideEvent( QHideEvent* he) { - QPushButton::hideEvent(he); +void KMultiTabBarButton::hideEvent( TQHideEvent* he) { + TQPushButton::hideEvent(he); KMultiTabBar *tb=dynamic_cast(parentWidget()); if (tb) tb->updateSeparator(); } -void KMultiTabBarButton::showEvent( QShowEvent* he) { - QPushButton::showEvent(he); +void KMultiTabBarButton::showEvent( TQShowEvent* he) { + TQPushButton::showEvent(he); KMultiTabBar *tb=dynamic_cast(parentWidget()); if (tb) tb->updateSeparator(); } -QSize KMultiTabBarButton::sizeHint() const +TQSize KMultiTabBarButton::sizeHint() const { constPolish(); @@ -466,39 +466,39 @@ QSize KMultiTabBarButton::sizeHint() const // 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(); + int iw = iconSet()->pixmap( TQIconSet::Small, TQIconSet::Normal ).width() + 4; + int ih = iconSet()->pixmap( TQIconSet::Small, TQIconSet::Normal ).height(); w += iw; h = QMAX( h, ih ); } #endif if ( isMenuButton() ) - w += style().pixelMetric(QStyle::PM_MenuButtonIndicator, this); + w += style().pixelMetric(TQStyle::PM_MenuButtonIndicator, this); if ( pixmap() ) { - QPixmap *pm = (QPixmap *)pixmap(); + TQPixmap *pm = (TQPixmap *)pixmap(); w += pm->width(); h += pm->height(); } else { - QString s( text() ); + TQString s( text() ); bool empty = s.isEmpty(); if ( empty ) - s = QString::fromLatin1("XXXX"); - QFontMetrics fm = fontMetrics(); - QSize sz = fm.size( ShowPrefix, s ); + s = TQString::fromLatin1("XXXX"); + TQFontMetrics fm = fontMetrics(); + TQSize 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())); + return (style().sizeFromContents(TQStyle::CT_ToolButton, this, TQSize(w, h)). + expandedTo(TQApplication::globalStrut())); } -KMultiTabBarTab::KMultiTabBarTab(const QPixmap& pic, const QString& text, - int id,QWidget *parent,KMultiTabBar::KMultiTabBarPosition pos, +KMultiTabBarTab::KMultiTabBarTab(const TQPixmap& pic, const TQString& text, + int id,TQWidget *parent,KMultiTabBar::KMultiTabBarPosition pos, KMultiTabBar::KMultiTabBarStyle style) :KMultiTabBarButton(text,0,id,parent,pos,style), m_showActiveTabText(false) @@ -518,7 +518,7 @@ 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); + TQWMatrix 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); @@ -529,23 +529,23 @@ void KMultiTabBarTab::setTabsPosition(KMultiTabBar::KMultiTabBarPosition pos) // repaint(); } -void KMultiTabBarTab::setIcon(const QString& icon) +void KMultiTabBarTab::setIcon(const TQString& icon) { - QPixmap pic=SmallIcon(icon); + TQPixmap pic=SmallIcon(icon); setIcon(pic); } -void KMultiTabBarTab::setIcon(const QPixmap& icon) +void KMultiTabBarTab::setIcon(const TQPixmap& icon) { if (m_style!=KMultiTabBar::KDEV3) { if ((m_position==KMultiTabBar::Left) || (m_position==KMultiTabBar::Right)) { - QWMatrix rotateMatrix; + TQWMatrix rotateMatrix; if (m_position==KMultiTabBar::Left) rotateMatrix.rotate(90); else rotateMatrix.rotate(-90); - QPixmap pic=icon.xForm(rotateMatrix); //TODO FIX THIS, THIS SHOWS WINDOW + TQPixmap pic=icon.xForm(rotateMatrix); //TODO FIX THIS, THIS SHOWS WINDOW d->pix=pic; setIconSet(pic); } else setIconSet(icon); @@ -569,10 +569,10 @@ void KMultiTabBarTab::updateState() if (m_style!=KMultiTabBar::KONQSBC) { if ((m_style==KMultiTabBar::KDEV3) || (m_style==KMultiTabBar::KDEV3ICON) || (isOn())) { - QPushButton::setText(m_text); + TQPushButton::setText(m_text); } else { - kdDebug()<<"KMultiTabBarTab::updateState(): setting text to an empty QString***************"<height(),this->width());//KMultiTabBarButton::sizeHint(); - else sh=QSize(this->width(),this->height()); + sh=TQSize(this->height(),this->width());//KMultiTabBarButton::sizeHint(); + else sh=TQSize(this->width(),this->height()); } else - sh=QSize(width,height); + sh=TQSize(width,height); - QPixmap pixmap( sh.width(),height); ///,sh.height()); + TQPixmap pixmap( sh.width(),height); ///,sh.height()); pixmap.fill(eraseColor()); - QPainter painter(&pixmap); + TQPainter painter(&pixmap); - QStyle::SFlags st=QStyle::Style_Default; + TQStyle::SFlags st=TQStyle::Style_Default; - st|=QStyle::Style_Enabled; + st|=TQStyle::Style_Enabled; - if (isOn()) st|=QStyle::Style_On; + if (isOn()) st|=TQStyle::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); + style().drawControl(TQStyle::CE_PushButton,&painter,this, TQRect(0,0,pixmap.width(),pixmap.height()), colorGroup(),st); + style().drawControl(TQStyle::CE_PushButtonLabel,&painter,this, TQRect(0,0,pixmap.width(),pixmap.height()), colorGroup(),st); switch (m_position) { case KMultiTabBar::Left: @@ -668,17 +668,17 @@ void KMultiTabBarTab::drawButtonStyled(QPainter *paint) { paint->drawPixmap(0,0,pixmap); break; } -// style().drawControl(QStyle::CE_PushButtonLabel,painter,this, QRect(0,0,pixmap.width(),pixmap.height()), -// colorGroup(),QStyle::Style_Enabled); +// style().drawControl(TQStyle::CE_PushButtonLabel,painter,this, TQRect(0,0,pixmap.width(),pixmap.height()), +// colorGroup(),TQStyle::Style_Enabled); } -void KMultiTabBarTab::drawButtonClassic(QPainter *paint) +void KMultiTabBarTab::drawButtonClassic(TQPainter *paint) { - QPixmap pixmap; + TQPixmap pixmap; if ( iconSet()) - pixmap = iconSet()->pixmap( QIconSet::Small, QIconSet::Normal ); + pixmap = iconSet()->pixmap( TQIconSet::Small, TQIconSet::Normal ); paint->fillRect(0, 0, 24, 24, colorGroup().background()); if (!isOn()) @@ -686,7 +686,7 @@ void KMultiTabBarTab::drawButtonClassic(QPainter *paint) if (m_position==KMultiTabBar::Right) { - paint->fillRect(0,0,21,21,QBrush(colorGroup().background())); + paint->fillRect(0,0,21,21,TQBrush(colorGroup().background())); paint->setPen(colorGroup().background().dark(150)); paint->drawLine(0,22,23,22); @@ -702,7 +702,7 @@ void KMultiTabBarTab::drawButtonClassic(QPainter *paint) else if ((m_position==KMultiTabBar::Bottom) || (m_position==KMultiTabBar::Top)) { - paint->fillRect(0,1,23,22,QBrush(colorGroup().background())); + paint->fillRect(0,1,23,22,TQBrush(colorGroup().background())); paint->drawPixmap(12-pixmap.width()/2,12-pixmap.height()/2,pixmap); @@ -723,7 +723,7 @@ void KMultiTabBarTab::drawButtonClassic(QPainter *paint) { paint->setPen(colorGroup().background().dark(120)); paint->drawLine(0,23,23,23); - paint->fillRect(0,0,23,21,QBrush(colorGroup().background())); + paint->fillRect(0,0,23,21,TQBrush(colorGroup().background())); paint->drawPixmap(12-pixmap.width()/2,12-pixmap.height()/2,pixmap); paint->setPen(colorGroup().light()); @@ -746,20 +746,20 @@ void KMultiTabBarTab::drawButtonClassic(QPainter *paint) 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->fillRect(0,0,21,height()-3,TQBrush(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); + TQPixmap tpixmap(height()-25-3, width()-2); + TQPainter painter(&tpixmap); - painter.fillRect(0,0,tpixmap.width(),tpixmap.height(),QBrush(colorGroup().light())); + painter.fillRect(0,0,tpixmap.width(),tpixmap.height(),TQBrush(colorGroup().light())); painter.setPen(colorGroup().text()); - painter.drawText(0,+width()/2+QFontMetrics(QFont()).height()/2,m_text); + painter.drawText(0,+width()/2+TQFontMetrics(TQFont()).height()/2,m_text); paint->rotate(90); kdDebug()<<"tpixmap.width:"<fillRect(0,0,width()-1,23,QBrush(colorGroup().light())); + paint->fillRect(0,0,width()-1,23,TQBrush(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); + paint->drawText(25,height()/2+TQFontMetrics(TQFont()).height()/2,m_text); } } else @@ -784,12 +784,12 @@ void KMultiTabBarTab::drawButtonClassic(QPainter *paint) 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->fillRect(0,0,width()-1,21,TQBrush(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); + paint->drawText(25,height()/2+TQFontMetrics(TQFont()).height()/2,m_text); } } @@ -800,20 +800,20 @@ void KMultiTabBarTab::drawButtonClassic(QPainter *paint) 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->fillRect(0,0,23,height()-3,TQBrush(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); + TQPixmap tpixmap(height()-25-3, width()-2); + TQPainter painter(&tpixmap); - painter.fillRect(0,0,tpixmap.width(),tpixmap.height(),QBrush(colorGroup().light())); + painter.fillRect(0,0,tpixmap.width(),tpixmap.height(),TQBrush(colorGroup().light())); painter.setPen(colorGroup().text()); - painter.drawText(tpixmap.width()-QFontMetrics(QFont()).width(m_text),+width()/2+QFontMetrics(QFont()).height()/2,m_text); + painter.drawText(tpixmap.width()-TQFontMetrics(TQFont()).width(m_text),+width()/2+TQFontMetrics(TQFont()).height()/2,m_text); paint->rotate(-90); kdDebug()<<"tpixmap.width:"<setMargin(0); @@ -857,9 +857,9 @@ KMultiTabBar::KMultiTabBar(KMultiTabBarMode bm, QWidget *parent,const char *name // setStyle(KDEV3); //setStyle(KONQSBC); m_l->insertWidget(0,m_internal); - m_l->insertWidget(0,m_btnTabSep=new QFrame(this)); + m_l->insertWidget(0,m_btnTabSep=new TQFrame(this)); m_btnTabSep->setFixedHeight(4); - m_btnTabSep->setFrameStyle(QFrame::Panel | QFrame::Sunken); + m_btnTabSep->setFrameStyle(TQFrame::Panel | TQFrame::Sunken); m_btnTabSep->setLineWidth(2); m_btnTabSep->hide(); @@ -869,16 +869,16 @@ KMultiTabBar::KMultiTabBar(KMultiTabBarMode bm, QWidget *parent,const char *name KMultiTabBar::~KMultiTabBar() { } -/*int KMultiTabBar::insertButton(QPixmap pic,int id ,const QString&) +/*int KMultiTabBar::insertButton(TQPixmap pic,int id ,const TQString&) { (new KToolbarButton(pic,id,m_internal))->show(); return 0; }*/ -int KMultiTabBar::appendButton(const QPixmap &pic ,int id,QPopupMenu *popup,const QString&) +int KMultiTabBar::appendButton(const TQPixmap &pic ,int id,TQPopupMenu *popup,const TQString&) { KMultiTabBarButton *btn; - m_buttons.append(btn= new KMultiTabBarButton(pic,QString::null, + m_buttons.append(btn= new KMultiTabBarButton(pic,TQString::null, popup,id,this,m_position,m_internal->m_style)); m_l->insertWidget(0,btn); btn->show(); @@ -888,7 +888,7 @@ int KMultiTabBar::appendButton(const QPixmap &pic ,int id,QPopupMenu *popup,cons void KMultiTabBar::updateSeparator() { bool hideSep=true; - for (QPtrListIterator it(m_buttons);it.current();++it){ + for (TQPtrListIterator it(m_buttons);it.current();++it){ if (it.current()->isVisibleTo(this)) { hideSep=false; break; @@ -899,7 +899,7 @@ void KMultiTabBar::updateSeparator() { } -int KMultiTabBar::appendTab(const QPixmap &pic ,int id ,const QString& text) +int KMultiTabBar::appendTab(const TQPixmap &pic ,int id ,const TQString& text) { m_internal->appendTab(pic,id,text); return 0; @@ -907,7 +907,7 @@ int KMultiTabBar::appendTab(const QPixmap &pic ,int id ,const QString& text) KMultiTabBarButton* KMultiTabBar::button(int id) const { - for (QPtrListIterator it(m_buttons);it.current();++it){ + for (TQPtrListIterator it(m_buttons);it.current();++it){ if (it.current()->id()==id) return it.current(); } return 0; @@ -976,13 +976,13 @@ void KMultiTabBar::setPosition(KMultiTabBarPosition pos) for (uint i=0;isetPosition(pos); } -void KMultiTabBar::fontChange(const QFont& /* oldFont */) +void KMultiTabBar::fontChange(const TQFont& /* oldFont */) { for (uint i=0;icount();i++) tabs()->at(i)->resize(); repaint(); } -QPtrList* KMultiTabBar::tabs() {return m_internal->tabs();} -QPtrList* KMultiTabBar::buttons() {return &m_buttons;} +TQPtrList* KMultiTabBar::tabs() {return m_internal->tabs();} +TQPtrList* KMultiTabBar::buttons() {return &m_buttons;} diff --git a/lib/compatibility/kmdi/qextmdi/kmultitabbar.h b/lib/compatibility/kmdi/qextmdi/kmultitabbar.h index 0d1a6841..a0731c01 100644 --- a/lib/compatibility/kmdi/qextmdi/kmultitabbar.h +++ b/lib/compatibility/kmdi/qextmdi/kmultitabbar.h @@ -25,13 +25,13 @@ #ifndef _KMultitabbar_h_ #define _KMultitabbar_h_ -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include @@ -66,7 +66,7 @@ public: */ enum KMultiTabBarStyle{VSNET=0, KDEV3=1, KONQSBC=2, KDEV3ICON=3,STYLELAST=0xffff}; - KMultiTabBar(KMultiTabBarMode bm,QWidget *parent=0,const char *name=0); + KMultiTabBar(KMultiTabBarMode bm,TQWidget *parent=0,const char *name=0); virtual ~KMultiTabBar(); /** @@ -78,7 +78,7 @@ public: * @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); + int appendButton(const TQPixmap &pic,int id=-1,TQPopupMenu* popup=0,const TQString& not_used_yet=TQString::null); /** * remove a button with the given ID */ @@ -89,7 +89,7 @@ public: * @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); + int appendTab(const TQPixmap &pic,int id=-1,const TQString& text=TQString::null); /** * remove a tab with a given ID */ @@ -125,11 +125,11 @@ public: /** * be carefull, don't delete tabs yourself and don't delete the list itself */ - QPtrList* tabs(); + TQPtrList* tabs(); /** * be carefull, don't delete buttons yourself and don't delete the list itself */ - QPtrList* buttons(); + TQPtrList* buttons(); /** * might vanish, not sure yet @@ -137,13 +137,13 @@ public: void showActiveTabTexts(bool show=true); protected: friend class KMultiTabBarButton; - virtual void fontChange( const QFont& ); + virtual void fontChange( const TQFont& ); void updateSeparator(); private: class KMultiTabBarInternal *m_internal; - QBoxLayout *m_l; - QFrame *m_btnTabSep; - QPtrList m_buttons; + TQBoxLayout *m_l; + TQFrame *m_btnTabSep; + TQPtrList m_buttons; KMultiTabBarPosition m_position; KMultiTabBarPrivate *d; }; @@ -155,10 +155,10 @@ 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); + KMultiTabBarButton(const TQPixmap& pic,const TQString&, TQPopupMenu *popup, + int id,TQWidget *parent, KMultiTabBar::KMultiTabBarPosition pos, KMultiTabBar::KMultiTabBarStyle style); + KMultiTabBarButton(const TQString&, TQPopupMenu *popup, + int id,TQWidget *parent, KMultiTabBar::KMultiTabBarPosition pos, KMultiTabBar::KMultiTabBarStyle style); virtual ~KMultiTabBarButton(); int id() const; @@ -177,16 +177,16 @@ public slots: /** * modify the text of the button */ - void setText(const QString &); + void setText(const TQString &); - QSize sizeHint() const; + TQSize sizeHint() const; protected: KMultiTabBar::KMultiTabBarPosition m_position; KMultiTabBar::KMultiTabBarStyle m_style; - QString m_text; - virtual void hideEvent( class QHideEvent*); - virtual void showEvent( class QShowEvent*); + TQString m_text; + virtual void hideEvent( class TQHideEvent*); + virtual void showEvent( class TQShowEvent*); private: int m_id; KMultiTabBarButtonPrivate *d; @@ -207,7 +207,7 @@ class KUTILS_EXPORT KMultiTabBarTab: public KMultiTabBarButton { Q_OBJECT public: - KMultiTabBarTab(const QPixmap& pic,const QString&,int id,QWidget *parent, + KMultiTabBarTab(const TQPixmap& pic,const TQString&,int id,TQWidget *parent, KMultiTabBar::KMultiTabBarPosition pos,KMultiTabBar::KMultiTabBarStyle style); virtual ~KMultiTabBarTab(); /** @@ -230,17 +230,17 @@ protected: void setSize(int); int neededSize(); void updateState(); - virtual void drawButton(QPainter *); - virtual void drawButtonLabel(QPainter *); - void drawButtonStyled(QPainter *); - void drawButtonClassic(QPainter *); + virtual void drawButton(TQPainter *); + virtual void drawButtonLabel(TQPainter *); + void drawButtonStyled(TQPainter *); + void drawButtonClassic(TQPainter *); protected slots: virtual void slotClicked(); void setTabsPosition(KMultiTabBar::KMultiTabBarPosition); public slots: - virtual void setIcon(const QString&); - virtual void setIcon(const QPixmap&); + virtual void setIcon(const TQString&); + virtual void setIcon(const TQPixmap&); }; #endif diff --git a/lib/compatibility/kmdi/qextmdi/kmultitabbar_p.h b/lib/compatibility/kmdi/qextmdi/kmultitabbar_p.h index f47cc538..e4820016 100644 --- a/lib/compatibility/kmdi/qextmdi/kmultitabbar_p.h +++ b/lib/compatibility/kmdi/qextmdi/kmultitabbar_p.h @@ -24,26 +24,26 @@ #ifndef K_MULTI_TAB_BAR_P_H #define K_MULTI_TAB_BAR_P_H -#include +#include #include class KMultiTabBarInternal: public QScrollView { Q_OBJECT public: - KMultiTabBarInternal(QWidget *parent,KMultiTabBar::KMultiTabBarMode bm); - int appendTab(const QPixmap &,int=-1,const QString& =QString::null); + KMultiTabBarInternal(TQWidget *parent,KMultiTabBar::KMultiTabBarMode bm); + int appendTab(const TQPixmap &,int=-1,const TQString& =TQString::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* tabs(){return &m_tabs;} + TQPtrList* tabs(){return &m_tabs;} private: friend class KMultiTabBar; - QWidget *box; - QBoxLayout *mainLayout; - QPtrList m_tabs; + TQWidget *box; + TQBoxLayout *mainLayout; + TQPtrList m_tabs; enum KMultiTabBar::KMultiTabBarPosition m_position; bool m_showActiveTabTexts; enum KMultiTabBar::KMultiTabBarStyle m_style; @@ -51,17 +51,17 @@ private: int m_lines; KMultiTabBar::KMultiTabBarMode m_barMode; protected: - virtual bool eventFilter(QObject *,QEvent*); - virtual void drawContents ( QPainter *, int, int, int, int); + virtual bool eventFilter(TQObject *,TQEvent*); + virtual void drawContents ( TQPainter *, 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 *); + virtual void contentsMousePressEvent(TQMouseEvent *); + virtual void mousePressEvent(TQMouseEvent *); + virtual void resizeEvent(TQResizeEvent *); }; #endif diff --git a/lib/compatibility/kmdi/qextmdi/ktabbar.cpp b/lib/compatibility/kmdi/qextmdi/ktabbar.cpp index d8ee58cd..e961fda1 100644 --- a/lib/compatibility/kmdi/qextmdi/ktabbar.cpp +++ b/lib/compatibility/kmdi/qextmdi/ktabbar.cpp @@ -18,13 +18,13 @@ Boston, MA 02110-1301, USA. */ -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -33,8 +33,8 @@ #include "ktabbar.h" #include "ktabwidget.h" -KTabBar::KTabBar( QWidget *parent, const char *name ) - : QTabBar( parent, name ), mReorderStartTab( -1 ), mReorderPreviousTab( -1 ), +KTabBar::KTabBar( TQWidget *parent, const char *name ) + : TQTabBar( parent, name ), mReorderStartTab( -1 ), mReorderPreviousTab( -1 ), mHoverCloseButtonTab( 0 ), mDragSwitchTab( 0 ), mHoverCloseButton( 0 ), mHoverCloseButtonEnabled( false ), mHoverCloseButtonDelayed( true ), mTabReorderingEnabled( false ), mTabCloseActivatePrevious( false ) @@ -42,13 +42,13 @@ KTabBar::KTabBar( QWidget *parent, const char *name ) setAcceptDrops( true ); setMouseTracking( true ); - mEnableCloseButtonTimer = new QTimer( this ); - connect( mEnableCloseButtonTimer, SIGNAL( timeout() ), SLOT( enableCloseButton() ) ); + mEnableCloseButtonTimer = new TQTimer( this ); + connect( mEnableCloseButtonTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( enableCloseButton() ) ); - mActivateDragSwitchTabTimer = new QTimer( this ); - connect( mActivateDragSwitchTabTimer, SIGNAL( timeout() ), SLOT( activateDragSwitchTab() ) ); + mActivateDragSwitchTabTimer = new TQTimer( this ); + connect( mActivateDragSwitchTabTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( activateDragSwitchTab() ) ); - connect(this, SIGNAL(layoutChanged()), SLOT(onLayoutChange())); + connect(this, TQT_SIGNAL(layoutChanged()), TQT_SLOT(onLayoutChange())); } KTabBar::~KTabBar() @@ -59,13 +59,13 @@ KTabBar::~KTabBar() void KTabBar::setTabEnabled( int id, bool enabled ) { - QTab * t = tab( id ); + TQTab * t = tab( id ); if ( t ) { if ( t->isEnabled() != enabled ) { t->setEnabled( enabled ); - QRect r( t->rect() ); + TQRect r( t->rect() ); if ( !enabled && id == currentTab() && count()>1 ) { - QPtrList *tablist = tabList(); + TQPtrList *tablist = tabList(); if ( mTabCloseActivatePrevious ) t = tablist->at( count()-2 ); else { @@ -85,46 +85,46 @@ void KTabBar::setTabEnabled( int id, bool enabled ) } } -void KTabBar::mouseDoubleClickEvent( QMouseEvent *e ) +void KTabBar::mouseDoubleClickEvent( TQMouseEvent *e ) { if( e->button() != LeftButton ) return; - QTab *tab = selectTab( e->pos() ); + TQTab *tab = selectTab( e->pos() ); if( tab ) { emit( mouseDoubleClick( indexOf( tab->identifier() ) ) ); return; } - QTabBar::mouseDoubleClickEvent( e ); + TQTabBar::mouseDoubleClickEvent( e ); } -void KTabBar::mousePressEvent( QMouseEvent *e ) +void KTabBar::mousePressEvent( TQMouseEvent *e ) { if( e->button() == LeftButton ) { mEnableCloseButtonTimer->stop(); mDragStart = e->pos(); } else if( e->button() == RightButton ) { - QTab *tab = selectTab( e->pos() ); + TQTab *tab = selectTab( e->pos() ); if( tab ) { emit( contextMenu( indexOf( tab->identifier() ), mapToGlobal( e->pos() ) ) ); return; } } - QTabBar::mousePressEvent( e ); + TQTabBar::mousePressEvent( e ); } -void KTabBar::mouseMoveEvent( QMouseEvent *e ) +void KTabBar::mouseMoveEvent( TQMouseEvent *e ) { if ( e->state() == LeftButton ) { - QTab *tab = selectTab( e->pos() ); + TQTab *tab = selectTab( e->pos() ); if ( mDragSwitchTab && tab != mDragSwitchTab ) { mActivateDragSwitchTabTimer->stop(); mDragSwitchTab = 0; } int delay = KGlobalSettings::dndEventDelay(); - QPoint newPos = e->pos(); + TQPoint newPos = e->pos(); if( newPos.x() > mDragStart.x()+delay || newPos.x() < mDragStart.x()-delay || newPos.y() > mDragStart.y()+delay || newPos.y() < mDragStart.y()-delay ) { @@ -137,11 +137,11 @@ void KTabBar::mouseMoveEvent( QMouseEvent *e ) else if ( e->state() == MidButton ) { if (mReorderStartTab==-1) { int delay = KGlobalSettings::dndEventDelay(); - QPoint newPos = e->pos(); + TQPoint 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() ); + TQTab *tab = selectTab( e->pos() ); if( tab && mTabReorderingEnabled ) { mReorderStartTab = indexOf( tab->identifier() ); grabMouse( sizeAllCursor ); @@ -150,7 +150,7 @@ void KTabBar::mouseMoveEvent( QMouseEvent *e ) } } else { - QTab *tab = selectTab( e->pos() ); + TQTab *tab = selectTab( e->pos() ); if( tab ) { int reorderStopTab = indexOf( tab->identifier() ); if ( mReorderStartTab!=reorderStopTab && mReorderPreviousTab!=reorderStopTab ) { @@ -164,16 +164,16 @@ void KTabBar::mouseMoveEvent( QMouseEvent *e ) } if ( mHoverCloseButtonEnabled && mReorderStartTab==-1) { - QTab *t = selectTab( e->pos() ); + TQTab *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); + TQPixmap pixmap = t->iconSet()->pixmap( TQIconSet::Small, TQIconSet::Normal ); + TQRect 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; + xoff = style().pixelMetric( TQStyle::PM_TabBarTabShiftHorizontal, this ) + 3; + yoff = style().pixelMetric( TQStyle::PM_TabBarTabShiftVertical, this ) - 4; } else { xoff = 7; @@ -189,18 +189,18 @@ void KTabBar::mouseMoveEvent( QMouseEvent *e ) delete mHoverCloseButton; } - mHoverCloseButton = new QPushButton( this ); + mHoverCloseButton = new TQPushButton( this ); mHoverCloseButton->setIconSet( KGlobal::iconLoader()->loadIconSet("fileclose", KIcon::Toolbar, KIcon::SizeSmall) ); mHoverCloseButton->setGeometry( rect ); - QToolTip::add(mHoverCloseButton,i18n("Close this tab")); + TQToolTip::add(mHoverCloseButton,i18n("Close this tab")); mHoverCloseButton->setFlat(true); mHoverCloseButton->show(); if ( mHoverCloseButtonDelayed ) { mHoverCloseButton->setEnabled(false); - mEnableCloseButtonTimer->start( QApplication::doubleClickInterval(), true ); + mEnableCloseButtonTimer->start( TQApplication::doubleClickInterval(), true ); } mHoverCloseButtonTab = t; - connect( mHoverCloseButton, SIGNAL( clicked() ), SLOT( closeButtonClicked() ) ); + connect( mHoverCloseButton, TQT_SIGNAL( clicked() ), TQT_SLOT( closeButtonClicked() ) ); return; } } @@ -211,7 +211,7 @@ void KTabBar::mouseMoveEvent( QMouseEvent *e ) } } - QTabBar::mouseMoveEvent( e ); + TQTabBar::mouseMoveEvent( e ); } void KTabBar::enableCloseButton() @@ -221,17 +221,17 @@ void KTabBar::enableCloseButton() void KTabBar::activateDragSwitchTab() { - QTab *tab = selectTab( mapFromGlobal( QCursor::pos() ) ); + TQTab *tab = selectTab( mapFromGlobal( TQCursor::pos() ) ); if ( tab && mDragSwitchTab == tab ) setCurrentTab( mDragSwitchTab ); mDragSwitchTab = 0; } -void KTabBar::mouseReleaseEvent( QMouseEvent *e ) +void KTabBar::mouseReleaseEvent( TQMouseEvent *e ) { if( e->button() == MidButton ) { if ( mReorderStartTab==-1 ) { - QTab *tab = selectTab( e->pos() ); + TQTab *tab = selectTab( e->pos() ); if( tab ) { emit( mouseMiddleClick( indexOf( tab->identifier() ) ) ); return; @@ -244,42 +244,42 @@ void KTabBar::mouseReleaseEvent( QMouseEvent *e ) mReorderPreviousTab=-1; } } - QTabBar::mouseReleaseEvent( e ); + TQTabBar::mouseReleaseEvent( e ); } -void KTabBar::dragMoveEvent( QDragMoveEvent *e ) +void KTabBar::dragMoveEvent( TQDragMoveEvent *e ) { - QTab *tab = selectTab( e->pos() ); + TQTab *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() ) ) { + if ( accept && tab != TQTabBar::tab( currentTab() ) ) { mDragSwitchTab = tab; - mActivateDragSwitchTabTimer->start( QApplication::doubleClickInterval()*2, true ); + mActivateDragSwitchTabTimer->start( TQApplication::doubleClickInterval()*2, true ); } e->accept( accept ); return; } e->accept( false ); - QTabBar::dragMoveEvent( e ); + TQTabBar::dragMoveEvent( e ); } -void KTabBar::dropEvent( QDropEvent *e ) +void KTabBar::dropEvent( TQDropEvent *e ) { - QTab *tab = selectTab( e->pos() ); + TQTab *tab = selectTab( e->pos() ); if( tab ) { mActivateDragSwitchTabTimer->stop(); mDragSwitchTab = 0; emit( receivedDropEvent( indexOf( tab->identifier() ) , e ) ); return; } - QTabBar::dropEvent( e ); + TQTabBar::dropEvent( e ); } #ifndef QT_NO_WHEELEVENT -void KTabBar::wheelEvent( QWheelEvent *e ) +void KTabBar::wheelEvent( TQWheelEvent *e ) { if ( e->orientation() == Horizontal ) return; @@ -288,16 +288,16 @@ void KTabBar::wheelEvent( QWheelEvent *e ) } #endif -void KTabBar::setTabColor( int id, const QColor& color ) +void KTabBar::setTabColor( int id, const TQColor& color ) { - QTab *t = tab( id ); + TQTab *t = tab( id ); if ( t ) { mTabColors.insert( id, color ); repaint( t->rect(), false ); } } -const QColor &KTabBar::tabColor( int id ) const +const TQColor &KTabBar::tabColor( int id ) const { if ( mTabColors.contains( id ) ) return mTabColors[id]; @@ -305,43 +305,43 @@ const QColor &KTabBar::tabColor( int id ) const return colorGroup().foreground(); } -int KTabBar::insertTab( QTab *t, int index ) +int KTabBar::insertTab( TQTab *t, int index ) { - int res = QTabBar::insertTab( t, index ); + int res = TQTabBar::insertTab( t, index ); if ( mTabCloseActivatePrevious && count() > 2 ) { - QPtrList *tablist = tabList(); + TQPtrList *tablist = tabList(); tablist->insert( count()-2, tablist->take( tablist->findRef( t ) ) ); } return res; } -void KTabBar::removeTab( QTab *t ) +void KTabBar::removeTab( TQTab *t ) { mTabColors.remove( t->identifier() ); - QTabBar::removeTab( t ); + TQTabBar::removeTab( t ); } -void KTabBar::paintLabel( QPainter *p, const QRect& br, - QTab *t, bool has_focus ) const +void KTabBar::paintLabel( TQPainter *p, const TQRect& br, + TQTab *t, bool has_focus ) const { - QRect r = br; + TQRect 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 ); + TQIconSet::Mode mode = ( t->isEnabled() && isEnabled() ) + ? TQIconSet::Normal : TQIconSet::Disabled; + if ( mode == TQIconSet::Normal && has_focus ) + mode = TQIconSet::Active; + TQPixmap pixmap = t->iconSet()->pixmap( TQIconSet::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 inactiveXShift = style().pixelMetric( TQStyle::PM_TabBarTabShiftHorizontal, this ); + int inactiveYShift = style().pixelMetric( TQStyle::PM_TabBarTabShiftVertical, this ); int right = t->text().isEmpty() ? br.right() - pixw : br.left() + 2; @@ -350,20 +350,20 @@ void KTabBar::paintLabel( QPainter *p, const QRect& br, pixmap ); } - QStyle::SFlags flags = QStyle::Style_Default; + TQStyle::SFlags flags = TQStyle::Style_Default; if ( isEnabled() && t->isEnabled() ) - flags |= QStyle::Style_Enabled; + flags |= TQStyle::Style_Enabled; if ( has_focus ) - flags |= QStyle::Style_HasFocus; + flags |= TQStyle::Style_HasFocus; - QColorGroup cg( colorGroup() ); + TQColorGroup cg( colorGroup() ); if ( mTabColors.contains( t->identifier() ) ) - cg.setColor( QColorGroup::Foreground, mTabColors[t->identifier()] ); + cg.setColor( TQColorGroup::Foreground, mTabColors[t->identifier()] ); - style().drawControl( QStyle::CE_TabBarLabel, p, this, r, + style().drawControl( TQStyle::CE_TabBarLabel, p, this, r, t->isEnabled() ? cg : palette().disabled(), - flags, QStyleOption(t) ); + flags, TQStyleOption(t) ); } bool KTabBar::isTabReorderingEnabled() const diff --git a/lib/compatibility/kmdi/qextmdi/ktabbar.h b/lib/compatibility/kmdi/qextmdi/ktabbar.h index 2ea300db..c8f81169 100644 --- a/lib/compatibility/kmdi/qextmdi/ktabbar.h +++ b/lib/compatibility/kmdi/qextmdi/ktabbar.h @@ -21,7 +21,7 @@ #ifndef KTABBAR_H #define KTABBAR_H -#include +#include #include @@ -37,16 +37,16 @@ class KDEUI_EXPORT KTabBar: public QTabBar Q_OBJECT public: - KTabBar( QWidget* parent=0, const char* name=0 ); + KTabBar( TQWidget* parent=0, const char* name=0 ); virtual ~KTabBar(); virtual void setTabEnabled( int, bool ); - const QColor &tabColor( int ) const; - void setTabColor( int, const QColor& ); + const TQColor &tabColor( int ) const; + void setTabColor( int, const TQColor& ); - virtual int insertTab( QTab *, int index = -1 ); - virtual void removeTab( QTab * ); + virtual int insertTab( TQTab *, int index = -1 ); + virtual void removeTab( TQTab * ); void setTabReorderingEnabled( bool enable ); bool isTabReorderingEnabled() const; @@ -61,12 +61,12 @@ public: bool tabCloseActivatePrevious() const; signals: - void contextMenu( int, const QPoint & ); + void contextMenu( int, const TQPoint & ); void mouseDoubleClick( int ); void mouseMiddleClick( int ); void initiateDrag( int ); - void testCanDecode(const QDragMoveEvent *e, bool &accept /* result */); - void receivedDropEvent( int, QDropEvent * ); + void testCanDecode(const TQDragMoveEvent *e, bool &accept /* result */); + void receivedDropEvent( int, TQDropEvent * ); void moveTab( int, int ); void closeRequest( int ); #ifndef QT_NO_WHEELEVENT @@ -74,18 +74,18 @@ signals: #endif protected: - virtual void mouseDoubleClickEvent( QMouseEvent *e ); - virtual void mousePressEvent( QMouseEvent *e ); - virtual void mouseMoveEvent( QMouseEvent *e ); - virtual void mouseReleaseEvent( QMouseEvent *e ); + virtual void mouseDoubleClickEvent( TQMouseEvent *e ); + virtual void mousePressEvent( TQMouseEvent *e ); + virtual void mouseMoveEvent( TQMouseEvent *e ); + virtual void mouseReleaseEvent( TQMouseEvent *e ); #ifndef QT_NO_WHEELEVENT - virtual void wheelEvent( QWheelEvent *e ); + virtual void wheelEvent( TQWheelEvent *e ); #endif - virtual void dragMoveEvent( QDragMoveEvent *e ); - virtual void dropEvent( QDropEvent *e ); + virtual void dragMoveEvent( TQDragMoveEvent *e ); + virtual void dropEvent( TQDropEvent *e ); - virtual void paintLabel( QPainter*, const QRect&, QTab*, bool ) const; + virtual void paintLabel( TQPainter*, const TQRect&, TQTab*, bool ) const; protected slots: virtual void closeButtonClicked(); @@ -94,13 +94,13 @@ protected slots: virtual void activateDragSwitchTab(); private: - QPoint mDragStart; + TQPoint mDragStart; int mReorderStartTab; int mReorderPreviousTab; - QMap mTabColors; - QTab *mHoverCloseButtonTab, *mDragSwitchTab; - QPushButton *mHoverCloseButton; - QTimer *mEnableCloseButtonTimer, *mActivateDragSwitchTabTimer; + TQMap mTabColors; + TQTab *mHoverCloseButtonTab, *mDragSwitchTab; + TQPushButton *mHoverCloseButton; + TQTimer *mEnableCloseButtonTimer, *mActivateDragSwitchTabTimer; bool mHoverCloseButtonEnabled; bool mHoverCloseButtonDelayed; diff --git a/lib/compatibility/kmdi/qextmdi/ktabwidget.cpp b/lib/compatibility/kmdi/qextmdi/ktabwidget.cpp index af73e013..21ed3e82 100644 --- a/lib/compatibility/kmdi/qextmdi/ktabwidget.cpp +++ b/lib/compatibility/kmdi/qextmdi/ktabwidget.cpp @@ -18,8 +18,8 @@ Boston, MA 02110-1301, USA. */ -#include -#include +#include +#include #include #include @@ -37,7 +37,7 @@ public: //holds the full names of the tab, otherwise all we //know about is the shortened name - QStringList m_tabNames; + TQStringList m_tabNames; KTabWidgetPrivate() { m_automaticResizeTabs = false; @@ -48,23 +48,23 @@ public: } }; -KTabWidget::KTabWidget( QWidget *parent, const char *name, WFlags f ) - : QTabWidget( parent, name, f ) +KTabWidget::KTabWidget( TQWidget *parent, const char *name, WFlags f ) + : TQTabWidget( 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 ))); + connect(tabBar(), TQT_SIGNAL(contextMenu( int, const TQPoint & )), TQT_SLOT(contextMenu( int, const TQPoint & ))); + connect(tabBar(), TQT_SIGNAL(mouseDoubleClick( int )), TQT_SLOT(mouseDoubleClick( int ))); + connect(tabBar(), TQT_SIGNAL(mouseMiddleClick( int )), TQT_SLOT(mouseMiddleClick( int ))); + connect(tabBar(), TQT_SIGNAL(initiateDrag( int )), TQT_SLOT(initiateDrag( int ))); + connect(tabBar(), TQT_SIGNAL(testCanDecode(const TQDragMoveEvent *, bool & )), TQT_SIGNAL(testCanDecode(const TQDragMoveEvent *, bool & ))); + connect(tabBar(), TQT_SIGNAL(receivedDropEvent( int, TQDropEvent * )), TQT_SLOT(receivedDropEvent( int, TQDropEvent * ))); + connect(tabBar(), TQT_SIGNAL(moveTab( int, int )), TQT_SLOT(moveTab( int, int ))); + connect(tabBar(), TQT_SIGNAL(closeRequest( int )), TQT_SLOT(closeRequest( int ))); #ifndef QT_NO_WHEELEVENT - connect(tabBar(), SIGNAL(wheelDelta( int )), SLOT(wheelDelta( int ))); + connect(tabBar(), TQT_SIGNAL(wheelDelta( int )), TQT_SLOT(wheelDelta( int ))); #endif } @@ -73,19 +73,19 @@ KTabWidget::~KTabWidget() delete d; } -void KTabWidget::insertTab( QWidget *child, const QString &label, int index ) +void KTabWidget::insertTab( TQWidget *child, const TQString &label, int index ) { - QTabWidget::insertTab( child, label, index ); + TQTabWidget::insertTab( child, label, index ); } -void KTabWidget::insertTab( QWidget *child, const QIconSet& iconset, const QString &label, int index ) +void KTabWidget::insertTab( TQWidget *child, const TQIconSet& iconset, const TQString &label, int index ) { - QTabWidget::insertTab( child, iconset, label, index ); + TQTabWidget::insertTab( child, iconset, label, index ); } -void KTabWidget::insertTab( QWidget *child, QTab *tab, int index ) +void KTabWidget::insertTab( TQWidget *child, TQTab *tab, int index ) { - QTabWidget::insertTab( child, tab, index); + TQTabWidget::insertTab( child, tab, index); if ( d->m_automaticResizeTabs ) { if ( index < 0 || index >= count() ) { d->m_tabNames.append( tab->text() ); @@ -100,8 +100,8 @@ void KTabWidget::insertTab( QWidget *child, QTab *tab, int index ) void KTabWidget::setTabBarHidden( bool hide ) { - QWidget *rightcorner = this->cornerWidget( TopRight ); - QWidget *leftcorner = this->cornerWidget( TopLeft ); + TQWidget *rightcorner = this->cornerWidget( TopRight ); + TQWidget *leftcorner = this->cornerWidget( TopLeft ); if ( hide ) { if ( leftcorner ) leftcorner->hide(); @@ -119,21 +119,21 @@ bool KTabWidget::isTabBarHidden() const return !( tabBar()->isVisible() ); } -void KTabWidget::setTabColor( QWidget *w, const QColor& color ) +void KTabWidget::setTabColor( TQWidget *w, const TQColor& color ) { - QTab *t = tabBar()->tabAt( indexOf( w ) ); + TQTab *t = tabBar()->tabAt( indexOf( w ) ); if (t) { static_cast(tabBar())->setTabColor( t->identifier(), color ); } } -QColor KTabWidget::tabColor( QWidget *w ) const +TQColor KTabWidget::tabColor( TQWidget *w ) const { - QTab *t = tabBar()->tabAt( indexOf( w ) ); + TQTab *t = tabBar()->tabAt( indexOf( w ) ); if (t) { return static_cast(tabBar())->tabColor( t->identifier() ); } else { - return QColor(); + return TQColor(); } } @@ -160,30 +160,30 @@ bool KTabWidget::tabCloseActivatePrevious() const 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() ); + hframe = tabBar()->style().pixelMetric( TQStyle::PM_TabBarTabHSpace, tabBar() ); + overlap = tabBar()->style().pixelMetric( TQStyle::PM_TabBarTabOverlap, tabBar() ); - QFontMetrics fm = tabBar()->fontMetrics(); + TQFontMetrics fm = tabBar()->fontMetrics(); int x = 0; for( int i=0; i < count(); ++i ) { - QString newTitle = d->m_tabNames[ i ]; + TQString newTitle = d->m_tabNames[ i ]; newTitle = KStringHandler::rsqueeze( newTitle, maxLength ).leftJustify( d->m_minLength, ' ' ); - QTab* tab = tabBar()->tabAt( i ); + TQTab* 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(); + iw = tab->iconSet()->pixmap( TQIconSet::Small, TQIconSet::Normal ).width() + 4; + x += ( tabBar()->style().sizeFromContents( TQStyle::CT_TabBarTab, this, + TQSize( QMAX( lw + hframe + iw, TQApplication::globalStrut().width() ), 0 ), + TQStyleOption( tab ) ) ).width(); } return x; } -void KTabWidget::changeTab( QWidget *w, const QString &label ) +void KTabWidget::changeTab( TQWidget *w, const TQString &label ) { - QTabWidget::changeTab( w, label ); + TQTabWidget::changeTab( w, label ); if ( d->m_automaticResizeTabs ) { int index = indexOf( w ); if ( index != -1 ) { @@ -193,9 +193,9 @@ void KTabWidget::changeTab( QWidget *w, const QString &label ) } } -void KTabWidget::changeTab( QWidget *w, const QIconSet &iconset, const QString &label ) +void KTabWidget::changeTab( TQWidget *w, const TQIconSet &iconset, const TQString &label ) { - QTabWidget::changeTab( w, iconset, label ); + TQTabWidget::changeTab( w, iconset, label ); if ( d->m_automaticResizeTabs ) { int index = indexOf( w ); if ( index != -1 ) { @@ -205,34 +205,34 @@ void KTabWidget::changeTab( QWidget *w, const QIconSet &iconset, const QString & } } -QString KTabWidget::label( int index ) const +TQString KTabWidget::label( int index ) const { if ( d->m_automaticResizeTabs ) { if ( index >= 0 && index < count() ) return d->m_tabNames[ index ]; else - return QString::null; + return TQString::null; } else - return QTabWidget::label( index ); + return TQTabWidget::label( index ); } -QString KTabWidget::tabLabel( QWidget * w ) const +TQString KTabWidget::tabLabel( TQWidget * w ) const { if ( d->m_automaticResizeTabs ) { int index = indexOf( w ); if ( index == -1 ) - return QString::null; + return TQString::null; else return d->m_tabNames[ index ]; } else - return QTabWidget::tabLabel( w ); + return TQTabWidget::tabLabel( w ); } -void KTabWidget::setTabLabel( QWidget *w, const QString &l ) +void KTabWidget::setTabLabel( TQWidget *w, const TQString &l ) { - QTabWidget::setTabLabel( w, l ); + TQTabWidget::setTabLabel( w, l ); if ( d->m_automaticResizeTabs ) { int index = indexOf( w ); if ( index != -1 ) { @@ -278,7 +278,7 @@ void KTabWidget::resizeTabs( int changeTabIndex ) void KTabWidget::updateTab( int index ) { - QString title = d->m_automaticResizeTabs ? d->m_tabNames[ index ] : QTabWidget::label( index ); + TQString title = d->m_automaticResizeTabs ? d->m_tabNames[ index ] : TQTabWidget::label( index ); removeTabToolTip( page( index ) ); if ( title.length() > d->m_CurrentMaxLength ) setTabToolTip( page( index ), title ); @@ -286,11 +286,11 @@ void KTabWidget::updateTab( int index ) title = KStringHandler::rsqueeze( title, d->m_CurrentMaxLength ).leftJustify( d->m_minLength, ' ' ); title.replace( '&', "&&" ); - if ( QTabWidget::label( index ) != title ) - QTabWidget::setTabLabel( page( index ), title ); + if ( TQTabWidget::label( index ) != title ) + TQTabWidget::setTabLabel( page( index ), title ); } -void KTabWidget::dragMoveEvent( QDragMoveEvent *e ) +void KTabWidget::dragMoveEvent( TQDragMoveEvent *e ) { if ( isEmptyTabbarSpace( e->pos() ) ) { bool accept = false; @@ -301,20 +301,20 @@ void KTabWidget::dragMoveEvent( QDragMoveEvent *e ) return; } e->accept( false ); - QTabWidget::dragMoveEvent( e ); + TQTabWidget::dragMoveEvent( e ); } -void KTabWidget::dropEvent( QDropEvent *e ) +void KTabWidget::dropEvent( TQDropEvent *e ) { if ( isEmptyTabbarSpace( e->pos() ) ) { emit ( receivedDropEvent( e ) ); return; } - QTabWidget::dropEvent( e ); + TQTabWidget::dropEvent( e ); } #ifndef QT_NO_WHEELEVENT -void KTabWidget::wheelEvent( QWheelEvent *e ) +void KTabWidget::wheelEvent( TQWheelEvent *e ) { if ( e->orientation() == Horizontal ) return; @@ -342,7 +342,7 @@ void KTabWidget::wheelDelta( int delta ) } #endif -void KTabWidget::mouseDoubleClickEvent( QMouseEvent *e ) +void KTabWidget::mouseDoubleClickEvent( TQMouseEvent *e ) { if( e->button() != LeftButton ) return; @@ -351,10 +351,10 @@ void KTabWidget::mouseDoubleClickEvent( QMouseEvent *e ) emit( mouseDoubleClick() ); return; } - QTabWidget::mouseDoubleClickEvent( e ); + TQTabWidget::mouseDoubleClickEvent( e ); } -void KTabWidget::mousePressEvent( QMouseEvent *e ) +void KTabWidget::mousePressEvent( TQMouseEvent *e ) { if ( e->button() == RightButton ) { if ( isEmptyTabbarSpace( e->pos() ) ) { @@ -367,10 +367,10 @@ void KTabWidget::mousePressEvent( QMouseEvent *e ) return; } } - QTabWidget::mousePressEvent( e ); + TQTabWidget::mousePressEvent( e ); } -void KTabWidget::receivedDropEvent( int index, QDropEvent *e ) +void KTabWidget::receivedDropEvent( int index, TQDropEvent *e ) { emit( receivedDropEvent( page( index ), e ) ); } @@ -380,7 +380,7 @@ void KTabWidget::initiateDrag( int index ) emit( initiateDrag( page( index ) ) ); } -void KTabWidget::contextMenu( int index, const QPoint &p ) +void KTabWidget::contextMenu( int index, const TQPoint &p ) { emit( contextMenu( page( index ), p ) ); } @@ -397,25 +397,25 @@ void KTabWidget::mouseMiddleClick( int 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 ); + TQString tablabel = label( from ); + TQWidget *w = page( from ); + TQColor color = tabColor( w ); + TQIconSet tabiconset = tabIconSet( w ); + TQString 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(); + TQTab * t = new TQTab(); t->setText(tablabel); - QTabWidget::insertTab( w, t, to ); + TQTabWidget::insertTab( w, t, to ); if ( d->m_automaticResizeTabs ) { if ( to < 0 || to >= count() ) - d->m_tabNames.append( QString::null ); + d->m_tabNames.append( TQString::null ); else - d->m_tabNames.insert( d->m_tabNames.at( to ), QString::null ); + d->m_tabNames.insert( d->m_tabNames.at( to ), TQString::null ); } w = page( to ); @@ -430,29 +430,29 @@ void KTabWidget::moveTab( int from, int to ) emit ( movedTab( from, to ) ); } -void KTabWidget::removePage( QWidget * w ) { +void KTabWidget::removePage( TQWidget * w ) { if ( d->m_automaticResizeTabs ) { int index = indexOf( w ); if ( index != -1 ) d->m_tabNames.remove( d->m_tabNames.at( index ) ); } - QTabWidget::removePage( w ); + TQTabWidget::removePage( w ); if ( d->m_automaticResizeTabs ) resizeTabs(); } -bool KTabWidget::isEmptyTabbarSpace( const QPoint &p ) const +bool KTabWidget::isEmptyTabbarSpace( const TQPoint &p ) const { - QPoint point( p ); - QSize size( tabBar()->sizeHint() ); + TQPoint point( p ); + TQSize size( tabBar()->sizeHint() ); if ( ( tabPosition()==Top && point.y()< size.height() ) || ( tabPosition()==Bottom && point.y()>(height()-size.height() ) ) ) { - QWidget *rightcorner = cornerWidget( TopRight ); + TQWidget *rightcorner = cornerWidget( TopRight ); if ( rightcorner ) { if ( point.x()>=width()-rightcorner->width() ) return false; } - QWidget *leftcorner = cornerWidget( TopLeft ); + TQWidget *leftcorner = cornerWidget( TopLeft ); if ( leftcorner ) { if ( point.x()<=leftcorner->width() ) return false; @@ -460,7 +460,7 @@ bool KTabWidget::isEmptyTabbarSpace( const QPoint &p ) const } if ( tabPosition()==Bottom ) point.setY( point.y()-( height()-size.height() ) ); - QTab *tab = tabBar()->selectTab( point); + TQTab *tab = tabBar()->selectTab( point); if( !tab ) return true; } @@ -514,9 +514,9 @@ void KTabWidget::closeRequest( int index ) emit( closeRequest( page( index ) ) ); } -void KTabWidget::resizeEvent( QResizeEvent *e ) +void KTabWidget::resizeEvent( TQResizeEvent *e ) { - QTabWidget::resizeEvent( e ); + TQTabWidget::resizeEvent( e ); resizeTabs(); } diff --git a/lib/compatibility/kmdi/qextmdi/ktabwidget.h b/lib/compatibility/kmdi/qextmdi/ktabwidget.h index 634dcda3..3a686fa3 100644 --- a/lib/compatibility/kmdi/qextmdi/ktabwidget.h +++ b/lib/compatibility/kmdi/qextmdi/ktabwidget.h @@ -21,8 +21,8 @@ #ifndef KTABWIDGET_H #define KTABWIDGET_H -#include -#include +#include +#include #include @@ -43,7 +43,7 @@ class KDEUI_EXPORT KTabWidget : public QTabWidget Q_PROPERTY( bool automaticResizeTabs READ automaticResizeTabs WRITE setAutomaticResizeTabs ) public: - KTabWidget( QWidget *parent = 0, const char *name = 0, WFlags f = 0 ); + KTabWidget( TQWidget *parent = 0, const char *name = 0, WFlags f = 0 ); /** * Destructor. */ @@ -51,8 +51,8 @@ public: /*! Set the tab of the given widget to \a color. */ - void setTabColor( QWidget *, const QColor& color ); - QColor tabColor( QWidget * ) const; + void setTabColor( TQWidget *, const TQColor& color ); + TQColor tabColor( TQWidget * ) const; /*! Returns true if tab ordering with the middle mouse button @@ -102,42 +102,42 @@ public: /*! Reimplemented for internal reasons. */ - virtual void insertTab( QWidget *, const QString &, int index = -1 ); + virtual void insertTab( TQWidget *, const TQString &, int index = -1 ); /*! Reimplemented for internal reasons. */ - virtual void insertTab( QWidget *child, const QIconSet& iconset, - const QString &label, int index = -1 ); + virtual void insertTab( TQWidget *child, const TQIconSet& iconset, + const TQString &label, int index = -1 ); /*! Reimplemented for internal reasons. */ - virtual void insertTab( QWidget *, QTab *, int index = -1 ); + virtual void insertTab( TQWidget *, TQTab *, int index = -1 ); /*! Reimplemented for internal reasons. */ - void changeTab( QWidget *, const QString & ); + void changeTab( TQWidget *, const TQString & ); /*! Reimplemented for internal reasons. */ - void changeTab( QWidget *child, const QIconSet& iconset, const QString &label ); + void changeTab( TQWidget *child, const TQIconSet& iconset, const TQString &label ); /*! Reimplemented for internal reasons. */ - QString label( int ) const; + TQString label( int ) const; /*! Reimplemented for internal reasons. */ - QString tabLabel( QWidget * ) const; + TQString tabLabel( TQWidget * ) const; /*! Reimplemented for internal reasons. */ - void setTabLabel( QWidget *, const QString & ); + void setTabLabel( TQWidget *, const TQString & ); public slots: /*! @@ -150,13 +150,13 @@ public slots: Removes the widget, reimplemented for internal reasons (keeping labels in sync). */ - virtual void removePage ( QWidget * w ); + virtual void removePage ( TQWidget * 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. + currentPageIndex() or indexOf( TQWidget * ) 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. @@ -165,7 +165,7 @@ public slots: /*! If \a enable is true, a close button will be shown on mouse hover - over tab icons which will emit signal closeRequest( QWidget * ) + over tab icons which will emit signal closeRequest( TQWidget * ) when pressed. */ void setHoverCloseButton( bool enable ); @@ -186,7 +186,7 @@ public slots: /*! 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 + Does not work reliable with "TQTabWidget* foo=new KTabWidget()" and if you change tabs via the tabbar or by accessing tabs directly. @since 3.4 */ @@ -196,34 +196,34 @@ 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 */); + void testCanDecode(const TQDragMoveEvent *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 * ); + void receivedDropEvent( TQDropEvent * ); /*! Received an drop event on given widget's tab. This signal is only possible after testCanDecode and positive accept result. */ - void receivedDropEvent( QWidget *, QDropEvent * ); + void receivedDropEvent( TQWidget *, TQDropEvent * ); /*! Request to start a drag operation on the given tab. */ - void initiateDrag( QWidget * ); + void initiateDrag( TQWidget * ); /*! The right mouse button was pressed over empty space besides tabbar. */ - void contextMenu( const QPoint & ); + void contextMenu( const TQPoint & ); /*! The right mouse button was pressed over a widget. */ - void contextMenu( QWidget *, const QPoint & ); + void contextMenu( TQWidget *, const TQPoint & ); /*! A tab was moved from first to second index. This signal is only @@ -240,7 +240,7 @@ signals: /*! A double left mouse button click was performed over the widget. */ - void mouseDoubleClick( QWidget * ); + void mouseDoubleClick( TQWidget * ); /*! A middle mouse button click was performed over empty space besides tabbar. @@ -250,29 +250,29 @@ signals: /*! A middle mouse button click was performed over the widget. */ - void mouseMiddleClick( QWidget * ); + void mouseMiddleClick( TQWidget * ); /*! The close button of a widget's tab was clicked. This signal is only possible after you have called setHoverCloseButton( true ). */ - void closeRequest( QWidget * ); + void closeRequest( TQWidget * ); protected: - virtual void mouseDoubleClickEvent( QMouseEvent *e ); - virtual void mousePressEvent( QMouseEvent * ); - virtual void dragMoveEvent( QDragMoveEvent * ); - virtual void dropEvent( QDropEvent * ); + virtual void mouseDoubleClickEvent( TQMouseEvent *e ); + virtual void mousePressEvent( TQMouseEvent * ); + virtual void dragMoveEvent( TQDragMoveEvent * ); + virtual void dropEvent( TQDropEvent * ); unsigned int tabBarWidthForMaxChars( uint maxLength ); #ifndef QT_NO_WHEELEVENT - virtual void wheelEvent( QWheelEvent *e ); + virtual void wheelEvent( TQWheelEvent *e ); #endif - virtual void resizeEvent( QResizeEvent * ); + virtual void resizeEvent( TQResizeEvent * ); protected slots: - virtual void receivedDropEvent( int, QDropEvent * ); + virtual void receivedDropEvent( int, TQDropEvent * ); virtual void initiateDrag( int ); - virtual void contextMenu( int, const QPoint & ); + virtual void contextMenu( int, const TQPoint & ); virtual void mouseDoubleClick( int ); virtual void mouseMiddleClick( int ); virtual void closeRequest( int ); @@ -281,7 +281,7 @@ protected slots: #endif private: - bool isEmptyTabbarSpace( const QPoint & ) const; + bool isEmptyTabbarSpace( const TQPoint & ) const; void resizeTabs( int changedTabIndex = -1 ); void updateTab( int index ); diff --git a/lib/compatibility/knewstuff/downloaddialog.cpp b/lib/compatibility/knewstuff/downloaddialog.cpp index be3cf66d..b14ff38b 100644 --- a/lib/compatibility/knewstuff/downloaddialog.cpp +++ b/lib/compatibility/knewstuff/downloaddialog.cpp @@ -37,28 +37,28 @@ #include #include -#include -#include -#include -#include -#include -#include // hack +#include +#include +#include +#include +#include +#include // 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 ) : + NumSortListViewItem( TQListView * parent, TQString label1, TQString label2 = TQString::null, TQString label3 = TQString::null, TQString label4 = TQString::null, TQString label5 = TQString::null, TQString label6 = TQString::null, TQString label7 = TQString::null, TQString label8 = TQString::null ) : KListViewItem( parent, label1, label2, label3, label4, label5, label6, label7, label8 ) { } - QString key(int col, bool asc) const { + TQString key(int col, bool asc) const { if (col == 2) { - QString s; + TQString s; s.sprintf("%08d", text(col).toInt()); return s; } @@ -67,21 +67,21 @@ class NumSortListViewItem : public KListViewItem }; // BEGIN deprecated for KDE 4 -DownloadDialog::DownloadDialog(Engine *engine, QWidget *) +DownloadDialog::DownloadDialog(Engine *engine, TQWidget *) : KDialogBase(KDialogBase::IconList, i18n("Get Hot New Stuff"), KDialogBase::Close, KDialogBase::Close) { init(engine); } -DownloadDialog::DownloadDialog(QWidget *) +DownloadDialog::DownloadDialog(TQWidget *) : KDialogBase(KDialogBase::IconList, i18n("Get Hot New Stuff"), KDialogBase::Close, KDialogBase::Close) { init(0); } -void DownloadDialog::open(QString type) +void DownloadDialog::open(TQString type) { DownloadDialog d; d.setType(type); @@ -90,14 +90,14 @@ void DownloadDialog::open(QString type) } // END deprecated for KDE 4 -DownloadDialog::DownloadDialog(Engine *engine, QWidget *, const QString& caption) +DownloadDialog::DownloadDialog(Engine *engine, TQWidget *, const TQString& caption) : KDialogBase(KDialogBase::IconList, (caption.isNull() ? i18n("Get Hot New Stuff") : caption), KDialogBase::Close, KDialogBase::Close) { init(engine); } -DownloadDialog::DownloadDialog(QWidget *, const QString& caption) +DownloadDialog::DownloadDialog(TQWidget *, const TQString& caption) : KDialogBase(KDialogBase::IconList, (caption.isNull() ? i18n("Get Hot New Stuff") : caption), KDialogBase::Close, KDialogBase::Close) { @@ -111,12 +111,12 @@ void DownloadDialog::init(Engine *engine) m_engine = engine; m_page = NULL; - connect(this, SIGNAL(aboutToShowPage(QWidget*)), SLOT(slotPage(QWidget*))); + connect(this, TQT_SIGNAL(aboutToShowPage(TQWidget*)), TQT_SLOT(slotPage(TQWidget*))); if(!engine) { m_loader = new ProviderLoader(this); - connect(m_loader, SIGNAL(providersLoaded(Provider::List*)), SLOT(slotProviders(Provider::List*))); + connect(m_loader, TQT_SIGNAL(providersLoaded(Provider::List*)), TQT_SLOT(slotProviders(Provider::List*))); } } @@ -129,17 +129,17 @@ void DownloadDialog::load() m_loader->load(m_filter, m_providerlist); } -void DownloadDialog::load(QString providerList) +void DownloadDialog::load(TQString providerList) { m_loader->load(m_filter, providerList); } void DownloadDialog::clear() { - QMap* >::Iterator it; + TQMap* >::Iterator it; for(it = m_map.begin(); it != m_map.end(); ++it) { - QValueList *v = it.data(); + TQValueList *v = it.data(); kdDebug() << "clear listviews in " << v << endl; if(v) { @@ -158,7 +158,7 @@ void DownloadDialog::clear() void DownloadDialog::slotProviders(Provider::List *list) { Provider *p; - /*QFrame *frame;*/ + /*TQFrame *frame;*/ for(p = list->first(); p; p = list->next()) { @@ -175,19 +175,19 @@ void DownloadDialog::slotProviders(Provider::List *list) void DownloadDialog::addProvider(Provider *p) { - QFrame *frame; + TQFrame *frame; KTabCtl *ctl; - QWidget *w_d, *w_r, *w_l; - QWidget *w2; + TQWidget *w_d, *w_r, *w_l; + TQWidget *w2; KListView *lvtmp_r, *lvtmp_d, *lvtmp_l; - QTextBrowser *rt; - QString tmp; + TQTextBrowser *rt; + TQString tmp; int ret; - QPixmap pix; + TQPixmap pix; if(m_map.count() == 0) { - frame = addPage(i18n("Welcome"), i18n("Welcome"), QPixmap("")); + frame = addPage(i18n("Welcome"), i18n("Welcome"), TQPixmap("")); delete frame; } @@ -196,15 +196,15 @@ void DownloadDialog::addProvider(Provider *p) ret = true; if(!p->icon().isValid()) ret = false; else ret = KIO::NetAccess::download(p->icon(), tmp, this); - if(ret) pix = QPixmap(tmp); + if(ret) pix = TQPixmap(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); + w2 = new TQWidget(frame); + w_d = new TQWidget(frame); + w_r = new TQWidget(frame); + w_l = new TQWidget(frame); ctl = new KTabCtl(frame); ctl->addTab(w_r, i18n("Highest Rated")); @@ -212,9 +212,9 @@ void DownloadDialog::addProvider(Provider *p) ctl->addTab(w_l, i18n("Latest")); m_curtab = 0; - connect(ctl, SIGNAL(tabSelected(int)), SLOT(slotTab(int))); + connect(ctl, TQT_SIGNAL(tabSelected(int)), TQT_SLOT(slotTab(int))); - QHBoxLayout *box = new QHBoxLayout(frame); + TQHBoxLayout *box = new TQHBoxLayout(frame); box->add(ctl); lvtmp_r = new KListView(w_r); @@ -235,40 +235,40 @@ void DownloadDialog::addProvider(Provider *p) 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())); + connect(lvtmp_r, TQT_SIGNAL(selectionChanged()), TQT_SLOT(slotSelected())); + connect(lvtmp_d, TQT_SIGNAL(selectionChanged()), TQT_SLOT(slotSelected())); + connect(lvtmp_l, TQT_SIGNAL(selectionChanged()), TQT_SLOT(slotSelected())); - rt = new QTextBrowser(frame); + rt = new TQTextBrowser(frame); rt->setMinimumWidth(150); - QPushButton *in = new QPushButton(i18n("Install"), frame); - QPushButton *de = new QPushButton(i18n("Details"), frame); + TQPushButton *in = new TQPushButton(i18n("Install"), frame); + TQPushButton *de = new TQPushButton(i18n("Details"), frame); in->setEnabled(false); de->setEnabled(false); box->addSpacing(spacingHint()); - QVBoxLayout *vbox = new QVBoxLayout(box); + TQVBoxLayout *vbox = new TQVBoxLayout(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())); + connect(in, TQT_SIGNAL(clicked()), TQT_SLOT(slotInstall())); + connect(de, TQT_SIGNAL(clicked()), TQT_SLOT(slotDetails())); - QVBoxLayout *box2 = new QVBoxLayout(w_r); + TQVBoxLayout *box2 = new TQVBoxLayout(w_r); box2->add(lvtmp_r); - QVBoxLayout *box3 = new QVBoxLayout(w_d); + TQVBoxLayout *box3 = new TQVBoxLayout(w_d); box3->add(lvtmp_d); - QVBoxLayout *box4 = new QVBoxLayout(w_l); + TQVBoxLayout *box4 = new TQVBoxLayout(w_l); box4->add(lvtmp_l); - QValueList *v = new QValueList; + TQValueList *v = new TQValueList; *v << lvtmp_r << lvtmp_d << lvtmp_l; m_map[frame] = v; m_rts[frame] = rt; - QValueList *vb = new QValueList; + TQValueList *vb = new TQValueList; *vb << in << de; m_buttons[frame] = vb; m_providers[frame] = p; @@ -277,13 +277,13 @@ void DownloadDialog::addProvider(Provider *p) if(m_engine) slotPage(frame); - QTimer::singleShot(100, this, SLOT(slotFinish())); + TQTimer::singleShot(100, this, TQT_SLOT(slotFinish())); } void DownloadDialog::slotResult(KIO::Job *job) { - QDomDocument dom; - QDomElement knewstuff; + TQDomDocument dom; + TQDomElement knewstuff; kdDebug() << "got data: " << m_data[job] << endl; @@ -292,9 +292,9 @@ void DownloadDialog::slotResult(KIO::Job *job) dom.setContent(m_data[job]); knewstuff = dom.documentElement(); - for(QDomNode pn = knewstuff.firstChild(); !pn.isNull(); pn = pn.nextSibling()) + for(TQDomNode pn = knewstuff.firstChild(); !pn.isNull(); pn = pn.nextSibling()) { - QDomElement stuff = pn.toElement(); + TQDomElement stuff = pn.toElement(); kdDebug() << "element: " << stuff.tagName() << endl; @@ -323,8 +323,8 @@ void DownloadDialog::slotResult(KIO::Job *job) int DownloadDialog::installStatus(Entry *entry) { - QDate date; - QString datestring; + TQDate date; + TQString datestring; int installed; kapp->config()->setGroup("KNewStuffStatus"); @@ -332,7 +332,7 @@ int DownloadDialog::installStatus(Entry *entry) if(datestring.isNull()) installed = 0; else { - date = QDate::fromString(datestring, Qt::ISODate); + date = TQDate::fromString(datestring, Qt::ISODate); if(!date.isValid()) installed = 0; else if(date < entry->releaseDate()) installed = -1; else installed = 1; @@ -343,14 +343,14 @@ int DownloadDialog::installStatus(Entry *entry) void DownloadDialog::addEntry(Entry *entry) { - QPixmap pix; + TQPixmap pix; int installed; /*if(m_engine) { if(m_map.count() == 0) { - m_frame = addPage(i18n("Welcome"), i18n("Welcome"), QPixmap("")); + m_frame = addPage(i18n("Welcome"), i18n("Welcome"), TQPixmap("")); Provider *p = new Provider(); p->setName(i18n("Generic")); addProvider(p); @@ -361,12 +361,12 @@ void DownloadDialog::addEntry(Entry *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(); + else pix = TQPixmap(); KListViewItem *tmp_r = new KListViewItem(lv_r, - entry->name(), entry->version(), QString("%1").arg(entry->rating())); + entry->name(), entry->version(), TQString("%1").arg(entry->rating())); KListViewItem *tmp_d = new NumSortListViewItem(lv_d, - entry->name(), entry->version(), QString("%1").arg(entry->downloads())); + entry->name(), entry->version(), TQString("%1").arg(entry->downloads())); KListViewItem *tmp_l = new KListViewItem(lv_l, entry->name(), entry->version(), KGlobal::locale()->formatDate(entry->releaseDate())); @@ -379,10 +379,10 @@ void DownloadDialog::addEntry(Entry *entry) kdDebug() << "added entry " << entry->name() << endl; } -void DownloadDialog::slotData(KIO::Job *job, const QByteArray &a) +void DownloadDialog::slotData(KIO::Job *job, const TQByteArray &a) { - QCString tmp(a, a.size() + 1); - m_data[job].append(QString::fromUtf8(tmp)); + TQCString tmp(a, a.size() + 1); + m_data[job].append(TQString::fromUtf8(tmp)); } void DownloadDialog::slotDetails() @@ -390,9 +390,9 @@ void DownloadDialog::slotDetails() Entry *e = getEntry(); if(!e) return; - QString lang = KGlobal::locale()->language(); + TQString lang = KGlobal::locale()->language(); - QString info = i18n + TQString info = i18n ( "Name: %1\n" "Author: %2\n" @@ -447,7 +447,7 @@ void DownloadDialog::slotInstall() 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*))); + connect(job, TQT_SIGNAL(result(KIO::Job*)), TQT_SLOT(slotInstalled(KIO::Job*))); } } @@ -457,7 +457,7 @@ void DownloadDialog::install(Entry *e) kapp->config()->writeEntry(m_entryname, e->releaseDate().toString(Qt::ISODate)); kapp->config()->sync(); - QPixmap pix = KGlobal::iconLoader()->loadIcon("ok", KIcon::Small); + TQPixmap 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); @@ -466,7 +466,7 @@ void DownloadDialog::install(Entry *e) if(m_entryitem) m_entryitem->setPixmap(0, pix); - QPushButton *in; + TQPushButton *in; in = *(m_buttons[m_page]->at(0)); if(in) in->setEnabled(false); } @@ -505,29 +505,29 @@ void DownloadDialog::slotTab(int tab) void DownloadDialog::slotSelected() { - QString tmp; + TQString tmp; bool enabled; Entry *e = getEntry(); - QString lang = KGlobal::locale()->language(); + TQString lang = KGlobal::locale()->language(); if(e) { if(!e->preview(lang).isValid()) { - m_rt->setText(QString("%1
%2
%3

%4
(%5)").arg( + m_rt->setText(TQString("%1
%2
%3

%4
(%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("%1
%2
%3


%5
(%6)").arg( + m_rt->setText(TQString("%1
%2
%3


%5
(%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; + TQPushButton *de, *in; in = *(m_buttons[m_page]->at(0)); de = *(m_buttons[m_page]->at(1)); if(in) in->setEnabled(enabled); @@ -552,7 +552,7 @@ Entry *DownloadDialog::getEntry() return 0; } -void DownloadDialog::slotPage(QWidget *w) +void DownloadDialog::slotPage(TQWidget *w) { Provider *p; @@ -589,17 +589,17 @@ void DownloadDialog::loadProvider(Provider *p) 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&))); + connect(job, TQT_SIGNAL(result(KIO::Job*)), TQT_SLOT(slotResult(KIO::Job*))); + connect(job, TQT_SIGNAL(data(KIO::Job*, const TQByteArray&)), + TQT_SLOT(slotData(KIO::Job*, const TQByteArray&))); } -void DownloadDialog::setType(QString type) +void DownloadDialog::setType(TQString type) { m_filter = type; } -void DownloadDialog::setProviderList(const QString& providerList) +void DownloadDialog::setProviderList(const TQString& providerList) { m_providerlist = providerList; } @@ -612,7 +612,7 @@ void DownloadDialog::slotApply() { } -void DownloadDialog::open(const QString& type, const QString& caption) +void DownloadDialog::open(const TQString& type, const TQString& caption) { DownloadDialog d(0, caption); d.setType(type); diff --git a/lib/compatibility/knewstuff/downloaddialog.h b/lib/compatibility/knewstuff/downloaddialog.h index 34b2b22b..81f88de4 100644 --- a/lib/compatibility/knewstuff/downloaddialog.h +++ b/lib/compatibility/knewstuff/downloaddialog.h @@ -66,7 +66,7 @@ class KDE_EXPORT DownloadDialog : public KDialogBase @param parent the parent window @param caption the dialog caption */ - DownloadDialog(Engine *engine, QWidget *parent, const QString& caption); + DownloadDialog(Engine *engine, TQWidget *parent, const TQString& caption); /** Alternative constructor. @@ -75,7 +75,7 @@ class KDE_EXPORT DownloadDialog : public KDialogBase @param parent the parent window @param caption the dialog caption */ - DownloadDialog(QWidget *parent, const QString& caption); + DownloadDialog(TQWidget *parent, const TQString& caption); /** Destructor. @@ -87,8 +87,8 @@ class KDE_EXPORT DownloadDialog : public KDialogBase @param type a Hotstuff data type such as "korganizer/calendar" */ - void setType(QString type); - // ### KDE 4.0: use const QString& + void setType(TQString type); + // ### KDE 4.0: use const TQString& /** Fetches descriptions of all available data, optionally considering @@ -104,7 +104,7 @@ class KDE_EXPORT DownloadDialog : public KDialogBase @since 3.4 */ - void setProviderList(const QString& providerList); + void setProviderList(const TQString& providerList); /** Fetches descriptions of all available data, optionally considering @@ -114,7 +114,7 @@ class KDE_EXPORT DownloadDialog : public KDialogBase 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 + void load(TQString providerList); // KDE4: merge with load() above /** Adds another provider to the download dialog. @@ -147,7 +147,7 @@ class KDE_EXPORT DownloadDialog : public KDialogBase @param type a data type such as "korganizer/calendar" @param caption the dialog caption */ - static void open(const QString& type, const QString& caption); + static void open(const TQString& type, const TQString& caption); /** Constructor. @@ -156,7 +156,7 @@ class KDE_EXPORT DownloadDialog : public KDialogBase dialog should create an engine on its own @param parent the parent window */ - DownloadDialog(Engine *engine, QWidget *parent = 0); + DownloadDialog(Engine *engine, TQWidget *parent = 0); // ### KDE 4.0: remove and make caption/parent argument optional /** @@ -165,7 +165,7 @@ class KDE_EXPORT DownloadDialog : public KDialogBase @param parent the parent window */ - DownloadDialog(QWidget *parent = 0); + DownloadDialog(TQWidget *parent = 0); // ### KDE 4.0: remove and make caption/parent argument optional /** @@ -176,7 +176,7 @@ class KDE_EXPORT DownloadDialog : public KDialogBase @param type a data type such as "korganizer/calendar" */ - static void open(QString type); + static void open(TQString type); // ### KDE 4.0: remove and make caption/parent argument optional public slots: @@ -193,13 +193,13 @@ class KDE_EXPORT DownloadDialog : public KDialogBase private slots: void slotResult(KIO::Job *job); - void slotData(KIO::Job *job, const QByteArray &a); + void slotData(KIO::Job *job, const TQByteArray &a); void slotInstall(); void slotDetails(); void slotInstalled(KIO::Job *job); void slotTab(int tab); void slotSelected(); - void slotPage(QWidget *w); + void slotPage(TQWidget *w); void slotFinish(); private: @@ -210,25 +210,25 @@ class KDE_EXPORT DownloadDialog : public KDialogBase int installStatus(Entry *e); ProviderLoader *m_loader; - QString m_entryname; + TQString m_entryname; KListView *lv_r, *lv_d, *lv_l; - QTextBrowser *m_rt; - QFrame *m_frame; - QListViewItem *m_entryitem; - QPtrList m_entries; + TQTextBrowser *m_rt; + TQFrame *m_frame; + TQListViewItem *m_entryitem; + TQPtrList m_entries; Entry *m_entry; KNewStuffGeneric *m_s; int m_curtab; - QMap* > m_map; - QMap m_providers; - QMap m_rts; - QMap* > m_buttons; - QMap m_jobs; - QMap m_data; - QString m_filter; - QString m_providerlist; + TQMap* > m_map; + TQMap m_providers; + TQMap m_rts; + TQMap* > m_buttons; + TQMap m_jobs; + TQMap m_data; + TQString m_filter; + TQString m_providerlist; Engine *m_engine; - QWidget *m_page; + TQWidget *m_page; }; } diff --git a/lib/compatibility/knewstuff/engine.cpp b/lib/compatibility/knewstuff/engine.cpp index c141aeeb..ace0b75e 100644 --- a/lib/compatibility/knewstuff/engine.cpp +++ b/lib/compatibility/knewstuff/engine.cpp @@ -18,9 +18,9 @@ Boston, MA 02110-1301, USA. */ -#include -#include -#include +#include +#include +#include #include #include @@ -39,8 +39,8 @@ using namespace KNS; -Engine::Engine( KNewStuff *newStuff, const QString &type, - QWidget *parentWidget ) : +Engine::Engine( KNewStuff *newStuff, const TQString &type, + TQWidget *parentWidget ) : mParentWidget( parentWidget ), mDownloadDialog( 0 ), mUploadDialog( 0 ), mProviderDialog( 0 ), mUploadProvider( 0 ), mNewStuff( newStuff ), mType( type ) @@ -50,8 +50,8 @@ Engine::Engine( KNewStuff *newStuff, const QString &type, mNewStuffList.setAutoDelete( true ); } -Engine::Engine( KNewStuff *newStuff, const QString &type, - const QString &providerList, QWidget *parentWidget ) : +Engine::Engine( KNewStuff *newStuff, const TQString &type, + const TQString &providerList, TQWidget *parentWidget ) : mParentWidget( parentWidget ), mDownloadDialog( 0 ), mUploadDialog( 0 ), mProviderDialog( 0 ), mUploadProvider( 0 ), @@ -75,8 +75,8 @@ void Engine::download() kdDebug(5850) << "Engine::download()" << endl; connect( mProviderLoader, - SIGNAL( providersLoaded( Provider::List * ) ), - SLOT( getMetaInformation( Provider::List * ) ) ); + TQT_SIGNAL( providersLoaded( Provider::List * ) ), + TQT_SLOT( getMetaInformation( Provider::List * ) ) ); mProviderLoader->load( mType, mProviderList ); } @@ -97,25 +97,25 @@ void Engine::getMetaInformation( Provider::List *providers ) 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 & ) ) ); + connect( job, TQT_SIGNAL( result( KIO::Job * ) ), + TQT_SLOT( slotNewStuffJobResult( KIO::Job * ) ) ); + connect( job, TQT_SIGNAL( data( KIO::Job *, const TQByteArray & ) ), + TQT_SLOT( slotNewStuffJobData( KIO::Job *, const TQByteArray & ) ) ); mNewStuffJobData.insert( job, "" ); mProviderJobs[ job ] = p; } } -void Engine::slotNewStuffJobData( KIO::Job *job, const QByteArray &data ) +void Engine::slotNewStuffJobData( KIO::Job *job, const TQByteArray &data ) { if ( data.isEmpty() ) return; kdDebug(5850) << "Engine:slotNewStuffJobData()" << endl; - QCString str( data, data.size() + 1 ); + TQCString str( data, data.size() + 1 ); - mNewStuffJobData[ job ].append( QString::fromUtf8( str ) ); + mNewStuffJobData[ job ].append( TQString::fromUtf8( str ) ); } void Engine::slotNewStuffJobResult( KIO::Job *job ) @@ -124,25 +124,25 @@ void Engine::slotNewStuffJobResult( KIO::Job *job ) kdDebug(5850) << "Error downloading new stuff descriptions." << endl; job->showErrorDialog( mParentWidget ); } else { - QString knewstuffDoc = mNewStuffJobData[ job ]; + TQString knewstuffDoc = mNewStuffJobData[ job ]; kdDebug(5850) << "---START---" << endl << knewstuffDoc << "---END---" << endl; mDownloadDialog->addProvider( mProviderJobs[ job ] ); - QDomDocument doc; + TQDomDocument doc; if ( !doc.setContent( knewstuffDoc ) ) { kdDebug(5850) << "Error parsing knewstuff.xml." << endl; return; } else { - QDomElement knewstuff = doc.documentElement(); + TQDomElement knewstuff = doc.documentElement(); if ( knewstuff.isNull() ) { kdDebug(5850) << "No document in knewstuffproviders.xml." << endl; } else { - QDomNode p; + TQDomNode p; for ( p = knewstuff.firstChild(); !p.isNull(); p = p.nextSibling() ) { - QDomElement stuff = p.toElement(); + TQDomElement stuff = p.toElement(); if ( stuff.tagName() != "stuff" ) continue; if ( stuff.attribute("type", mType) != mType ) continue; @@ -193,8 +193,8 @@ void Engine::download( Entry *entry ) 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 * ) ) ); + connect( job, TQT_SIGNAL( result( KIO::Job * ) ), + TQT_SLOT( slotDownloadJobResult( KIO::Job * ) ) ); } void Engine::slotDownloadJobResult( KIO::Job *job ) @@ -217,14 +217,14 @@ void Engine::slotDownloadJobResult( KIO::Job *job ) } } -void Engine::upload(const QString &fileName, const QString &previewName ) +void Engine::upload(const TQString &fileName, const TQString &previewName ) { mUploadFile = fileName; mPreviewFile = previewName; connect( mProviderLoader, - SIGNAL( providersLoaded( Provider::List * ) ), - SLOT( selectUploadProvider( Provider::List * ) ) ); + TQT_SIGNAL( providersLoaded( Provider::List * ) ), + TQT_SLOT( selectUploadProvider( Provider::List * ) ) ); mProviderLoader->load( mType ); } @@ -264,7 +264,7 @@ void Engine::upload( Entry *entry ) { if ( mUploadFile.isNull()) { mUploadFile = entry->fullName(); - mUploadFile = locateLocal( "data", QString(kapp->instanceName()) + "/upload/" + mUploadFile ); + mUploadFile = locateLocal( "data", TQString(kapp->instanceName()) + "/upload/" + mUploadFile ); if ( !mNewStuff->createUploadFile( mUploadFile ) ) { KMessageBox::error( mParentWidget, i18n("Unable to create file to upload.") ); @@ -273,8 +273,8 @@ void Engine::upload( Entry *entry ) } } - QString lang = entry->langs().first(); - QFileInfo fi( mUploadFile ); + TQString lang = entry->langs().first(); + TQFileInfo fi( mUploadFile ); entry->setPayload( KURL::fromPathOrURL( fi.fileName() ), lang ); if ( !createMetaFile( entry ) ) { @@ -282,7 +282,7 @@ void Engine::upload( Entry *entry ) return; } - QString text = i18n("The files to be uploaded have been created at:\n"); + TQString 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) ); @@ -291,7 +291,7 @@ void Engine::upload( Entry *entry ) 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"); + TQString caption = i18n("Upload Files"); if ( mUploadProvider->noUpload() ) { KURL noUploadUrl = mUploadProvider->noUploadUrl(); @@ -314,8 +314,8 @@ void Engine::upload( Entry *entry ) destination.setFileName( fi.fileName() ); KIO::FileCopyJob *job = KIO::file_copy( KURL::fromPathOrURL( mUploadFile ), destination ); - connect( job, SIGNAL( result( KIO::Job * ) ), - SLOT( slotUploadPayloadJobResult( KIO::Job * ) ) ); + connect( job, TQT_SIGNAL( result( KIO::Job * ) ), + TQT_SLOT( slotUploadPayloadJobResult( KIO::Job * ) ) ); } else { emit uploadFinished( false ); } @@ -324,10 +324,10 @@ void Engine::upload( Entry *entry ) bool Engine::createMetaFile( Entry *entry ) { - QDomDocument doc("knewstuff"); + TQDomDocument doc("knewstuff"); doc.appendChild( doc.createProcessingInstruction( "xml", "version=\"1.0\" encoding=\"UTF-8\"" ) ); - QDomElement de = doc.createElement("knewstuff"); + TQDomElement de = doc.createElement("knewstuff"); doc.appendChild( de ); entry->setType(type()); @@ -338,17 +338,17 @@ bool Engine::createMetaFile( Entry *entry ) if ( mUploadMetaFile.isNull() ) { mUploadMetaFile = entry->fullName() + ".meta"; - mUploadMetaFile = locateLocal( "data", QString(kapp->instanceName()) + "/upload/" + mUploadMetaFile ); + mUploadMetaFile = locateLocal( "data", TQString(kapp->instanceName()) + "/upload/" + mUploadMetaFile ); } - QFile f( mUploadMetaFile ); + TQFile f( mUploadMetaFile ); if ( !f.open( IO_WriteOnly ) ) { - mUploadMetaFile = QString::null; + mUploadMetaFile = TQString::null; return false; } - QTextStream ts( &f ); - ts.setEncoding( QTextStream::UnicodeUTF8 ); + TQTextStream ts( &f ); + ts.setEncoding( TQTextStream::UnicodeUTF8 ); ts << doc.toString(); f.close(); @@ -370,14 +370,14 @@ void Engine::slotUploadPayloadJobResult( KIO::Job *job ) return; } - QFileInfo fi( mPreviewFile ); + TQFileInfo 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 * ) ) ); + connect( newJob, TQT_SIGNAL( result( KIO::Job * ) ), + TQT_SLOT( slotUploadPreviewJobResult( KIO::Job * ) ) ); } void Engine::slotUploadPreviewJobResult( KIO::Job *job ) @@ -389,19 +389,19 @@ void Engine::slotUploadPreviewJobResult( KIO::Job *job ) return; } - QFileInfo fi( mUploadMetaFile ); + TQFileInfo 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 * ) ) ); + connect( newJob, TQT_SIGNAL( result( KIO::Job * ) ), + TQT_SLOT( slotUploadMetaJobResult( KIO::Job * ) ) ); } void Engine::slotUploadMetaJobResult( KIO::Job *job ) { - mUploadMetaFile = QString::null; + mUploadMetaFile = TQString::null; if ( job->error() ) { kdDebug(5850) << "Error uploading new stuff metadata." << endl; job->showErrorDialog( mParentWidget ); diff --git a/lib/compatibility/knewstuff/engine.h b/lib/compatibility/knewstuff/engine.h index dd3f2b30..42f86e64 100644 --- a/lib/compatibility/knewstuff/engine.h +++ b/lib/compatibility/knewstuff/engine.h @@ -20,9 +20,9 @@ #ifndef KNEWSTUFF_ENGINE_H #define KNEWSTUFF_ENGINE_H -#include -#include -#include +#include +#include +#include #include "entry.h" #include "provider.h" @@ -59,7 +59,7 @@ class Engine : public QObject @param type the Hotstuff data type such as "korganizer/calendar" @param parentWidget the parent window */ - Engine( KNewStuff *newStuff, const QString &type, QWidget *parentWidget = 0 ); + Engine( KNewStuff *newStuff, const TQString &type, TQWidget *parentWidget = 0 ); /** Constructor. @@ -68,7 +68,7 @@ class Engine : public QObject @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 ); + Engine( KNewStuff *newStuff, const TQString &type, const TQString &providerList, TQWidget *parentWidget = 0 ); /** Destructor. @@ -80,14 +80,14 @@ class Engine : public QObject @return the Hotstuff data type */ - QString type() const { return mType; } + TQString type() const { return mType; } /** Returns the previously set parent widget. @return parent widget */ - QWidget *parentWidget() const { return mParentWidget; } + TQWidget *parentWidget() const { return mParentWidget; } /** Initiates the download process, retrieving provider lists and invoking @@ -102,7 +102,7 @@ class Engine : public QObject @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 ); + void upload( const TQString &fileName = TQString::null, const TQString &previewName = TQString::null ); /** Downloads the specified data file. @@ -142,7 +142,7 @@ class Engine : public QObject void getMetaInformation( Provider::List *providers ); void selectUploadProvider( Provider::List *providers ); - void slotNewStuffJobData( KIO::Job *job, const QByteArray &data ); + void slotNewStuffJobData( KIO::Job *job, const TQByteArray &data ); void slotNewStuffJobResult( KIO::Job *job ); void slotDownloadJobResult( KIO::Job *job ); @@ -155,31 +155,31 @@ class Engine : public QObject bool createMetaFile( Entry * ); private: - QWidget *mParentWidget; + TQWidget *mParentWidget; ProviderLoader *mProviderLoader; - QMap mNewStuffJobData; - QMap mProviderJobs; + TQMap mNewStuffJobData; + TQMap mProviderJobs; - QPtrList mNewStuffList; + TQPtrList mNewStuffList; DownloadDialog *mDownloadDialog; UploadDialog *mUploadDialog; ProviderDialog *mProviderDialog; - QString mDownloadDestination; + TQString mDownloadDestination; Provider *mUploadProvider; - QString mUploadMetaFile; - QString mUploadFile; - QString mPreviewFile; - QString mProviderList; + TQString mUploadMetaFile; + TQString mUploadFile; + TQString mPreviewFile; + TQString mProviderList; KNewStuff *mNewStuff; - QString mType; + TQString mType; bool mIgnoreInstallResult; }; diff --git a/lib/compatibility/knewstuff/entry.cpp b/lib/compatibility/knewstuff/entry.cpp index 1d4f7e72..ef9d3a88 100644 --- a/lib/compatibility/knewstuff/entry.cpp +++ b/lib/compatibility/knewstuff/entry.cpp @@ -26,12 +26,12 @@ using namespace KNS; Entry::Entry() : - mRelease( 0 ), mReleaseDate( QDate::currentDate() ), mRating( 0 ), + mRelease( 0 ), mReleaseDate( TQDate::currentDate() ), mRating( 0 ), mDownloads( 0 ) { } -Entry::Entry( const QDomElement &e ) +Entry::Entry( const TQDomElement &e ) { parseDomElement( e ); } @@ -41,78 +41,78 @@ Entry::~Entry() } -void Entry::setName( const QString &name ) +void Entry::setName( const TQString &name ) { mName = name; } -QString Entry::name() const +TQString Entry::name() const { return mName; } -void Entry::setType( const QString &type ) +void Entry::setType( const TQString &type ) { mType = type; } -QString Entry::type() const +TQString Entry::type() const { return mType; } -void Entry::setAuthor( const QString &author ) +void Entry::setAuthor( const TQString &author ) { mAuthor = author; } -QString Entry::author() const +TQString Entry::author() const { return mAuthor; } -void Entry::setLicence( const QString &license ) +void Entry::setLicence( const TQString &license ) { mLicence = license; } -QString Entry::license() const +TQString Entry::license() const { return mLicence; } -void Entry::setSummary( const QString &text, const QString &lang ) +void Entry::setSummary( const TQString &text, const TQString &lang ) { mSummaryMap.insert( lang, text ); if ( mLangs.find( lang ) == mLangs.end() ) mLangs.append( lang ); } -QString Entry::summary( const QString &lang ) const +TQString Entry::summary( const TQString &lang ) const { - if ( mSummaryMap.isEmpty() ) return QString::null; + if ( mSummaryMap.isEmpty() ) return TQString::null; if ( !mSummaryMap[ lang ].isEmpty() ) return mSummaryMap[ lang ]; else { - QStringList langs = KGlobal::locale()->languageList(); - for(QStringList::Iterator it = langs.begin(); it != langs.end(); ++it) + TQStringList langs = KGlobal::locale()->languageList(); + for(TQStringList::Iterator it = langs.begin(); it != langs.end(); ++it) if( !mSummaryMap[ *it ].isEmpty() ) return mSummaryMap[ *it ]; } - if ( !mSummaryMap[ QString::null ].isEmpty() ) return mSummaryMap[ QString::null ]; + if ( !mSummaryMap[ TQString::null ].isEmpty() ) return mSummaryMap[ TQString::null ]; else return *(mSummaryMap.begin()); } -void Entry::setVersion( const QString &version ) +void Entry::setVersion( const TQString &version ) { mVersion = version; } -QString Entry::version() const +TQString Entry::version() const { return mVersion; } @@ -129,33 +129,33 @@ int Entry::release() const } -void Entry::setReleaseDate( const QDate &d ) +void Entry::setReleaseDate( const TQDate &d ) { mReleaseDate = d; } -QDate Entry::releaseDate() const +TQDate Entry::releaseDate() const { return mReleaseDate; } -void Entry::setPayload( const KURL &url, const QString &lang ) +void Entry::setPayload( const KURL &url, const TQString &lang ) { mPayloadMap.insert( lang, url ); if ( mLangs.find( lang ) == mLangs.end() ) mLangs.append( lang ); } -KURL Entry::payload( const QString &lang ) const +KURL Entry::payload( const TQString &lang ) const { KURL payload = mPayloadMap[ lang ]; if ( payload.isEmpty() ) { - QStringList langs = KGlobal::locale()->languageList(); - for(QStringList::Iterator it = langs.begin(); it != langs.end(); ++it) + TQStringList langs = KGlobal::locale()->languageList(); + for(TQStringList::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() ) payload = mPayloadMap [ TQString::null ]; if ( payload.isEmpty() && !mPayloadMap.isEmpty() ) { payload = *(mPayloadMap.begin()); } @@ -163,22 +163,22 @@ KURL Entry::payload( const QString &lang ) const } -void Entry::setPreview( const KURL &url, const QString &lang ) +void Entry::setPreview( const KURL &url, const TQString &lang ) { mPreviewMap.insert( lang, url ); if ( mLangs.find( lang ) == mLangs.end() ) mLangs.append( lang ); } -KURL Entry::preview( const QString &lang ) const +KURL Entry::preview( const TQString &lang ) const { KURL preview = mPreviewMap[ lang ]; if ( preview.isEmpty() ) { - QStringList langs = KGlobal::locale()->languageList(); - for(QStringList::Iterator it = langs.begin(); it != langs.end(); ++it) + TQStringList langs = KGlobal::locale()->languageList(); + for(TQStringList::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() ) preview = mPreviewMap [ TQString::null ]; if ( preview.isEmpty() && !mPreviewMap.isEmpty() ) { preview = *(mPreviewMap.begin()); } @@ -207,43 +207,43 @@ int Entry::downloads() return mDownloads; } -QString Entry::fullName() +TQString Entry::fullName() { - return name() + "-" + version() + "-" + QString::number( release() ); + return name() + "-" + version() + "-" + TQString::number( release() ); } -QStringList Entry::langs() +TQStringList Entry::langs() { return mLangs; } -void Entry::parseDomElement( const QDomElement &element ) +void Entry::parseDomElement( const TQDomElement &element ) { if ( element.tagName() != "stuff" ) return; mType = element.attribute("type"); - QDomNode n; + TQDomNode n; for( n = element.firstChild(); !n.isNull(); n = n.nextSibling() ) { - QDomElement e = n.toElement(); + TQDomElement 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" ); + TQString 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 ); + TQDate date = TQDate::fromString( e.text().stripWhiteSpace(), Qt::ISODate ); setReleaseDate( date ); } if ( e.tagName() == "preview" ) { - QString lang = e.attribute( "lang" ); + TQString lang = e.attribute( "lang" ); setPreview( KURL( e.text().stripWhiteSpace() ), lang ); } if ( e.tagName() == "payload" ) { - QString lang = e.attribute( "lang" ); + TQString lang = e.attribute( "lang" ); setPayload( KURL( e.text().stripWhiteSpace() ), lang ); } if ( e.tagName() == "rating" ) setRating( e.text().toInt() ); @@ -251,10 +251,10 @@ void Entry::parseDomElement( const QDomElement &element ) } } -QDomElement Entry::createDomElement( QDomDocument &doc, - QDomElement &parent ) +TQDomElement Entry::createDomElement( TQDomDocument &doc, + TQDomElement &parent ) { - QDomElement entry = doc.createElement( "stuff" ); + TQDomElement entry = doc.createElement( "stuff" ); entry.setAttribute("type", mType); parent.appendChild( entry ); @@ -262,17 +262,17 @@ QDomElement Entry::createDomElement( QDomDocument &doc, 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, "release", TQString::number( release() ) ); + addElement( doc, entry, "rating", TQString::number( rating() ) ); + addElement( doc, entry, "downloads", TQString::number( downloads() ) ); addElement( doc, entry, "releasedate", releaseDate().toString( Qt::ISODate ) ); - QStringList ls = langs(); - QStringList::ConstIterator it; + TQStringList ls = langs(); + TQStringList::ConstIterator it; for( it = ls.begin(); it != ls.end(); ++it ) { - QDomElement e = addElement( doc, entry, "summary", summary( *it ) ); + TQDomElement e = addElement( doc, entry, "summary", summary( *it ) ); e.setAttribute( "lang", *it ); e = addElement( doc, entry, "preview", preview( *it ).url() ); e.setAttribute( "lang", *it ); @@ -283,10 +283,10 @@ QDomElement Entry::createDomElement( QDomDocument &doc, return entry; } -QDomElement Entry::addElement( QDomDocument &doc, QDomElement &parent, - const QString &tag, const QString &value ) +TQDomElement Entry::addElement( TQDomDocument &doc, TQDomElement &parent, + const TQString &tag, const TQString &value ) { - QDomElement n = doc.createElement( tag ); + TQDomElement n = doc.createElement( tag ); n.appendChild( doc.createTextNode( value ) ); parent.appendChild( n ); diff --git a/lib/compatibility/knewstuff/entry.h b/lib/compatibility/knewstuff/entry.h index 3a16964d..a3c816a1 100644 --- a/lib/compatibility/knewstuff/entry.h +++ b/lib/compatibility/knewstuff/entry.h @@ -20,11 +20,11 @@ #ifndef KNEWSTUFF_ENTRY_H #define KNEWSTUFF_ENTRY_H -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include @@ -48,7 +48,7 @@ class KDE_EXPORT Entry /** * Constructor. */ - Entry( const QDomElement & ); + Entry( const TQDomElement & ); /** * Destructor. @@ -58,75 +58,75 @@ class KDE_EXPORT Entry /** * Sets the (unique) name for this data object. */ - void setName( const QString & ); + void setName( const TQString & ); /** * Retrieve the name of the data object. * * @return object name */ - QString name() const; + TQString name() const; /** * Sets the application type, e.g. 'kdesktop/wallpaper'. */ - void setType( const QString & ); + void setType( const TQString & ); /** * Retrieve the type of the data object. * * @return object type */ - QString type() const; + TQString type() const; /** * Sets the full name of the object's author. */ - void setAuthor( const QString & ); + void setAuthor( const TQString & ); /** * Retrieve the author's name of the object. * * @return object author */ - QString author() const; + TQString author() const; /** * Sets the license (abbreviation) applicable to the object. */ - void setLicence( const QString & ); + void setLicence( const TQString & ); /** * Retrieve the license name of the object. * * @return object license */ - QString license() const; + TQString license() const; /** * Sets a short description on what the object is all about. */ - void setSummary( const QString &, const QString &lang = QString::null ); + void setSummary( const TQString &, const TQString &lang = TQString::null ); /** * Retrieve a short description about the object. * - * @param lang preferred language, or QString::null for KDE default + * @param lang preferred language, or TQString::null for KDE default * @return object description */ - QString summary( const QString &lang = QString::null ) const; + TQString summary( const TQString &lang = TQString::null ) const; /** * Sets the version number. */ - void setVersion( const QString & ); + void setVersion( const TQString & ); /** * Retrieve the version string of the object. * * @return object version */ - QString version() const; + TQString version() const; /** * Sets the release number, which is increased for feature-equal objects @@ -144,41 +144,41 @@ class KDE_EXPORT Entry /** * Sets the release date. */ - void setReleaseDate( const QDate & ); + void setReleaseDate( const TQDate & ); /** * Retrieve the date of the object's publication. * * @return object release date */ - QDate releaseDate() const; + TQDate releaseDate() const; /** * Sets the object's file. */ - void setPayload( const KURL &, const QString &lang = QString::null ); + void setPayload( const KURL &, const TQString &lang = TQString::null ); /** * Retrieve the file name of the object. * - * @param lang preferred language, or QString::null for KDE default + * @param lang preferred language, or TQString::null for KDE default * @return object filename */ - KURL payload( const QString &lang = QString::null ) const; + KURL payload( const TQString &lang = TQString::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 ); + void setPreview( const KURL &, const TQString &lang = TQString::null ); /** * Retrieve the file name of an image containing a preview of the object. * - * @param lang preferred language, or QString::null for KDE default + * @param lang preferred language, or TQString::null for KDE default * @return object preview filename */ - KURL preview( const QString &lang = QString::null ) const; + KURL preview( const TQString &lang = TQString::null ) const; /** * Sets the rating between 0 (worst) and 10 (best). @@ -214,42 +214,42 @@ class KDE_EXPORT Entry * Return the full name for the meta information. It is constructed as * name-version-release. */ - QString fullName(); + TQString fullName(); /** * Return the list of languages this object supports. */ - QStringList langs(); + TQStringList langs(); /** * @internal */ - void parseDomElement( const QDomElement & ); + void parseDomElement( const TQDomElement & ); /** * @internal */ - QDomElement createDomElement( QDomDocument &, QDomElement &parent ); + TQDomElement createDomElement( TQDomDocument &, TQDomElement &parent ); protected: - QDomElement addElement( QDomDocument &doc, QDomElement &parent, - const QString &tag, const QString &value ); + TQDomElement addElement( TQDomDocument &doc, TQDomElement &parent, + const TQString &tag, const TQString &value ); private: - QString mName; - QString mType; - QString mAuthor; - QString mLicence; - QMap mSummaryMap; - QString mVersion; + TQString mName; + TQString mType; + TQString mAuthor; + TQString mLicence; + TQMap mSummaryMap; + TQString mVersion; int mRelease; - QDate mReleaseDate; - QMap mPayloadMap; - QMap mPreviewMap; + TQDate mReleaseDate; + TQMap mPayloadMap; + TQMap mPreviewMap; int mRating; int mDownloads; - QStringList mLangs; + TQStringList mLangs; }; } diff --git a/lib/compatibility/knewstuff/knewstuff.cpp b/lib/compatibility/knewstuff/knewstuff.cpp index 5387e647..6a37aa61 100644 --- a/lib/compatibility/knewstuff/knewstuff.cpp +++ b/lib/compatibility/knewstuff/knewstuff.cpp @@ -30,8 +30,8 @@ using namespace KNS; -KAction* KNS::standardAction(const QString& what, - const QObject *recvr, +KAction* KNS::standardAction(const TQString& what, + const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name) { @@ -39,22 +39,22 @@ KAction* KNS::standardAction(const QString& what, 0, recvr, slot, parent, name); } -KNewStuff::KNewStuff( const QString &type, QWidget *parentWidget ) +KNewStuff::KNewStuff( const TQString &type, TQWidget *parentWidget ) { mEngine = new Engine( this, type, parentWidget ); } -KNewStuff::KNewStuff( const QString &type, const QString &providerList, QWidget *parentWidget ) +KNewStuff::KNewStuff( const TQString &type, const TQString &providerList, TQWidget *parentWidget ) { mEngine = new Engine( this, type, providerList, parentWidget ); } -QString KNewStuff::type() const +TQString KNewStuff::type() const { return mEngine->type(); } -QWidget *KNewStuff::parentWidget() const +TQWidget *KNewStuff::parentWidget() const { return mEngine->parentWidget(); } @@ -69,7 +69,7 @@ void KNewStuff::download() mEngine->download(); } -QString KNewStuff::downloadDestination( Entry * ) +TQString KNewStuff::downloadDestination( Entry * ) { return KGlobal::dirs()->saveLocation( "tmp" ) + KApplication::randomString( 10 ); @@ -80,7 +80,7 @@ void KNewStuff::upload() mEngine->upload(); } -void KNewStuff::upload( const QString &fileName, const QString previewName ) +void KNewStuff::upload( const TQString &fileName, const TQString previewName ) { mEngine->upload(fileName, previewName); } diff --git a/lib/compatibility/knewstuff/knewstuff.h b/lib/compatibility/knewstuff/knewstuff.h index 9d2d10ed..2f266a0b 100644 --- a/lib/compatibility/knewstuff/knewstuff.h +++ b/lib/compatibility/knewstuff/knewstuff.h @@ -20,7 +20,7 @@ #ifndef KNEWSTUFF_H #define KNEWSTUFF_H -#include +#include #include @@ -33,8 +33,8 @@ namespace KNS { class Engine; class Entry; -KAction* standardAction(const QString& what, - const QObject *recvr, +KAction* standardAction(const TQString& what, + const TQObject *recvr, const char *slot, KActionCollection* parent, const char *name = 0); @@ -77,7 +77,7 @@ class KDE_EXPORT KNewStuff @param parentWidget parent widget of dialogs opened by the KNewStuff engine */ - KNewStuff( const QString &type, QWidget *parentWidget = 0 ); + KNewStuff( const TQString &type, TQWidget *parentWidget = 0 ); /** Constructor. @@ -88,18 +88,18 @@ class KDE_EXPORT KNewStuff @param parentWidget parent widget of dialogs opened by the KNewStuff engine */ - KNewStuff( const QString &type, const QString &providerList, QWidget *parentWidget = 0 ); + KNewStuff( const TQString &type, const TQString &providerList, TQWidget *parentWidget = 0 ); virtual ~KNewStuff(); /** Return type of data. */ - QString type() const; + TQString type() const; /** Return parent widget. */ - QWidget *parentWidget() const; + TQWidget *parentWidget() const; /** Start download process. @@ -114,7 +114,7 @@ class KDE_EXPORT KNewStuff /** Upload with pre-defined files. */ - void upload( const QString &fileName, const QString previewName ); + void upload( const TQString &fileName, const TQString previewName ); /** Install file to application. The given fileName points to the file @@ -127,7 +127,7 @@ class KDE_EXPORT KNewStuff @param fileName name of downloaded file */ - virtual bool install( const QString &fileName ) = 0; + virtual bool install( const TQString &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 @@ -137,14 +137,14 @@ class KDE_EXPORT KNewStuff @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; + virtual bool createUploadFile( const TQString &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 ); + virtual TQString downloadDestination( KNS::Entry *entry ); protected: diff --git a/lib/compatibility/knewstuff/knewstuffgeneric.cpp b/lib/compatibility/knewstuff/knewstuffgeneric.cpp index 22673dac..51305f62 100644 --- a/lib/compatibility/knewstuff/knewstuffgeneric.cpp +++ b/lib/compatibility/knewstuff/knewstuffgeneric.cpp @@ -19,9 +19,9 @@ Boston, MA 02110-1301, USA. */ -#include -#include -#include +#include +#include +#include #include #include @@ -37,7 +37,7 @@ using namespace std; -KNewStuffGeneric::KNewStuffGeneric( const QString &type, QWidget *parent ) +KNewStuffGeneric::KNewStuffGeneric( const TQString &type, TQWidget *parent ) : KNewStuff( type, parent ) { mConfig = KGlobal::config(); @@ -47,14 +47,14 @@ KNewStuffGeneric::~KNewStuffGeneric() { } -bool KNewStuffGeneric::install( const QString &fileName ) +bool KNewStuffGeneric::install( const TQString &fileName ) { kdDebug(5850) << "KNewStuffGeneric::install(): " << fileName << endl; - QStringList list, list2; + TQStringList list, list2; mConfig->setGroup("KNewStuff"); - QString uncompress = mConfig->readEntry( "Uncompress" ); + TQString uncompress = mConfig->readEntry( "Uncompress" ); if ( !uncompress.isEmpty() ) { kdDebug(5850) << "Uncompression method: " << uncompress << endl; KTar tar(fileName, uncompress); @@ -62,14 +62,14 @@ bool KNewStuffGeneric::install( const QString &fileName ) const KArchiveDirectory *dir = tar.directory(); dir->copyTo(destinationPath(0)); tar.close(); - QFile::remove(fileName); + TQFile::remove(fileName); } - QString cmd = mConfig->readEntry( "InstallationCommand" ); + TQString 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) { + list = TQStringList::split( " ", cmd ); + for ( TQStringList::iterator it = list.begin(); it != list.end(); ++it) { list2 << (*it).replace("%f", fileName); } KProcess proc; @@ -80,20 +80,20 @@ bool KNewStuffGeneric::install( const QString &fileName ) return true; } -bool KNewStuffGeneric::createUploadFile( const QString & /*fileName*/ ) +bool KNewStuffGeneric::createUploadFile( const TQString & /*fileName*/ ) { return false; } -QString KNewStuffGeneric::destinationPath( KNS::Entry *entry ) +TQString KNewStuffGeneric::destinationPath( KNS::Entry *entry ) { - QString path, file, target; + TQString path, file, target; mConfig->setGroup("KNewStuff"); if( entry ) target = entry->fullName(); else target = "/"; - QString res = mConfig->readEntry( "StandardResource" ); + TQString res = mConfig->readEntry( "StandardResource" ); if ( res.isEmpty() ) { target = mConfig->readEntry("TargetDir"); @@ -110,13 +110,13 @@ QString KNewStuffGeneric::destinationPath( KNS::Entry *entry ) } if ( res.isEmpty() && path.isEmpty() ) { - if ( !entry ) return QString::null; + if ( !entry ) return TQString::null; else return KNewStuff::downloadDestination( entry ); } if ( !path.isEmpty() ) { - file = QDir::home().path() + "/" + path + "/"; + file = TQDir::home().path() + "/" + path + "/"; if ( entry ) file += entry->fullName(); } else file = locateLocal( res.utf8() , target ); @@ -124,16 +124,16 @@ QString KNewStuffGeneric::destinationPath( KNS::Entry *entry ) return file; } -QString KNewStuffGeneric::downloadDestination( KNS::Entry *entry ) +TQString KNewStuffGeneric::downloadDestination( KNS::Entry *entry ) { - QString file = destinationPath(entry); + TQString 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; + TQString::null, i18n("Overwrite") ); + if ( result == KMessageBox::Cancel ) return TQString::null; } return file; diff --git a/lib/compatibility/knewstuff/knewstuffgeneric.h b/lib/compatibility/knewstuff/knewstuffgeneric.h index 5443e24a..6347bf53 100644 --- a/lib/compatibility/knewstuff/knewstuffgeneric.h +++ b/lib/compatibility/knewstuff/knewstuffgeneric.h @@ -30,7 +30,7 @@ class KConfig; * * This class is used for data uploads and installation. * \code - * QString payload, preview; + * TQString payload, preview; * KNewStuffGeneric *ns = new KNewStuffGeneric("kamikaze/level", this); * ns->upload(payload, preview); * \endcode @@ -48,7 +48,7 @@ class KDE_EXPORT KNewStuffGeneric : public KNewStuff @param type a Hotstuff data type such as "korganizer/calendar" @param parent the parent window. */ - KNewStuffGeneric( const QString &type, QWidget *parent = 0 ); + KNewStuffGeneric( const TQString &type, TQWidget *parent = 0 ); ~KNewStuffGeneric(); /** @@ -57,7 +57,7 @@ class KDE_EXPORT KNewStuffGeneric : public KNewStuff @param fileName filename of the donwloaded file @return @c true in case of installation success, @c false otherwise */ - bool install( const QString &fileName ); + bool install( const TQString &fileName ); /** Creates a file suitable for upload. @@ -67,7 +67,7 @@ class KDE_EXPORT KNewStuffGeneric : public KNewStuff @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 ); + bool createUploadFile( const TQString &fileName ); /** Queries the preferred destination file for a download. @@ -75,10 +75,10 @@ class KDE_EXPORT KNewStuffGeneric : public KNewStuff @param entry a Hotstuff data entry @return destination filename, or 0 to return directory only */ - QString downloadDestination( KNS::Entry *entry ); + TQString downloadDestination( KNS::Entry *entry ); private: - QString destinationPath( KNS::Entry *entry ); + TQString destinationPath( KNS::Entry *entry ); KConfig *mConfig; }; diff --git a/lib/compatibility/knewstuff/knewstuffsecure.cpp b/lib/compatibility/knewstuff/knewstuffsecure.cpp index 270d9449..f68be7ae 100644 --- a/lib/compatibility/knewstuff/knewstuffsecure.cpp +++ b/lib/compatibility/knewstuff/knewstuffsecure.cpp @@ -13,7 +13,7 @@ * * ***************************************************************************/ //qt includes -#include +#include //kde includes #include @@ -33,11 +33,11 @@ using namespace KNS; -KNewStuffSecure::KNewStuffSecure(const QString &type, QWidget *parentWidget) +KNewStuffSecure::KNewStuffSecure(const TQString &type, TQWidget *parentWidget) : KNewStuff(type, parentWidget) { m_tempDir = 0L; - connect(engine(), SIGNAL(uploadFinished(bool)), SLOT(slotUploadFinished(bool))); + connect(engine(), TQT_SIGNAL(uploadFinished(bool)), TQT_SLOT(slotUploadFinished(bool))); } @@ -46,7 +46,7 @@ KNewStuffSecure::~KNewStuffSecure() removeTempDirectory(); } -bool KNewStuffSecure::install(const QString &fileName) +bool KNewStuffSecure::install(const TQString &fileName) { bool ok = true; @@ -59,8 +59,8 @@ bool KNewStuffSecure::install(const QString &fileName) 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) + TQStringList entries = directory->entries(); + for (TQStringList::Iterator it = entries.begin(); it != entries.end(); ++it) { if (*it != "signature" && *it != "md5sum") { @@ -74,7 +74,7 @@ bool KNewStuffSecure::install(const QString &fileName) else { m_tarName.prepend(m_tempDir->name()); - connect(Security::ref(), SIGNAL(validityResult(int)), this, SLOT(slotValidated(int))); + connect(Security::ref(), TQT_SIGNAL(validityResult(int)), this, TQT_SLOT(slotValidated(int))); Security::ref()->checkValidity(m_tarName); } } else @@ -86,8 +86,8 @@ bool KNewStuffSecure::install(const QString &fileName) void KNewStuffSecure::slotValidated(int result) { - QString errorString; - QString signatureStr; + TQString errorString; + TQString signatureStr; bool valid = true; if (result == -1) { @@ -147,14 +147,14 @@ void KNewStuffSecure::slotValidated(int result) KConfig *cfg = KGlobal::config(); cfg->deleteGroup("KNewStuffStatus"); cfg->setGroup("KNewStuffStatus"); - for (QMap::ConstIterator it = m_installedResources.constBegin(); it != m_installedResources.constEnd(); ++it) + for (TQMap::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))); + disconnect(Security::ref(), TQT_SIGNAL(validityResult(int)), this, TQT_SLOT(slotValidated(int))); } void KNewStuffSecure::downloadResource() @@ -165,19 +165,19 @@ void KNewStuffSecure::downloadResource() KNewStuff::download(); } -bool KNewStuffSecure::createUploadFile(const QString &fileName) +bool KNewStuffSecure::createUploadFile(const TQString &fileName) { Q_UNUSED(fileName); return true; } -void KNewStuffSecure::uploadResource(const QString& fileName) +void KNewStuffSecure::uploadResource(const TQString& fileName) { - connect(Security::ref(), SIGNAL(fileSigned(int)), this, SLOT(slotFileSigned(int))); + connect(Security::ref(), TQT_SIGNAL(fileSigned(int)), this, TQT_SLOT(slotFileSigned(int))); removeTempDirectory(); m_tempDir = new KTempDir(); m_tempDir->setAutoDelete(true); - QFileInfo f(fileName); + TQFileInfo 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); @@ -194,30 +194,30 @@ void KNewStuffSecure::slotFileSigned(int result) { 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))); + disconnect(Security::ref(), TQT_SIGNAL(fileSigned(int)), this, TQT_SLOT(slotFileSigned(int))); removeTempDirectory(); return; } } KTar tar(m_signedFileName + ".signed", "application/x-gzip"); tar.open(IO_WriteOnly); - QStringList files; + TQStringList 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) + for (TQStringList::Iterator it_f = files.begin(); it_f != files.end(); ++it_f) { - QFile file(*it_f); + TQFile file(*it_f); file.open(IO_ReadOnly); - QByteArray bArray = file.readAll(); - tar.writeFile(QFileInfo(file).fileName(), "user", "group", bArray.size(), bArray.data()); + TQByteArray bArray = file.readAll(); + tar.writeFile(TQFileInfo(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))); + KNewStuff::upload(m_signedFileName, TQString::null); + disconnect(Security::ref(), TQT_SIGNAL(fileSigned(int)), this, TQT_SLOT(slotFileSigned(int))); } } diff --git a/lib/compatibility/knewstuff/knewstuffsecure.h b/lib/compatibility/knewstuff/knewstuffsecure.h index 2aed131a..1a6bc44a 100644 --- a/lib/compatibility/knewstuff/knewstuffsecure.h +++ b/lib/compatibility/knewstuff/knewstuffsecure.h @@ -17,7 +17,7 @@ #define KNEWSTUFFSECURE_H //qt includes -#include +#include //kde includes #include "knewstuff.h" @@ -37,7 +37,7 @@ to the standard KNewStuff class. @author Andras Mantia */ -class KDE_EXPORT KNewStuffSecure : public QObject, public KNewStuff +class KDE_EXPORT KNewStuffSecure : public TQObject, public KNewStuff { Q_OBJECT @@ -49,16 +49,16 @@ public: @param parentWidget parent widget of dialogs opened by the KNewStuff engine */ - KNewStuffSecure(const QString &type, QWidget *parentWidget=0); + KNewStuffSecure(const TQString &type, TQWidget *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 ); + bool install( const TQString &fileName ); /** Reimplemented for internal reasons. */ - bool createUploadFile(const QString &fileName); + bool createUploadFile(const TQString &fileName); /** Initiates a download. This is the method that must be called in * order to download a signed resource. */ @@ -67,7 +67,7 @@ public: /** Signs the file and uploads to the central server. * @param fileName The file to be signed and uploaded */ - void uploadResource(const QString &fileName); + void uploadResource(const TQString &fileName); private slots: @@ -93,9 +93,9 @@ protected: void removeTempDirectory(); KTempDir *m_tempDir; - QString m_tarName; - QString m_signedFileName; - QMap m_installedResources; + TQString m_tarName; + TQString m_signedFileName; + TQMap m_installedResources; }; #endif diff --git a/lib/compatibility/knewstuff/provider.cpp b/lib/compatibility/knewstuff/provider.cpp index 2ab48f18..ca7767e0 100644 --- a/lib/compatibility/knewstuff/provider.cpp +++ b/lib/compatibility/knewstuff/provider.cpp @@ -34,7 +34,7 @@ Provider::Provider() : mNoUpload( false ) { } -Provider::Provider( const QDomElement &e ) : mNoUpload( false ) +Provider::Provider( const TQDomElement &e ) : mNoUpload( false ) { parseDomElement( e ); } @@ -44,12 +44,12 @@ Provider::~Provider() } -void Provider::setName( const QString &name ) +void Provider::setName( const TQString &name ) { mName = name; } -QString Provider::name() const +TQString Provider::name() const { return mName; } @@ -110,7 +110,7 @@ bool Provider::noUpload() const } -void Provider::parseDomElement( const QDomElement &element ) +void Provider::parseDomElement( const TQDomElement &element ) { if ( element.tagName() != "provider" ) return; @@ -119,21 +119,21 @@ void Provider::parseDomElement( const QDomElement &element ) setNoUploadUrl( KURL( element.attribute("nouploadurl") ) ); setIcon( KURL( element.attribute("icon") ) ); - QDomNode n; + TQDomNode n; for ( n = element.firstChild(); !n.isNull(); n = n.nextSibling() ) { - QDomElement p = n.toElement(); + TQDomElement p = n.toElement(); if ( p.tagName() == "noupload" ) setNoUpload( true ); if ( p.tagName() == "title" ) setName( p.text().stripWhiteSpace() ); } } -QDomElement Provider::createDomElement( QDomDocument &doc, QDomElement &parent ) +TQDomElement Provider::createDomElement( TQDomDocument &doc, TQDomElement &parent ) { - QDomElement entry = doc.createElement( "stuff" ); + TQDomElement entry = doc.createElement( "stuff" ); parent.appendChild( entry ); - QDomElement n = doc.createElement( "name" ); + TQDomElement n = doc.createElement( "name" ); n.appendChild( doc.createTextNode( name() ) ); entry.appendChild( n ); @@ -141,13 +141,13 @@ QDomElement Provider::createDomElement( QDomDocument &doc, QDomElement &parent ) } -ProviderLoader::ProviderLoader( QWidget *parentWidget ) : +ProviderLoader::ProviderLoader( TQWidget *parentWidget ) : mParentWidget( parentWidget ) { mProviders.setAutoDelete( true ); } -void ProviderLoader::load( const QString &type, const QString &providersList ) +void ProviderLoader::load( const TQString &type, const TQString &providersList ) { kdDebug(5850) << "ProviderLoader::load()" << endl; @@ -157,13 +157,13 @@ void ProviderLoader::load( const QString &type, const QString &providersList ) KConfig *cfg = KGlobal::config(); cfg->setGroup("KNewStuff"); - QString providersUrl = providersList; + TQString 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", + TQString server = cfg->readEntry( "MasterServer", "http://korganizer.kde.org" ); providersUrl = server + "/knewstuff/" + type + "/providers.xml"; @@ -172,23 +172,23 @@ void ProviderLoader::load( const QString &type, const QString &providersList ) 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 & ) ) ); + connect( job, TQT_SIGNAL( result( KIO::Job * ) ), + TQT_SLOT( slotJobResult( KIO::Job * ) ) ); + connect( job, TQT_SIGNAL( data( KIO::Job *, const TQByteArray & ) ), + TQT_SLOT( slotJobData( KIO::Job *, const TQByteArray & ) ) ); // job->dumpObjectInfo(); } -void ProviderLoader::slotJobData( KIO::Job *, const QByteArray &data ) +void ProviderLoader::slotJobData( KIO::Job *, const TQByteArray &data ) { kdDebug(5850) << "ProviderLoader::slotJobData()" << endl; if ( data.size() == 0 ) return; - QCString str( data, data.size() + 1 ); + TQCString str( data, data.size() + 1 ); - mJobData.append( QString::fromUtf8( str ) ); + mJobData.append( TQString::fromUtf8( str ) ); } void ProviderLoader::slotJobResult( KIO::Job *job ) @@ -200,21 +200,21 @@ void ProviderLoader::slotJobResult( KIO::Job *job ) kdDebug(5850) << "--PROVIDERS-START--" << endl << mJobData << "--PROV_END--" << endl; - QDomDocument doc; + TQDomDocument doc; if ( !doc.setContent( mJobData ) ) { KMessageBox::error( mParentWidget, i18n("Error parsing providers list.") ); return; } - QDomElement providers = doc.documentElement(); + TQDomElement providers = doc.documentElement(); if ( providers.isNull() ) { kdDebug(5850) << "No document in Providers.xml." << endl; } - QDomNode n; + TQDomNode n; for ( n = providers.firstChild(); !n.isNull(); n = n.nextSibling() ) { - QDomElement p = n.toElement(); + TQDomElement p = n.toElement(); mProviders.append( new Provider( p ) ); } diff --git a/lib/compatibility/knewstuff/provider.h b/lib/compatibility/knewstuff/provider.h index 69898bc4..f878175a 100644 --- a/lib/compatibility/knewstuff/provider.h +++ b/lib/compatibility/knewstuff/provider.h @@ -20,11 +20,11 @@ #ifndef KNEWSTUFF_PROVIDER_H #define KNEWSTUFF_PROVIDER_H -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include @@ -46,7 +46,7 @@ namespace KNS { class Provider { public: - typedef QPtrList List; + typedef TQPtrList List; /** * Constructor. @@ -56,7 +56,7 @@ class Provider /** * Constructor with XML feed. */ - Provider( const QDomElement & ); + Provider( const TQDomElement & ); /** * Destructor. @@ -66,14 +66,14 @@ class Provider /** * Sets the common name of the provider. */ - void setName( const QString & ); + void setName( const TQString & ); /** * Retrieves the common name of the provider. * * @return provider name */ - QString name() const; + TQString name() const; /** * Sets the download URL. @@ -142,12 +142,12 @@ class Provider KURL icon() const; protected: - void parseDomElement( const QDomElement & ); + void parseDomElement( const TQDomElement & ); - QDomElement createDomElement( QDomDocument &, QDomElement &parent ); + TQDomElement createDomElement( TQDomDocument &, TQDomElement &parent ); private: - QString mName; + TQString mName; KURL mDownloadUrl; KURL mUploadUrl; KURL mNoUploadUrl; @@ -170,7 +170,7 @@ class ProviderLoader : public QObject * * @param parentWidget the parent widget */ - ProviderLoader( QWidget *parentWidget ); + ProviderLoader( TQWidget *parentWidget ); /** * Starts asynchronously loading the list of providers of the @@ -181,7 +181,7 @@ class ProviderLoader : public QObject * 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 ); + void load( const TQString &type, const TQString &providerList = TQString::null ); signals: /** @@ -190,13 +190,13 @@ class ProviderLoader : public QObject void providersLoaded( Provider::List * ); protected slots: - void slotJobData( KIO::Job *, const QByteArray & ); + void slotJobData( KIO::Job *, const TQByteArray & ); void slotJobResult( KIO::Job * ); private: - QWidget *mParentWidget; + TQWidget *mParentWidget; - QString mJobData; + TQString mJobData; Provider::List mProviders; }; diff --git a/lib/compatibility/knewstuff/providerdialog.cpp b/lib/compatibility/knewstuff/providerdialog.cpp index 00374a34..a6625870 100644 --- a/lib/compatibility/knewstuff/providerdialog.cpp +++ b/lib/compatibility/knewstuff/providerdialog.cpp @@ -18,9 +18,9 @@ Boston, MA 02110-1301, USA. */ -#include -#include -#include +#include +#include +#include #include #include @@ -49,16 +49,16 @@ class ProviderItem : public KListViewItem Provider *mProvider; }; -ProviderDialog::ProviderDialog( Engine *engine, QWidget *parent ) : +ProviderDialog::ProviderDialog( Engine *engine, TQWidget *parent ) : KDialogBase( Plain, i18n("Hot New Stuff Providers"), Ok | Cancel, Cancel, parent, 0, false, true ), mEngine( engine ) { - QFrame *topPage = plainPage(); + TQFrame *topPage = plainPage(); - QBoxLayout *topLayout = new QVBoxLayout( topPage ); + TQBoxLayout *topLayout = new TQVBoxLayout( topPage ); - QLabel *description = new QLabel( i18n("Please select one of the providers listed below:"), topPage ); + TQLabel *description = new TQLabel( i18n("Please select one of the providers listed below:"), topPage ); topLayout->addWidget( description ); mListView = new KListView( topPage ); diff --git a/lib/compatibility/knewstuff/providerdialog.h b/lib/compatibility/knewstuff/providerdialog.h index c75cc3a1..3e02e30a 100644 --- a/lib/compatibility/knewstuff/providerdialog.h +++ b/lib/compatibility/knewstuff/providerdialog.h @@ -50,7 +50,7 @@ class ProviderDialog : public KDialogBase @param engine a KNewStuff engine object @param parent the parent window */ - ProviderDialog( Engine *engine, QWidget *parent ); + ProviderDialog( Engine *engine, TQWidget *parent ); /** Clears the list of providers. diff --git a/lib/compatibility/knewstuff/security.cpp b/lib/compatibility/knewstuff/security.cpp index f7099c72..8ef377b7 100644 --- a/lib/compatibility/knewstuff/security.cpp +++ b/lib/compatibility/knewstuff/security.cpp @@ -14,10 +14,10 @@ ***************************************************************************/ //qt includes -#include -#include -#include -#include +#include +#include +#include +#include //kde includes #include @@ -50,15 +50,15 @@ void Security::readKeys() { if (m_gpgRunning) { - QTimer::singleShot(5, this, SLOT(readKeys())); + TQTimer::singleShot(5, this, TQT_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 *))); + connect(readProcess, TQT_SIGNAL(processExited(KProcess *)), this, TQT_SLOT(slotProcessExited(KProcess *))); + connect(readProcess, TQT_SIGNAL(readReady(KProcIO *)) ,this, TQT_SLOT(slotDataArrived(KProcIO *))); if (!readProcess->start(KProcess::NotifyOnExit, true)) KMessageBox::error(0L, i18n("Cannot start gpg and retrieve the available keys. Make sure that gpg is installed, otherwise verification of downloaded resources will not be possible.")); else @@ -69,14 +69,14 @@ void Security::readSecretKeys() { if (m_gpgRunning) { - QTimer::singleShot(5, this, SLOT(readSecretKeys())); + TQTimer::singleShot(5, this, TQT_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 *))); + connect(readProcess, TQT_SIGNAL(processExited(KProcess *)), this, TQT_SLOT(slotProcessExited(KProcess *))); + connect(readProcess, TQT_SIGNAL(readReady(KProcIO *)) ,this, TQT_SLOT(slotDataArrived(KProcIO *))); if (readProcess->start(KProcess::NotifyOnExit, true)) m_gpgRunning = true; } @@ -100,7 +100,7 @@ void Security::slotProcessExited(KProcess *process) void Security::slotDataArrived(KProcIO *procIO) { - QString data; + TQString data; while (procIO->readln(data, true) != -1) { switch (m_runMode) @@ -114,10 +114,10 @@ void Security::slotDataArrived(KProcIO *procIO) key.secret = false; else key.secret = true; - QStringList line = QStringList::split(":", data, true); + TQStringList line = TQStringList::split(":", data, true); key.id = line[4]; - QString shortId = key.id.right(8); - QString trustStr = line[1]; + TQString shortId = key.id.right(8); + TQString trustStr = line[1]; key.trusted = false; if (trustStr == "u" || trustStr == "f") key.trusted = true; @@ -136,7 +136,7 @@ void Security::slotDataArrived(KProcIO *procIO) { m_result &= SIGNED_BAD_CLEAR; m_result |= SIGNED_OK; - QString id = data.section(" ", 1 , 1).right(8); + TQString id = data.section(" ", 1 , 1).right(8); if (!m_keys.contains(id)) { m_result |= UNKNOWN; @@ -153,7 +153,7 @@ void Security::slotDataArrived(KProcIO *procIO) if (data.startsWith("BADSIG")) { m_result |= SIGNED_BAD; - QString id = data.section(" ", 1 , 1).right(8); + TQString id = data.section(" ", 1 , 1).right(8); if (!m_keys.contains(id)) { m_result |= UNKNOWN; @@ -172,7 +172,7 @@ void Security::slotDataArrived(KProcIO *procIO) case Sign: if (data.find("passphrase.enter") != -1) { - QCString password; + TQCString password; KeyStruct key = m_keys[m_secretKey]; int result = KPasswordDialog::getPassword(password, i18n("Enter passphrase for key 0x%1, belonging to
%2<%3>:
").arg(m_secretKey).arg(key.name).arg(key.mail)); if (result == KPasswordDialog::Accepted) @@ -196,7 +196,7 @@ void Security::slotDataArrived(KProcIO *procIO) } } -void Security::checkValidity(const QString& filename) +void Security::checkValidity(const TQString& filename) { m_fileName = filename; slotCheckValidity(); @@ -206,7 +206,7 @@ void Security::slotCheckValidity() { if (!m_keysRead || m_gpgRunning) { - QTimer::singleShot(5, this, SLOT(slotCheckValidity())); + TQTimer::singleShot(5, this, TQT_SLOT(slotCheckValidity())); return; } if (m_keys.count() == 0) @@ -217,12 +217,12 @@ void Security::slotCheckValidity() m_result = 0; m_runMode = Verify; - QFileInfo f(m_fileName); + TQFileInfo f(m_fileName); //check the MD5 sum - QString md5sum; + TQString md5sum; const char* c = ""; KMD5 context(c); - QFile file(m_fileName); + TQFile file(m_fileName); if (file.open(IO_ReadOnly)) { context.reset(); @@ -233,7 +233,7 @@ void Security::slotCheckValidity() file.setName(f.dirPath() + "/md5sum"); if (file.open(IO_ReadOnly)) { - QString md5sum_file; + TQString md5sum_file; file.readLine(md5sum_file, 50); if (!md5sum.isEmpty() && !md5sum_file.isEmpty() && md5sum_file.startsWith(md5sum)) m_result |= MD5_OK; @@ -248,8 +248,8 @@ void Security::slotCheckValidity() //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 *))); + connect(verifyProcess, TQT_SIGNAL(processExited(KProcess *)),this, TQT_SLOT(slotProcessExited(KProcess *))); + connect(verifyProcess, TQT_SIGNAL(readReady(KProcIO *)),this, TQT_SLOT(slotDataArrived(KProcIO *))); if (verifyProcess->start(KProcess::NotifyOnExit,true)) m_gpgRunning = true; else @@ -260,7 +260,7 @@ void Security::slotCheckValidity() } } -void Security::signFile(const QString &fileName) +void Security::signFile(const TQString &fileName) { m_fileName = fileName; slotSignFile(); @@ -270,12 +270,12 @@ void Security::slotSignFile() { if (!m_keysRead || m_gpgRunning) { - QTimer::singleShot(5, this, SLOT(slotSignFile())); + TQTimer::singleShot(5, this, TQT_SLOT(slotSignFile())); return; } - QStringList secretKeys; - for (QMap::Iterator it = m_keys.begin(); it != m_keys.end(); ++it) + TQStringList secretKeys; + for (TQMap::Iterator it = m_keys.begin(); it != m_keys.end(); ++it) { if (it.data().secret) secretKeys.append(it.key()); @@ -288,13 +288,13 @@ void Security::slotSignFile() } m_result = 0; - QFileInfo f(m_fileName); + TQFileInfo f(m_fileName); //create the MD5 sum - QString md5sum; + TQString md5sum; const char* c = ""; KMD5 context(c); - QFile file(m_fileName); + TQFile file(m_fileName); if (file.open(IO_ReadOnly)) { context.reset(); @@ -305,7 +305,7 @@ void Security::slotSignFile() file.setName(f.dirPath() + "/md5sum"); if (file.open(IO_WriteOnly)) { - QTextStream stream(&file); + TQTextStream stream(&file); stream << md5sum; m_result |= MD5_OK; file.close(); @@ -328,8 +328,8 @@ void Security::slotSignFile() //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 *))); + connect(signProcess, TQT_SIGNAL(processExited(KProcess *)),this, TQT_SLOT(slotProcessExited(KProcess *))); + connect(signProcess, TQT_SIGNAL(readReady(KProcIO *)),this, TQT_SLOT(slotDataArrived(KProcIO *))); m_runMode = Sign; if (signProcess->start(KProcess::NotifyOnExit,true)) m_gpgRunning = true; diff --git a/lib/compatibility/knewstuff/security.h b/lib/compatibility/knewstuff/security.h index 5eea64ae..d5e9299c 100644 --- a/lib/compatibility/knewstuff/security.h +++ b/lib/compatibility/knewstuff/security.h @@ -18,16 +18,16 @@ #define SECURITY_H //qt includes -#include -#include +#include +#include class KProcIO; class KProcess; struct KeyStruct { - QString id; - QString name; - QString mail; + TQString id; + TQString name; + TQString mail; bool trusted; bool secret; }; @@ -59,7 +59,7 @@ public: * 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); + void checkValidity(const TQString &fileName); /** Creates a signature and an md5sum file for the fileName and packs * everything into a gzipped tarball. @@ -67,7 +67,7 @@ public: * * The method is asynchronous and the result is signalled with @ref fileSigned. */ - void signFile(const QString &fileName); + void signFile(const TQString &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 @@ -115,9 +115,9 @@ private: int m_runMode; bool m_gpgRunning; /// true if gpg is currently running bool m_keysRead; /// true if all the keys were read - QMap m_keys; /// holds information about the available key - QString m_fileName; /// the file to sign/verify - QString m_secretKey; /// the key used for signing + TQMap m_keys; /// holds information about the available key + TQString m_fileName; /// the file to sign/verify + TQString m_secretKey; /// the key used for signing private slots: void slotProcessExited(KProcess *process); diff --git a/lib/compatibility/knewstuff/uploaddialog.cpp b/lib/compatibility/knewstuff/uploaddialog.cpp index 5116785d..163ed4ba 100644 --- a/lib/compatibility/knewstuff/uploaddialog.cpp +++ b/lib/compatibility/knewstuff/uploaddialog.cpp @@ -18,12 +18,12 @@ Boston, MA 02110-1301, USA. */ -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include @@ -42,78 +42,78 @@ using namespace KNS; -UploadDialog::UploadDialog( Engine *engine, QWidget *parent ) : +UploadDialog::UploadDialog( Engine *engine, TQWidget *parent ) : KDialogBase( Plain, i18n("Share Hot New Stuff"), Ok | Cancel, Cancel, parent, 0, false, true ), mEngine( engine ) { mEntryList.setAutoDelete( true ); - QFrame *topPage = plainPage(); + TQFrame *topPage = plainPage(); - QGridLayout *topLayout = new QGridLayout( topPage ); + TQGridLayout *topLayout = new TQGridLayout( topPage ); topLayout->setSpacing( spacingHint() ); - QLabel *nameLabel = new QLabel( i18n("Name:"), topPage ); + TQLabel *nameLabel = new TQLabel( i18n("Name:"), topPage ); topLayout->addWidget( nameLabel, 0, 0 ); - mNameEdit = new QLineEdit( topPage ); + mNameEdit = new TQLineEdit( topPage ); topLayout->addWidget( mNameEdit, 0, 1 ); - QLabel *authorLabel = new QLabel( i18n("Author:"), topPage ); + TQLabel *authorLabel = new TQLabel( i18n("Author:"), topPage ); topLayout->addWidget( authorLabel, 1, 0 ); - mAuthorEdit = new QLineEdit( topPage ); + mAuthorEdit = new TQLineEdit( topPage ); topLayout->addWidget( mAuthorEdit, 1, 1 ); - QLabel *versionLabel = new QLabel( i18n("Version:"), topPage ); + TQLabel *versionLabel = new TQLabel( i18n("Version:"), topPage ); topLayout->addWidget( versionLabel, 2, 0 ); - mVersionEdit = new QLineEdit( topPage ); + mVersionEdit = new TQLineEdit( topPage ); topLayout->addWidget( mVersionEdit, 2, 1 ); - QLabel *releaseLabel = new QLabel( i18n("Release:"), topPage ); + TQLabel *releaseLabel = new TQLabel( i18n("Release:"), topPage ); topLayout->addWidget( releaseLabel, 3, 0 ); - mReleaseSpin = new QSpinBox( topPage ); + mReleaseSpin = new TQSpinBox( topPage ); mReleaseSpin->setMinValue( 1 ); topLayout->addWidget( mReleaseSpin, 3, 1 ); - QLabel *licenceLabel = new QLabel( i18n("License:"), topPage ); + TQLabel *licenceLabel = new TQLabel( i18n("License:"), topPage ); topLayout->addWidget( licenceLabel, 4, 0 ); - mLicenceCombo = new QComboBox( topPage ); + mLicenceCombo = new TQComboBox( 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 ); + TQLabel *languageLabel = new TQLabel( i18n("Language:"), topPage ); topLayout->addWidget( languageLabel, 5, 0 ); - mLanguageCombo = new QComboBox( topPage ); + mLanguageCombo = new TQComboBox( topPage ); topLayout->addWidget( mLanguageCombo, 5, 1 ); mLanguageCombo->insertStringList( KGlobal::locale()->languageList() ); - QLabel *previewLabel = new QLabel( i18n("Preview URL:"), topPage ); + TQLabel *previewLabel = new TQLabel( 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 ); + TQLabel *summaryLabel = new TQLabel( 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"); + TQString name = conf->readEntry("name"); + TQString author = conf->readEntry("author"); + TQString version = conf->readEntry("version"); + TQString release = conf->readEntry("release"); + TQString preview = conf->readEntry("preview"); + TQString summary = conf->readEntry("summary"); + TQString lang = conf->readEntry("language"); + TQString 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")); + int prefill = KMessageBox::questionYesNo(this, i18n("Old upload information found, fill out fields?"), TQString::null, i18n("Fill Out Fields"), i18n("Do Not Fill Out")); if(prefill == KMessageBox::Yes) { mNameEdit->setText(name); @@ -169,7 +169,7 @@ void UploadDialog::slotOk() accept(); } -void UploadDialog::setPreviewFile( const QString &previewFile ) +void UploadDialog::setPreviewFile( const TQString &previewFile ) { mPreviewUrl->setURL( previewFile ); } diff --git a/lib/compatibility/knewstuff/uploaddialog.h b/lib/compatibility/knewstuff/uploaddialog.h index 8e962ccb..a289da11 100644 --- a/lib/compatibility/knewstuff/uploaddialog.h +++ b/lib/compatibility/knewstuff/uploaddialog.h @@ -54,7 +54,7 @@ class UploadDialog : public KDialogBase @param engine a KNewStuff engine object to be used for uploads @param parent the parent window */ - UploadDialog( Engine *engine, QWidget *parent ); + UploadDialog( Engine *engine, TQWidget *parent ); /** Destructor. @@ -67,7 +67,7 @@ class UploadDialog : public KDialogBase @param previewFile the preview image file */ - void setPreviewFile( const QString &previewFile ); + void setPreviewFile( const TQString &previewFile ); protected slots: void slotOk(); @@ -75,16 +75,16 @@ class UploadDialog : public KDialogBase private: Engine *mEngine; - QLineEdit *mNameEdit; - QLineEdit *mAuthorEdit; - QLineEdit *mVersionEdit; - QSpinBox *mReleaseSpin; + TQLineEdit *mNameEdit; + TQLineEdit *mAuthorEdit; + TQLineEdit *mVersionEdit; + TQSpinBox *mReleaseSpin; KURLRequester *mPreviewUrl; - QTextEdit *mSummaryEdit; - QComboBox *mLanguageCombo; - QComboBox *mLicenceCombo; + TQTextEdit *mSummaryEdit; + TQComboBox *mLanguageCombo; + TQComboBox *mLicenceCombo; - QPtrList mEntryList; + TQPtrList mEntryList; }; } diff --git a/lib/ksavealldialog.cpp b/lib/ksavealldialog.cpp index 620f018e..3aecd72f 100644 --- a/lib/ksavealldialog.cpp +++ b/lib/ksavealldialog.cpp @@ -17,9 +17,9 @@ Boston, MA 02110-1301, USA. */ -#include -#include -#include +#include +#include +#include #include #include @@ -35,8 +35,8 @@ namespace class CheckURL : public QCheckListItem { public: - CheckURL( QListView * lv, KURL const & url ) - : QCheckListItem( lv, url.path(), QCheckListItem::CheckBox), + CheckURL( TQListView * lv, KURL const & url ) + : TQCheckListItem( lv, url.path(), TQCheckListItem::CheckBox), _url( url ) {} @@ -49,18 +49,18 @@ private: } -KSaveSelectDialog::KSaveSelectDialog( KURL::List const & filelist, KURL::List const & ignorelist, QWidget * parent ) : +KSaveSelectDialog::KSaveSelectDialog( KURL::List const & filelist, KURL::List const & ignorelist, TQWidget * parent ) : KDialogBase( parent, "SaveAllDialog", true, i18n("Save Modified Files?"), Ok | User1 | Close ) { - QVBox *top = makeVBoxMainWidget(); + TQVBox *top = makeVBoxMainWidget(); - (void)new QLabel( i18n("The following files have been modified. Save them?"), top ); + (void)new TQLabel( i18n("The following files have been modified. Save them?"), top ); _listview = new KListView( top ); _listview->addColumn( "" ); _listview->header()->hide(); - _listview->setResizeMode( QListView::LastColumn ); + _listview->setResizeMode( TQListView::LastColumn ); setButtonOKText( i18n("Save &Selected"), i18n("Saves all selected files") ); setButtonText( User1, i18n("Save &None") ); @@ -73,15 +73,15 @@ KSaveSelectDialog::KSaveSelectDialog( KURL::List const & filelist, KURL::List co { if ( !ignorelist.contains( *it ) ) { - QCheckListItem * x = new CheckURL( _listview, *it ); + TQCheckListItem * 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()) ); + connect( this, TQT_SIGNAL(closeClicked()), this, TQT_SLOT(cancel()) ); + connect( this, TQT_SIGNAL(okClicked()), this, TQT_SLOT(save()) ); + connect( this, TQT_SIGNAL(user1Clicked()), this, TQT_SLOT(saveNone()) ); } KSaveSelectDialog::~KSaveSelectDialog() {} @@ -96,17 +96,17 @@ void KSaveSelectDialog::saveNone( ) item = static_cast( item->nextSibling() ); } - QDialog::accept(); + TQDialog::accept(); } void KSaveSelectDialog::save( ) { - QDialog::accept(); + TQDialog::accept(); } void KSaveSelectDialog::cancel( ) { - QDialog::reject(); + TQDialog::reject(); } KURL::List KSaveSelectDialog::filesToSave( ) @@ -140,15 +140,15 @@ KURL::List KSaveSelectDialog::filesNotToSave( ) } -KSaveAllDialog::KSaveAllDialog( const QStringList& filenames, QWidget* parent ) : +KSaveAllDialog::KSaveAllDialog( const TQStringList& filenames, TQWidget* parent ) : KDialogBase( parent, "SaveAllDialog", true, i18n("Save Modified Files?"), Ok | User1 | Close ) { m_result = Cancel; - QVBox *top = makeVBoxMainWidget(); + TQVBox *top = makeVBoxMainWidget(); - (void)new QLabel( i18n("The following files have been modified. Save them?"), top ); + (void)new TQLabel( i18n("The following files have been modified. Save them?"), top ); KListBox* lb = new KListBox( top ); lb->setMinimumHeight( lb->fontMetrics().height() * 5 ); lb->insertStringList( filenames ); @@ -159,9 +159,9 @@ KSaveAllDialog::KSaveAllDialog( const QStringList& filenames, QWidget* parent ) 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()) ); + connect( this, TQT_SIGNAL(closeClicked()), this, TQT_SLOT(cancel()) ); + connect( this, TQT_SIGNAL(okClicked()), this, TQT_SLOT(saveAll()) ); + connect( this, TQT_SIGNAL(user1Clicked()), this, TQT_SLOT(revert()) ); } KSaveAllDialog::~KSaveAllDialog() @@ -171,19 +171,19 @@ KSaveAllDialog::~KSaveAllDialog() void KSaveAllDialog::revert() { m_result = Revert; - QDialog::accept(); + TQDialog::accept(); } void KSaveAllDialog::saveAll() { m_result = SaveAll; - QDialog::accept(); + TQDialog::accept(); } void KSaveAllDialog::cancel() { m_result = Cancel; - QDialog::reject(); + TQDialog::reject(); } #include "ksavealldialog.moc" diff --git a/lib/ksavealldialog.h b/lib/ksavealldialog.h index 9d7860cf..c6592b4a 100644 --- a/lib/ksavealldialog.h +++ b/lib/ksavealldialog.h @@ -20,7 +20,7 @@ #ifndef SAVEALLDIALOG_H #define SAVEALLDIALOG_H -#include +#include #include #include @@ -38,7 +38,7 @@ class KSaveSelectDialog : public KDialogBase Q_OBJECT public: - KSaveSelectDialog( KURL::List const & filelist, KURL::List const & ignorelist, QWidget * parent ); + KSaveSelectDialog( KURL::List const & filelist, KURL::List const & ignorelist, TQWidget * parent ); virtual ~KSaveSelectDialog(); KURL::List filesToSave(); @@ -65,7 +65,7 @@ class KSaveAllDialog : public KDialogBase public: enum SaveAllResult{ SaveAll, Cancel, Revert }; - KSaveAllDialog( const QStringList& filenames, QWidget* parent ); + KSaveAllDialog( const TQStringList& filenames, TQWidget* parent ); virtual ~KSaveAllDialog(); SaveAllResult result() const { return m_result; } diff --git a/lib/qextfileinfo.cpp b/lib/qextfileinfo.cpp index b7c7e741..7ff92c60 100644 --- a/lib/qextfileinfo.cpp +++ b/lib/qextfileinfo.cpp @@ -12,12 +12,12 @@ //qt includes -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include //kde includes #include @@ -32,34 +32,34 @@ //app includes #include "qextfileinfo.h" -QString QExtFileInfo::lastErrorMsg = ""; +TQString QExtFileInfo::lastErrorMsg = ""; -QString QExtFileInfo::canonicalPath(const QString& path) +TQString QExtFileInfo::canonicalPath(const TQString& path) { if (!path.startsWith("/") || path == "/") return path; bool endsWithSlash = path.endsWith("/"); - QDir dir(path); - if (dir.exists() || QFileInfo(path).exists()) + TQDir dir(path); + if (dir.exists() || TQFileInfo(path).exists()) { - QString s = dir.canonicalPath(); + TQString s = dir.canonicalPath(); if (endsWithSlash) s.append("/"); return s; } else { KURL u = KURL::fromPathOrURL(path).upURL(); - QString s = u.path(-1) + "/"; + TQString s = u.path(-1) + "/"; if (s == "//") s = "/"; - QString s2 = path.mid(s.length()); + TQString s2 = path.mid(s.length()); s2 = QExtFileInfo::canonicalPath(s) + s2; return s2; } } -QString QExtFileInfo::homeDirPath() +TQString QExtFileInfo::homeDirPath() { - return QDir(QDir::homeDirPath()).canonicalPath(); + return TQDir(TQDir::homeDirPath()).canonicalPath(); } /** create a relative short url based in baseURL*/ @@ -72,7 +72,7 @@ KURL QExtFileInfo::toRelative(const KURL& _urlToConvert,const KURL& _baseURL, bo { if (urlToConvert.isLocalFile()) { - QString path; + TQString path; if (resolveSymlinks) path = QExtFileInfo::canonicalPath(urlToConvert.path()); else @@ -86,8 +86,8 @@ KURL QExtFileInfo::toRelative(const KURL& _urlToConvert,const KURL& _baseURL, bo if (!path.isEmpty()) baseURL.setPath(path); } - QString path = urlToConvert.path(); - QString basePath = baseURL.path(1); + TQString path = urlToConvert.path(); + TQString basePath = baseURL.path(1); if (path.startsWith("/")) { path.remove(0, 1); @@ -118,7 +118,7 @@ KURL QExtFileInfo::toRelative(const KURL& _urlToConvert,const KURL& _baseURL, bo }; } - resultURL.setPath(QDir::cleanDirPath(path)); + resultURL.setPath(TQDir::cleanDirPath(path)); } if (urlToConvert.path().endsWith("/") && !resultURL.path().isEmpty()) @@ -136,20 +136,20 @@ KURL QExtFileInfo::toAbsolute(const KURL& _urlToConvert,const KURL& _baseURL) { if (urlToConvert.isLocalFile()) { - QString path = QExtFileInfo::canonicalPath(baseURL.path()); + TQString path = QExtFileInfo::canonicalPath(baseURL.path()); if (!path.isEmpty()) baseURL.setPath(path); } int pos; - QString cutname = urlToConvert.path(); - QString cutdir = baseURL.path(1); + TQString cutname = urlToConvert.path(); + TQString 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)); + resultURL.setPath(TQDir::cleanDirPath(cutdir+cutname)); } if (urlToConvert.path().endsWith("/")) resultURL.adjustPath(1); @@ -161,13 +161,13 @@ KURL QExtFileInfo::toAbsolute(const KURL& _urlToConvert,const KURL& _baseURL) 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) +KURL::List QExtFileInfo::allFiles( const KURL& path, const TQString& mask, TQWidget *window) { QExtFileInfo internalFileInfo; return internalFileInfo.allFilesInternal(path, mask, window); } -KURL::List QExtFileInfo::allFilesRelative( const KURL& path, const QString& mask, QWidget *window, bool resolveSymlinks) +KURL::List QExtFileInfo::allFilesRelative( const KURL& path, const TQString& mask, TQWidget *window, bool resolveSymlinks) { QExtFileInfo internalFileInfo; KURL::List r = internalFileInfo.allFilesInternal(path, mask, window); @@ -181,14 +181,14 @@ KURL::List QExtFileInfo::allFilesRelative( const KURL& path, const QString& mask return r; } -QDict QExtFileInfo::allFilesDetailed(const KURL& path, const QString& mask, QWidget *window) +TQDict QExtFileInfo::allFilesDetailed(const KURL& path, const TQString& mask, TQWidget *window) { QExtFileInfo internalFileInfo; return internalFileInfo.allFilesDetailedInternal(path, mask, window); } -bool QExtFileInfo::createDir(const KURL& path, QWidget *window) +bool QExtFileInfo::createDir(const KURL& path, TQWidget *window) { int i = 0; bool result; @@ -226,7 +226,7 @@ bool QExtFileInfo::createDir(const KURL& path, QWidget *window) KURL QExtFileInfo::cdUp(const KURL &url) { KURL u = url; - QString dir = u.path(-1); + TQString dir = u.path(-1); while ( !dir.isEmpty() && dir.right(1) != "/" ) { dir.remove( dir.length()-1,1); @@ -235,7 +235,7 @@ KURL QExtFileInfo::cdUp(const KURL &url) return u; } -QString QExtFileInfo::shortName(const QString &fname) +TQString QExtFileInfo::shortName(const TQString &fname) { return fname.section("/", -1); } @@ -250,12 +250,12 @@ KURL QExtFileInfo::path( const KURL &url ) KURL QExtFileInfo::home() { KURL url; - url.setPath(QDir::currentDirPath()+"/"); + url.setPath(TQDir::currentDirPath()+"/"); return url; } -bool QExtFileInfo::exists(const KURL& a_url, bool readingOnly, QWidget *window) +bool QExtFileInfo::exists(const KURL& a_url, bool readingOnly, TQWidget *window) { // Andras: Don't use it now, as it brings up an extra dialog and need manual // intervention when usign fish @@ -264,7 +264,7 @@ bool QExtFileInfo::exists(const KURL& a_url, bool readingOnly, QWidget *window) // No dialog when stating. if (a_url.isLocalFile()) { - return QFile::exists(a_url.path()); + return TQFile::exists(a_url.path()); } else { QExtFileInfo internalFileInfo; @@ -274,14 +274,14 @@ bool QExtFileInfo::exists(const KURL& a_url, bool readingOnly, QWidget *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 ) + bool overwrite, bool resume, TQWidget* 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) +KURL::List QExtFileInfo::allFilesInternal(const KURL& startURL, const TQString& mask, TQWidget *window) { if (startURL.isLocalFile()) return allLocalFiles(startURL.path(-1), mask); @@ -292,18 +292,18 @@ KURL::List QExtFileInfo::allFilesInternal(const KURL& startURL, const QString& m 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 ) ); + TQStringList list = TQStringList::split( ' ', mask ); + for ( TQStringList::Iterator it = list.begin(); it != list.end(); ++it ) + lstFilters.append( new TQRegExp(*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 *) ) ); + connect(job, TQT_SIGNAL(entries(KIO::Job *, const KIO::UDSEntryList&)), + this, TQT_SLOT(slotNewEntries(KIO::Job *, const KIO::UDSEntryList&))); + connect( job, TQT_SIGNAL( result (KIO::Job *) ), + this, TQT_SLOT( slotListResult (KIO::Job *) ) ); m_listStartURL = startURL.url(); //kdDebug(24000) << "Now listing: " << startURL.url() << endl; @@ -320,7 +320,7 @@ KURL::List QExtFileInfo::allFilesInternal(const KURL& startURL, const QString& m } /** No descriptions */ -QDict QExtFileInfo::allFilesDetailedInternal(const KURL& startURL, const QString& mask, QWidget *window) +TQDict QExtFileInfo::allFilesDetailedInternal(const KURL& startURL, const TQString& mask, TQWidget *window) { detailedDirListItems.setAutoDelete(true); detailedDirListItems.clear(); @@ -330,18 +330,18 @@ QDict QExtFileInfo::allFilesDetailedInternal(const KURL& startURL, co 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 ) ); + TQStringList list = TQStringList::split( ' ', mask ); + for ( TQStringList::Iterator it = list.begin(); it != list.end(); ++it ) + lstFilters.append( new TQRegExp(*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 *) ) ); + connect(job, TQT_SIGNAL(entries(KIO::Job *, const KIO::UDSEntryList&)), + this, TQT_SLOT(slotNewDetailedEntries(KIO::Job *, const KIO::UDSEntryList&))); + connect( job, TQT_SIGNAL( result (KIO::Job *) ), + this, TQT_SLOT( slotListResult (KIO::Job *) ) ); m_listStartURL = startURL.url(); //kdDebug(24000) << "Now listing: " << startURL.url() << endl; enter_loop(); @@ -356,27 +356,27 @@ QDict QExtFileInfo::allFilesDetailedInternal(const KURL& startURL, co return detailedDirListItems; } -KURL::List QExtFileInfo::allLocalFiles(const QString& startPath, const QString& mask) +KURL::List QExtFileInfo::allLocalFiles(const TQString& startPath, const TQString& 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) + TQDir d(startPath, mask); + TQStringList l = d.entryList(); + TQStringList::ConstIterator end = l.constEnd(); + TQString path; + for (TQStringList::ConstIterator it = l.constBegin(); it != end; ++it) { path = *it; if (path != "." && path != "..") { path = startPath + "/" + path; - if (QFileInfo(path).isDir()) + if (TQFileInfo(path).isDir()) path.append("/"); list.append(KURL::fromPathOrURL(path)); } } - l = d.entryList("*", QDir::Dirs); + l = d.entryList("*", TQDir::Dirs); end = l.constEnd(); - for (QStringList::ConstIterator it = l.constBegin(); it != end; ++it) + for (TQStringList::ConstIterator it = l.constBegin(); it != end; ++it) { if ((*it) != "." && (*it) != "..") list += allLocalFiles(startPath + "/" + (*it), mask); @@ -387,7 +387,7 @@ KURL::List QExtFileInfo::allLocalFiles(const QString& startPath, const QString& //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) +bool QExtFileInfo::internalExists(const KURL& url, bool readingOnly, TQWidget *window) { bJobOK = true; KURL url2 = url; @@ -397,11 +397,11 @@ bool QExtFileInfo::internalExists(const KURL& url, bool readingOnly, QWidget *wi job->setWindow(window); job->setDetails(0); job->setSide(readingOnly); - connect( job, SIGNAL( result (KIO::Job *) ), - this, SLOT( slotResult (KIO::Job *) ) ); + connect( job, TQT_SIGNAL( result (KIO::Job *) ), + this, TQT_SLOT( slotResult (KIO::Job *) ) ); //To avoid lock-ups, start a timer. - QTimer::singleShot(60*1000, this,SLOT(slotTimeout())); + TQTimer::singleShot(60*1000, this,TQT_SLOT(slotTimeout())); //kdDebug(24000)<<"QExtFileInfo::internalExists:before enter_loop"<setWindow (window); - //connect( job2, SIGNAL( result (KIO::Job *) ), -// this, SLOT( slotResult (KIO::Job *) ) ); + //connect( job2, TQT_SIGNAL( result (KIO::Job *) ), +// this, TQT_SLOT( slotResult (KIO::Job *) ) ); //enter_loop(); //if (bJobOK) @@ -426,21 +426,21 @@ bool QExtFileInfo::internalCopy(const KURL& src, const KURL& target, int permiss // 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 *) ) ); + connect( job, TQT_SIGNAL( result (KIO::Job *) ), + this, TQT_SLOT( slotResult (KIO::Job *) ) ); enter_loop(); } return bJobOK; } -void qt_enter_modal( QWidget *widget ); -void qt_leave_modal( QWidget *widget ); +void qt_enter_modal( TQWidget *widget ); +void qt_leave_modal( TQWidget *widget ); void QExtFileInfo::enter_loop() { - QWidget dummy(0,0,WType_Dialog | WShowModal); - dummy.setFocusPolicy( QWidget::NoFocus ); + TQWidget dummy(0,0,WType_Dialog | WShowModal); + dummy.setFocusPolicy( TQWidget::NoFocus ); qt_enter_modal(&dummy); //kdDebug(24000)<<"QExtFileInfo::enter_loop:before qApp->enter_loop()"<< endl; qApp->enter_loop(); @@ -474,17 +474,17 @@ void QExtFileInfo::slotNewEntries(KIO::Job *job, const KIO::UDSEntryList& udsLis KURL url = static_cast(job)->url(); url.adjustPath(-1); // avoid creating these QStrings again and again - static const QString& dot = KGlobal::staticQString("."); - static const QString& dotdot = KGlobal::staticQString(".."); + static const TQString& dot = KGlobal::staticQString("."); + static const TQString& dotdot = KGlobal::staticQString(".."); KIO::UDSEntryListConstIterator it = udsList.begin(); KIO::UDSEntryListConstIterator end = udsList.end(); KURL itemURL; - QPtrList linkItems; + TQPtrList linkItems; linkItems.setAutoDelete(true); for ( ; it != end; ++it ) { - QString name; + TQString name; // find out about the name KIO::UDSEntry::ConstIterator entit = (*it).begin(); @@ -501,7 +501,7 @@ void QExtFileInfo::slotNewEntries(KIO::Job *job, const KIO::UDSEntryList& udsLis if (item->isDir() && item->isLink()) { KURL u = item->url(); - QString linkDest = item->linkDest(); + TQString linkDest = item->linkDest(); kdDebug(24000) << "Got link: " << name << " Points to:" << linkDest << endl; if (linkDest.startsWith("./") || linkDest.startsWith("../") ) { @@ -523,7 +523,7 @@ void QExtFileInfo::slotNewEntries(KIO::Job *job, const KIO::UDSEntryList& udsLis itemURL = item->url(); if (item->isDir()) itemURL.adjustPath(1); - for (QPtrListIterator filterIt(lstFilters); filterIt.current(); ++filterIt ) + for (TQPtrListIterator filterIt(lstFilters); filterIt.current(); ++filterIt ) { if (filterIt.current()->exactMatch(item->text())) dirListItems.append(itemURL); @@ -531,15 +531,15 @@ void QExtFileInfo::slotNewEntries(KIO::Job *job, const KIO::UDSEntryList& udsLis delete item; } } - for (QPtrList::ConstIterator it = linkItems.constBegin(); it != linkItems.constEnd(); ++it) + for (TQPtrList::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 *))); + connect( ljob, TQT_SIGNAL(entries(KIO::Job *,const KIO::UDSEntryList &)), + this,TQT_SLOT (slotNewEntries(KIO::Job *,const KIO::UDSEntryList &))); + connect( ljob, TQT_SIGNAL(result(KIO::Job *)), + this,TQT_SLOT (slotListResult(KIO::Job *))); } } @@ -548,17 +548,17 @@ void QExtFileInfo::slotNewDetailedEntries(KIO::Job *job, const KIO::UDSEntryList KURL url = static_cast(job)->url(); url.adjustPath(-1); // avoid creating these QStrings again and again - static const QString& dot = KGlobal::staticQString("."); - static const QString& dotdot = KGlobal::staticQString(".."); + static const TQString& dot = KGlobal::staticQString("."); + static const TQString& dotdot = KGlobal::staticQString(".."); KIO::UDSEntryListConstIterator it = udsList.begin(); KIO::UDSEntryListConstIterator end = udsList.end(); KURL itemURL; - QPtrList linkItems; + TQPtrList linkItems; linkItems.setAutoDelete(true); for ( ; it != end; ++it ) { - QString name; + TQString name; // find out about the name KIO::UDSEntry::ConstIterator entit = (*it).begin(); @@ -576,7 +576,7 @@ void QExtFileInfo::slotNewDetailedEntries(KIO::Job *job, const KIO::UDSEntryList { KURL u = item->url(); u.setPath(item->linkDest()); - QString urlStr = u.url(); + TQString urlStr = u.url(); if (detailedDirListItems.find(urlStr) == 0L && (urlStr != m_listStartURL)) { @@ -588,7 +588,7 @@ void QExtFileInfo::slotNewDetailedEntries(KIO::Job *job, const KIO::UDSEntryList } } bool added = false; - for (QPtrListIterator filterIt( lstFilters ); filterIt.current(); ++filterIt) + for (TQPtrListIterator filterIt( lstFilters ); filterIt.current(); ++filterIt) if (filterIt.current()->exactMatch(item->text())) { detailedDirListItems.insert(item->url().url(), item); @@ -598,15 +598,15 @@ void QExtFileInfo::slotNewDetailedEntries(KIO::Job *job, const KIO::UDSEntryList delete item; } } - for (QPtrList::ConstIterator it = linkItems.constBegin(); it != linkItems.constEnd(); ++it) + for (TQPtrList::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 *))); + connect( ljob, TQT_SIGNAL(entries(KIO::Job *,const KIO::UDSEntryList &)), + this,TQT_SLOT (slotNewDetailedEntries(KIO::Job *,const KIO::UDSEntryList &))); + connect( ljob, TQT_SIGNAL(result(KIO::Job *)), + this,TQT_SLOT (slotListResult(KIO::Job *))); } } diff --git a/lib/qextfileinfo.h b/lib/qextfileinfo.h index dd05cb41..96d418fb 100644 --- a/lib/qextfileinfo.h +++ b/lib/qextfileinfo.h @@ -17,10 +17,10 @@ #include #include -#include -#include -#include -#include +#include +#include +#include +#include class QExtFileInfo:public QObject { @@ -30,7 +30,7 @@ public: ~QExtFileInfo() {}; /** - * Works like QDir::canonicalPath, but it does not return an empty + * Works like TQDir::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. @@ -42,36 +42,36 @@ public: * @param path the path to resolve * @return the canonical path (symlinks resolved) */ - static QString canonicalPath(const QString& path); + static TQString canonicalPath(const TQString& path); /** - * Similar to QDir::homeDirPath(), but returns a resolved path. + * Similar to TQDir::homeDirPath(), but returns a resolved path. * */ - static QString homeDirPath(); + static TQString 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); + static KURL::List allFiles( const KURL& path, const TQString &mask, TQWidget *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); + static KURL::List allFilesRelative( const KURL& path, const TQString &mask, TQWidget *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 allFilesDetailed(const KURL& path, const QString &mask, QWidget *window); + static TQDict allFilesDetailed(const KURL& path, const TQString &mask, TQWidget *window); /** Creates a dir if don't exists. */ - static bool createDir(const KURL & path, QWidget *window); + static bool createDir(const KURL & path, TQWidget *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 ); + static TQString shortName(const TQString &fname ); /** Returns the path to the url. */ static KURL path(const KURL &); /** Returns the user's home directory as an url. */ @@ -79,31 +79,31 @@ public: /** 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); + static bool exists(const KURL& url, bool readingOnly, TQWidget *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 ); + bool overwrite=false, bool resume=false, TQWidget* 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 internalExists(const KURL& url, bool readingOnly, TQWidget *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 allFilesDetailedInternal(const KURL& startURL, const QString& mask, QWidget *window); - KURL::List allLocalFiles(const QString& startPath, const QString& mask); + bool overwrite, bool resume, TQWidget* window); + KURL::List allFilesInternal(const KURL& startURL, const TQString& mask, TQWidget *window); + TQDict allFilesDetailedInternal(const KURL& startURL, const TQString& mask, TQWidget *window); + KURL::List allLocalFiles(const TQString& startPath, const TQString& mask); bool bJobOK; - static QString lastErrorMsg; + static TQString lastErrorMsg; KIO::UDSEntry m_entry; KURL::List dirListItems; - QDict detailedDirListItems; - QPtrList lstFilters; + TQDict detailedDirListItems; + TQPtrList lstFilters; int m_listJobCount; - QString m_listStartURL; + TQString m_listStartURL; private slots: void slotListResult(KIO::Job *job); diff --git a/quanta/components/csseditor/colorrequester.cpp b/quanta/components/csseditor/colorrequester.cpp index 1333a48e..d2164b06 100644 --- a/quanta/components/csseditor/colorrequester.cpp +++ b/quanta/components/csseditor/colorrequester.cpp @@ -18,8 +18,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include @@ -30,11 +30,11 @@ 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& ))); } + void setText( const TQString& text ) { edit->setText( text ); } + void connectSignals( TQObject *receiver ) { connect( edit, TQT_SIGNAL( textChanged( const TQString& )),receiver, TQT_SIGNAL( textChanged( const TQString& ))); } }; -colorRequester::colorRequester(QWidget *parent, const char* name) : miniEditor(parent,name){ +colorRequester::colorRequester(TQWidget *parent, const char* name) : miniEditor(parent,name){ d = new colorRequesterPrivate; init(); } @@ -45,7 +45,7 @@ colorRequester::~colorRequester(){ } void colorRequester::connectToPropertySetter(propertySetter* p){ - connect( this, SIGNAL(textChanged(const QString&)), p, SIGNAL(valueChanged(const QString&))); + connect( this, TQT_SIGNAL(textChanged(const TQString&)), p, TQT_SIGNAL(valueChanged(const TQString&))); } void colorRequester::init() @@ -56,31 +56,31 @@ void colorRequester::init() 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 ); + TQIconSet iconSet = SmallIconSet(TQString::fromLatin1("colorize")); + TQPixmap pixMap = iconSet.pixmap( TQIconSet::Small, TQIconSet::Normal ); myButton->setIconSet( iconSet ); myButton->setFixedSize( pixMap.width()+8, pixMap.height()+8 ); - QToolTip::add(myButton, i18n("Open color dialog")); + TQToolTip::add(myButton, i18n("Open color dialog")); setSpacing( KDialog::spacingHint() ); - QWidget *widget = (QWidget*) d->edit; + TQWidget *widget = (TQWidget*) 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&*/ ) )); + connect( myButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( openColorDialog() )); + connect( d->edit, TQT_SIGNAL( textChanged ( const TQString & ) ), this, TQT_SLOT( setInitialValue(/*const TQString&*/ ) )); KAccel *accel = new KAccel( this ); - accel->insert( KStdAccel::Open, this, SLOT( openColorDialog() )); + accel->insert( KStdAccel::Open, this, TQT_SLOT( openColorDialog() )); accel->readSettings(); } void colorRequester::openColorDialog(){ KColorDialog dlg(this,"dlg",true); - dlg.setColor(QColor(m_initialValue)); + dlg.setColor(TQColor(m_initialValue)); if(dlg.exec()){ - QColor myColor(dlg.color()); + TQColor myColor(dlg.color()); d->edit->setText(myColor.name()); emit textChanged(myColor.name()); } @@ -90,13 +90,13 @@ KLineEdit * colorRequester::lineEdit() const{ return d->edit; } #include -void colorRequester::setInitialValue(/*const QString& s*/){ - QString temp = d->edit->text(); +void colorRequester::setInitialValue(/*const TQString& s*/){ + TQString temp = d->edit->text(); temp.remove(" "); if( temp.contains("#") != 0){ temp.remove("#"); if(temp.length() == 3) { - QString temp2; + TQString temp2; temp2.append(temp[0]); temp2.append(temp[0]); temp2.append(temp[1]); @@ -115,7 +115,7 @@ void colorRequester::setInitialValue(/*const QString& s*/){ if( temp.contains("rgb(") != 0){ temp.remove("rgb(").remove(")"); - QStringList rgbValues = QStringList::split(",",temp); + TQStringList rgbValues = TQStringList::split(",",temp); // bool ok; int r = rgbValues[0].toInt(); int g = rgbValues[1].toInt(); diff --git a/quanta/components/csseditor/colorrequester.h b/quanta/components/csseditor/colorrequester.h index e0b4be4f..baf95d86 100644 --- a/quanta/components/csseditor/colorrequester.h +++ b/quanta/components/csseditor/colorrequester.h @@ -17,7 +17,7 @@ #define COLORREQUESTER_H #include -#include +#include #include "minieditor.h" @@ -26,25 +26,25 @@ class KColorDialog; class colorRequester : public miniEditor{ Q_OBJECT public: - colorRequester(QWidget *parent, const char* name=0); + colorRequester(TQWidget *parent, const char* name=0); ~colorRequester(); KLineEdit * lineEdit() const; KPushButton * button() const { return myButton; } virtual void connectToPropertySetter(propertySetter* p); - //void setInitialValue(const QString&); + //void setInitialValue(const TQString&); public slots: void openColorDialog(); - void setInitialValue(/*const QString&*/); + void setInitialValue(/*const TQString&*/); protected: void init(); signals: - void selectedColor(QColor); - void textChanged(const QString&); + void selectedColor(TQColor); + void textChanged(const TQString&); private: mutable KColorDialog * myColorDialog; KPushButton *myButton; class colorRequesterPrivate; colorRequesterPrivate *d; - QColor m_initialValue; + TQColor m_initialValue; }; #endif diff --git a/quanta/components/csseditor/colorslider.cpp b/quanta/components/csseditor/colorslider.cpp index 436c7e21..98019f23 100644 --- a/quanta/components/csseditor/colorslider.cpp +++ b/quanta/components/csseditor/colorslider.cpp @@ -15,8 +15,8 @@ * * ***************************************************************************/ -#include -#include +#include +#include #include @@ -29,27 +29,27 @@ -colorSlider::colorSlider(const QString& fn,const QString& l,const QString& c,const QString& r,QWidget *parent, const char *name) : miniEditor(parent,name) { +colorSlider::colorSlider(const TQString& fn,const TQString& l,const TQString& c,const TQString& r,TQWidget *parent, const char *name) : miniEditor(parent,name) { m_functionName = fn; - QVBox *leftBox = new QVBox(this); - QVBox *centerBox = new QVBox(this); - QVBox *rightBox = new QVBox(this); - QLabel *leftLabel = new QLabel("" + l +"",leftBox); - QLabel *centerLabel = new QLabel(("" + c +""),centerBox); - QLabel *rightLabel = new QLabel(("" + r +""),rightBox); + TQVBox *leftBox = new TQVBox(this); + TQVBox *centerBox = new TQVBox(this); + TQVBox *rightBox = new TQVBox(this); + TQLabel *leftLabel = new TQLabel("" + l +"",leftBox); + TQLabel *centerLabel = new TQLabel(("" + c +""),centerBox); + TQLabel *rightLabel = new TQLabel(("" + r +""),rightBox); leftLabel->setAlignment(Qt::AlignHCenter); centerLabel->setAlignment(Qt::AlignHCenter); rightLabel->setAlignment(Qt::AlignHCenter); leftLabel->setTextFormat (Qt::RichText ) ; centerLabel->setTextFormat ( Qt::RichText ) ; rightLabel->setTextFormat (Qt::RichText ) ; - m_leftValue = new QSlider ( 0, 255, 1, 0, Qt::Horizontal , leftBox); - m_centerValue = new QSlider ( 0, 255, 1, 0, Qt::Horizontal , centerBox); - m_rightValue = new QSlider ( 0, 255, 1, 0, Qt::Horizontal , rightBox); + m_leftValue = new TQSlider ( 0, 255, 1, 0, Qt::Horizontal , leftBox); + m_centerValue = new TQSlider ( 0, 255, 1, 0, Qt::Horizontal , centerBox); + m_rightValue = new TQSlider ( 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))); + connect(m_leftValue, TQT_SIGNAL(valueChanged ( int)), this, TQT_SLOT(convertLeftValue(int))); + connect(m_centerValue, TQT_SIGNAL(valueChanged ( int)), this, TQT_SLOT(convertCenterValue(int))); + connect(m_rightValue, TQT_SIGNAL(valueChanged ( int)), this, TQT_SLOT(convertRightValue(int))); } colorSlider::~colorSlider(){ @@ -59,26 +59,26 @@ colorSlider::~colorSlider(){ } void colorSlider::connectToPropertySetter(propertySetter* p){ - connect( this, SIGNAL(valueChanged(const QString&)), p, SIGNAL(valueChanged(const QString&))); + connect( this, TQT_SIGNAL(valueChanged(const TQString&)), p, TQT_SIGNAL(valueChanged(const TQString&))); } 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) +")"); + emit valueChanged(m_functionName + "(" + TQString::number(i,10) + "," + TQString::number(m_centerValue->value(),10) + "," +TQString::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) +")"); + emit valueChanged(m_functionName + "(" + TQString::number(m_leftValue->value(),10) + "," + TQString::number(i,10) + "," + TQString::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) +")"); + emit valueChanged(m_functionName + "(" + TQString::number(m_leftValue->value(),10) + "," + TQString::number(m_centerValue->value(),10) + "," + TQString::number(i,10) +")"); } -RGBcolorSlider::RGBcolorSlider(QWidget *parent, const char *name) : colorSlider("rgb",i18n("Red"),i18n("Green"),i18n("Blue"),parent,name){ +RGBcolorSlider::RGBcolorSlider(TQWidget *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){ +/*HSLcolorSlider::HSLcolorSlider(TQWidget *parent, const char *name) : colorSlider("hsl",i18n("Hue"),i18n("Saturation"),i18n("Lightness"),parent,name){ } */ diff --git a/quanta/components/csseditor/colorslider.h b/quanta/components/csseditor/colorslider.h index 41a78fa9..d2e0b11b 100644 --- a/quanta/components/csseditor/colorslider.h +++ b/quanta/components/csseditor/colorslider.h @@ -18,7 +18,7 @@ #ifndef COLORSLIDER_H #define COLORSLIDER_H -#include +#include #include "minieditor.h" @@ -31,13 +31,13 @@ class colorSlider : public miniEditor { Q_OBJECT private : - QString m_functionName; + TQString m_functionName; protected: - QSlider *m_leftValue, + TQSlider *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); + colorSlider(const TQString& functionName,const TQString& l=TQString::null,const TQString& c=TQString::null,const TQString& r=TQString::null,TQWidget *parent=0, const char *name=0); virtual ~colorSlider(); virtual void connectToPropertySetter(propertySetter* p); @@ -47,13 +47,13 @@ class colorSlider : public miniEditor { void convertRightValue(int i); signals: - void valueChanged(const QString&); + void valueChanged(const TQString&); }; class RGBcolorSlider : public colorSlider { Q_OBJECT public: - RGBcolorSlider(QWidget *parent=0, const char *name=0); + RGBcolorSlider(TQWidget *parent=0, const char *name=0); ~RGBcolorSlider(){} }; @@ -61,7 +61,7 @@ class RGBcolorSlider : public colorSlider { /*class HSLcolorSlider : public colorSlider { Q_OBJECT public: - HSLcolorSlider(QWidget *parent=0, const char *name=0); + HSLcolorSlider(TQWidget *parent=0, const char *name=0); ~HSLcolorSlider(); };*/ diff --git a/quanta/components/csseditor/csseditor.cpp b/quanta/components/csseditor/csseditor.cpp index 692a8edf..553d5478 100644 --- a/quanta/components/csseditor/csseditor.cpp +++ b/quanta/components/csseditor/csseditor.cpp @@ -16,13 +16,13 @@ ***************************************************************************/ #include "csseditor.h" -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -47,11 +47,11 @@ -myCheckListItem::myCheckListItem(QListView * parent, const QString & text):QCheckListItem(parent, text, QCheckListItem::CheckBox),m_checkedChildren(0){ +myCheckListItem::myCheckListItem(TQListView * parent, const TQString & text):TQCheckListItem(parent, text, TQCheckListItem::CheckBox),m_checkedChildren(0){ m_sig = new QSignal; } -myCheckListItem::myCheckListItem(QCheckListItem * parent, const QString & text):QCheckListItem(parent, text, QCheckListItem::CheckBox),m_checkedChildren(0){ +myCheckListItem::myCheckListItem(TQCheckListItem * parent, const TQString & text):TQCheckListItem(parent, text, TQCheckListItem::CheckBox),m_checkedChildren(0){ m_sig = new QSignal; } @@ -59,12 +59,12 @@ myCheckListItem::~myCheckListItem(){ delete m_sig; } -void myCheckListItem::connect( QObject *receiver, const char *member ){ +void myCheckListItem::connect( TQObject *receiver, const char *member ){ m_sig->connect( receiver, member ); } void myCheckListItem::activate(){ - if(isOn()) QCheckListItem::activate(); + if(isOn()) TQCheckListItem::activate(); } void myCheckListItem::addCheckedChild() { @@ -75,9 +75,9 @@ void myCheckListItem::stateChange (bool b){ if(!b) { if(childCount()) { - QListViewItem * child = firstChild(); + TQListViewItem * child = firstChild(); while( child ) { - m_sig->setValue(QVariant(child->text(0))); + m_sig->setValue(TQVariant(child->text(0))); m_sig->activate(); static_cast(child)->setOn(false); child = child->nextSibling(); @@ -90,12 +90,12 @@ void myCheckListItem::stateChange (bool b){ while( p ) { if( p->m_checkedChildren != 1) { p->m_checkedChildren--; - m_sig->setValue(QVariant(text(0))); + m_sig->setValue(TQVariant(text(0))); m_sig->activate(); break; } else { - m_sig->setValue(QVariant(text(0))); + m_sig->setValue(TQVariant(text(0))); m_sig->activate(); p->setOn(false); } @@ -103,7 +103,7 @@ void myCheckListItem::stateChange (bool b){ } } else { - m_sig->setValue(QVariant(text(0))); + m_sig->setValue(TQVariant(text(0))); m_sig->activate(); } } @@ -113,29 +113,29 @@ void myCheckListItem::stateChange (bool b){ } } -void CSSEditor::appendSub(QDomNodeList l, myCheckListItem *cli){ +void CSSEditor::appendSub(TQDomNodeList l, myCheckListItem *cli){ unsigned int i; for(i=0;iconnect(this,SLOT(removeProperty(const QVariant&))); + item->connect(this,TQT_SLOT(removeProperty(const TQVariant&))); if(l.item(i).toElement().attribute("hasSub") == "yes") appendSub(l.item(i).childNodes(),item); } } -void CSSEditor::buildListView(QDomNodeList l, QListView *lv){ +void CSSEditor::buildListView(TQDomNodeList l, TQListView *lv){ unsigned int i; for(i=0;iconnect(this,SLOT(removeProperty(const QVariant&))); + item->connect(this,TQT_SLOT(removeProperty(const TQVariant&))); if(l.item(i).toElement().attribute("hasSub") == "yes") { - QDomNodeList listSub = l.item(i).childNodes(); + TQDomNodeList listSub = l.item(i).childNodes(); appendSub(listSub,item); } } } -void CSSEditor::setCurrentPropOn(const QString& s){ +void CSSEditor::setCurrentPropOn(const TQString& s){ if( (m_currentProp = static_cast(lvVisual->findItem( s,0 )) )) m_currentProp->setOn(true); else @@ -161,12 +161,12 @@ void CSSEditor::setCurrentPropOn(const QString& s){ } - void CSSEditor::addAndSetPropertyOn(const QString& property, const QString& value){ + void CSSEditor::addAndSetPropertyOn(const TQString& property, const TQString& value){ addProperty(property,value); setCurrentPropOn(property); } - void CSSEditor::setSidesOfPropertyBorderOn(const QString& s){ + void CSSEditor::setSidesOfPropertyBorderOn(const TQString& s){ static_cast(lvVisual->findItem( "border-top",0 ))->setOn(true); static_cast(lvVisual->findItem( "border-right",0 ))->setOn(true); static_cast(lvVisual->findItem( "border-bottom",0 ))->setOn(true); @@ -184,20 +184,20 @@ void CSSEditor::hidePreviewer(){ void CSSEditor::initialize(){ m_config = kapp->config(); - connect(pbOk, SIGNAL(clicked()), this, SLOT(toggleShortendForm())); + connect(pbOk, TQT_SIGNAL(clicked()), this, TQT_SLOT(toggleShortendForm())); m_config->setGroup("CSSEditor Options"); SHckb->setChecked(m_config->readBoolEntry("Shorthand form enabled",false)); - QString configFile = locate("appdata", "csseditor/config.xml"); + TQString configFile = locate("appdata", "csseditor/config.xml"); m_myhi = new QMyHighlighter(display); - QBoxLayout *fPreviewLayout = new QBoxLayout(fPreview,QBoxLayout::LeftToRight); + TQBoxLayout *fPreviewLayout = new TQBoxLayout(fPreview,TQBoxLayout::LeftToRight); m_previewer=new KHTMLPart(fPreview); fPreviewLayout->addWidget(m_previewer->view()); - QFile file( configFile ); + TQFile file( configFile ); if ( !file.open( IO_ReadOnly ) ) { return; } @@ -207,11 +207,11 @@ void CSSEditor::initialize(){ } file.close(); - QDomElement docElem = m_doc.documentElement(); + TQDomElement docElem = m_doc.documentElement(); - QDomNode n = docElem.firstChild(); + TQDomNode n = docElem.firstChild(); while( !n.isNull() ) { - QDomElement e = n.toElement(); + TQDomElement e = n.toElement(); if( !e.isNull() ) { if( e.attribute("type") == "visual") { lvVisual->setRootIsDecorated(true); @@ -239,32 +239,32 @@ void CSSEditor::initialize(){ Connect(); - QBoxLayout *fEditingLayout = new QBoxLayout(fEditing,QBoxLayout::LeftToRight); + TQBoxLayout *fEditingLayout = new TQBoxLayout(fEditing,TQBoxLayout::LeftToRight); m_ps = new propertySetter(fEditing); fEditingLayout->addWidget(m_ps); - connect(m_ps, SIGNAL(valueChanged(const QString&)), this, SLOT(checkProperty(const QString&))); + connect(m_ps, TQT_SIGNAL(valueChanged(const TQString&)), this, TQT_SLOT(checkProperty(const TQString&))); - QStringList props; - QString temp; + TQStringList props; + TQString temp; bool normalMode = true; if( !m_selectorName.isEmpty() ){ //the cssselector has been called m_initialProperties = m_initialProperties.stripWhiteSpace(); - props=QStringList::split(";",m_initialProperties); + props=TQStringList::split(";",m_initialProperties); temp= m_selectorName + " {\n\t" ; } else { m_InlineStyleContent = m_InlineStyleContent.stripWhiteSpace(); normalMode = false; - props=QStringList::split(";",m_InlineStyleContent); + props=TQStringList::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)); + for ( TQStringList::Iterator it = props.begin(); it != props.end(); ++it ) { + const TQString propertyName((*it).section(":",0,0).stripWhiteSpace()); + const TQString propertyValue((*it).section(":",1)); if( ShorthandFormer::SHFormList().contains(propertyName)==0 ) { temp+= propertyName + " : " + propertyValue +";\n\t"; @@ -272,8 +272,8 @@ void CSSEditor::initialize(){ } else{ ShorthandFormer decompressor; - QMap expandedProperties = decompressor.expand(propertyName, propertyValue ); - QMap::Iterator it; + TQMap expandedProperties = decompressor.expand(propertyName, propertyValue ); + TQMap::Iterator it; for ( it = expandedProperties.begin(); it != expandedProperties.end(); ++it ) { addAndSetPropertyOn( it.key(), it.data() ); @@ -296,7 +296,7 @@ void CSSEditor::toggleShortendForm() m_config->sync(); } -CSSEditor::CSSEditor(QListViewItem *i, QWidget *parent, const char *name) : CSSEditorS(parent, name){ +CSSEditor::CSSEditor(TQListViewItem *i, TQWidget *parent, const char *name) : CSSEditorS(parent, name){ m_selectorName = i->text(0); m_initialProperties = i->text(1); } @@ -307,21 +307,21 @@ CSSEditor::~CSSEditor() { delete m_previewer; } -void CSSEditor::setMiniEditors(QListViewItem* i){ +void CSSEditor::setMiniEditors(TQListViewItem* i){ m_ps->reset(); if(i->childCount()==0) { m_currentProp = static_cast(i); - QDomNodeList valueTypes = m_doc.elementsByTagName(i->text(0)).item(0).childNodes(); + TQDomNodeList valueTypes = m_doc.elementsByTagName(i->text(0)).item(0).childNodes(); unsigned int i; for(i=0; isetComboBox(); - QStringList values = QStringList::split(",",curr.attribute("value")); + TQStringList values = TQStringList::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))) @@ -362,7 +362,7 @@ void CSSEditor::setMiniEditors(QListViewItem* i){ if(m_properties.contains(m_currentProp->text(0)) !=0 ) editor->setInitialValue(m_properties[m_currentProp->text(0)]); else - editor->setInitialValue(QString::null); + editor->setInitialValue(TQString::null); m_ps->installMiniEditor(editor); } else @@ -381,13 +381,13 @@ void CSSEditor::setMiniEditors(QListViewItem* i){ doubleLengthEditor *editor = new doubleLengthEditor(m_ps); if(m_properties.contains(m_currentProp->text(0)) !=0 ){ - QString temp(m_properties[m_currentProp->text(0)].simplifyWhiteSpace()), + TQString 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); + else editor->setInitialValue(TQString::null,TQString::null); m_ps->installMiniEditor(editor); } else @@ -395,13 +395,13 @@ void CSSEditor::setMiniEditors(QListViewItem* i){ doublePercentageEditor *editor = new doublePercentageEditor(m_ps); if(m_properties.contains(m_currentProp->text(0)) !=0 ){ - QString temp(m_properties[m_currentProp->text(0)].simplifyWhiteSpace()), + TQString 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); + else editor->setInitialValue(TQString::null,TQString::null); m_ps->installMiniEditor(editor); } else @@ -410,7 +410,7 @@ void CSSEditor::setMiniEditors(QListViewItem* i){ if(m_properties.contains(m_currentProp->text(0)) !=0 ) editor->setInitialValue(m_properties[m_currentProp->text(0)]); else - editor->setInitialValue(QString::null); + editor->setInitialValue(TQString::null); m_ps->installMiniEditor(editor); } else @@ -419,7 +419,7 @@ void CSSEditor::setMiniEditors(QListViewItem* i){ if(m_properties.contains(m_currentProp->text(0)) !=0 ) editor->setInitialValue(m_properties[m_currentProp->text(0)]); else - editor->setInitialValue(QString::null); + editor->setInitialValue(TQString::null); m_ps->installMiniEditor(editor); } else @@ -428,7 +428,7 @@ void CSSEditor::setMiniEditors(QListViewItem* i){ if(m_properties.contains(m_currentProp->text(0)) !=0 ) editor->setInitialValue(m_properties[m_currentProp->text(0)]); else - editor->setInitialValue(QString::null); + editor->setInitialValue(TQString::null); m_ps->installMiniEditor(editor); } else @@ -467,8 +467,8 @@ void CSSEditor::setMiniEditors(QListViewItem* i){ 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"))); + editor->cbSx()->insertStringList(TQStringList::split(",",curr.firstChild().toElement().attribute("value"))); + editor->cbDx()->insertStringList(TQStringList::split(",",curr.lastChild().toElement().attribute("value"))); m_ps->installMiniEditor(editor); } else @@ -477,7 +477,7 @@ void CSSEditor::setMiniEditors(QListViewItem* i){ if(m_properties.contains(m_currentProp->text(0)) !=0 ){ editor->setInitialValue(m_properties[m_currentProp->text(0)]); } - else editor->setInitialValue(QString::null); + else editor->setInitialValue(TQString::null); m_ps->installMiniEditor(editor); } } @@ -486,7 +486,7 @@ void CSSEditor::setMiniEditors(QListViewItem* i){ } } -void CSSEditor::checkProperty(const QString& v){ +void CSSEditor::checkProperty(const TQString& v){ if(!m_currentProp->isOn()) m_currentProp->setOn(true); @@ -500,7 +500,7 @@ void CSSEditor::checkProperty(const QString& v){ if(m_currentProp->text(0) =="border-style" ){ setSidesOfPropertyBorderOn("style"); - QStringList values = QStringList::split(" ",v.stripWhiteSpace()); + TQStringList values = TQStringList::split(" ",v.stripWhiteSpace()); addProperty("border-top-style",values[0]); switch(values.count()) { case 1: @@ -530,7 +530,7 @@ void CSSEditor::checkProperty(const QString& v){ else if(m_currentProp->text(0) =="border-width" ){ setSidesOfPropertyBorderOn("width"); - QStringList values = QStringList::split(" ",v.stripWhiteSpace()); + TQStringList values = TQStringList::split(" ",v.stripWhiteSpace()); addProperty("border-top-width",values[0]); switch(values.count()) { case 1: @@ -560,7 +560,7 @@ void CSSEditor::checkProperty(const QString& v){ else if(m_currentProp->text(0) =="border-color" ){ setSidesOfPropertyBorderOn("color"); - QStringList values = QStringList::split(" ",v.stripWhiteSpace()); + TQStringList values = TQStringList::split(" ",v.stripWhiteSpace()); addProperty("border-top-color",values[0]); switch(values.count()) { case 1: @@ -592,22 +592,22 @@ void CSSEditor::checkProperty(const QString& v){ } 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 * ))); + connect(this, TQT_SIGNAL(signalUpdatePreview()), this, TQT_SLOT(updatePreview())); + connect(lvVisual,TQT_SIGNAL(selectionChanged ( TQListViewItem * )),this,TQT_SLOT(setMiniEditors ( TQListViewItem * ))); + connect(lvAll,TQT_SIGNAL( selectionChanged( TQListViewItem * )),this,TQT_SLOT(setMiniEditors ( TQListViewItem * ))); + connect(lvAural,TQT_SIGNAL( selectionChanged( TQListViewItem * )),this,TQT_SLOT(setMiniEditors ( TQListViewItem * ))); + connect(lvInteractive,TQT_SIGNAL( selectionChanged( TQListViewItem * )),this,TQT_SLOT(setMiniEditors ( TQListViewItem * ))); + connect(lvPaged,TQT_SIGNAL( selectionChanged( TQListViewItem * )),this,TQT_SLOT(setMiniEditors ( TQListViewItem * ))); } -void CSSEditor::removeProperty(const QVariant& v){ +void CSSEditor::removeProperty(const TQVariant& v){ m_properties.remove(v.toString()); updatePreview(); } -QString CSSEditor::generateProperties(){ - QString props; - QMap::Iterator it; +TQString CSSEditor::generateProperties(){ + TQString props; + TQMap::Iterator it; if(!SHckb->isChecked()) { for ( it = m_properties.begin(); it != m_properties.end(); ++it ) props+= it.key() + " : " + it.data().stripWhiteSpace() + "; " ; @@ -628,7 +628,7 @@ void CSSEditor::updatePreview(){ void CSSEditor::activatePreview() { if(!m_isFileToPreviewExternal){ - QString testHeader, + TQString testHeader, testFooter, testBody; @@ -641,7 +641,7 @@ void CSSEditor::activatePreview() { testFooter = "\"" ; } - QMap::Iterator it; + TQMap::Iterator it; for ( it = m_properties.begin(); it != m_properties.end(); ++it ) testBody+= it.key() + " : " + it.data() + ";"; @@ -652,22 +652,22 @@ void CSSEditor::activatePreview() { } else { - QString tmp("{"); - QFile file(m_fileToPreview); + TQString tmp("{"); + TQFile file(m_fileToPreview); if ( file.open( IO_ReadOnly ) ) { - QMap::Iterator it; + TQMap::Iterator it; for ( it = m_properties.begin(); it != m_properties.end(); ++it ) tmp+= it.key() + " : " + it.data() + ";"; - QFileInfo fi(m_fileToPreview); + TQFileInfo 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 ); + TQTextStream stream( &file ); m_previewer->begin(KURL(m_fileToPreview)); m_previewer->write(stream.read()); @@ -680,8 +680,8 @@ void CSSEditor::activatePreview() { } void CSSEditor::updateDisplay(){ - QString toDisplay; - QMap::Iterator it; + TQString toDisplay; + TQMap::Iterator it; for ( it = m_properties.begin(); it != m_properties.end(); ++it ) toDisplay += it.key() + " : " + it.data() + ";\n\t"; diff --git a/quanta/components/csseditor/csseditor.h b/quanta/components/csseditor/csseditor.h index 6994a686..3bb44228 100644 --- a/quanta/components/csseditor/csseditor.h +++ b/quanta/components/csseditor/csseditor.h @@ -18,12 +18,12 @@ #ifndef CSSEDITOR_H #define CSSEDITOR_H -#include +#include #include "csseditors.h" -#include -#include -#include -#include +#include +#include +#include +#include class propertySetter; class KConfig; @@ -37,14 +37,14 @@ class QMyHighlighter; class myCheckListItem : public QCheckListItem { private: - QSignal *m_sig; + TQSignal *m_sig; unsigned int m_checkedChildren; public : - myCheckListItem(QCheckListItem * parent, const QString & text); - myCheckListItem(QListView * parent, const QString & text); + myCheckListItem(TQCheckListItem * parent, const TQString & text); + myCheckListItem(TQListView * parent, const TQString & text); ~myCheckListItem(); - void connect( QObject *receiver, const char *member ); + void connect( TQObject *receiver, const char *member ); void addCheckedChild(); protected : @@ -61,9 +61,9 @@ class CSSEditor : public CSSEditorS propertySetter *m_ps; myCheckListItem *m_currentProp; KHTMLPart *m_previewer; - QDomDocument m_doc; - QMap m_properties; - QString m_selectorName, + TQDomDocument m_doc; + TQMap m_properties; + TQString m_selectorName, m_initialProperties, m_Selectors, m_Header, @@ -79,36 +79,36 @@ class CSSEditor : public CSSEditorS //sourceFileName; void Connect(); - void appendSub(QDomNodeList, myCheckListItem *); - void buildListView(QDomNodeList, QListView *); + void appendSub(TQDomNodeList, myCheckListItem *); + void buildListView(TQDomNodeList, TQListView *); 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); + void setCurrentPropOn(const TQString& s); + void addProperty(const TQString& property, const TQString& value) { m_properties[property] = value; } + void addAndSetPropertyOn(const TQString& property, const TQString& value); + void setSidesOfPropertyBorderOn(const TQString& s); private slots: - void checkProperty(const QString&); - void removeProperty(const QVariant&); + void checkProperty(const TQString&); + void removeProperty(const TQVariant&); void updatePreview(); - void setMiniEditors(QListViewItem*); + void setMiniEditors(TQListViewItem*); 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(TQWidget* parent=0, const char *name=0): CSSEditorS(parent, name), m_config(0L){} + CSSEditor( TQListViewItem * i, TQWidget* 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 setSelectors( const TQString& s) { m_Selectors = s; } + void setHeader( const TQString& s) { m_Header = s; } + void setFooter( const TQString& s) { m_Footer = s;} + void setInlineStyleContent( const TQString& s){ m_InlineStyleContent = s; } + TQString generateProperties(); void hidePreviewer(); - void setFileToPreview(const QString& s,bool b) { m_fileToPreview = s; m_isFileToPreviewExternal = b;} - void setExternalStyleSheetDefinition(const QString& s) { m_externalStyleSheetDefinition = s;} + void setFileToPreview(const TQString& s,bool b) { m_fileToPreview = s; m_isFileToPreviewExternal = b;} + void setExternalStyleSheetDefinition(const TQString& s) { m_externalStyleSheetDefinition = s;} signals: void signalUpdatePreview(); diff --git a/quanta/components/csseditor/csseditor_globals.cpp b/quanta/components/csseditor/csseditor_globals.cpp index a73cb876..c2be79c0 100644 --- a/quanta/components/csseditor/csseditor_globals.cpp +++ b/quanta/components/csseditor/csseditor_globals.cpp @@ -15,25 +15,25 @@ * * ***************************************************************************/ -#include +#include #include "csseditor_globals.h" -mySpinBox::mySpinBox(QWidget * parent , const char * name ) : QSpinBox (parent, name){ - connect( editor(), SIGNAL(textChanged(const QString&)), this, SLOT(checkSuffix( const QString & ))); - connect( editor(), SIGNAL(textChanged(const QString&)), this, SIGNAL(valueChanged( const QString & ))); +mySpinBox::mySpinBox(TQWidget * parent , const char * name ) : TQSpinBox (parent, name){ + connect( editor(), TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(checkSuffix( const TQString & ))); + connect( editor(), TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SIGNAL(valueChanged( const TQString & ))); } -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( int minValue, int maxValue, int step, TQWidget * parent, const char * name ) : TQSpinBox( minValue, maxValue, step, parent,name ){ + connect( editor(), TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(checkSuffix( const TQString & ))); + connect( editor(), TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SIGNAL(valueChanged( const TQString & ))); } mySpinBox::~mySpinBox(){} -void mySpinBox::checkSuffix(const QString&){// check if the suffix is present and how many times : it normalizes these times to one +void mySpinBox::checkSuffix(const TQString&){// 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()); + const TQString suf(suffix()); + TQString t(editor()->text()); if( t.contains(suf) ==0 ) { editor()->setText( t + suf); editor()->setCursorPosition(editor()->cursorPosition() - 1); diff --git a/quanta/components/csseditor/csseditor_globals.h b/quanta/components/csseditor/csseditor_globals.h index fefae7c8..b577981e 100644 --- a/quanta/components/csseditor/csseditor_globals.h +++ b/quanta/components/csseditor/csseditor_globals.h @@ -17,12 +17,12 @@ #ifndef CSSEDITOR_GLOBALS_H #define CSSEDITOR_GLOBALS_H -#include -#include -#include +#include +#include +#include namespace CSSEditorGlobals { -const QStringList HTMLColors(QStringList::split(",",QString("aliceblue,antiquewhite,aqua,aquamarine,azure,beige,bisque,black,blanchedalmond," +const TQStringList HTMLColors(TQStringList::split(",",TQString("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," @@ -42,21 +42,21 @@ const QStringList HTMLColors(QStringList::split(",",QString("aliceblue,antiquewh "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"))); + const TQStringList lengthUnits(TQStringList::split(",",TQString("cm,em,ex,in,mm,pc,pt,px"))); + const TQStringList frequencyUnits(TQStringList::split(",",TQString("Hz,kHz"))); + const TQStringList angleUnits(TQStringList::split(",",TQString("deg,rad,grad"))); + const TQStringList timeUnits(TQStringList::split(",",TQString("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(TQWidget * parent = 0, const char * name = 0 ); + mySpinBox( int minValue, int maxValue, int step = 1, TQWidget * parent = 0, const char * name = 0 ); ~mySpinBox(); public slots: - void checkSuffix(const QString&); + void checkSuffix(const TQString&); }; diff --git a/quanta/components/csseditor/cssselector.cpp b/quanta/components/csseditor/cssselector.cpp index 1425102f..73460c05 100644 --- a/quanta/components/csseditor/cssselector.cpp +++ b/quanta/components/csseditor/cssselector.cpp @@ -18,16 +18,16 @@ #include "cssselector.h" #include "csseditor.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -39,7 +39,7 @@ #include "stylesheetparser.h" -CSSSelector::CSSSelector(QWidget *parent, const char* name) : CSSSelectorS (parent,name),m_orderNumber(0),m_stopProcessingStylesheet(false) { +CSSSelector::CSSSelector(TQWidget *parent, const char* name) : CSSSelectorS (parent,name),m_orderNumber(0),m_stopProcessingStylesheet(false) { m_currentItem = 0L; @@ -47,15 +47,15 @@ CSSSelector::CSSSelector(QWidget *parent, const char* name) : CSSSelectorS (pare 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"); + TQWhatsThis::add((TQLineEdit*)(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() + "/";*/ + /*TQString configDir = locate("appdata", "csseditor/config.xml"); + configDir = TQFileInfo(configDir).dirPath() + "/";*/ - QString configDir = QFileInfo( locate("appdata", "csseditor/config.xml") ).dirPath() + "/"; + TQString configDir = TQFileInfo( locate("appdata", "csseditor/config.xml") ).dirPath() + "/"; - QDomDocument doc; - QFile file( configDir+"pseudo.xml" ); + TQDomDocument doc; + TQFile file( configDir+"pseudo.xml" ); if ( !file.open( IO_ReadOnly ) ) return; if ( !doc.setContent( &file ) ) { @@ -64,11 +64,11 @@ CSSSelector::CSSSelector(QWidget *parent, const char* name) : CSSSelectorS (pare } file.close(); - QDomElement docElem = doc.documentElement(); + TQDomElement docElem = doc.documentElement(); - QDomNode n = docElem.firstChild(); + TQDomNode n = docElem.firstChild(); while( !n.isNull() ) { - QDomElement e = n.toElement(); + TQDomElement e = n.toElement(); if( !e.isNull() ) { cbPseudo->insertItem(e.attribute("name")); } @@ -84,17 +84,17 @@ CSSSelector::CSSSelector(QWidget *parent, const char* name) : CSSSelectorS (pare } file.close(); - QStringList dtdNames, + TQStringList dtdNames, dtdNickNames; docElem = doc.documentElement(); n = docElem.firstChild(); while( !n.isNull() ) { - QDomElement e = n.toElement(); + TQDomElement 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() ); + TQStringList tagList = TQStringList::split( ',',e.text() ); tagList.sort(); cbTag->insertStringList( tagList ); cbTag->setAutoCompletion(true); @@ -110,43 +110,43 @@ CSSSelector::~CSSSelector(){ void CSSSelector::Connect(){ - connect(cbDTD,SIGNAL(activated(const QString&)),this,SLOT(setDTDTags(const QString&))); + connect(cbDTD,TQT_SIGNAL(activated(const TQString&)),this,TQT_SLOT(setDTDTags(const TQString&))); - 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(pbAddTag,TQT_SIGNAL(clicked()), this ,TQT_SLOT(addTag())); + connect(pbAddClass,TQT_SIGNAL(clicked()), this ,TQT_SLOT(addClass())); + connect(pbAddID,TQT_SIGNAL(clicked()), this ,TQT_SLOT(addID())); + connect(pbAddPseudo,TQT_SIGNAL(clicked()), this ,TQT_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, TQT_SIGNAL(doubleClicked( TQListViewItem * )), this, TQT_SLOT(openCSSEditor(TQListViewItem *))); + connect(lvClasses, TQT_SIGNAL(doubleClicked( TQListViewItem * )), this, TQT_SLOT(openCSSEditor(TQListViewItem *))); + connect(lvIDs, TQT_SIGNAL(doubleClicked( TQListViewItem * )), this, TQT_SLOT(openCSSEditor(TQListViewItem *))); + connect(lvPseudo, TQT_SIGNAL(doubleClicked( TQListViewItem * )), this, TQT_SLOT(openCSSEditor(TQListViewItem *))); - 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(lvTags, TQT_SIGNAL(selectionChanged( TQListViewItem * )), this, TQT_SLOT(setCurrentItem(TQListViewItem *))); + connect(lvClasses, TQT_SIGNAL(selectionChanged( TQListViewItem * )), this, TQT_SLOT(setCurrentItem(TQListViewItem *))); + connect(lvIDs, TQT_SIGNAL(selectionChanged( TQListViewItem * )), this, TQT_SLOT(setCurrentItem(TQListViewItem *))); + connect(lvPseudo, TQT_SIGNAL( selectionChanged( TQListViewItem * )), this, TQT_SLOT(setCurrentItem(TQListViewItem *))); - 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(pbRemoveSelectedTag,TQT_SIGNAL(clicked()), this ,TQT_SLOT(removeSelected())); + connect(pbRemoveSelectedClass,TQT_SIGNAL(clicked()), this ,TQT_SLOT(removeSelected())); + connect(pbRemoveSelectedID,TQT_SIGNAL(clicked()), this ,TQT_SLOT(removeSelected())); + connect(pbRemoveSelectedPseudo,TQT_SIGNAL(clicked()), this ,TQT_SLOT(removeSelected())); - connect(twSelectors,SIGNAL(currentChanged ( QWidget * )), this ,SLOT(setCurrentListView( QWidget * ))); + connect(twSelectors,TQT_SIGNAL(currentChanged ( TQWidget * )), this ,TQT_SLOT(setCurrentListView( TQWidget * ))); - 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())); + connect(pbRemoveAllTags,TQT_SIGNAL(clicked()), this ,TQT_SLOT(removeAll())); + connect(pbRemoveAllClasses,TQT_SIGNAL(clicked()), this ,TQT_SLOT(removeAll())); + connect(pbRemoveAllIDs,TQT_SIGNAL(clicked()), this ,TQT_SLOT(removeAll())); + connect(pbRemoveAllPseudo,TQT_SIGNAL(clicked()), this ,TQT_SLOT(removeAll())); } -void CSSSelector::setDTDTags(const QString& s){ +void CSSSelector::setDTDTags(const TQString& s){ - QString configDir = QFileInfo( locate("appdata", "csseditor/config.xml") ).dirPath() + "/"; + TQString configDir = TQFileInfo( locate("appdata", "csseditor/config.xml") ).dirPath() + "/"; - QDomDocument doc; + TQDomDocument doc; - QFile file( configDir+"dtdTags.xml" ); + TQFile file( configDir+"dtdTags.xml" ); if ( !file.open( IO_ReadOnly ) ) return; if ( !doc.setContent( &file ) ) { @@ -155,15 +155,15 @@ void CSSSelector::setDTDTags(const QString& s){ } file.close(); - QStringList dtdNames; - QDomElement docElem = doc.documentElement(); - QDomNode n = docElem.firstChild(); + TQStringList dtdNames; + TQDomElement docElem = doc.documentElement(); + TQDomNode n = docElem.firstChild(); while( !n.isNull() ) { if( n.toElement().attribute("nickName") == s ) break; n = n.nextSibling(); } - QStringList tagList = QStringList::split( ',',n.toElement().text() ); + TQStringList tagList = TQStringList::split( ',',n.toElement().text() ); tagList.sort(); cbTag->clear(); cbTag->insertStringList( tagList ); @@ -171,50 +171,50 @@ void CSSSelector::setDTDTags(const QString& s){ } void CSSSelector::addTag(){ - QListViewItem *item = new QListViewItem(lvTags); + TQListViewItem *item = new TQListViewItem(lvTags); if(!cbTag->currentText().isEmpty()){ item->setText(0,cbTag->currentText()); - QPair tmp(QString::null,++m_orderNumber); + QPair tmp(TQString::null,++m_orderNumber); m_currentStylesheetStructure[item->text(0)]=tmp; } } void CSSSelector::addClass(){ - QListViewItem *item = new QListViewItem(lvClasses); + TQListViewItem *item = new TQListViewItem(lvClasses); if(!leClass->text().isEmpty()){ item->setText(0,leClass->text()); - QPair tmp(QString::null,++m_orderNumber); + QPair tmp(TQString::null,++m_orderNumber); m_currentStylesheetStructure[item->text(0)]=tmp; } } void CSSSelector::addID(){ - QListViewItem *item = new QListViewItem(lvIDs); + TQListViewItem *item = new TQListViewItem(lvIDs); if(!leID->text().isEmpty()){ item->setText(0,leID->text()); - QPair tmp(QString::null,++m_orderNumber); + QPair tmp(TQString::null,++m_orderNumber); m_currentStylesheetStructure[item->text(0)]=tmp; } } void CSSSelector::addPseudo(){ - QListViewItem *item = new QListViewItem(lvPseudo); + TQListViewItem *item = new TQListViewItem(lvPseudo); item->setText(0,(lePseudoSelector->text()+":"+cbPseudo->currentText()).stripWhiteSpace()); - QPair tmp(QString::null,++m_orderNumber); + QPair tmp(TQString::null,++m_orderNumber); m_currentStylesheetStructure[item->text(0)]=tmp; } -void CSSSelector::openCSSEditor(QListViewItem * i){ +void CSSSelector::openCSSEditor(TQListViewItem * 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; + TQListView *lv = i->listView(); + TQListViewItem *temp; + TQString s; + TQObjectList *l = queryList( "TQListView" ); + TQObjectListIt it( *l ); // iterate over the listviews + TQObject *obj; while ( (obj = it.current()) != 0 ) { - QListView *lvTemp = (QListView*)obj; + TQListView *lvTemp = (TQListView*)obj; if( lv != lvTemp){ temp = lvTemp->firstChild(); while(temp){ @@ -246,8 +246,8 @@ void CSSSelector::openCSSEditor(QListViewItem * i){ else { dlg.setFileToPreview(kurApplyToFile->url(),true); - QString tmp; - QListViewItem *item = lvTags->firstChild(); + TQString tmp; + TQListViewItem *item = lvTags->firstChild(); while( item ) { if(i->text(0).stripWhiteSpace() != item->text(0).stripWhiteSpace()) tmp += item->text(0) + " {" + item->text(1) + "}"; @@ -283,22 +283,22 @@ void CSSSelector::openCSSEditor(QListViewItem * i){ if(dlg.exec()) { i->setText(1,dlg.generateProperties()); - QPair tmp(m_currentStylesheetStructure[i->text(0)]); + QPair tmp(m_currentStylesheetStructure[i->text(0)]); tmp.first = dlg.generateProperties(); m_currentStylesheetStructure[i->text(0)] = tmp; } } } -void CSSSelector::setCurrentListView(QWidget* w){ - QObjectList *l = w->queryList( "QListView" ); - m_currentListView = static_cast(l->first()); +void CSSSelector::setCurrentListView(TQWidget* w){ + TQObjectList *l = w->queryList( "TQListView" ); + m_currentListView = static_cast(l->first()); } void CSSSelector::removeAll(){ - QListViewItemIterator it( m_currentListView ); + TQListViewItemIterator it( m_currentListView ); while ( it.current() ) { - QListViewItem *item = it.current(); + TQListViewItem *item = it.current(); m_currentStylesheetStructure.remove(item->text(0)); ++it; } @@ -313,30 +313,30 @@ void CSSSelector::removeSelected(){ } } -void CSSSelector::loadCSSContent(const QString& s){ +void CSSSelector::loadCSSContent(const TQString& s){ stylesheetParser p(s); - connect(&p,SIGNAL(errorOccurred(const QString&)), this, SLOT(setStylesheetProcessing(const QString&))); + connect(&p,TQT_SIGNAL(errorOccurred(const TQString&)), this, TQT_SLOT(setStylesheetProcessing(const TQString&))); p.parse(); m_orderNumber = p.orderNumber(); - QMap >::Iterator it; + TQMap >::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; + TQListViewItem *item; if(it.key().contains(":")){ - item = new QListViewItem(lvPseudo); + item = new TQListViewItem(lvPseudo); } else if(it.key().contains("#")){ - item = new QListViewItem(lvIDs); + item = new TQListViewItem(lvIDs); } else if(it.key().contains(".")){ - item = new QListViewItem(lvClasses); + item = new TQListViewItem(lvClasses); } else { - item = new QListViewItem(lvTags); + item = new TQListViewItem(lvTags); } item->setText(0,it.key()); @@ -346,27 +346,27 @@ void CSSSelector::loadCSSContent(const QString& s){ } } -QString CSSSelector::generateFormattedStyleSection(){ - QMap< QString,QPair >::Iterator it; - QString styleSection,tmpStr; +TQString CSSSelector::generateFormattedStyleSection(){ + TQMap< TQString,QPair >::Iterator it; + TQString 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(); + TQString 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]+$")); + key.remove(TQRegExp("-v[\\d]+$")); styleSection += "\n" + key + " {\n"; indentWidth = indentDisplacement + 2; - QStringList props = QStringList::split(";",it.data().first.simplifyWhiteSpace()); - QString indentStr; + TQStringList props = TQStringList::split(";",it.data().first.simplifyWhiteSpace()); + TQString indentStr; indentStr.fill(' ',indentWidth); - for ( QStringList::Iterator it = props.begin(); it != props.end(); ++it ) { + for ( TQStringList::Iterator it = props.begin(); it != props.end(); ++it ) { if((*it).startsWith(" ")) tmpStr += indentStr + (*it).remove(0,1) + ";\n"; else @@ -374,7 +374,7 @@ QString CSSSelector::generateFormattedStyleSection(){ } indentStr.fill(' ', indentDisplacement); styleSection += tmpStr + indentStr + "}\n\n"; - tmpStr = QString::null; + tmpStr = TQString::null; } } } @@ -387,7 +387,7 @@ void CSSSelector::enableApplyToFile(){ kurApplyToFile->setEnabled(true); } -void CSSSelector::setStylesheetProcessing(const QString& msg) { +void CSSSelector::setStylesheetProcessing(const TQString& msg) { m_stopProcessingStylesheet=true; KMessageBox::error (0L, msg ); } diff --git a/quanta/components/csseditor/cssselector.h b/quanta/components/csseditor/cssselector.h index f4d42e89..a569929a 100644 --- a/quanta/components/csseditor/cssselector.h +++ b/quanta/components/csseditor/cssselector.h @@ -18,8 +18,8 @@ #ifndef CSSSELECTOR_H #define CSSSELECTOR_H -#include -#include +#include +#include #include "cssselectors.h" class QListViewItem; @@ -32,42 +32,42 @@ class CSSSelector : public CSSSelectorS { Q_OBJECT private: - QListViewItem *m_currentItem; - QListView *m_currentListView; - QString m_header, + TQListViewItem *m_currentItem; + TQListView *m_currentListView; + TQString m_header, m_footer, m_callingFrom, m_fileToPreview; - QMap > m_currentStylesheetStructure; + TQMap > m_currentStylesheetStructure; unsigned int m_orderNumber; bool m_stopProcessingStylesheet; void Connect(); public: - CSSSelector(QWidget *parent=0, const char* name=0); + CSSSelector(TQWidget *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 loadCSSContent(const TQString& s); + void setHeader(const TQString& h) { m_header = h; } + void setFooter(const TQString& f) { m_footer = f; } void enableApplyToFile(); - void setCallingFrom(const QString& cf){ m_callingFrom = cf ;} - void setFileToPreview(const QString& s){ m_fileToPreview=s;} + void setCallingFrom(const TQString& cf){ m_callingFrom = cf ;} + void setFileToPreview(const TQString& s){ m_fileToPreview=s;} bool errorOnProcessingStylesheet() const { return m_stopProcessingStylesheet; } - QString generateFormattedStyleSection(); + TQString generateFormattedStyleSection(); private slots: - void openCSSEditor(QListViewItem *); + void openCSSEditor(TQListViewItem *); 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&); + void setCurrentItem(TQListViewItem* i) { m_currentItem = i; } + void setCurrentListView(TQWidget*); + void setDTDTags(const TQString&); + void setStylesheetProcessing(const TQString&); }; #endif diff --git a/quanta/components/csseditor/cssshpropertyparser.cpp b/quanta/components/csseditor/cssshpropertyparser.cpp index d02c39a5..d117b5f5 100644 --- a/quanta/components/csseditor/cssshpropertyparser.cpp +++ b/quanta/components/csseditor/cssshpropertyparser.cpp @@ -18,15 +18,15 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ #include "cssshpropertyparser.h" -#include +#include //#include -CSSSHPropertyParser::CSSSHPropertyParser(const QString& s){ - QStringList l1, - l2=QStringList::split(",",s); +CSSSHPropertyParser::CSSSHPropertyParser(const TQString& s){ + TQStringList l1, + l2=TQStringList::split(",",s); - for ( QStringList::Iterator it = l2.begin(); it != l2.end(); ++it ) { - QString temp; + for ( TQStringList::Iterator it = l2.begin(); it != l2.end(); ++it ) { + TQString temp; temp=removeBeginningWhiteSpaces((*it)); temp=removeEndingWhiteSpaces(temp); l1.append(temp); @@ -37,26 +37,26 @@ CSSSHPropertyParser::CSSSHPropertyParser(const QString& s){ CSSSHPropertyParser::~CSSSHPropertyParser(){} -QString CSSSHPropertyParser::removeEndingWhiteSpaces(const QString& s){ +TQString CSSSHPropertyParser::removeEndingWhiteSpaces(const TQString& s){ int index = s.length()-1; while(s[index] == ' ' ) index--; return s.left(index+1); } -QString CSSSHPropertyParser::removeBeginningWhiteSpaces(const QString& s){ +TQString CSSSHPropertyParser::removeBeginningWhiteSpaces(const TQString& 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*"); +TQString CSSSHPropertyParser::extractFunctionList(){ + TQRegExp functionListPattern("\\s*([a-zA-Z0-9_]*\\([\\W\\w]*\\))\\s*"); functionListPattern.search(m_propertyToParse); return functionListPattern.cap(1); } -QString CSSSHPropertyParser::extractQuotedStringList(){ - QString temp; +TQString CSSSHPropertyParser::extractQuotedStringList(){ + TQString temp; bool stop = false; unsigned int i=0; while(!stop && i +#include class CSSSHPropertyParser{ public: - CSSSHPropertyParser(const QString& s); + CSSSHPropertyParser(const TQString& s); ~CSSSHPropertyParser(); - QStringList parse(); + TQStringList parse(); private: - QString m_propertyToParse; + TQString m_propertyToParse; private: - QString extractURIList(); - QString extractFunctionList(); - QString extractQuotedStringList(); - QString removeBeginningWhiteSpaces(const QString& s); - QString removeEndingWhiteSpaces(const QString& s); + TQString extractURIList(); + TQString extractFunctionList(); + TQString extractQuotedStringList(); + TQString removeBeginningWhiteSpaces(const TQString& s); + TQString removeEndingWhiteSpaces(const TQString& s); }; #endif diff --git a/quanta/components/csseditor/doubleeditors.cpp b/quanta/components/csseditor/doubleeditors.cpp index 6fab0547..e877e2ac 100644 --- a/quanta/components/csseditor/doubleeditors.cpp +++ b/quanta/components/csseditor/doubleeditors.cpp @@ -16,27 +16,27 @@ ***************************************************************************/ #include "doubleeditors.h" #include "specialsb.h" - #include + #include #include "csseditor_globals.h" #include "propertysetter.h" - #include + #include -doubleEditorBase::doubleEditorBase(QWidget *parent, const char *name) : miniEditor(parent,name){ +doubleEditorBase::doubleEditorBase(TQWidget *parent, const char *name) : miniEditor(parent,name){ } -void doubleEditorBase::sxValueSlot(const QString& v){ +void doubleEditorBase::sxValueSlot(const TQString& v){ m_sxValue=v; emit valueChanged( m_sxValue +" " + m_dxValue); } -void doubleEditorBase::dxValueSlot(const QString& v){ +void doubleEditorBase::dxValueSlot(const TQString& v){ m_dxValue=v; emit valueChanged( m_sxValue +" " + m_dxValue); } - doubleLengthEditor::doubleLengthEditor(QWidget *parent, const char *name) : doubleEditorBase(parent,name){ + doubleLengthEditor::doubleLengthEditor(TQWidget *parent, const char *name) : doubleEditorBase(parent,name){ m_ssbSx = new specialSB(this); m_ssbSx->insertItem("cm"); @@ -58,8 +58,8 @@ void doubleEditorBase::dxValueSlot(const QString& v){ 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&))); + connect(m_ssbSx, TQT_SIGNAL(valueChanged(const TQString&)), this, TQT_SLOT(sxValueSlot(const TQString&))); + connect(m_ssbDx, TQT_SIGNAL(valueChanged(const TQString&)), this, TQT_SLOT(dxValueSlot(const TQString&))); } doubleLengthEditor::~doubleLengthEditor(){ @@ -68,19 +68,19 @@ doubleLengthEditor::~doubleLengthEditor(){ } void doubleLengthEditor::connectToPropertySetter(propertySetter* p){ - connect(this, SIGNAL(valueChanged(const QString&)), p ,SIGNAL(valueChanged(const QString&))); + connect(this, TQT_SIGNAL(valueChanged(const TQString&)), p ,TQT_SIGNAL(valueChanged(const TQString&))); } -void doubleLengthEditor::setInitialValue(const QString& sx, const QString& dx){ +void doubleLengthEditor::setInitialValue(const TQString& sx, const TQString& 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(TQWidget *parent, const char *name) : doubleEditorBase(parent,name){ + m_cbSx = new TQComboBox(this); + m_cbDx = new TQComboBox(this); + connect(m_cbSx, TQT_SIGNAL(activated ( const TQString & )), this, TQT_SLOT(sxValueSlot(const TQString&))); + connect(m_cbDx, TQT_SIGNAL(activated ( const TQString & )), this, TQT_SLOT(dxValueSlot(const TQString&))); } doubleComboBoxEditor::~doubleComboBoxEditor(){ @@ -89,16 +89,16 @@ doubleComboBoxEditor::~doubleComboBoxEditor(){ } void doubleComboBoxEditor::connectToPropertySetter(propertySetter* p){ - connect(this, SIGNAL(valueChanged(const QString&)), p ,SIGNAL(valueChanged(const QString&))); + connect(this, TQT_SIGNAL(valueChanged(const TQString&)), p ,TQT_SIGNAL(valueChanged(const TQString&))); } -doublePercentageEditor::doublePercentageEditor(QWidget *parent, const char *name) : doubleEditorBase(parent,name){ +doublePercentageEditor::doublePercentageEditor(TQWidget *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&))); + connect(m_sbSx,TQT_SIGNAL(valueChanged(const TQString&)),this,TQT_SLOT(sxValueSlot(const TQString&))); + connect(m_sbDx,TQT_SIGNAL(valueChanged(const TQString&)),this,TQT_SLOT(dxValueSlot(const TQString&))); } doublePercentageEditor::~doublePercentageEditor(){ @@ -107,12 +107,12 @@ doublePercentageEditor::~doublePercentageEditor(){ } void doublePercentageEditor::connectToPropertySetter(propertySetter* p){ - connect(this, SIGNAL(valueChanged(const QString&)), p ,SIGNAL(valueChanged(const QString&))); + connect(this, TQT_SIGNAL(valueChanged(const TQString&)), p ,TQT_SIGNAL(valueChanged(const TQString&))); } -void doublePercentageEditor::setInitialValue(const QString& a_sx, const QString& a_dx){ - QString sx = a_sx; - QString dx = a_dx; +void doublePercentageEditor::setInitialValue(const TQString& a_sx, const TQString& a_dx){ + TQString sx = a_sx; + TQString dx = a_dx; m_sbSx->setValue(sx.remove("%").toInt()); m_sbDx->setValue(dx.remove("%").toInt()); } diff --git a/quanta/components/csseditor/doubleeditors.h b/quanta/components/csseditor/doubleeditors.h index 6496a6fa..ed3b91cd 100644 --- a/quanta/components/csseditor/doubleeditors.h +++ b/quanta/components/csseditor/doubleeditors.h @@ -26,21 +26,21 @@ class doubleEditorBase : public miniEditor { Q_OBJECT protected: - QString m_sxValue, + TQString m_sxValue, m_dxValue; public: - doubleEditorBase(QWidget *parent=0, const char *name=0); + doubleEditorBase(TQWidget *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&); + void sxValueSlot(const TQString&); + void dxValueSlot(const TQString&); signals: - void valueChanged(const QString&); + void valueChanged(const TQString&); }; class doublePercentageEditor : public doubleEditorBase { @@ -50,23 +50,23 @@ class doublePercentageEditor : public doubleEditorBase { *m_sbDx; public: - doublePercentageEditor(QWidget *parent=0, const char *name=0); + doublePercentageEditor(TQWidget *parent=0, const char *name=0); virtual ~doublePercentageEditor(); - virtual void setInitialValue(const QString& sx, const QString& dx); + virtual void setInitialValue(const TQString& sx, const TQString& dx); virtual void connectToPropertySetter(propertySetter* p); }; class doubleComboBoxEditor : public doubleEditorBase { Q_OBJECT private: - QComboBox *m_cbSx, + TQComboBox *m_cbSx, *m_cbDx; public: - doubleComboBoxEditor(QWidget *parent=0, const char *name=0); + doubleComboBoxEditor(TQWidget *parent=0, const char *name=0); virtual ~doubleComboBoxEditor(); - QComboBox* cbSx() const { return m_cbSx;} - QComboBox* cbDx() const { return m_cbDx;} + TQComboBox* cbSx() const { return m_cbSx;} + TQComboBox* cbDx() const { return m_cbDx;} virtual void connectToPropertySetter(propertySetter* p); }; @@ -77,9 +77,9 @@ class doubleLengthEditor : public doubleEditorBase { *m_ssbDx; public: - doubleLengthEditor(QWidget *parent=0, const char *name=0); + doubleLengthEditor(TQWidget *parent=0, const char *name=0); virtual ~doubleLengthEditor(); - virtual void setInitialValue(const QString& sx, const QString& dx); + virtual void setInitialValue(const TQString& sx, const TQString& dx); virtual void connectToPropertySetter(propertySetter* p); }; diff --git a/quanta/components/csseditor/encodingselector.cpp b/quanta/components/csseditor/encodingselector.cpp index 3eeb593b..f8ba4ac6 100644 --- a/quanta/components/csseditor/encodingselector.cpp +++ b/quanta/components/csseditor/encodingselector.cpp @@ -20,18 +20,18 @@ #include "encodingselector.h" #include #include -#include +#include /** *@author gulmini luciano */ -encodingSelector::encodingSelector(QWidget *parent, const char* name) : encodingSelectorS(parent,name){ - QStringList encodings (KGlobal::charsets()->availableEncodingNames()); +encodingSelector::encodingSelector(TQWidget *parent, const char* name) : encodingSelectorS(parent,name){ + TQStringList 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); + TQTextCodec *codecForEnc = KGlobal::charsets()->codecForName(encodings[i], found); if (found){ cbEncoding->insertItem (encodings[i]); diff --git a/quanta/components/csseditor/encodingselector.h b/quanta/components/csseditor/encodingselector.h index 3b10fa23..f53dca27 100644 --- a/quanta/components/csseditor/encodingselector.h +++ b/quanta/components/csseditor/encodingselector.h @@ -20,7 +20,7 @@ #include "encodingselectors.h" -#include +#include /** *@author gulmini luciano @@ -30,9 +30,9 @@ class encodingSelector : public encodingSelectorS { Q_OBJECT public: - encodingSelector(QWidget *parent=0, const char* name=0); + encodingSelector(TQWidget *parent=0, const char* name=0); ~encodingSelector(); - QString encodingSet() const { return cbEncoding->currentText();} + TQString encodingSet() const { return cbEncoding->currentText();} }; diff --git a/quanta/components/csseditor/fontfamilychooser.cpp b/quanta/components/csseditor/fontfamilychooser.cpp index d42139f8..9f8da65d 100644 --- a/quanta/components/csseditor/fontfamilychooser.cpp +++ b/quanta/components/csseditor/fontfamilychooser.cpp @@ -16,35 +16,35 @@ #include "fontfamilychooser.h" -#include -#include -#include -#include +#include +#include +#include +#include #include -#include -#include +#include +#include #include #include #include -#include -#include -#include +#include +#include +#include #include -fontFamilyChooser::fontFamilyChooser(QWidget* parent, const char *name) : fontFamilyChooserS(parent,name){ +fontFamilyChooser::fontFamilyChooser(TQWidget* parent, const char *name) : fontFamilyChooserS(parent,name){ - QFont tmpFont( KGlobalSettings::generalFont().family(), 64, QFont::Black ); + TQFont tmpFont( KGlobalSettings::generalFont().family(), 64, TQFont::Black ); lePreview->setMinimumHeight( lePreview->fontMetrics().lineSpacing() ); lePreview->setAlignment(Qt::AlignCenter); - QFont font; + TQFont 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 ) { + TQFontDatabase fdb; + TQStringList families = fdb.families(); + for ( TQStringList::Iterator it = families.begin(); it != families.end(); ++it ) { if( (*it).contains('[') !=0 ) it = families.remove(it); } @@ -52,49 +52,49 @@ fontFamilyChooser::fontFamilyChooser(QWidget* parent, const char *name) : fontFa if( families.count() != 0 ) lbAvailable->insertStringList(families); - QIconSet iconSet = SmallIconSet(QString::fromLatin1("forward")); - QPixmap pixMap = iconSet.pixmap( QIconSet::Small, QIconSet::Normal ); + TQIconSet iconSet = SmallIconSet(TQString::fromLatin1("forward")); + TQPixmap pixMap = iconSet.pixmap( TQIconSet::Small, TQIconSet::Normal ); pbAdd->setIconSet(iconSet); pbAdd->setFixedSize( pixMap.width()+8, pixMap.height()+8 ); - iconSet = SmallIconSet(QString::fromLatin1("back")); + iconSet = SmallIconSet(TQString::fromLatin1("back")); pbRemove->setIconSet(iconSet); pbRemove->setFixedSize( pixMap.width()+8, pixMap.height()+8 ); - iconSet = SmallIconSet(QString::fromLatin1("up")); + iconSet = SmallIconSet(TQString::fromLatin1("up")); pbMoveUp->setIconSet(iconSet); pbMoveUp->setFixedSize( pixMap.width()+8, pixMap.height()+8 ); - iconSet = SmallIconSet(QString::fromLatin1("down")); + iconSet = SmallIconSet(TQString::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() ) ); + connect(pbAdd, TQT_SIGNAL(clicked()), this ,TQT_SLOT( addFont() )); + connect( lbAvailable, TQT_SIGNAL( highlighted( const TQString& ) ), this, TQT_SLOT( updatePreview( const TQString&) ) ); + connect( lbAvailable, TQT_SIGNAL( highlighted( const TQString& ) ), this, TQT_SLOT( setCurrentSelectedAvailableFamilyFont( const TQString&) ) ); + connect( lbGeneric, TQT_SIGNAL( highlighted( const TQString& ) ), this, TQT_SLOT( updatePreview( const TQString&) ) ); + connect( lbGeneric, TQT_SIGNAL( highlighted( const TQString& ) ), this, TQT_SLOT( setCurrentSelectedGenericFamilyFont( const TQString&) ) ); + connect( lbSelected, TQT_SIGNAL( highlighted( const TQString& ) ), this, TQT_SLOT( updatePreview( const TQString&) ) ); + connect( lbSelected, TQT_SIGNAL( highlighted( int ) ), this, TQT_SLOT( setCurrentSelectedFont( int ) ) ); + connect( lbSelected, TQT_SIGNAL( highlighted( const TQString& ) ), this, TQT_SLOT( setCurrentSelectedFont( const TQString&) ) ); + connect( pbRemove, TQT_SIGNAL( clicked() ), this, TQT_SLOT( removeFont() ) ); + connect( pbMoveUp, TQT_SIGNAL( clicked() ), this, TQT_SLOT( moveFontUp() ) ); + connect( pbMoveDown, TQT_SIGNAL( clicked() ), this, TQT_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")); + TQWhatsThis::add(lbAvailable,i18n("These are the names of the available fonts on your system")); + TQWhatsThis::add(lbGeneric,i18n("These are the names of the generic fonts ")); + TQWhatsThis::add(lbSelected,i18n("These are the names of the generic fonts you have selected ")); + TQWhatsThis::add(pbAdd,i18n("Click this to add a font to your style sheet")); + TQWhatsThis::add(pbRemove,i18n("Click this to remove a font from your style sheet")); + TQWhatsThis::add(pbMoveUp,i18n("Click this to make the font more preferable than the preceeding one")); + TQWhatsThis::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::updatePreview(const TQString& s){ + lePreview->setFont(TQFont(s,20)); } void fontFamilyChooser::addFont(){ @@ -107,13 +107,13 @@ void fontFamilyChooser::addFont(){ } } -void fontFamilyChooser::setCurrentSelectedAvailableFamilyFont(const QString& f){ +void fontFamilyChooser::setCurrentSelectedAvailableFamilyFont(const TQString& f){ m_fontOrigin = available; m_currentSelectedFont = f; m_selectedFontMap[f] = available; } -void fontFamilyChooser::setCurrentSelectedGenericFamilyFont(const QString& f){ +void fontFamilyChooser::setCurrentSelectedGenericFamilyFont(const TQString& f){ m_fontOrigin = generic; m_currentSelectedFont =f; m_selectedFontMap[f] = generic; @@ -136,7 +136,7 @@ void fontFamilyChooser::moveFontDown(){ } void fontFamilyChooser::removeFont(){ - QString dummyFont(m_currentSelectedFont);// since removeItem emits highlighted signal, after + TQString 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 @@ -152,20 +152,20 @@ void fontFamilyChooser::removeFont(){ } -QStringList fontFamilyChooser::fontList(){ - QStringList list; - QListBoxItem *item = lbSelected->firstItem(); +TQStringList fontFamilyChooser::fontList(){ + TQStringList list; + TQListBoxItem *item = lbSelected->firstItem(); while( item != 0 ){ - if( item->text().contains( QRegExp("\\W") ) ) list.append( "'" + item->text() + "'" ); + if( item->text().contains( TQRegExp("\\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 ) { +void fontFamilyChooser::setInitialValue(const TQString& s){ + TQStringList familyList = TQStringList::split(",",s); + for ( TQStringList::Iterator it = familyList.begin(); it != familyList.end(); ++it ) { (*it).remove("'"); (*it).remove("\""); lbSelected->insertItem((*it).stripWhiteSpace()); diff --git a/quanta/components/csseditor/fontfamilychooser.h b/quanta/components/csseditor/fontfamilychooser.h index c812e774..fa5c947e 100644 --- a/quanta/components/csseditor/fontfamilychooser.h +++ b/quanta/components/csseditor/fontfamilychooser.h @@ -18,7 +18,7 @@ #define FONTFAMILYCHOOSER_H #include "fontfamilychoosers.h" -#include +#include class QStringList; class fontFamilyChooser : public fontFamilyChooserS @@ -26,27 +26,27 @@ class fontFamilyChooser : public fontFamilyChooserS Q_OBJECT private: enum FontOrigin { available, generic }; - QString m_currentSelectedFont; + TQString m_currentSelectedFont; FontOrigin m_fontOrigin; int m_currentSelectedFontIndex; - QMap m_selectedFontMap; + TQMap m_selectedFontMap; private slots: - void updatePreview(const QString &); - void setCurrentSelectedAvailableFamilyFont(const QString&); - void setCurrentSelectedGenericFamilyFont(const QString&); + void updatePreview(const TQString &); + void setCurrentSelectedAvailableFamilyFont(const TQString&); + void setCurrentSelectedGenericFamilyFont(const TQString&); void setCurrentSelectedFont( int i) { m_currentSelectedFontIndex = i; } - void setCurrentSelectedFont( const QString& f ) { m_currentSelectedFont = f; } + void setCurrentSelectedFont( const TQString& f ) { m_currentSelectedFont = f; } void addFont(); void removeFont(); void moveFontUp(); void moveFontDown(); public: - fontFamilyChooser(QWidget* parent, const char *name=0); + fontFamilyChooser(TQWidget* parent, const char *name=0); ~fontFamilyChooser(); - QStringList fontList(); - void setInitialValue(const QString& s); + TQStringList fontList(); + void setInitialValue(const TQString& s); }; #endif diff --git a/quanta/components/csseditor/minieditor.h b/quanta/components/csseditor/minieditor.h index 773ed285..1f5c25ef 100644 --- a/quanta/components/csseditor/minieditor.h +++ b/quanta/components/csseditor/minieditor.h @@ -18,7 +18,7 @@ #ifndef MINIEDITOR_H #define MINIEDITOR_H -#include +#include /** *@author gulmini luciano @@ -28,7 +28,7 @@ class propertySetter; class miniEditor : public QHBox{ public: - miniEditor(QWidget *parent=0, const char *name=0):QHBox(parent,name){} + miniEditor(TQWidget *parent=0, const char *name=0):TQHBox(parent,name){} ~miniEditor(){} virtual void connectToPropertySetter(propertySetter* p)=0; }; diff --git a/quanta/components/csseditor/percentageeditor.cpp b/quanta/components/csseditor/percentageeditor.cpp index 0c8a9d6c..b02a1615 100644 --- a/quanta/components/csseditor/percentageeditor.cpp +++ b/quanta/components/csseditor/percentageeditor.cpp @@ -17,13 +17,13 @@ #include "percentageeditor.h" #include "propertysetter.h" -percentageEditor::percentageEditor(const QString& initialValue, QWidget *parent, const char *name) : miniEditor(parent,name) +percentageEditor::percentageEditor(const TQString& initialValue, TQWidget *parent, const char *name) : miniEditor(parent,name) { - QString temp(initialValue); + TQString 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&))); + connect(m_sb, TQT_SIGNAL(valueChanged ( const TQString & )), this, TQT_SIGNAL(valueChanged(const TQString&))); } percentageEditor::~percentageEditor() @@ -32,7 +32,7 @@ percentageEditor::~percentageEditor() } void percentageEditor::connectToPropertySetter(propertySetter* p){ - connect( this, SIGNAL(valueChanged(const QString&)), p, SIGNAL(valueChanged(const QString&))); + connect( this, TQT_SIGNAL(valueChanged(const TQString&)), p, TQT_SIGNAL(valueChanged(const TQString&))); } #include "percentageeditor.moc" diff --git a/quanta/components/csseditor/percentageeditor.h b/quanta/components/csseditor/percentageeditor.h index d6931aec..a6aecb8c 100644 --- a/quanta/components/csseditor/percentageeditor.h +++ b/quanta/components/csseditor/percentageeditor.h @@ -18,11 +18,11 @@ #ifndef PERCENTAGEEDITOR_H #define PERCENTAGEEDITOR_H -#include -#include +#include +#include #include "doubleeditors.h" -#include -#include +#include +#include #include "csseditor_globals.h" #include "minieditor.h" @@ -41,11 +41,11 @@ class percentageEditor : public miniEditor { private: mySpinBox *m_sb; public: - percentageEditor(const QString& initialValue="0",QWidget *parent=0, const char *name=0); + percentageEditor(const TQString& initialValue="0",TQWidget *parent=0, const char *name=0); ~percentageEditor(); virtual void connectToPropertySetter(propertySetter* p); signals: - void valueChanged(const QString&); + void valueChanged(const TQString&); }; diff --git a/quanta/components/csseditor/propertysetter.cpp b/quanta/components/csseditor/propertysetter.cpp index 683320ae..922c7dbe 100644 --- a/quanta/components/csseditor/propertysetter.cpp +++ b/quanta/components/csseditor/propertysetter.cpp @@ -17,13 +17,13 @@ #include "propertysetter.h" -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -36,7 +36,7 @@ #include "csseditor_globals.h" #include "minieditor.h" -propertySetter::propertySetter(QWidget *parent, const char *name ) : QHBox(parent,name) { +propertySetter::propertySetter(TQWidget *parent, const char *name ) : TQHBox(parent,name) { m_ind = 0; m_cb = 0L; m_list.setAutoDelete(true); @@ -59,38 +59,38 @@ void propertySetter::reset(){ 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_cb = new TQComboBox(this); + connect(m_cb, TQT_SIGNAL(activated(const TQString&)), this, TQT_SIGNAL(valueChanged(const TQString&))); + connect(m_cb, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SIGNAL(valueChanged(const TQString&))); m_list.append(m_cb); } -void propertySetter::setSpinBox(const QString& initialValue, const QString& min, const QString& max, const QString& s) +void propertySetter::setSpinBox(const TQString& initialValue, const TQString& min, const TQString& max, const TQString& 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&))); + connect(editor, TQT_SIGNAL(valueChanged(const TQString&)), this ,TQT_SIGNAL(valueChanged(const TQString&))); m_list.append(editor); } void propertySetter::setLineEdit() { - QLineEdit *editor = new QLineEdit(this); - connect(editor,SIGNAL(textChanged ( const QString & )), this, SIGNAL(valueChanged ( const QString & ))); + TQLineEdit *editor = new TQLineEdit(this); + connect(editor,TQT_SIGNAL(textChanged ( const TQString & )), this, TQT_SIGNAL(valueChanged ( const TQString & ))); m_list.append(editor); } void propertySetter::setPredefinedColorListEditor() { - QComboBox *editor = new QComboBox(this); + TQComboBox *editor = new TQComboBox(this); editor->insertStringList(CSSEditorGlobals::HTMLColors); - connect(editor, SIGNAL(activated(const QString&)), this, SIGNAL(valueChanged(const QString&))); + connect(editor, TQT_SIGNAL(activated(const TQString&)), this, TQT_SIGNAL(valueChanged(const TQString&))); m_list.append(editor); } void propertySetter::Show(){ - QWidget *w; + TQWidget *w; for ( w = m_list.first(); w; w = m_list.next() ) w->hide(); @@ -112,13 +112,13 @@ void propertySetter::Show(){ 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 ); + TQToolTip::add(m_pb, i18n( "More..." )); + TQIconSet iconSet = SmallIconSet(TQString::fromLatin1("2rightarrow")); + TQPixmap pixMap = iconSet.pixmap( TQIconSet::Small, TQIconSet::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())); + connect(m_pb, TQT_SIGNAL(clicked()), this ,TQT_SLOT(Show())); } void propertySetter::installMiniEditor(miniEditor *m){ diff --git a/quanta/components/csseditor/propertysetter.h b/quanta/components/csseditor/propertysetter.h index 3f13b8ba..2f0a90af 100644 --- a/quanta/components/csseditor/propertysetter.h +++ b/quanta/components/csseditor/propertysetter.h @@ -18,9 +18,9 @@ #ifndef PROPERTYSETTER_H #define PROPERTYSETTER_H -#include -#include -#include +#include +#include +#include class miniEditor; @@ -31,34 +31,34 @@ class KPushButton; *@author gulmini luciano */ -class propertySetter : public QHBox { +class propertySetter : public TQHBox { Q_OBJECT private: unsigned int m_ind; - QPtrList m_list; - QComboBox *m_cb; + TQPtrList m_list; + TQComboBox *m_cb; KPushButton *m_pb; public: - propertySetter(QWidget *parent=0, const char *name=0); + propertySetter(TQWidget *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 setSpinBox(const TQString& initialValue="0", const TQString& min="0", const TQString& max="9999", const TQString& s=TQString::null); void setLineEdit(); void setPredefinedColorListEditor(); void reset(); void addButton(); - QComboBox* ComboBox() const { return m_cb; } + TQComboBox* ComboBox() const { return m_cb; } public slots: void Show(); signals: - void valueChanged(const QString&); + void valueChanged(const TQString&); }; #endif diff --git a/quanta/components/csseditor/qmyhighlighter.cpp b/quanta/components/csseditor/qmyhighlighter.cpp index 431bf6a5..dad1fe24 100644 --- a/quanta/components/csseditor/qmyhighlighter.cpp +++ b/quanta/components/csseditor/qmyhighlighter.cpp @@ -16,22 +16,22 @@ ***************************************************************************/ #include "qmyhighlighter.h" -#include -QMyHighlighter::QMyHighlighter(QTextEdit* Qtxt):QSyntaxHighlighter(Qtxt){ +#include +QMyHighlighter::QMyHighlighter(TQTextEdit* Qtxt):TQSyntaxHighlighter(Qtxt){ } /*****************************************************************************/ QMyHighlighter::~QMyHighlighter(){ } /*****************************************************************************/ -int QMyHighlighter::highlightParagraph( const QString & text, int /*endStateOfLastPara*/ ) +int QMyHighlighter::highlightParagraph( const TQString & text, int /*endStateOfLastPara*/ ) { - //QRegExp pattern("\\s*\\{([\\w\\s\\d:;-\"]*)\\}\\s*"); - QRegExp pattern("([#:\\.\\w]*)\\s*\\{"); + //TQRegExp pattern("\\s*\\{([\\w\\s\\d:;-\"]*)\\}\\s*"); + TQRegExp pattern("([#:\\.\\w]*)\\s*\\{"); int pos=pattern.search(text,0); int l=int(pattern.cap(1).length()); - setFormat(pos,l,QColor("red")); + setFormat(pos,l,TQColor("red")); if( pos== -1) pos = 0; @@ -45,7 +45,7 @@ int QMyHighlighter::highlightParagraph( const QString & text, int /*endStateOfLa if ( pos > -1 ) { l = pattern.matchedLength(); - setFormat(pos,l,QColor("mediumvioletred")); + setFormat(pos,l,TQColor("mediumvioletred")); pos += pattern.matchedLength(); } } @@ -56,7 +56,7 @@ int QMyHighlighter::highlightParagraph( const QString & text, int /*endStateOfLa pos = pattern.search( text, pos ); if ( pos > -1 ) { l = pattern.cap(1).length(); - setFormat(pos + 2 ,l,QColor("steelblue")); + setFormat(pos + 2 ,l,TQColor("steelblue")); pos += pattern.matchedLength(); } } diff --git a/quanta/components/csseditor/qmyhighlighter.h b/quanta/components/csseditor/qmyhighlighter.h index a75d6d00..60e767f5 100644 --- a/quanta/components/csseditor/qmyhighlighter.h +++ b/quanta/components/csseditor/qmyhighlighter.h @@ -18,18 +18,18 @@ #ifndef QMYHIGHLIGHTER_H #define QMYHIGHLIGHTER_H -#include +#include /** *@author Emiliano Gulmini */ -class QMyHighlighter : public QSyntaxHighlighter { +class QMyHighlighter : public TQSyntaxHighlighter { public: - QMyHighlighter(QTextEdit* Qtxt); + QMyHighlighter(TQTextEdit* Qtxt); ~QMyHighlighter(); - int highlightParagraph ( const QString & text, int endStateOfLastPara ); + int highlightParagraph ( const TQString & text, int endStateOfLastPara ); }; diff --git a/quanta/components/csseditor/shorthandformer.cpp b/quanta/components/csseditor/shorthandformer.cpp index e8b7a837..08acc819 100644 --- a/quanta/components/csseditor/shorthandformer.cpp +++ b/quanta/components/csseditor/shorthandformer.cpp @@ -18,38 +18,38 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ #include "shorthandformer.h" -#include +#include #include "cssshpropertyparser.h" #include #include "csseditor_globals.h" -QRegExp globalPercentagePattern("\\d%"), +TQRegExp 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 TQString borderStyleValueString("none,hidden,dotted,dashed,solid,double,groove,ridge,inset,outset,inherit"); +static const TQString widthValueString("thin,medium,thick,inherit"); +static const TQString 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 TQString fontSizeValueString("smaller,larger,xx-large,x-large,large,medium,small,x-small,xx-small,inherit"); +static const TQString fontWeightValueString("900,800,700,600,500,400,300,200,100,lighter,bolder,normal,bold,inherit"); +static const TQString fontVariantValueString("normal,small-caps,inherit"); +static const TQString fontStyleValueString("oblique,italic,normal,inherit"); +static const TQString 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); +static const TQStringList borderStyleValueList = TQStringList::split(",",borderStyleValueString); +static const TQStringList widthValueList = TQStringList::split(",",widthValueString); +static const TQStringList listTypeValueList = TQStringList::split(",",listTypeValueString); +static const TQStringList fontSizeValueList = TQStringList::split(",",fontSizeValueString); +static const TQStringList fontWeightValueList = TQStringList::split(",",fontWeightValueString); +static const TQStringList fontStyleValueList = TQStringList::split(",",fontStyleValueString); +static const TQStringList fontVariantValueList = TQStringList::split(",",fontVariantValueString); +static const TQStringList backgroundRepeatValueList = TQStringList::split(",",backgroundRepeatValueString); -ShorthandFormer::ShorthandFormer( QMap m){ +ShorthandFormer::ShorthandFormer( TQMap m){ m_properties = m; if(m_properties.contains("cue-after")){ @@ -218,8 +218,8 @@ ShorthandFormer::ShorthandFormer( QMap m){ } } -QString ShorthandFormer::compress(){ - QString props; +TQString ShorthandFormer::compress(){ + TQString props; props += compressCueProp(); props += compressPauseProp(); @@ -231,7 +231,7 @@ QString ShorthandFormer::compress(){ props += compressListStyleProp(); props += compressBorderProp(); - QMap::Iterator it; + TQMap::Iterator it; for ( it = m_properties.begin(); it != m_properties.end(); ++it ) props += it.key() + " : " + it.data().stripWhiteSpace() + "; " ; @@ -240,8 +240,8 @@ QString ShorthandFormer::compress(){ return props; } -QString ShorthandFormer::compressBorderProp(){ - QString props; +TQString ShorthandFormer::compressBorderProp(){ + TQString props; bool allColorSidesSet = false, allStyleSidesSet = false, @@ -306,17 +306,17 @@ QString ShorthandFormer::compressBorderProp(){ return props; } -QString ShorthandFormer::compressBorderStyleProp(){ +TQString ShorthandFormer::compressBorderStyleProp(){ return compressImplementation( "border-style" ,border_top_style, border_bottom_style, border_right_style, border_left_style, "none"); } -QString ShorthandFormer::compressBorderWidthProp(){ +TQString ShorthandFormer::compressBorderWidthProp(){ return compressImplementation( "border-width" ,border_top_width, border_bottom_width, border_right_width, border_left_width, "medium"); } -QString ShorthandFormer::compressBorderColorProp(){ +TQString ShorthandFormer::compressBorderColorProp(){ //because the default value of color property is browser dependant, this method doesn't compress the color value - QString props; + TQString props; if( !border_top_color.isEmpty() ) props += "border-top-color : " + border_top_color +"; "; if( !border_right_color.isEmpty() ) @@ -328,8 +328,8 @@ QString ShorthandFormer::compressBorderColorProp(){ return props; } -QString ShorthandFormer::compressFontProp(){ - QString fontProp, +TQString ShorthandFormer::compressFontProp(){ + TQString fontProp, props; //bool appendLineHeight = false; @@ -368,51 +368,51 @@ QString ShorthandFormer::compressFontProp(){ return props; } -QString ShorthandFormer::compressCueProp(){ +TQString ShorthandFormer::compressCueProp(){ return compressImplementation2( "cue", cue_after, cue_before, "none"); } -QString ShorthandFormer::compressPauseProp(){ +TQString ShorthandFormer::compressPauseProp(){ return compressImplementation2( "pause", pause_after, pause_before, "0"); } -QString ShorthandFormer::compressBackgroundProp(){ - QString backgroundProp; +TQString ShorthandFormer::compressBackgroundProp(){ + TQString 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; + return TQString::null; } -QString ShorthandFormer::compressPaddingProp(){ +TQString ShorthandFormer::compressPaddingProp(){ return compressImplementation( "padding" ,padding_top, padding_bottom, padding_right, padding_left, "0"); } -QString ShorthandFormer::compressMarginProp(){ +TQString ShorthandFormer::compressMarginProp(){ return compressImplementation( "margin" ,margin_top, margin_bottom, margin_right, margin_left, "0"); } -QString ShorthandFormer::compressOutlineProp(){ +TQString ShorthandFormer::compressOutlineProp(){ return compressImplementation3("outline", outline_color, outline_style, outline_width); } -QString ShorthandFormer::compressListStyleProp(){ +TQString 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; +TQString ShorthandFormer::compressImplementation3( const TQString& prop, const TQString& p1, const TQString& p2, const TQString& p3){ + TQString 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; + return TQString::null; } -QString ShorthandFormer::compressImplementation2( const QString& prop, const QString& after, const QString& before, const QString& defValue){ - QString props; +TQString ShorthandFormer::compressImplementation2( const TQString& prop, const TQString& after, const TQString& before, const TQString& defValue){ + TQString props; if(after == before){ if(!after.isEmpty()) props+=( prop + " : " + after + "; "); } @@ -425,9 +425,9 @@ QString ShorthandFormer::compressImplementation2( const QString& prop, const QSt return props; } -QString ShorthandFormer::compressImplementation( const QString& prop, const QString& t, const QString& b, const QString& r, const QString& l, const QString& defValue){ +TQString ShorthandFormer::compressImplementation( const TQString& prop, const TQString& t, const TQString& b, const TQString& r, const TQString& l, const TQString& defValue){ - QString props, + TQString props, top(t.stripWhiteSpace()), bottom(b.stripWhiteSpace()), left(l.stripWhiteSpace()), @@ -440,7 +440,7 @@ QString ShorthandFormer::compressImplementation( const QString& prop, const QStr if( top == defValue && bottom == defValue && right == defValue && left == defValue) - return QString::null; + return TQString::null; if( top == bottom && bottom == right && right == left ) return ( prop +" : " + top + "; "); @@ -456,9 +456,9 @@ QString ShorthandFormer::compressImplementation( const QString& prop, const QStr //+++++++++++++++++++++EXPANDING METHODS+++++++++++++++++++++++++++++++++++ -QMap ShorthandFormer::expand( const QString& propertyName, const QString& propertyValue ){ +TQMap ShorthandFormer::expand( const TQString& propertyName, const TQString& propertyValue ){ CSSSHPropertyParser parser(propertyValue); - QStringList foundValues = parser.parse(); + TQStringList foundValues = parser.parse(); if( propertyName == "cue" ) return expandCueProp(foundValues); if( propertyName == "pause") return expandPauseProp(foundValues); @@ -476,19 +476,19 @@ QMap ShorthandFormer::expand( const QString& propertyName, cons if( propertyName == "border") return expandBorderProp(foundValues); if( propertyName == "padding") return expandPaddingProp(foundValues); if( propertyName == "margin") return expandMarginProp(foundValues); - return QMap();//dummy instruction avoiding a pedantic warning; can never be reached + return TQMap();//dummy instruction avoiding a pedantic warning; can never be reached } -QMap ShorthandFormer::expandCueProp(const QStringList& l){ +TQMap ShorthandFormer::expandCueProp(const TQStringList& l){ return expandImplementation("cue",l); } -QMap ShorthandFormer::expandPauseProp(const QStringList& l){ +TQMap ShorthandFormer::expandPauseProp(const TQStringList& l){ return expandImplementation("pause",l); } -QMap ShorthandFormer::expandImplementation(const QString& propertyName, const QStringList& l){ - QMap expandedProps; +TQMap ShorthandFormer::expandImplementation(const TQString& propertyName, const TQStringList& l){ + TQMap expandedProps; if( l.count()==1) { expandedProps[propertyName + "-before"] = l[0] ; expandedProps[propertyName + "-after"] = l[0] ; @@ -502,8 +502,8 @@ QMap ShorthandFormer::expandImplementation(const QString& prop } } -QMap ShorthandFormer::expandBackgroundProp(const QStringList& l){ - QMap expandedProps; +TQMap ShorthandFormer::expandBackgroundProp(const TQStringList& l){ + TQMap 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]; @@ -513,10 +513,10 @@ QMap ShorthandFormer::expandBackgroundProp(const QStringList& } else { - QStringList::ConstIterator it = l.begin(); + TQStringList::ConstIterator it = l.begin(); while ( it != l.end() ) { - QString temp((*it).stripWhiteSpace()); + TQString temp((*it).stripWhiteSpace()); if( (*it).contains("url(") || temp == "none" || temp == "inherit" ){ expandedProps["background-image"] = (*it); } @@ -546,9 +546,9 @@ QMap ShorthandFormer::expandBackgroundProp(const QStringList& return expandedProps; } -QMap ShorthandFormer::expandBox(const QString& subPropName, const QStringList& l){ +TQMap ShorthandFormer::expandBox(const TQString& subPropName, const TQStringList& l){ - QMap expandedProps; + TQMap expandedProps; expandedProps["border-top-" + subPropName] = l[0]; switch(l.count()){ case 1 : @@ -576,14 +576,14 @@ QMap ShorthandFormer::expandBox(const QString& subPropName, co return expandedProps; } -QMap ShorthandFormer::expandFontProp(const QStringList& l){ - QMap expandedProps; +TQMap ShorthandFormer::expandFontProp(const TQStringList& l){ + TQMap expandedProps; - QRegExp percentagePattern("/"+globalPercentagePattern.pattern()), + TQRegExp percentagePattern("/"+globalPercentagePattern.pattern()), lengthPattern("/"+globalLengthPattern.pattern()), numberPattern("/"+globalNumberPattern.pattern()); - QStringList fontPseudoSHFormValues; + TQStringList fontPseudoSHFormValues; fontPseudoSHFormValues.append("caption"); fontPseudoSHFormValues.append("icon"); fontPseudoSHFormValues.append("menu"); @@ -595,10 +595,10 @@ QMap ShorthandFormer::expandFontProp(const QStringList& l){ return expandedProps; } else { - QStringList::ConstIterator it = l.begin(); + TQStringList::ConstIterator it = l.begin(); while ( it != l.end() ) { - QString currentIt = (*it); - QString temp(currentIt.stripWhiteSpace()); + TQString currentIt = (*it); + TQString temp(currentIt.stripWhiteSpace()); if( fontStyleValueList.contains(temp)!=0 ) expandedProps["font-style"] = (*it); else if( fontVariantValueList.contains(temp)!=0 ) expandedProps["font-variant"] = currentIt ; @@ -621,8 +621,8 @@ QMap ShorthandFormer::expandFontProp(const QStringList& l){ } } -QMap ShorthandFormer::expandListstyleProp( const QStringList& l){ - QMap expandedProps; +TQMap ShorthandFormer::expandListstyleProp( const TQStringList& l){ + TQMap expandedProps; if( (l.count() == 1) && (l[0] == "inherit")){ expandedProps["list-style-image"] ="inherit"; expandedProps["list-style-type"] ="inherit"; @@ -637,9 +637,9 @@ QMap ShorthandFormer::expandListstyleProp( const QStringList& l } - QStringList::ConstIterator it = l.begin(); + TQStringList::ConstIterator it = l.begin(); while ( it != l.end() ) { - QString temp((*it).stripWhiteSpace()); + TQString temp((*it).stripWhiteSpace()); if( listTypeValueList.contains(temp)!=0) { expandedProps["list-style-type"] = (*it) ; } @@ -656,11 +656,11 @@ QMap ShorthandFormer::expandListstyleProp( const QStringList& l return expandedProps; } -QMap ShorthandFormer::expandOutlineProp( const QStringList& l){ - QMap expandedProps; - QStringList::ConstIterator it = l.begin(); +TQMap ShorthandFormer::expandOutlineProp( const TQStringList& l){ + TQMap expandedProps; + TQStringList::ConstIterator it = l.begin(); while ( it != l.end() ) { - QString temp((*it).stripWhiteSpace()); + TQString 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") @@ -673,12 +673,12 @@ QMap ShorthandFormer::expandOutlineProp( const QStringList& l) return expandedProps; } -QMap ShorthandFormer::expandBoxSide(const QString& subPropName, const QStringList& l){ - QMap expandedProps; +TQMap ShorthandFormer::expandBoxSide(const TQString& subPropName, const TQStringList& l){ + TQMap expandedProps; - QStringList::ConstIterator it = l.begin(); + TQStringList::ConstIterator it = l.begin(); while ( it != l.end() ) { - QString temp((*it).stripWhiteSpace()); + TQString 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") @@ -691,11 +691,11 @@ QMap ShorthandFormer::expandBoxSide(const QString& subPropName return expandedProps; } -QMap ShorthandFormer::expandBorderProp(const QStringList& l){ - QMap expandedProps; - QStringList::ConstIterator it = l.begin(); +TQMap ShorthandFormer::expandBorderProp(const TQStringList& l){ + TQMap expandedProps; + TQStringList::ConstIterator it = l.begin(); while ( it != l.end() ) { - QString temp((*it).stripWhiteSpace()); + TQString temp((*it).stripWhiteSpace()); if( borderStyleValueList.contains(temp)!=0 ){ expandedProps["border-top-style"] = (*it); expandedProps["border-left-style"] = (*it); @@ -721,8 +721,8 @@ QMap ShorthandFormer::expandBorderProp(const QStringList& l){ return expandedProps; } -QMap ShorthandFormer::expandImplementation2(const QString& propertyName, const QStringList& l){ - QMap expandedProps; +TQMap ShorthandFormer::expandImplementation2(const TQString& propertyName, const TQStringList& l){ + TQMap expandedProps; expandedProps[ propertyName + "-top" ] = l[0]; switch(l.count()){ case 1 : @@ -750,16 +750,16 @@ QMap ShorthandFormer::expandImplementation2(const QString& prop return expandedProps; } - QMap ShorthandFormer::expandPaddingProp(const QStringList& l){ + TQMap ShorthandFormer::expandPaddingProp(const TQStringList& l){ return expandImplementation2("padding", l); } - QMap ShorthandFormer::expandMarginProp(const QStringList& l){ + TQMap ShorthandFormer::expandMarginProp(const TQStringList& l){ return expandImplementation2("margin", l); } -QStringList ShorthandFormer::SHFormList() { - QStringList l; +TQStringList ShorthandFormer::SHFormList() { + TQStringList l; l.append("cue"); l.append("pause"); l.append("font"); diff --git a/quanta/components/csseditor/shorthandformer.h b/quanta/components/csseditor/shorthandformer.h index f5b0f291..8673c01e 100644 --- a/quanta/components/csseditor/shorthandformer.h +++ b/quanta/components/csseditor/shorthandformer.h @@ -23,22 +23,22 @@ /** @author Gulmini Luciano */ -#include +#include class QString; class QStringList; class ShorthandFormer{ public: ShorthandFormer(){} - ShorthandFormer( QMap m ); + ShorthandFormer( TQMap m ); ~ShorthandFormer(){} - QString compress(); - QMap expand(const QString& propertyName, const QString& propertyValue); - static QStringList SHFormList(); + TQString compress(); + TQMap expand(const TQString& propertyName, const TQString& propertyValue); + static TQStringList SHFormList(); private: - QMap m_properties; - QString cue_after, + TQMap m_properties; + TQString cue_after, cue_before, pause_before, pause_after, @@ -81,37 +81,37 @@ private: 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(); + TQString compressCueProp(); + TQString compressPauseProp(); + TQString compressPaddingProp(); + TQString compressMarginProp(); + TQString compressFontProp(); + TQString compressBackgroundProp(); + TQString compressOutlineProp(); + TQString compressListStyleProp(); + TQString compressBorderStyleProp(); + TQString compressBorderWidthProp(); + TQString compressBorderColorProp(); + TQString 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); + TQString compressImplementation( const TQString& prop, const TQString& t, const TQString& b, const TQString& r, const TQString& l, const TQString& defValue); + TQString compressImplementation2( const TQString& prop, const TQString& after, const TQString& before, const TQString& defValue); + TQString compressImplementation3( const TQString& prop, const TQString& p1, const TQString& p2, const TQString& p3); - QMap expandCueProp(const QStringList& l); - QMap expandPauseProp(const QStringList& l); - QMap expandBackgroundProp(const QStringList& l); - QMap expandFontProp(const QStringList& l); - QMap expandOutlineProp(const QStringList& l); - QMap expandListstyleProp(const QStringList& l); - QMap expandBoxSide(const QString& subPropName, const QStringList& l); - QMap expandBorderProp(const QStringList& l); - QMap expandBox(const QString& subPropName, const QStringList& l); - QMap expandPaddingProp(const QStringList& l); - QMap expandMarginProp(const QStringList& l); + TQMap expandCueProp(const TQStringList& l); + TQMap expandPauseProp(const TQStringList& l); + TQMap expandBackgroundProp(const TQStringList& l); + TQMap expandFontProp(const TQStringList& l); + TQMap expandOutlineProp(const TQStringList& l); + TQMap expandListstyleProp(const TQStringList& l); + TQMap expandBoxSide(const TQString& subPropName, const TQStringList& l); + TQMap expandBorderProp(const TQStringList& l); + TQMap expandBox(const TQString& subPropName, const TQStringList& l); + TQMap expandPaddingProp(const TQStringList& l); + TQMap expandMarginProp(const TQStringList& l); - QMap expandImplementation(const QString& propertyName, const QStringList& l); - QMap expandImplementation2(const QString& propertyName, const QStringList& l); + TQMap expandImplementation(const TQString& propertyName, const TQStringList& l); + TQMap expandImplementation2(const TQString& propertyName, const TQStringList& l); }; #endif diff --git a/quanta/components/csseditor/specialsb.cpp b/quanta/components/csseditor/specialsb.cpp index eb26e05f..6edf110c 100644 --- a/quanta/components/csseditor/specialsb.cpp +++ b/quanta/components/csseditor/specialsb.cpp @@ -21,21 +21,21 @@ #include -specialSB::specialSB(QWidget *parent, const char *name, bool useLineEdit ) : miniEditor(parent,name) { +specialSB::specialSB(TQWidget *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 & ))); + connect(m_lineEdit, TQT_SIGNAL(textChanged ( const TQString & )), this, TQT_SLOT(lineEditValueSlot ( const TQString & ))); } else { m_sb=new mySpinBox(this); - connect(m_sb, SIGNAL(valueChanged ( const QString & )), this, SLOT(sbValueSlot(const QString&))); + connect(m_sb, TQT_SIGNAL(valueChanged ( const TQString & )), this, TQT_SLOT(sbValueSlot(const TQString&))); m_lineEdit = 0L; } - m_cb = new QComboBox(this); - connect(m_cb, SIGNAL(activated ( const QString & )), this, SLOT(cbValueSlot(const QString&))); + m_cb = new TQComboBox(this); + connect(m_cb, TQT_SIGNAL(activated ( const TQString & )), this, TQT_SLOT(cbValueSlot(const TQString&))); } specialSB::~specialSB(){ @@ -45,32 +45,32 @@ specialSB::~specialSB(){ } void specialSB::connectToPropertySetter(propertySetter* p){ - connect(this, SIGNAL(valueChanged(const QString&)), p,SIGNAL(valueChanged(const QString&))); + connect(this, TQT_SIGNAL(valueChanged(const TQString&)), p,TQT_SIGNAL(valueChanged(const TQString&))); } -void specialSB::cbValueSlot(const QString& s){ +void specialSB::cbValueSlot(const TQString& s){ if (m_sb) emit valueChanged( m_sb->text() +s ); else emit valueChanged( m_lineEdit->text() +s ); } -void specialSB::sbValueSlot(const QString& s){ +void specialSB::sbValueSlot(const TQString& s){ emit valueChanged( s + m_cb->currentText()); } -void specialSB::lineEditValueSlot(const QString& s){ +void specialSB::lineEditValueSlot(const TQString& s){ emit valueChanged( s + m_cb->currentText()); } -void specialSB::setInitialValue(const QString& s){ +void specialSB::setInitialValue(const TQString& s){ - QRegExp pattern("\\d("+ cbValueList().join("|")+")"); + TQRegExp pattern("\\d("+ cbValueList().join("|")+")"); if (pattern.search(s) != -1) { - QString temp(s.stripWhiteSpace()); - QString cbValue = pattern.cap(1); + TQString temp(s.stripWhiteSpace()); + TQString cbValue = pattern.cap(1); if (m_sb) m_sb->setValue(temp.remove(cbValue).toInt()); @@ -81,19 +81,19 @@ void specialSB::setInitialValue(const QString& s){ else return; } -QStringList specialSB::cbValueList(){ - QStringList l; +TQStringList specialSB::cbValueList(){ + TQStringList l; for(int i=0; icount();i++) l.append(m_cb->text(i)); return l; } -frequencyEditor::frequencyEditor(QWidget *parent, const char *name ) : specialSB(parent,name) { +frequencyEditor::frequencyEditor(TQWidget *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){ +angleEditor::angleEditor(TQWidget *parent, const char *name) : specialSB(parent,name){ m_cb->insertItem("deg"); m_cb->insertItem("grad"); m_cb->insertItem("rad"); @@ -101,13 +101,13 @@ angleEditor::angleEditor(QWidget *parent, const char *name) : specialSB(parent,n m_sb->setMaxValue(400); } -timeEditor::timeEditor(QWidget *parent, const char *name ) : specialSB(parent,name) { +timeEditor::timeEditor(TQWidget *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) { +lengthEditor::lengthEditor(TQWidget *parent, const char *name ) : specialSB(parent,name, true) { m_cb->insertItem("px"); m_cb->insertItem("em"); m_cb->insertItem("ex"); diff --git a/quanta/components/csseditor/specialsb.h b/quanta/components/csseditor/specialsb.h index 43d6273e..bca3d9fa 100644 --- a/quanta/components/csseditor/specialsb.h +++ b/quanta/components/csseditor/specialsb.h @@ -19,7 +19,7 @@ #define SPECIALSB_H #include "minieditor.h" -#include +#include class mySpinBox; class KLineEdit; @@ -30,50 +30,50 @@ class KLineEdit; class specialSB : public miniEditor { Q_OBJECT protected: - QComboBox *m_cb; + TQComboBox *m_cb; mySpinBox *m_sb; KLineEdit *m_lineEdit; public: - specialSB(QWidget *parent=0, const char *name=0, bool useLineEdit = false); + specialSB(TQWidget *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(); + void insertItem(const TQString& s){ m_cb->insertItem(s); } + void setInitialValue(const TQString& s); + TQStringList cbValueList(); virtual void connectToPropertySetter(propertySetter* p); public slots: - void cbValueSlot(const QString&); - void sbValueSlot(const QString&); - void lineEditValueSlot(const QString&); + void cbValueSlot(const TQString&); + void sbValueSlot(const TQString&); + void lineEditValueSlot(const TQString&); signals: - void valueChanged(const QString&); + void valueChanged(const TQString&); }; class angleEditor : public specialSB { Q_OBJECT public: - angleEditor(QWidget *parent=0, const char *name=0); + angleEditor(TQWidget *parent=0, const char *name=0); }; class frequencyEditor : public specialSB { Q_OBJECT public: - frequencyEditor(QWidget *parent=0, const char *name=0); + frequencyEditor(TQWidget *parent=0, const char *name=0); }; class timeEditor : public specialSB { Q_OBJECT public: - timeEditor(QWidget *parent=0, const char *name=0); + timeEditor(TQWidget *parent=0, const char *name=0); }; class lengthEditor : public specialSB { Q_OBJECT public: - lengthEditor(QWidget *parent=0, const char *name=0); + lengthEditor(TQWidget *parent=0, const char *name=0); }; #endif diff --git a/quanta/components/csseditor/styleeditor.cpp b/quanta/components/csseditor/styleeditor.cpp index 63d4af79..31f6788b 100644 --- a/quanta/components/csseditor/styleeditor.cpp +++ b/quanta/components/csseditor/styleeditor.cpp @@ -13,11 +13,11 @@ ***************************************************************************/ //qt includes -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include //kde includes #include @@ -39,11 +39,11 @@ #include "viewmanager.h" #include "csseditor.h" -StyleEditor::StyleEditor(QWidget *parent, const char* name) : TLPEditor(parent,name){ - connect(m_pb, SIGNAL(clicked()), this, SLOT(openCSSEditor())); +StyleEditor::StyleEditor(TQWidget *parent, const char* name) : TLPEditor(parent,name){ + connect(m_pb, TQT_SIGNAL(clicked()), this, TQT_SLOT(openCSSEditor())); setToolTip(i18n("Open css dialog")); - QIconSet iconSet = SmallIconSet(QString::fromLatin1("stylesheet")); - QPixmap pixMap = iconSet.pixmap( QIconSet::Small, QIconSet::Normal ); + TQIconSet iconSet = SmallIconSet(TQString::fromLatin1("stylesheet")); + TQPixmap pixMap = iconSet.pixmap( TQIconSet::Small, TQIconSet::Normal ); m_pb->setIconSet(iconSet); m_iconWidth = pixMap.width(); m_iconHeight = pixMap.height(); @@ -73,18 +73,18 @@ void StyleEditor::openCSSEditor(){ if (styleNode->tag->type == Tag::XmlTagEnd && styleNode->prev) styleNode = styleNode->prev; - QString fullDocument = w->editIf->text().stripWhiteSpace(); + TQString 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()); + TQFileInfo 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; + TQString temp; if (styleNode->tag->hasAttribute("style")) { dlg->setInlineStyleContent(styleNode->tag->attributeValue("style")); Tag tempTag(*(styleNode->tag)); @@ -92,7 +92,7 @@ void StyleEditor::openCSSEditor(){ temp = tempTag.toString(); } else { - dlg->setInlineStyleContent(QString::null); + dlg->setInlineStyleContent(TQString::null); temp = styleNode->tag->toString(); } diff --git a/quanta/components/csseditor/styleeditor.h b/quanta/components/csseditor/styleeditor.h index 582ac848..bef9146f 100644 --- a/quanta/components/csseditor/styleeditor.h +++ b/quanta/components/csseditor/styleeditor.h @@ -29,13 +29,13 @@ class StyleEditor : public TLPEditor{ int m_iconWidth, m_iconHeight; public: - StyleEditor(QWidget *parent=0, const char* name=0); + StyleEditor(TQWidget *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*/){} + virtual void setInitialValue(const TQString& /*s*/){} }; diff --git a/quanta/components/csseditor/stylesheetparser.cpp b/quanta/components/csseditor/stylesheetparser.cpp index b8cbf306..db36ea4c 100644 --- a/quanta/components/csseditor/stylesheetparser.cpp +++ b/quanta/components/csseditor/stylesheetparser.cpp @@ -19,10 +19,10 @@ #include #include -static const QString msg1(i18n("has not been closed")), +static const TQString msg1(i18n("has not been closed")), msg2(i18n("needs an opening parenthesis ")); -stylesheetParser::stylesheetParser(const QString& s){ +stylesheetParser::stylesheetParser(const TQString& s){ m_styleSheet = s; m_styleSheet=m_styleSheet.right(m_styleSheet.length()-whiteSpaces(0)); m_stopProcessing = false; @@ -32,7 +32,7 @@ stylesheetParser::stylesheetParser(const QString& s){ int stylesheetParser::whiteSpaces(int d){ int ws=0; for( unsigned int i=d;i tmp(m_styleSheet.left(k+ws),++m_orderNumber); - m_stylesheetStructure["/*"+QString::number(m_orderNumber,10)]=tmp; + QPair tmp(m_styleSheet.left(k+ws),++m_orderNumber); + m_stylesheetStructure["/*"+TQString::number(m_orderNumber,10)]=tmp; m_styleSheet=m_styleSheet.right(m_styleSheet.length()-k-ws); parse(); } @@ -87,8 +87,8 @@ void stylesheetParser::parseComment(){ } } -unsigned int stylesheetParser::numberOfParenthesisInAParenthesisBlock(parenthesisKind p, const QString& b){ - QChar searchFor = '{'; +unsigned int stylesheetParser::numberOfParenthesisInAParenthesisBlock(parenthesisKind p, const TQString& b){ + TQChar searchFor = '{'; if (p == closed) searchFor = '}'; int num = 0; @@ -106,7 +106,7 @@ unsigned int stylesheetParser::numberOfParenthesisInAParenthesisBlock(parenthesi return num; } -int findParanthesis(const QString& string, const QChar &ch, int startPos = 0) +int findParanthesis(const TQString& string, const TQChar &ch, int startPos = 0) { int pos = -1; int len = string.length(); @@ -134,7 +134,7 @@ void stylesheetParser::parseSelector(){ return; } - QString temp(m_styleSheet.left(closingParenthesisPos+1)); + TQString temp(m_styleSheet.left(closingParenthesisPos+1)); if(numberOfParenthesisInAParenthesisBlock(closed,temp) < numberOfParenthesisInAParenthesisBlock(opened,temp)){ m_stopProcessing = true; @@ -154,21 +154,21 @@ void stylesheetParser::parseSelector(){ 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(), + TQString selectorName=m_styleSheet.left(findParanthesis(m_styleSheet, '{')/*m_styleSheet.find("{")*/).stripWhiteSpace(), selectorValue=m_styleSheet.mid(findParanthesis(m_styleSheet, '{')/*m_styleSheet.find("{")*/+1, closingParenthesisPos - m_styleSheet.find("{") -1); selectorName.remove("\n").remove("\t"); selectorValue.remove("\n").remove("\t"); - QPair tmp(selectorValue,++m_orderNumber); + QPair tmp(selectorValue,++m_orderNumber); if (m_stylesheetStructure.contains(selectorName)) { uint i = 2; - QString s = selectorName + QString("-v%1").arg(i); + TQString s = selectorName + TQString("-v%1").arg(i); while (m_stylesheetStructure.contains(s)) { i++; - s = selectorName + QString("-v%1").arg(i); + s = selectorName + TQString("-v%1").arg(i); } selectorName = s; } @@ -219,8 +219,8 @@ void stylesheetParser::parseAtRules1(){ } int ws=whiteSpaces(closingParenthesisPos+1); - QPair tmp(m_styleSheet.left(closingParenthesisPos+1+ws),++m_orderNumber); - m_stylesheetStructure["@rule"+QString::number(m_orderNumber,10)]=tmp; + QPair tmp(m_styleSheet.left(closingParenthesisPos+1+ws),++m_orderNumber); + m_stylesheetStructure["@rule"+TQString::number(m_orderNumber,10)]=tmp; m_styleSheet=m_styleSheet.right(m_styleSheet.length()-closingParenthesisPos-1-ws); parse(); } @@ -236,8 +236,8 @@ void stylesheetParser::parseAtRules2(){ } int ws=whiteSpaces(semicolonPos+1); - QPair tmp(m_styleSheet.left(semicolonPos+1+ws),++m_orderNumber); - m_stylesheetStructure["@rule"+QString::number(m_orderNumber,10)]=tmp; + QPair tmp(m_styleSheet.left(semicolonPos+1+ws),++m_orderNumber); + m_stylesheetStructure["@rule"+TQString::number(m_orderNumber,10)]=tmp; m_styleSheet=m_styleSheet.right(m_styleSheet.length()-semicolonPos-1-ws); parse(); } diff --git a/quanta/components/csseditor/stylesheetparser.h b/quanta/components/csseditor/stylesheetparser.h index 26d5fa3e..06ad1f86 100644 --- a/quanta/components/csseditor/stylesheetparser.h +++ b/quanta/components/csseditor/stylesheetparser.h @@ -18,9 +18,9 @@ #ifndef STYLESHEETPARSER_H #define STYLESHEETPARSER_H -#include -#include -#include +#include +#include +#include /** *@author gulmini luciano @@ -31,27 +31,27 @@ class stylesheetParser : public QObject{ private: enum parenthesisKind { opened, closed }; - QString m_styleSheet; + TQString m_styleSheet; bool m_stopProcessing; unsigned int m_orderNumber; - QMap > m_stylesheetStructure; + TQMap > m_stylesheetStructure; void parseComment(); void parseSelector(); void parseAtRules1(); void parseAtRules2(); int whiteSpaces(int); - unsigned int numberOfParenthesisInAParenthesisBlock(parenthesisKind p, const QString& b); + unsigned int numberOfParenthesisInAParenthesisBlock(parenthesisKind p, const TQString& b); public: - stylesheetParser(const QString& s); + stylesheetParser(const TQString& s); ~stylesheetParser(){} void parse(); - QMap > stylesheetStructure() { return m_stylesheetStructure; } + TQMap > stylesheetStructure() { return m_stylesheetStructure; } unsigned int orderNumber() const {return m_orderNumber; } signals: - void errorOccurred(const QString&); + void errorOccurred(const TQString&); }; #endif diff --git a/quanta/components/csseditor/tlpeditors.cpp b/quanta/components/csseditor/tlpeditors.cpp index 706ac518..81e72538 100644 --- a/quanta/components/csseditor/tlpeditors.cpp +++ b/quanta/components/csseditor/tlpeditors.cpp @@ -15,11 +15,11 @@ * * ***************************************************************************/ -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include @@ -34,9 +34,9 @@ #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); +TLPEditor::TLPEditor(TQWidget *parent, const char* name) : miniEditor(parent,name){ + m_label = new TQLabel(this); + m_le = new TQLineEdit(this); m_pb = new KPushButton(this); setSpacing( KDialog::spacingHint() ); } @@ -47,59 +47,59 @@ TLPEditor::~TLPEditor(){ delete m_pb; } -void TLPEditor::setButtonIcon(QString s){ - QIconSet iconSet = SmallIconSet(QString::fromLatin1(s)); - QPixmap pixMap = iconSet.pixmap( QIconSet::Small, QIconSet::Normal ); +void TLPEditor::setButtonIcon(TQString s){ + TQIconSet iconSet = SmallIconSet(TQString::fromLatin1(s)); + TQPixmap pixMap = iconSet.pixmap( TQIconSet::Small, TQIconSet::Normal ); m_pb->setIconSet(iconSet); m_pb->setFixedSize( pixMap.width()+8, pixMap.height()+8 ); } -void TLPEditor::setLabelText(QString s){ +void TLPEditor::setLabelText(TQString s){ m_label->setText(s); } -void TLPEditor::setToolTip(QString s){ - QToolTip::add(m_pb, s); +void TLPEditor::setToolTip(TQString s){ + TQToolTip::add(m_pb, s); } -void TLPEditor::setWhatsThis(QString s){ - QWhatsThis::add(m_le,s); +void TLPEditor::setWhatsThis(TQString s){ + TQWhatsThis::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"); +URIEditor::URIEditor(TQWidget *parent, const char* name) : TLPEditor(parent,name){ + TQString 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())); + connect(m_pb, TQT_SIGNAL(clicked()), this, TQT_SLOT(openFileDialog())); } void URIEditor::connectToPropertySetter(propertySetter* p){ - connect(this,SIGNAL(valueChanged(const QString&)), p ,SIGNAL(valueChanged(const QString&))); + connect(this,TQT_SIGNAL(valueChanged(const TQString&)), p ,TQT_SIGNAL(valueChanged(const TQString&))); } 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&))); + connect(m_le, TQT_SIGNAL(textChanged ( const TQString & )), this, TQT_SLOT(selectedURI(const TQString&))); else{ - connect(m_le, SIGNAL(textChanged ( const QString & )), this, SLOT(selectedURIs(const QStringList&))); + connect(m_le, TQT_SIGNAL(textChanged ( const TQString & )), this, TQT_SLOT(selectedURIs(const TQStringList&))); } } -void URIEditor::selectedURI(const QString & s){ +void URIEditor::selectedURI(const TQString & s){ KURL u; u.setPath(s); emit valueChanged("url(\'" + QExtFileInfo::toRelative(u, Project::ref()->projectBaseURL()).path() + "\')"); } -void URIEditor::selectedURIs(const QStringList& s){ +void URIEditor::selectedURIs(const TQStringList& s){ KURL u; - QStringList selectedFiles = s, + TQStringList selectedFiles = s, selectedFilesWithURLFormat; - for ( QStringList::Iterator it = selectedFiles.begin(); it != selectedFiles.end(); ++it ){ + for ( TQStringList::Iterator it = selectedFiles.begin(); it != selectedFiles.end(); ++it ){ u.setPath(*it); selectedFilesWithURLFormat.append( "url(\'" + QExtFileInfo::toRelative(u, Project::ref()->projectBaseURL()).path() + "\')"); } @@ -139,9 +139,9 @@ void URIEditor::openFileDialog(){ selectedURI( fd.selectedFile() ); else { selectedURIs( fd.selectedFiles() ); - /*QStringList selectedFiles = fd.selectedFiles(); + /*TQStringList selectedFiles = fd.selectedFiles(); KURL u; - for ( QStringList::Iterator it = selectedFiles.begin(); it != selectedFiles.end(); ++it ){ + for ( TQStringList::Iterator it = selectedFiles.begin(); it != selectedFiles.end(); ++it ){ u.setPath(*it); m_sFiles.append( "url(\'" + QExtFileInfo::toRelative(u, Project::ref()->projectBaseURL()).path() + "\')"); } @@ -150,18 +150,18 @@ void URIEditor::openFileDialog(){ } } -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"); +fontEditor::fontEditor(TQWidget *parent, const char* name) : TLPEditor(parent,name), m_initialValue(TQString::null){ + TQString 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& ) ) ); + connect(m_pb, TQT_SIGNAL(clicked()), this, TQT_SLOT(openFontChooser())); + connect(m_le, TQT_SIGNAL(textChanged ( const TQString & )), this, TQT_SIGNAL( valueChanged( const TQString& ) ) ); } void fontEditor::connectToPropertySetter(propertySetter* p){ - connect(this, SIGNAL(valueChanged(const QString&)), p, SIGNAL(valueChanged(const QString&))); + connect(this, TQT_SIGNAL(valueChanged(const TQString&)), p, TQT_SIGNAL(valueChanged(const TQString&))); } void fontEditor::openFontChooser(){ diff --git a/quanta/components/csseditor/tlpeditors.h b/quanta/components/csseditor/tlpeditors.h index d0e52d37..28881573 100644 --- a/quanta/components/csseditor/tlpeditors.h +++ b/quanta/components/csseditor/tlpeditors.h @@ -33,34 +33,34 @@ class TLPEditor : public miniEditor { //editor with a line text and a button cal Q_OBJECT protected: - QLineEdit *m_le; - QLabel *m_label; + TQLineEdit *m_le; + TQLabel *m_label; KPushButton *m_pb; public: - TLPEditor(QWidget *parent, const char* name=0); + TLPEditor(TQWidget *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; } + virtual void setButtonIcon(TQString); + void setToolTip(TQString); + void setLabelText(TQString); + void setWhatsThis(TQString); + TQLineEdit* lineEdit() const { return m_le; } KPushButton* button() const { return m_pb; } - virtual void setInitialValue(const QString& s)=0; + virtual void setInitialValue(const TQString& s)=0; virtual void connectToPropertySetter(propertySetter* p)=0; signals: - void valueChanged(const QString&); + void valueChanged(const TQString&); }; class fontEditor : public TLPEditor{ Q_OBJECT private: - QString m_initialValue; + TQString m_initialValue; public: - fontEditor(QWidget *parent, const char* name=0); - virtual void setInitialValue(const QString& s) { m_initialValue = s; } + fontEditor(TQWidget *parent, const char* name=0); + virtual void setInitialValue(const TQString& s) { m_initialValue = s; } virtual void connectToPropertySetter(propertySetter* p); public slots: @@ -78,15 +78,15 @@ class URIEditor : public TLPEditor { URIResourceType m_resourceType; public: - URIEditor(QWidget *parent, const char* name=0); + URIEditor(TQWidget *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 setInitialValue(const TQString& /*s*/){} virtual void connectToPropertySetter(propertySetter* p); public slots: - void selectedURI(const QString&); - void selectedURIs(const QStringList&); + void selectedURI(const TQString&); + void selectedURIs(const TQStringList&); void openFileDialog(); }; diff --git a/quanta/components/cvsservice/cvsservice.cpp b/quanta/components/cvsservice/cvsservice.cpp index 043af54e..4849ea72 100644 --- a/quanta/components/cvsservice/cvsservice.cpp +++ b/quanta/components/cvsservice/cvsservice.cpp @@ -14,12 +14,12 @@ ***************************************************************************/ //qt include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include //kde includes #include @@ -47,30 +47,30 @@ CVSService::CVSService(KActionCollection *ac) { m_menu = new KPopupMenu(); - KAction *action = new KAction(i18n("&Commit..."), "vcs_commit", 0, this, SLOT(slotCommit()), ac, "vcs_commit"); + KAction *action = new KAction(i18n("&Commit..."), "vcs_commit", 0, this, TQT_SLOT(slotCommit()), ac, "vcs_commit"); action->plug(m_menu); - action = new KAction(i18n("&Update"), "vcs_update", 0, this, SLOT(slotUpdate()), ac, "vcs_update"); + action = new KAction(i18n("&Update"), "vcs_update", 0, this, TQT_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 = new KAction(i18n("&Tag/Date..."), "vcs_update", 0, this, TQT_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 = new KAction(i18n("&HEAD"), "vcs_update", 0, this, TQT_SLOT(slotUpdateToHead()), ac, "vcs_update_head"); action->plug(updateToMenu); - action = new KAction(i18n("Re&vert"), "reload", 0, this, SLOT(slotRevert()), ac, "vcs_revert"); + action = new KAction(i18n("Re&vert"), "reload", 0, this, TQT_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 = new KAction(i18n("&Add to Repository..."), "vcs_add", 0, this, TQT_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 = new KAction(i18n("&Remove From Repository..."), "vcs_remove", 0, this, TQT_SLOT(slotRemove()), ac, "vcs_remove"); action->plug(m_menu); - action = new KAction(i18n("&Ignore in CVS Operations"), 0, this, SLOT(slotAddToCVSIgnore()), ac); + action = new KAction(i18n("&Ignore in CVS Operations"), 0, this, TQT_SLOT(slotAddToCVSIgnore()), ac); action->plug(m_menu); - action = new KAction(i18n("Do &Not Ignore in CVS Operations"), 0, this, SLOT(slotRemoveFromCVSIgnore()), ac); + action = new KAction(i18n("Do &Not Ignore in CVS Operations"), 0, this, TQT_SLOT(slotRemoveFromCVSIgnore()), ac); action->plug(m_menu); m_menu->insertSeparator(); - action = new KAction(i18n("Show &Log Messages"), 0, this, SLOT(slotBrowseLog()), ac); + action = new KAction(i18n("Show &Log Messages"), 0, this, TQT_SLOT(slotBrowseLog()), ac); action->plug(m_menu); m_cvsJob = 0L; @@ -78,8 +78,8 @@ CVSService::CVSService(KActionCollection *ac) m_cvsService =0L; m_commitDlg = new CVSCommitDlgS(); m_updateToDlg = new CVSUpdateToDlgS(); - m_timer = new QTimer(this); - connect(m_timer, SIGNAL(timeout()), this, SLOT(slotTimeout())); + m_timer = new TQTimer(this); + connect(m_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotTimeout())); } CVSService::~CVSService() @@ -95,14 +95,14 @@ CVSService::~CVSService() delete m_updateToDlg; } -void CVSService::setAppId(const QCString &id) +void CVSService::setAppId(const TQCString &id) { m_appId = id; m_cvsService = new CvsService_stub(m_appId, "CvsService"); m_timer->start(CVSSERVICE_TIMEOUT, true); } -void CVSService::setRepository(const QString &repository) +void CVSService::setRepository(const TQString &repository) { startService(); delete m_repository; @@ -117,7 +117,7 @@ void CVSService::setRepository(const QString &repository) void CVSService::slotUpdate() { - QStringList files; + TQStringList files; if (!m_defaultFile.isEmpty()) { if (m_defaultFile.startsWith(m_repositoryPath)) @@ -131,7 +131,7 @@ void CVSService::slotUpdate() } } -void CVSService::slotUpdate(const QStringList &files) +void CVSService::slotUpdate(const TQStringList &files) { startService(); if (m_repository && !m_appId.isEmpty()) @@ -144,15 +144,15 @@ void CVSService::slotUpdate(const QStringList &files) 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); + connectDCOPSignal(m_job.app(), m_job.obj(), "receivedStdout(TQString)", "slotReceivedStdout(TQString)", true); + connectDCOPSignal(m_job.app(), m_job.obj(), "receivedStderr(TQString)", "slotReceivedStderr(TQString)", true); m_cvsJob->execute(); } } void CVSService::slotUpdateToTag() { - QStringList files; + TQStringList files; if (!m_defaultFile.isEmpty()) { if (m_defaultFile.startsWith(m_repositoryPath)) @@ -166,13 +166,13 @@ void CVSService::slotUpdateToTag() } } -void CVSService::slotUpdateToTag(const QStringList &files) +void CVSService::slotUpdateToTag(const TQStringList &files) { startService(); if (m_repository && !m_appId.isEmpty() && m_updateToDlg->exec()) { - QString extraOpts; - QString commandStr; + TQString extraOpts; + TQString commandStr; if (m_updateToDlg->tagRadioButton->isChecked()) { extraOpts = "-r " + m_updateToDlg->tagCombo->currentText(); @@ -190,15 +190,15 @@ void CVSService::slotUpdateToTag(const QStringList &files) 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); + connectDCOPSignal(m_job.app(), m_job.obj(), "receivedStdout(TQString)", "slotReceivedStdout(TQString)", true); + connectDCOPSignal(m_job.app(), m_job.obj(), "receivedStderr(TQString)", "slotReceivedStderr(TQString)", true); m_cvsJob->execute(); } } void CVSService::slotUpdateToHead() { - QStringList files; + TQStringList files; if (!m_defaultFile.isEmpty()) { if (m_defaultFile.startsWith(m_repositoryPath)) @@ -212,7 +212,7 @@ void CVSService::slotUpdateToHead() } } -void CVSService::slotUpdateToHead(const QStringList &files) +void CVSService::slotUpdateToHead(const TQStringList &files) { startService(); if (m_repository && !m_appId.isEmpty()) @@ -225,15 +225,15 @@ void CVSService::slotUpdateToHead(const QStringList &files) 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); + connectDCOPSignal(m_job.app(), m_job.obj(), "receivedStdout(TQString)", "slotReceivedStdout(TQString)", true); + connectDCOPSignal(m_job.app(), m_job.obj(), "receivedStderr(TQString)", "slotReceivedStderr(TQString)", true); m_cvsJob->execute(); } } void CVSService::slotCommit() { - QStringList files; + TQStringList files; if (!m_defaultFile.isEmpty()) { if (m_defaultFile.startsWith(m_repositoryPath)) @@ -247,7 +247,7 @@ void CVSService::slotCommit() } } -void CVSService::slotCommit(const QStringList &files) +void CVSService::slotCommit(const TQStringList &files) { startService(); m_commitDlg->fileList->clear(); @@ -259,7 +259,7 @@ void CVSService::slotCommit(const QStringList &files) if (m_repository && !m_appId.isEmpty() && m_commitDlg->exec()) { m_commitDlg->messageCombo->removeItem(0); - QString message = m_commitDlg->logEdit->text(); + TQString message = m_commitDlg->logEdit->text(); if (message != m_commitDlg->messageCombo->currentText()) m_commitDlg->messageCombo->insertItem(message, 0); emit clearMessages(); @@ -270,15 +270,15 @@ void CVSService::slotCommit(const QStringList &files) 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); + connectDCOPSignal(m_job.app(), m_job.obj(), "receivedStdout(TQString)", "slotReceivedStdout(TQString)", true); + connectDCOPSignal(m_job.app(), m_job.obj(), "receivedStderr(TQString)", "slotReceivedStderr(TQString)", true); m_cvsJob->execute(); } } void CVSService::slotRevert() { - QStringList files; + TQStringList files; if (!m_defaultFile.isEmpty()) { if (m_defaultFile.startsWith(m_repositoryPath)) @@ -292,7 +292,7 @@ void CVSService::slotRevert() } } -void CVSService::slotRevert(const QStringList &files) +void CVSService::slotRevert(const TQStringList &files) { startService(); if (m_repository && !m_appId.isEmpty()) @@ -305,15 +305,15 @@ void CVSService::slotRevert(const QStringList &files) 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); + connectDCOPSignal(m_job.app(), m_job.obj(), "receivedStdout(TQString)", "slotReceivedStdout(TQString)", true); + connectDCOPSignal(m_job.app(), m_job.obj(), "receivedStderr(TQString)", "slotReceivedStderr(TQString)", true); m_cvsJob->execute(); } } void CVSService::slotAdd() { - QStringList files; + TQStringList files; if (!m_defaultFile.isEmpty()) { if (m_defaultFile.startsWith(m_repositoryPath)) @@ -327,7 +327,7 @@ void CVSService::slotAdd() } } -void CVSService::slotAdd(const QStringList &files) +void CVSService::slotAdd(const TQStringList &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)) @@ -340,15 +340,15 @@ void CVSService::slotAdd(const QStringList &files) 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); + connectDCOPSignal(m_job.app(), m_job.obj(), "receivedStdout(TQString)", "slotReceivedStdout(TQString)", true); + connectDCOPSignal(m_job.app(), m_job.obj(), "receivedStderr(TQString)", "slotReceivedStderr(TQString)", true); m_cvsJob->execute(); } } void CVSService::slotRemove() { - QStringList files; + TQStringList files; if (!m_defaultFile.isEmpty()) { if (m_defaultFile.startsWith(m_repositoryPath)) @@ -362,7 +362,7 @@ void CVSService::slotRemove() } } -void CVSService::slotRemove(const QStringList &files) +void CVSService::slotRemove(const TQStringList &files) { startService(); if (m_repository && !m_appId.isEmpty() && (KMessageBox::warningContinueCancelList(0, i18n("Remove the following files from the repository?
This will remove your working copy as well.
"), files, i18n("CVS Remove")) == KMessageBox::Continue)) @@ -375,8 +375,8 @@ void CVSService::slotRemove(const QStringList &files) 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); + connectDCOPSignal(m_job.app(), m_job.obj(), "receivedStdout(TQString)", "slotReceivedStdout(TQString)", true); + connectDCOPSignal(m_job.app(), m_job.obj(), "receivedStderr(TQString)", "slotReceivedStderr(TQString)", true); m_cvsJob->execute(); } } @@ -388,7 +388,7 @@ void CVSService::slotBrowseLog() { if (m_defaultFile.startsWith(m_repositoryPath)) { - QString file = m_defaultFile.remove(m_repositoryPath); + TQString file = m_defaultFile.remove(m_repositoryPath); if (m_repository && !m_appId.isEmpty() ) { emit clearMessages(); @@ -399,8 +399,8 @@ void CVSService::slotBrowseLog() 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); + connectDCOPSignal(m_job.app(), m_job.obj(), "receivedStdout(TQString)", "slotReceivedStdout(TQString)", true); + connectDCOPSignal(m_job.app(), m_job.obj(), "receivedStderr(TQString)", "slotReceivedStderr(TQString)", true); m_cvsJob->execute(); } } else @@ -417,14 +417,14 @@ void CVSService::slotAddToCVSIgnore() if (m_defaultFile.startsWith(m_repositoryPath)) { emit clearMessages(); - QFileInfo fInfo(m_defaultFile); - QFile f(fInfo.dirPath()+ "/.cvsignore"); + TQFileInfo fInfo(m_defaultFile); + TQFile f(fInfo.dirPath()+ "/.cvsignore"); if (f.open(IO_ReadWrite)) { bool found = false; - QTextStream str(&f); - str.setEncoding(QTextStream::UnicodeUTF8); - QString line; + TQTextStream str(&f); + str.setEncoding(TQTextStream::UnicodeUTF8); + TQString line; while (!str.atEnd()) { line = str.readLine().stripWhiteSpace(); @@ -457,15 +457,15 @@ void CVSService::slotRemoveFromCVSIgnore() if (m_defaultFile.startsWith(m_repositoryPath)) { emit clearMessages(); - QString content; - QFileInfo fInfo(m_defaultFile); - QFile f(fInfo.dirPath()+ "/.cvsignore"); + TQString content; + TQFileInfo fInfo(m_defaultFile); + TQFile f(fInfo.dirPath()+ "/.cvsignore"); bool found = false; if (f.open(IO_ReadWrite)) { - QTextStream str(&f); - str.setEncoding(QTextStream::UnicodeUTF8); - QString line; + TQTextStream str(&f); + str.setEncoding(TQTextStream::UnicodeUTF8); + TQString line; while (!str.atEnd()) { line = str.readLine().stripWhiteSpace(); @@ -483,8 +483,8 @@ void CVSService::slotRemoveFromCVSIgnore() } if (found && f.open(IO_WriteOnly)) { - QTextStream str(&f); - str.setEncoding(QTextStream::UnicodeUTF8); + TQTextStream str(&f); + str.setEncoding(TQTextStream::UnicodeUTF8); str << content; emit showMessage(i18n("\"%1\" removed from the CVS ignore list.").arg(fInfo.fileName()) + "\n", false); f.close(); @@ -508,20 +508,20 @@ void CVSService::slotJobExited(bool normalExit, int exitStatus) 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)"); + disconnectDCOPSignal(m_job.app(), m_job.obj(), "receivedStdout(TQString)", "slotReceivedStdout(TQString)"); + disconnectDCOPSignal(m_job.app(), m_job.obj(), "receivedStderr(TQString)", "slotReceivedStderr(TQString)"); //delete m_cvsJob; //m_cvsJob = 0L; emit showMessage(i18n("CVS command finished."), false); emit showMessage(" ", false); } -void CVSService::slotReceivedStdout(QString output) +void CVSService::slotReceivedStdout(TQString output) { emit showMessage(output, true); } -void CVSService::slotReceivedStderr(QString output) +void CVSService::slotReceivedStderr(TQString output) { emit showMessage(output, true); } @@ -536,8 +536,8 @@ void CVSService::startService() { if (!m_cvsService) { - QString error; - KApplication::startServiceByDesktopName("cvsservice", QStringList(), &error, + TQString error; + KApplication::startServiceByDesktopName("cvsservice", TQStringList(), &error, &m_appId); m_cvsService = new CvsService_stub(m_appId, "CvsService"); } diff --git a/quanta/components/cvsservice/cvsservice.h b/quanta/components/cvsservice/cvsservice.h index ebfcb402..70d9c66a 100644 --- a/quanta/components/cvsservice/cvsservice.h +++ b/quanta/components/cvsservice/cvsservice.h @@ -17,7 +17,7 @@ #define CVSSERVICE_H //qt includes -#include +#include //kde includes #include @@ -38,7 +38,7 @@ class CVSUpdateToDlgS; /** @short This class manages the CVS repositories from withing Quanta with the help of "cvsservice" * */ -class CVSService : public QObject, public CVSServiceDCOPIf +class CVSService : public TQObject, public CVSServiceDCOPIf { Q_OBJECT @@ -57,40 +57,40 @@ public: ~CVSService(); - void setAppId(const QCString& id); + void setAppId(const TQCString& 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;} + void setRepository(const TQString &repository); + void setCurrentFile(const TQString &file) {m_defaultFile = file;} KPopupMenu *menu() {return m_menu;} public slots: void slotUpdate(); - void slotUpdate(const QStringList &files); + void slotUpdate(const TQStringList &files); void slotUpdateToTag(); - void slotUpdateToTag(const QStringList &files); + void slotUpdateToTag(const TQStringList &files); void slotUpdateToHead(); - void slotUpdateToHead(const QStringList &files); + void slotUpdateToHead(const TQStringList &files); void slotCommit(); - void slotCommit(const QStringList &files); + void slotCommit(const TQStringList &files); void slotRevert(); - void slotRevert(const QStringList &files); + void slotRevert(const TQStringList &files); void slotAdd(); - void slotAdd(const QStringList &files); + void slotAdd(const TQStringList &files); void slotRemove(); - void slotRemove(const QStringList &files); + void slotRemove(const TQStringList &files); void slotBrowseLog(); void slotAddToCVSIgnore(); void slotRemoveFromCVSIgnore(); virtual void slotJobExited(bool normalExit, int exitStatus); - virtual void slotReceivedStdout(QString output); - virtual void slotReceivedStderr(QString output); + virtual void slotReceivedStdout(TQString output); + virtual void slotReceivedStderr(TQString output); signals: void clearMessages(); - void showMessage(const QString &msg, bool append); - void commandExecuted(const QString& command, const QStringList& files); + void showMessage(const TQString &msg, bool append); + void commandExecuted(const TQString& command, const TQStringList& files); private slots: void slotTimeout(); @@ -100,19 +100,19 @@ private: void notInRepository(); void startService(); - QCString m_appId; + TQCString 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; + TQString m_defaultFile; + TQString m_repositoryPath; + TQString m_cvsCommand; + TQStringList m_files; CVSCommitDlgS *m_commitDlg; CVSUpdateToDlgS *m_updateToDlg; DCOPRef m_job; - QTimer *m_timer; + TQTimer *m_timer; }; #endif diff --git a/quanta/components/cvsservice/cvsservicedcopif.h b/quanta/components/cvsservice/cvsservicedcopif.h index 75c0434a..c3f178a6 100644 --- a/quanta/components/cvsservice/cvsservicedcopif.h +++ b/quanta/components/cvsservice/cvsservicedcopif.h @@ -16,7 +16,7 @@ #ifndef CVSSERVICEDCOPIF_H #define CVSSERVICEDCOPIF_H -#include +#include #include class CVSServiceDCOPIf : virtual public DCOPObject @@ -24,7 +24,7 @@ class CVSServiceDCOPIf : virtual public DCOPObject K_DCOP k_dcop: virtual void slotJobExited( bool normalExit, int exitStatus ) = 0; - virtual void slotReceivedStdout( QString someOutput ) = 0; + virtual void slotReceivedStdout( TQString someOutput ) = 0; }; #endif diff --git a/quanta/components/debugger/backtracelistview.cpp b/quanta/components/debugger/backtracelistview.cpp index aa5c8c95..202e86e0 100644 --- a/quanta/components/debugger/backtracelistview.cpp +++ b/quanta/components/debugger/backtracelistview.cpp @@ -49,7 +49,7 @@ BacktraceListviewItem::BacktraceListviewItem(BacktraceListview* view) } -BacktraceListview::BacktraceListview(QWidget *parent, const char *name) +BacktraceListview::BacktraceListview(TQWidget *parent, const char *name) : KListView(parent, name) { int charwidth = this->fontMetrics().width("0"); @@ -64,14 +64,14 @@ BacktraceListview::BacktraceListview(QWidget *parent, const char *name) setAllColumnsShowFocus(true); // Jump to bt - connect(this, SIGNAL( doubleClicked( QListViewItem *, const QPoint &, int) ), this, SLOT(slotBacktraceDoubleClick( QListViewItem *, const QPoint &, int))); + connect(this, TQT_SIGNAL( doubleClicked( TQListViewItem *, const TQPoint &, int) ), this, TQT_SLOT(slotBacktraceDoubleClick( TQListViewItem *, const TQPoint &, int))); } BacktraceListview::~BacktraceListview() {} -void BacktraceListview::backtraceShow(int level, BacktraceType type, const QString& filename, long line, const QString& func) +void BacktraceListview::backtraceShow(int level, BacktraceType type, const TQString& filename, long line, const TQString& func) { BacktraceListviewItem* item = new BacktraceListviewItem(this); item->setLevel(level); @@ -82,14 +82,14 @@ void BacktraceListview::backtraceShow(int level, BacktraceType type, const QStri 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::Level, TQString::number(level)); + item->setText(BacktraceListviewColumns::Line, TQString::number(line + 1)); item->setText(BacktraceListviewColumns::Type, type == File ? i18n("File") : i18n("Eval")); insertItem(item); } -void BacktraceListview::keyPressEvent(QKeyEvent *e) +void BacktraceListview::keyPressEvent(TQKeyEvent *e) { if(e->key() != Qt::Key_Enter) { @@ -106,7 +106,7 @@ void BacktraceListview::clear() KListView::clear(); } -void BacktraceListview::slotBacktraceDoubleClick(QListViewItem *item, const QPoint &, int ) +void BacktraceListview::slotBacktraceDoubleClick(TQListViewItem *item, const TQPoint &, int ) { if(!item) return; @@ -114,7 +114,7 @@ void BacktraceListview::slotBacktraceDoubleClick(QListViewItem *item, const QPoi jumpHistory(item); } -void BacktraceListview::jumpHistory(QListViewItem *item) +void BacktraceListview::jumpHistory(TQListViewItem *item) { BacktraceListviewItem* btitem = dynamic_cast(item); diff --git a/quanta/components/debugger/backtracelistview.h b/quanta/components/debugger/backtracelistview.h index e00d0afc..21b72d3d 100644 --- a/quanta/components/debugger/backtracelistview.h +++ b/quanta/components/debugger/backtracelistview.h @@ -21,7 +21,7 @@ #include #include -#include +#include class BacktraceListview; @@ -37,8 +37,8 @@ class BacktraceListviewItem : public KListViewItem { private: BacktraceType m_type; - QString m_filename; - QString m_func; + TQString m_filename; + TQString m_func; long m_line; long m_level; @@ -51,12 +51,12 @@ class BacktraceListviewItem : public KListViewItem void setType(BacktraceType type) { m_type = type; } // Filename - QString filename() const { return m_filename; } - void setFilename(const QString &filename) { m_filename = filename; } + TQString filename() const { return m_filename; } + void setFilename(const TQString &filename) { m_filename = filename; } // Function - QString func() const { return m_func; } - void setFunc(const QString &func) { m_func = func; } + TQString func() const { return m_func; } + void setFunc(const TQString &func) { m_func = func; } // Line long line() const { return m_line; } @@ -74,19 +74,19 @@ class BacktraceListview : public KListView public: - BacktraceListview(QWidget *parent = 0, const char *name = 0); + BacktraceListview(TQWidget *parent = 0, const char *name = 0); ~BacktraceListview(); - void backtraceShow(int level, BacktraceType type, const QString& filename, long line, const QString& func); + void backtraceShow(int level, BacktraceType type, const TQString& filename, long line, const TQString& func); void clear(); public slots: - void slotBacktraceDoubleClick(QListViewItem *item, const QPoint &point, int column); + void slotBacktraceDoubleClick(TQListViewItem *item, const TQPoint &point, int column); private: - void keyPressEvent(QKeyEvent *e); - void jumpHistory(QListViewItem *item); + void keyPressEvent(TQKeyEvent *e); + void jumpHistory(TQListViewItem *item); }; diff --git a/quanta/components/debugger/conditionalbreakpointdialog.cpp b/quanta/components/debugger/conditionalbreakpointdialog.cpp index 943c33d4..055512da 100644 --- a/quanta/components/debugger/conditionalbreakpointdialog.cpp +++ b/quanta/components/debugger/conditionalbreakpointdialog.cpp @@ -16,19 +16,19 @@ #include "conditionalbreakpointdialog.h" -#include -#include +#include +#include #include -#include +#include #include #include #include -#include -#include +#include +#include #include "debuggerbreakpoint.h" -ConditionalBreakpointDialog::ConditionalBreakpointDialog(const QString& expression, const QString& inFile, const QString& inClass, const QString& inFunction) +ConditionalBreakpointDialog::ConditionalBreakpointDialog(const TQString& expression, const TQString& inFile, const TQString& inClass, const TQString& inFunction) : ConditionalBreakpointDialogS(0, "ConditionalBreakpointDialog", false, 0) { comboExpression->setCurrentText(expression); @@ -40,11 +40,11 @@ ConditionalBreakpointDialog::ConditionalBreakpointDialog(const QString& expressi buttonClearClass->setPixmap(SmallIcon("clear_left")); buttonClearFunction->setPixmap(SmallIcon("clear_left")); - connect(comboExpression, SIGNAL(textChanged(const QString&)), this, SLOT(slotExpressionChanged())); + connect(comboExpression, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotExpressionChanged())); - connect(buttonClearFile, SIGNAL(pressed()), this, SLOT(slotClearFile())); - connect(buttonClearClass, SIGNAL(pressed()), this, SLOT(slotClearClass())); - connect(buttonClearFunction, SIGNAL(pressed()), this, SLOT(slotClearFunction())); + connect(buttonClearFile, TQT_SIGNAL(pressed()), this, TQT_SLOT(slotClearFile())); + connect(buttonClearClass, TQT_SIGNAL(pressed()), this, TQT_SLOT(slotClearClass())); + connect(buttonClearFunction, TQT_SIGNAL(pressed()), this, TQT_SLOT(slotClearFunction())); slotExpressionChanged(); } @@ -56,7 +56,7 @@ ConditionalBreakpointDialog::~ConditionalBreakpointDialog() void ConditionalBreakpointDialog::slotExpressionChanged() { - if(comboExpression->currentText().find( QRegExp("[^=!]=[^=]"), 0 ) >= 0) + if(comboExpression->currentText().find( TQRegExp("[^=!]=[^=]"), 0 ) >= 0) ledWarning->on(); else ledWarning->off(); diff --git a/quanta/components/debugger/conditionalbreakpointdialog.h b/quanta/components/debugger/conditionalbreakpointdialog.h index fdae39a3..cad4adeb 100644 --- a/quanta/components/debugger/conditionalbreakpointdialog.h +++ b/quanta/components/debugger/conditionalbreakpointdialog.h @@ -31,13 +31,13 @@ class ConditionalBreakpointDialog : public ConditionalBreakpointDialogS OnChange }; - ConditionalBreakpointDialog(const QString& expression, const QString& inFile, const QString& inClass, const QString& inFunction); + ConditionalBreakpointDialog(const TQString& expression, const TQString& inFile, const TQString& inClass, const TQString& inFunction); ~ConditionalBreakpointDialog(); -// QString expression(); -// QString inFile(); -// QString inClass(); -// QString inFunction(); +// TQString expression(); +// TQString inFile(); +// TQString inClass(); +// TQString inFunction(); // DebuggerBreakpoint::Types type(); DebuggerBreakpoint *breakpoint(); diff --git a/quanta/components/debugger/dbgp/dbgpnetwork.cpp b/quanta/components/debugger/dbgp/dbgpnetwork.cpp index 8ef82c2d..62b0daa0 100644 --- a/quanta/components/debugger/dbgp/dbgpnetwork.cpp +++ b/quanta/components/debugger/dbgp/dbgpnetwork.cpp @@ -25,7 +25,7 @@ #include DBGpNetwork::DBGpNetwork() -: QObject() +: TQObject() { m_socket = NULL; m_server = NULL; @@ -37,7 +37,7 @@ DBGpNetwork::~DBGpNetwork() { } -void DBGpNetwork::sessionStart(bool useproxy, const QString& server, const QString & service) +void DBGpNetwork::sessionStart(bool useproxy, const TQString& server, const TQString & service) { kdDebug(24002) << k_funcinfo << ", m_server: " << m_server << ", m_socket" << m_socket << endl; @@ -48,11 +48,11 @@ void DBGpNetwork::sessionStart(bool useproxy, const QString& server, const QStri 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())); + connect(m_socket, TQT_SIGNAL(gotError(int)), this, TQT_SLOT(slotError(int))); + connect(m_socket, TQT_SIGNAL(connected(const KResolverEntry &)), this, TQT_SLOT(slotConnected(const KNetwork::KResolverEntry &))); + connect(m_socket, TQT_SIGNAL(closed()), this, TQT_SLOT(slotConnectionClosed())); + connect(m_socket, TQT_SIGNAL(readyRead()), this, TQT_SLOT(slotReadyRead())); + connect(m_socket, TQT_SIGNAL(destroyed()), this, TQT_SLOT(slotSocketDestroyed())); m_socket->connect(); emit active(false); kdDebug(24002) << k_funcinfo << ", proxy:" << server << ", " << service << endl; @@ -65,8 +65,8 @@ void DBGpNetwork::sessionStart(bool useproxy, const QString& server, const QStri 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))); + connect(m_server, TQT_SIGNAL(readyAccept()), this, TQT_SLOT(slotReadyAccept())); + connect(m_server, TQT_SIGNAL(gotError(int)), this, TQT_SLOT(slotError(int))); if(m_server->listen()) { @@ -91,7 +91,7 @@ void DBGpNetwork::sessionEnd() if(m_socket) { m_socket->flush(); - disconnect(m_socket, SIGNAL(closed()), this, SLOT(slotConnectionClosed())); + disconnect(m_socket, TQT_SIGNAL(closed()), this, TQT_SLOT(slotConnectionClosed())); if (m_socket) m_socket->close(); delete m_socket; @@ -146,7 +146,7 @@ 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())); + disconnect(m_server, TQT_SIGNAL(readyAccept()), this, TQT_SLOT(slotReadyAccept())); m_socket = (KNetwork::KStreamSocket *)m_server->accept(); // KSocketServer returns a KStreamSocket (!) if(m_socket) @@ -156,10 +156,10 @@ void DBGpNetwork::slotReadyAccept() 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())); + connect(m_socket, TQT_SIGNAL(gotError(int)), this, TQT_SLOT(slotError(int))); + connect(m_socket, TQT_SIGNAL(connected(const KResolverEntry &)), this, TQT_SLOT(slotConnected(const KResolverEntry &))); + connect(m_socket, TQT_SIGNAL(closed()), this, TQT_SLOT(slotConnectionClosed())); + connect(m_socket, TQT_SIGNAL(readyRead()), this, TQT_SLOT(slotReadyRead())); connected(); } else @@ -215,7 +215,7 @@ void DBGpNetwork::slotConnectionClosed() } if(m_server) - connect(m_server, SIGNAL(readyAccept()), this, SLOT(slotReadyAccept())); + connect(m_server, TQT_SIGNAL(readyAccept()), this, TQT_SLOT(slotReadyAccept())); // Disable all session related actions and enable connection action emit connected(false); @@ -242,7 +242,7 @@ void DBGpNetwork::slotReadyRead() while(m_socket && (m_socket->bytesAvailable() > 0 || m_fifo.length() >= (unsigned long)m_datalen)) { int bytes; - QString data; + TQString data; if(m_socket && m_socket->bytesAvailable() > 0 ) { @@ -282,18 +282,18 @@ void DBGpNetwork::slotReadyRead() } } -long DBGpNetwork::sendCommand(const QString & command) +long DBGpNetwork::sendCommand(const TQString & command) { return sendCommand(command, ""); } -long DBGpNetwork::sendCommand(const QString & command, const QString & arguments) +long DBGpNetwork::sendCommand(const TQString & command, const TQString & arguments) { if(!isConnected()) return false; m_transaction_id++; - QString commandline = command + QString(" -i %1").arg(m_transaction_id) + (!arguments.isEmpty() ? " " : "") + arguments; + TQString commandline = command + TQString(" -i %1").arg(m_transaction_id) + (!arguments.isEmpty() ? " " : "") + arguments; kdDebug(24002) << k_funcinfo << ", sending: " << commandline << endl; @@ -302,7 +302,7 @@ long DBGpNetwork::sendCommand(const QString & command, const QString & arguments return m_transaction_id; } -long DBGpNetwork::sendCommand( const QString & command, const QString & arguments, const QString & data ) +long DBGpNetwork::sendCommand( const TQString & command, const TQString & arguments, const TQString & data ) { QByteArrayFifo buffer; buffer.append(data.ascii(), data.length()); diff --git a/quanta/components/debugger/dbgp/dbgpnetwork.h b/quanta/components/debugger/dbgp/dbgpnetwork.h index 435dbc8e..96faca06 100644 --- a/quanta/components/debugger/dbgp/dbgpnetwork.h +++ b/quanta/components/debugger/dbgp/dbgpnetwork.h @@ -45,22 +45,22 @@ class DBGpNetwork : public QObject signals: void active(bool isOnline); void connected(bool isConnected); - void networkError(const QString &error, bool log); - void command(const QString& data); + void networkError(const TQString &error, bool log); + void command(const TQString& data); public: DBGpNetwork(); ~DBGpNetwork(); - virtual void sessionStart(bool useproxy, const QString& server, const QString & service); + virtual void sessionStart(bool useproxy, const TQString& server, const TQString & 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); + long sendCommand(const TQString & command); + long sendCommand(const TQString & command, const TQString & arguments); + long sendCommand(const TQString & command, const TQString & arguments, const TQString & data); public slots: // Socket slots diff --git a/quanta/components/debugger/dbgp/dbgpsettings.cpp b/quanta/components/debugger/dbgp/dbgpsettings.cpp index 80b7eaf1..e9bbc249 100644 --- a/quanta/components/debugger/dbgp/dbgpsettings.cpp +++ b/quanta/components/debugger/dbgp/dbgpsettings.cpp @@ -15,16 +15,16 @@ ***************************************************************************/ -#include "qlineedit.h" -#include "qcheckbox.h" +#include "tqlineedit.h" +#include "tqcheckbox.h" #include "dbgpsettings.h" #include -DBGpSettings::DBGpSettings(const QString &protocolversion) +DBGpSettings::DBGpSettings(const TQString &protocolversion) : DBGpSettingsS(0, "DBGpSettings", false, 0) { textAbout->setText(textAbout->text().replace("%PROTOCOLVERSION%", protocolversion)); - connect(checkLocalProject, SIGNAL(toggled(bool)), this, SLOT(slotLocalProjectToggle(bool))); + connect(checkLocalProject, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotLocalProjectToggle(bool))); } DBGpSettings::~DBGpSettings() diff --git a/quanta/components/debugger/dbgp/dbgpsettings.h b/quanta/components/debugger/dbgp/dbgpsettings.h index 4f2721ff..bdf8c2f0 100644 --- a/quanta/components/debugger/dbgp/dbgpsettings.h +++ b/quanta/components/debugger/dbgp/dbgpsettings.h @@ -24,7 +24,7 @@ class DBGpSettings : public DBGpSettingsS Q_OBJECT public: - DBGpSettings(const QString &protocolversion); + DBGpSettings(const TQString &protocolversion); ~DBGpSettings(); public slots: diff --git a/quanta/components/debugger/dbgp/qbytearrayfifo.cpp b/quanta/components/debugger/dbgp/qbytearrayfifo.cpp index f8f14aab..4f8e72d8 100644 --- a/quanta/components/debugger/dbgp/qbytearrayfifo.cpp +++ b/quanta/components/debugger/dbgp/qbytearrayfifo.cpp @@ -18,7 +18,7 @@ */ #include "qbytearrayfifo.h" -#include +#include #include QByteArrayFifo::QByteArrayFifo( ) @@ -27,10 +27,10 @@ QByteArrayFifo::QByteArrayFifo( ) m_array.resize(0); } -QString QByteArrayFifo::retrieve( ) +TQString QByteArrayFifo::retrieve( ) { // See if there's a null teminator somewhere - QString str(m_array); + TQString str(m_array); size_t size = str.length() + 1; // Decrease size and move bytes to the beginning of the array @@ -69,7 +69,7 @@ long QByteArrayFifo::find( char character ) return m_array.find(character); } -QString QByteArrayFifo::base64Encoded() +TQString QByteArrayFifo::base64Encoded() { return KCodecs::base64Encode(m_array); } diff --git a/quanta/components/debugger/dbgp/qbytearrayfifo.h b/quanta/components/debugger/dbgp/qbytearrayfifo.h index 04dc4b2f..851c7f34 100644 --- a/quanta/components/debugger/dbgp/qbytearrayfifo.h +++ b/quanta/components/debugger/dbgp/qbytearrayfifo.h @@ -20,8 +20,8 @@ #ifndef qbytearrayfifo_H #define qbytearrayfifo_H -#include -#include +#include +#include class QByteArrayFifo { @@ -29,13 +29,13 @@ class QByteArrayFifo public: QByteArrayFifo(); bool append(const char * chars, size_t size); - QString retrieve(); - QString base64Encoded(); + TQString retrieve(); + TQString base64Encoded(); long find(char character); size_t length() { return m_size; } private: - QByteArray m_array; + TQByteArray m_array; size_t m_size; }; diff --git a/quanta/components/debugger/dbgp/quantadebuggerdbgp.cpp b/quanta/components/debugger/dbgp/quantadebuggerdbgp.cpp index 100ec9d3..d16319a9 100644 --- a/quanta/components/debugger/dbgp/quantadebuggerdbgp.cpp +++ b/quanta/components/debugger/dbgp/quantadebuggerdbgp.cpp @@ -22,14 +22,14 @@ #include #include #include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include #include @@ -49,7 +49,7 @@ K_EXPORT_COMPONENT_FACTORY( quantadebuggerdbgp, const char QuantaDebuggerDBGp::protocolversion[] = "1.0"; -QuantaDebuggerDBGp::QuantaDebuggerDBGp (QObject *parent, const char*, const QStringList&) +QuantaDebuggerDBGp::QuantaDebuggerDBGp (TQObject *parent, const char*, const TQStringList&) : DebuggerClient (parent, "DBGp") { // Create a socket object and set up its signals @@ -59,10 +59,10 @@ QuantaDebuggerDBGp::QuantaDebuggerDBGp (QObject *parent, const char*, const QStr 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))); + connect(&m_network, TQT_SIGNAL(command(const TQString&)), this, TQT_SLOT(processCommand(const TQString&))); + connect(&m_network, TQT_SIGNAL(active(bool)), this, TQT_SLOT(slotNetworkActive(bool))); + connect(&m_network, TQT_SIGNAL(connected(bool)), this, TQT_SLOT(slotNetworkConnected(bool))); + connect(&m_network, TQT_SIGNAL(networkError(const TQString &, bool)), this, TQT_SLOT(slotNetworkError(const TQString &, bool))); } @@ -124,7 +124,7 @@ void QuantaDebuggerDBGp::slotNetworkConnected(bool connected) } -void QuantaDebuggerDBGp::slotNetworkError(const QString &errormsg, bool log) +void QuantaDebuggerDBGp::slotNetworkError(const TQString &errormsg, bool log) { debuggerInterface()->showStatus(errormsg, log); } @@ -187,7 +187,7 @@ void QuantaDebuggerDBGp::setExecutionState( const State & state, bool forcesend } // Change executionstate of the script -void QuantaDebuggerDBGp::setExecutionState(const QString &state) +void QuantaDebuggerDBGp::setExecutionState(const TQString &state) { kdDebug(24002) << k_funcinfo << state << endl; @@ -249,19 +249,19 @@ const uint QuantaDebuggerDBGp::supports(DebuggerClientCapabilities::Capabilities // Process a dbgp command -void QuantaDebuggerDBGp::processCommand(const QString& datas) +void QuantaDebuggerDBGp::processCommand(const TQString& datas) { kdDebug(24002) << k_lineinfo << datas.left(50) << " (" << datas.length() << " bytes)" << endl; - QDomDocument data; + TQDomDocument 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"); + TQDomNode response = data.elementsByTagName("response").item(0); + TQString command = attribute(response, "command"); // Status command if(command == "status") @@ -321,7 +321,7 @@ void QuantaDebuggerDBGp::processCommand(const QString& datas) } else if(data.elementsByTagName("init").count() > 0) { - QDomNode init = data.elementsByTagName("init").item(0); + TQDomNode init = data.elementsByTagName("init").item(0); initiateSession(init); return; } @@ -334,7 +334,7 @@ void QuantaDebuggerDBGp::processCommand(const QString& datas) } -void QuantaDebuggerDBGp::initiateSession(const QDomNode& initpacket) +void QuantaDebuggerDBGp::initiateSession(const TQDomNode& initpacket) { if(attribute(initpacket, "protocol_version") != protocolversion) { @@ -347,7 +347,7 @@ void QuantaDebuggerDBGp::initiateSession(const QDomNode& initpacket) endSession(); return; } - QString path = attribute(initpacket, "fileuri"); + TQString path = attribute(initpacket, "fileuri"); if (path.startsWith("file://")) { path.remove(0, 7); @@ -369,22 +369,22 @@ void QuantaDebuggerDBGp::initiateSession(const QDomNode& initpacket) m_network.sendCommand("feature_get", "-n quanta_initialized"); } -void QuantaDebuggerDBGp::stackShow(const QDomNode&node) +void QuantaDebuggerDBGp::stackShow(const TQDomNode&node) { bool foundlowlevel = false; BacktraceType type; - QString typestr; + TQString typestr; // Clear backtrace debuggerInterface()->backtraceClear(); // Add new one - for(QDomNode child = node.firstChild(); !child.isNull(); child = child.nextSibling()) + for(TQDomNode 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) + if(typestr.find(TQRegExp(".*%28[0-9]+%29%20%3A%20eval")) >= 0) type = Eval; else type = File; @@ -409,10 +409,10 @@ void QuantaDebuggerDBGp::stackShow(const QDomNode&node) } -void QuantaDebuggerDBGp::checkSupport( const QDomNode & node ) +void QuantaDebuggerDBGp::checkSupport( const TQDomNode & node ) { - QString feature = attribute(node, "feature_name"); - QString data = node.nodeValue(); + TQString feature = attribute(node, "feature_name"); + TQString data = node.nodeValue(); if(feature == "supports_async") m_supportsasync = data.toLong(); @@ -430,7 +430,7 @@ void QuantaDebuggerDBGp::checkSupport( const QDomNode & node ) } -QString QuantaDebuggerDBGp::attribute(const QDomNode&node, const QString &attribute) +TQString QuantaDebuggerDBGp::attribute(const TQDomNode&node, const TQString &attribute) { return node.attributes().namedItem(attribute).nodeValue(); } @@ -448,12 +448,12 @@ void QuantaDebuggerDBGp::debuggingState(bool enable) void QuantaDebuggerDBGp::sendWatches() { - for(QValueList::iterator it = m_watchlist.begin(); it != m_watchlist.end(); ++it) + for(TQValueList::iterator it = m_watchlist.begin(); it != m_watchlist.end(); ++it) m_network.sendCommand("property_get", "-n " + (*it)); } // Return name of debugger -QString QuantaDebuggerDBGp::getName() +TQString QuantaDebuggerDBGp::getName() { return "DBGp"; // no i18n on the name } @@ -462,7 +462,7 @@ QString QuantaDebuggerDBGp::getName() // Send HTTP Request void QuantaDebuggerDBGp::request() { - QString request; + TQString request; request = debuggerInterface()->activeFileParts(m_startsession); //if(request.startsWith(m_localBasedir, false)) @@ -525,7 +525,7 @@ void QuantaDebuggerDBGp::pause() // Add a breakpoint void QuantaDebuggerDBGp::addBreakpoint (DebuggerBreakpoint* breakpoint) { - QString type; + TQString type; if(breakpoint->type() == DebuggerBreakpoint::LineBreakpoint) type = "line"; else if(breakpoint->type() == DebuggerBreakpoint::ConditionalTrue) @@ -537,20 +537,20 @@ void QuantaDebuggerDBGp::addBreakpoint (DebuggerBreakpoint* breakpoint) "breakpoint_set", "-t " + type + " -f " + mapLocalPathToServer(breakpoint->filePath()) + - " -n " + QString::number(breakpoint->line() + 1) + " -n " + TQString::number(breakpoint->line() + 1) , breakpoint->condition()); - breakpoint->setKey(QString("id %1").arg(id)); + breakpoint->setKey(TQString("id %1").arg(id)); } -void QuantaDebuggerDBGp::setBreakpointKey( const QDomNode & response ) +void QuantaDebuggerDBGp::setBreakpointKey( const TQDomNode & response ) { long id; id = attribute(response, "transaction_id").toLong(); if(id > 0) { - QString oldkey = QString("id %1").arg(id); + TQString oldkey = TQString("id %1").arg(id); DebuggerBreakpoint *bp = debuggerInterface()->findDebuggerBreakpoint(oldkey); if(bp) debuggerInterface()->updateBreakpointKey(*bp, attribute(response, "id")); @@ -565,13 +565,13 @@ void QuantaDebuggerDBGp::removeBreakpoint(DebuggerBreakpoint* bp) } // A file was opened... -void QuantaDebuggerDBGp::fileOpened(const QString&) +void QuantaDebuggerDBGp::fileOpened(const TQString&) { // sendCommand("reinitialize", 0); } // Watch a variable -void QuantaDebuggerDBGp::addWatch(const QString & variable) +void QuantaDebuggerDBGp::addWatch(const TQString & variable) { if(m_watchlist.find(variable) == m_watchlist.end()) m_watchlist.append(variable); @@ -602,10 +602,10 @@ void QuantaDebuggerDBGp::showCondition(const StringMap &) } // Read configuration -void QuantaDebuggerDBGp::readConfig(QDomNode node) +void QuantaDebuggerDBGp::readConfig(TQDomNode node) { // Server - QDomNode valuenode = node.namedItem("serverhost"); + TQDomNode valuenode = node.namedItem("serverhost"); m_serverHost = valuenode.firstChild().nodeValue(); if(m_serverHost.isEmpty()) m_serverHost = "localhost"; @@ -670,7 +670,7 @@ void QuantaDebuggerDBGp::readConfig(QDomNode node) // Show configuration -void QuantaDebuggerDBGp::showConfig(QDomNode node) +void QuantaDebuggerDBGp::showConfig(TQDomNode node) { DBGpSettings set(protocolversion); @@ -699,9 +699,9 @@ void QuantaDebuggerDBGp::showConfig(QDomNode node) if(m_profilerMapFilename) set.checkProfilerMapFilename->setChecked(true); - if(set.exec() == QDialog::Accepted ) + if(set.exec() == TQDialog::Accepted ) { - QDomElement el; + TQDomElement el; el = node.namedItem("localproject").toElement(); if (!el.isNull()) @@ -785,7 +785,7 @@ void QuantaDebuggerDBGp::showConfig(QDomNode node) + (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))); + el.appendChild( node.ownerDocument().createTextNode(TQString::number(m_errormask))); // Profiler el = node.namedItem("profilerfilename").toElement(); @@ -815,14 +815,14 @@ void QuantaDebuggerDBGp::showConfig(QDomNode node) } // Map a server filepath to a local one using project settings -QString QuantaDebuggerDBGp::mapServerPathToLocal(const QString& serverpath) +TQString QuantaDebuggerDBGp::mapServerPathToLocal(const TQString& 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) +TQString QuantaDebuggerDBGp::mapLocalPathToServer(const TQString& localpath) { // Translate filename from local to server return debuggerInterface()->Mapper()->mapLocalPathToServer(localpath); @@ -832,7 +832,7 @@ void QuantaDebuggerDBGp::variableSetValue(const DebuggerVariable &variable) { m_network.sendCommand("property_set", "-n " + variable.name(), variable.value()); - for(QValueList::iterator it = m_watchlist.begin(); it != m_watchlist.end(); ++it) + for(TQValueList::iterator it = m_watchlist.begin(); it != m_watchlist.end(); ++it) if((*it) == variable.name()) { m_network.sendCommand("property_get", "-n " + variable.name(), variable.value()); @@ -849,14 +849,14 @@ void QuantaDebuggerDBGp::profilerOpen() void QuantaDebuggerDBGp::profilerOpen(bool forceopen) { - QString profileroutput = m_profilerFilename; + TQString profileroutput = m_profilerFilename; profileroutput.replace("%a", m_appid); profileroutput.replace("%c", m_initialscript); if(m_profilerMapFilename) profileroutput = mapServerPathToLocal( profileroutput); - bool exists = QFile::exists(profileroutput); + bool exists = TQFile::exists(profileroutput); if(m_profilerAutoOpen || forceopen) { if(exists) @@ -878,7 +878,7 @@ void QuantaDebuggerDBGp::profilerOpen(bool forceopen) } } -void QuantaDebuggerDBGp::typemapSetup( const QDomNode & typemapnode ) +void QuantaDebuggerDBGp::typemapSetup( const TQDomNode & typemapnode ) { /* @@ -902,7 +902,7 @@ void QuantaDebuggerDBGp::typemapSetup( const QDomNode & typemapnode ) // m_variabletypes["object"] = "object"; // m_variabletypes["resource"] = "resource"; - QDomNode child = typemapnode.firstChild(); + TQDomNode child = typemapnode.firstChild(); while(!child.isNull()) { if(child.nodeName() == "map") @@ -914,12 +914,12 @@ void QuantaDebuggerDBGp::typemapSetup( const QDomNode & typemapnode ) } -void QuantaDebuggerDBGp::showWatch( const QDomNode & variablenode) +void QuantaDebuggerDBGp::showWatch( const TQDomNode & variablenode) { debuggerInterface()->showVariable(buildVariable(variablenode.firstChild())); } -void QuantaDebuggerDBGp::propertySetResponse( const QDomNode & setnode) +void QuantaDebuggerDBGp::propertySetResponse( const TQDomNode & setnode) { if(attribute(setnode, "success") == "0") { @@ -928,7 +928,7 @@ void QuantaDebuggerDBGp::propertySetResponse( const QDomNode & setnode) } -DebuggerVariable* QuantaDebuggerDBGp::buildVariable( const QDomNode & variablenode) +DebuggerVariable* QuantaDebuggerDBGp::buildVariable( const TQDomNode & variablenode) { /* Sample: @@ -946,44 +946,44 @@ DebuggerVariable* QuantaDebuggerDBGp::buildVariable( const QDomNode & variableno */ - QString name = attribute(variablenode, "name"); - QString type = m_variabletypes[attribute(variablenode, "type")]; + TQString name = attribute(variablenode, "name"); + TQString type = m_variabletypes[attribute(variablenode, "type")]; if(type == "int") { - QString value = variablenode.firstChild().nodeValue(); + TQString value = variablenode.firstChild().nodeValue(); return debuggerInterface()->newDebuggerVariable( name, value, DebuggerVariableTypes::Integer); } else if (type == "string") { - QCString value = QCString(variablenode.firstChild().nodeValue()); + TQCString value = TQCString(variablenode.firstChild().nodeValue()); value = KCodecs::base64Decode(value); return debuggerInterface()->newDebuggerVariable( name, value, DebuggerVariableTypes::String); } else if (type == "bool") { - QString value = variablenode.firstChild().nodeValue(); + TQString value = variablenode.firstChild().nodeValue(); return debuggerInterface()->newDebuggerVariable( name, value, DebuggerVariableTypes::Boolean); } else if (type == "resource") { - QString value = variablenode.firstChild().nodeValue(); + TQString value = variablenode.firstChild().nodeValue(); return debuggerInterface()->newDebuggerVariable( name, value, DebuggerVariableTypes::Resource); } else if (type == "float") { - QString value = variablenode.firstChild().nodeValue(); + TQString value = variablenode.firstChild().nodeValue(); return debuggerInterface()->newDebuggerVariable( name, value, DebuggerVariableTypes::Float); } else if (type == "null") { - QString value = variablenode.firstChild().nodeValue(); + TQString value = variablenode.firstChild().nodeValue(); return debuggerInterface()->newDebuggerVariable( name, "", DebuggerVariableTypes::Undefined); } else if (type == "hash" || type == "array" || type == "object") { - QDomNode child = variablenode.firstChild(); - QPtrList vars ; + TQDomNode child = variablenode.firstChild(); + TQPtrList vars ; while(!child.isNull()) { DebuggerVariable* var = buildVariable( child); @@ -1001,12 +1001,12 @@ DebuggerVariable* QuantaDebuggerDBGp::buildVariable( const QDomNode & variableno return debuggerInterface()->newDebuggerVariable(name, "", DebuggerVariableTypes::Error);; } -void QuantaDebuggerDBGp::handleError(const QDomNode & statusnode ) +void QuantaDebuggerDBGp::handleError(const TQDomNode & statusnode ) { if(attribute(statusnode, "reason") == "error" || attribute(statusnode, "reason") == "aborted") { - QDomNode errornode = statusnode.firstChild(); + TQDomNode errornode = statusnode.firstChild(); while(!errornode.isNull()) { if(errornode.nodeName() == "error") diff --git a/quanta/components/debugger/dbgp/quantadebuggerdbgp.h b/quanta/components/debugger/dbgp/quantadebuggerdbgp.h index fd8eda22..7c9601ad 100644 --- a/quanta/components/debugger/dbgp/quantadebuggerdbgp.h +++ b/quanta/components/debugger/dbgp/quantadebuggerdbgp.h @@ -19,22 +19,22 @@ #include #include -#include +#include #include -#include +#include #include "debuggerclient.h" #include "dbgpnetwork.h" -typedef QValueList WatchList; -typedef QMap StringMap; +typedef TQValueList WatchList; +typedef TQMap StringMap; class QuantaDebuggerDBGp : public DebuggerClient { Q_OBJECT public: - QuantaDebuggerDBGp(QObject *parent, const char* name, const QStringList&); + QuantaDebuggerDBGp(TQObject *parent, const char* name, const TQStringList&); ~QuantaDebuggerDBGp(); // Execution states @@ -70,7 +70,7 @@ class QuantaDebuggerDBGp : public DebuggerClient void stepOut(); void pause(); void kill(); - void setExecutionState(const QString &state); + void setExecutionState(const TQString &state); void setExecutionState(const State &state, bool forcesend = false); // Connection @@ -78,17 +78,17 @@ class QuantaDebuggerDBGp : public DebuggerClient void endSession(); // Return name of debugger - QString getName(); + TQString getName(); // Initiation - void checkSupport(const QDomNode&node); + void checkSupport(const TQDomNode&node); // New file opened in quanta - void fileOpened(const QString& file); + void fileOpened(const TQString& file); // Settings - void readConfig(QDomNode node); - void showConfig(QDomNode node); + void readConfig(TQDomNode node); + void showConfig(TQDomNode node); // Breakpoints void addBreakpoint(DebuggerBreakpoint* breakpoint); @@ -96,26 +96,26 @@ class QuantaDebuggerDBGp : public DebuggerClient void showCondition(const StringMap &args); // Variables - void addWatch(const QString &variable); + void addWatch(const TQString &variable); void removeWatch(DebuggerVariable *var); void variableSetValue(const DebuggerVariable &variable); - void propertySetResponse( const QDomNode & setnode); + void propertySetResponse( const TQDomNode & setnode); // Call stack - void stackShow(const QDomNode&node); + void stackShow(const TQDomNode&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; + TQString m_serverBasedir; + TQString m_localBasedir; + TQString m_serverPort; + TQString m_serverHost; + TQString m_startsession; + TQString m_listenPort; + TQString m_profilerFilename; + TQString m_appid; + TQString m_initialscript; bool m_useproxy; bool m_profilerAutoOpen; @@ -135,19 +135,19 @@ class QuantaDebuggerDBGp : public DebuggerClient void debuggingState(bool enable); void connected(); - void handleError(const QDomNode & statusnode ); + void handleError(const TQDomNode & statusnode ); - QString mapServerPathToLocal(const QString& serverpath); - QString mapLocalPathToServer(const QString& localpath); - QString bpToDBGp(DebuggerBreakpoint* breakpoint); - void setBreakpointKey(const QDomNode& response); + TQString mapServerPathToLocal(const TQString& serverpath); + TQString mapLocalPathToServer(const TQString& localpath); + TQString bpToDBGp(DebuggerBreakpoint* breakpoint); + void setBreakpointKey(const TQDomNode& response); - QString attribute(const QDomNode&node, const QString &attribute); - void initiateSession(const QDomNode& initpacket); + TQString attribute(const TQDomNode&node, const TQString &attribute); + void initiateSession(const TQDomNode& initpacket); - void typemapSetup(const QDomNode& typemapnode); - void showWatch(const QDomNode& typemapnode); - DebuggerVariable* buildVariable(const QDomNode& typemapnode); + void typemapSetup(const TQDomNode& typemapnode); + void showWatch(const TQDomNode& typemapnode); + DebuggerVariable* buildVariable(const TQDomNode& typemapnode); // Profiler void profilerOpen(bool forceopen); @@ -156,8 +156,8 @@ class QuantaDebuggerDBGp : public DebuggerClient public slots: void slotNetworkActive(bool active); void slotNetworkConnected(bool connected); - void slotNetworkError(const QString &errormsg, bool log); - void processCommand(const QString&); + void slotNetworkError(const TQString &errormsg, bool log); + void processCommand(const TQString&); signals: void updateStatus(DebuggerUI::DebuggerStatus); diff --git a/quanta/components/debugger/debuggerbreakpoint.cpp b/quanta/components/debugger/debuggerbreakpoint.cpp index ae8ed6cb..d19c299d 100644 --- a/quanta/components/debugger/debuggerbreakpoint.cpp +++ b/quanta/components/debugger/debuggerbreakpoint.cpp @@ -47,7 +47,7 @@ DebuggerBreakpoint::DebuggerBreakpoint( const DebuggerBreakpoint * bp ) } -DebuggerBreakpoint::DebuggerBreakpoint(const QString& filePath, int line) +DebuggerBreakpoint::DebuggerBreakpoint(const TQString& filePath, int line) { m_filePath = filePath; m_line = line; @@ -56,8 +56,8 @@ DebuggerBreakpoint::DebuggerBreakpoint(const QString& filePath, int line) } DebuggerBreakpoint::DebuggerBreakpoint(const Types type, - const QString& conditionExpr, const QString& filePath, - const QString& inClass, const QString& inFunction) + const TQString& conditionExpr, const TQString& filePath, + const TQString& inClass, const TQString& inFunction) { m_conditionExpr = conditionExpr; m_filePath = filePath; @@ -71,17 +71,17 @@ DebuggerBreakpoint::DebuggerBreakpoint(const Types type, DebuggerBreakpoint::~DebuggerBreakpoint() {} -void DebuggerBreakpoint::setFilePath(const QString& filePath) +void DebuggerBreakpoint::setFilePath(const TQString& filePath) { m_filePath = filePath; } -void DebuggerBreakpoint::setClass(const QString& newclass) +void DebuggerBreakpoint::setClass(const TQString& newclass) { m_class = newclass; } -void DebuggerBreakpoint::setFunction(const QString& function) +void DebuggerBreakpoint::setFunction(const TQString& function) { m_function = function; } @@ -91,12 +91,12 @@ void DebuggerBreakpoint::setLine(int line) m_line = line; } -void DebuggerBreakpoint::setCondition(const QString& expression) +void DebuggerBreakpoint::setCondition(const TQString& expression) { m_conditionExpr = expression; } -void DebuggerBreakpoint::setValue(const QString& value) +void DebuggerBreakpoint::setValue(const TQString& value) { m_value = value; } @@ -111,31 +111,31 @@ void DebuggerBreakpoint::setType(DebuggerBreakpoint::Types type ) m_type = type; } -void DebuggerBreakpoint::setKey(const QString& value) +void DebuggerBreakpoint::setKey(const TQString& value) { m_key = value; } -const QString& DebuggerBreakpoint::key() const +const TQString& DebuggerBreakpoint::key() const { return m_key; } -const QString& DebuggerBreakpoint::filePath() const +const TQString& DebuggerBreakpoint::filePath() const { return m_filePath; } -const QString& DebuggerBreakpoint::value() const +const TQString& DebuggerBreakpoint::value() const { return m_value; } -const QString& DebuggerBreakpoint::inClass() const +const TQString& DebuggerBreakpoint::inClass() const { return m_class; } -const QString& DebuggerBreakpoint::inFunction() const +const TQString& DebuggerBreakpoint::inFunction() const { return m_function; } @@ -150,7 +150,7 @@ int DebuggerBreakpoint::line() const return m_line; } -const QString& DebuggerBreakpoint::condition() const +const TQString& DebuggerBreakpoint::condition() const { return m_conditionExpr; } diff --git a/quanta/components/debugger/debuggerbreakpoint.h b/quanta/components/debugger/debuggerbreakpoint.h index 46e0950d..2be6c4f8 100644 --- a/quanta/components/debugger/debuggerbreakpoint.h +++ b/quanta/components/debugger/debuggerbreakpoint.h @@ -17,7 +17,7 @@ #ifndef DEBUGGERBREAKPOINT_H #define DEBUGGERBREAKPOINT_H -#include +#include class DebuggerBreakpoint @@ -41,45 +41,45 @@ class DebuggerBreakpoint DebuggerBreakpoint(); DebuggerBreakpoint(const DebuggerBreakpoint& bp); DebuggerBreakpoint(const DebuggerBreakpoint* bp); - DebuggerBreakpoint(const QString& filePath, int line); // Line BP + DebuggerBreakpoint(const TQString& filePath, int line); // Line BP DebuggerBreakpoint(const DebuggerBreakpoint::Types type, // Any kind - const QString& conditionExpr, const QString& filePath = "", - const QString& inClass = "", const QString& inFunction = ""); + const TQString& conditionExpr, const TQString& filePath = "", + const TQString& inClass = "", const TQString& inFunction = ""); virtual ~DebuggerBreakpoint(); - virtual void setFunction(const QString& filePath); - virtual void setClass(const QString& filePath); - virtual void setFilePath(const QString& filePath); + virtual void setFunction(const TQString& filePath); + virtual void setClass(const TQString& filePath); + virtual void setFilePath(const TQString& filePath); virtual void setLine(int line); - virtual void setCondition(const QString& expression); + virtual void setCondition(const TQString& expression); virtual void setState(int state); virtual void setType(Types type); - virtual void setValue(const QString& value); - virtual void setKey(const QString& value); + virtual void setValue(const TQString& value); + virtual void setKey(const TQString& value); - virtual const QString& filePath() const; - virtual const QString& inClass() const; - virtual const QString& inFunction() const; + virtual const TQString& filePath() const; + virtual const TQString& inClass() const; + virtual const TQString& inFunction() const; virtual int line() const; - virtual const QString& condition() const; + virtual const TQString& condition() const; virtual int state() const; virtual DebuggerBreakpoint::Types type() const; - virtual const QString& value() const; - virtual const QString& key() const; + virtual const TQString& value() const; + virtual const TQString& key() const; bool operator == (DebuggerBreakpoint) const; protected: - QString m_filePath; - QString m_class; - QString m_function; + TQString m_filePath; + TQString m_class; + TQString m_function; int m_line; - QString m_conditionExpr; + TQString m_conditionExpr; int m_state; Types m_type; - QString m_value; - QString m_key; + TQString m_value; + TQString m_key; }; #endif diff --git a/quanta/components/debugger/debuggerbreakpointlist.cpp b/quanta/components/debugger/debuggerbreakpointlist.cpp index ba117965..6a47d296 100644 --- a/quanta/components/debugger/debuggerbreakpointlist.cpp +++ b/quanta/components/debugger/debuggerbreakpointlist.cpp @@ -15,7 +15,7 @@ * * ***************************************************************************/ -#include +#include #include #include @@ -76,7 +76,7 @@ void DebuggerBreakpointList::remove(DebuggerBreakpoint* bp) -DebuggerBreakpoint* DebuggerBreakpointList::retrieve(const QString& filePath, int line) +DebuggerBreakpoint* DebuggerBreakpointList::retrieve(const TQString& filePath, int line) { BreakpointList_t::iterator it; @@ -162,7 +162,7 @@ DebuggerBreakpoint* DebuggerBreakpointList::next() } } -DebuggerBreakpoint * DebuggerBreakpointList::findDebuggerBreakpoint( const QString & key ) +DebuggerBreakpoint * DebuggerBreakpointList::findDebuggerBreakpoint( const TQString & key ) { BreakpointList_t::iterator it; for(it = m_breakpointList->begin(); it != m_breakpointList->end(); ++it) @@ -176,7 +176,7 @@ DebuggerBreakpoint * DebuggerBreakpointList::findDebuggerBreakpoint( const QStri return NULL; } -void DebuggerBreakpointList::updateBreakpointKey( const DebuggerBreakpoint & bp, const QString & newkey ) +void DebuggerBreakpointList::updateBreakpointKey( const DebuggerBreakpoint & bp, const TQString & newkey ) { //DebuggerBreakpoint *bpp = new DebuggerBreakpoint(bp); BreakpointList_t::iterator it; diff --git a/quanta/components/debugger/debuggerbreakpointlist.h b/quanta/components/debugger/debuggerbreakpointlist.h index 4ca26a95..aa6cd803 100644 --- a/quanta/components/debugger/debuggerbreakpointlist.h +++ b/quanta/components/debugger/debuggerbreakpointlist.h @@ -18,12 +18,12 @@ #ifndef DEBUGGERBREAKPOINTLIST_H #define DEBUGGERBREAKPOINTLIST_H -#include -#include -#include +#include +#include +#include class DebuggerBreakpoint; - typedef QValueList BreakpointList_t; + typedef TQValueList BreakpointList_t; class DebuggerBreakpointList { @@ -39,15 +39,15 @@ class DebuggerBreakpointList void add(DebuggerBreakpoint*); void remove(DebuggerBreakpoint*); - //int remove(QString filePath, int line); + //int remove(TQString filePath, int line); void clear(); bool exists(DebuggerBreakpoint*); - //bool exists(QString filePath, int line); + //bool exists(TQString filePath, int line); - DebuggerBreakpoint* retrieve(const QString& filePath, int line); + DebuggerBreakpoint* retrieve(const TQString& filePath, int line); - DebuggerBreakpoint * findDebuggerBreakpoint(const QString& key); - void updateBreakpointKey(const DebuggerBreakpoint &bp, const QString& newkey); + DebuggerBreakpoint * findDebuggerBreakpoint(const TQString& key); + void updateBreakpointKey(const DebuggerBreakpoint &bp, const TQString& newkey); size_t count(); void rewind(); diff --git a/quanta/components/debugger/debuggerbreakpointview.cpp b/quanta/components/debugger/debuggerbreakpointview.cpp index 2f7eea36..8614bc28 100644 --- a/quanta/components/debugger/debuggerbreakpointview.cpp +++ b/quanta/components/debugger/debuggerbreakpointview.cpp @@ -52,7 +52,7 @@ DebuggerBreakpointViewItem::DebuggerBreakpointViewItem(DebuggerBreakpointView* v } -DebuggerBreakpointView::DebuggerBreakpointView(QWidget *parent, const char *name) +DebuggerBreakpointView::DebuggerBreakpointView(TQWidget *parent, const char *name) : KListView(parent, name) { // If you change here, change the DebuggerBreakpointViewColumns enums above @@ -63,16 +63,16 @@ DebuggerBreakpointView::DebuggerBreakpointView(QWidget *parent, const char *name addColumn(i18n("Line")); addColumn(i18n("Value")); - setResizeMode(QListView::AllColumns); + setResizeMode(TQListView::AllColumns); setAllColumnsShowFocus(true); m_breakpointPopup = new KPopupMenu(this); - m_breakpointPopup->insertItem(SmallIcon("editdelete"), i18n("&Remove"), this, SLOT(slotRemoveSelected())); + m_breakpointPopup->insertItem(SmallIcon("editdelete"), i18n("&Remove"), this, TQT_SLOT(slotRemoveSelected())); - connect(this, SIGNAL( contextMenu( KListView *, QListViewItem *, const QPoint & ) ), this, SLOT(slotBreakpointContextMenu(KListView *, QListViewItem *, const QPoint &))); + connect(this, TQT_SIGNAL( contextMenu( KListView *, TQListViewItem *, const TQPoint & ) ), this, TQT_SLOT(slotBreakpointContextMenu(KListView *, TQListViewItem *, const TQPoint &))); // Jump to bp - connect(this, SIGNAL( doubleClicked( QListViewItem *, const QPoint &, int) ), this, SLOT(slotBreakpointDoubleClick( QListViewItem *, const QPoint &, int))); + connect(this, TQT_SIGNAL( doubleClicked( TQListViewItem *, const TQPoint &, int) ), this, TQT_SLOT(slotBreakpointDoubleClick( TQListViewItem *, const TQPoint &, int))); } @@ -81,7 +81,7 @@ DebuggerBreakpointView::~DebuggerBreakpointView() void DebuggerBreakpointView::deleteBreakpoint(const DebuggerBreakpoint &bp) { - QListViewItem *item = findBreakpoint(bp, false); + TQListViewItem *item = findBreakpoint(bp, false); if(item) { delete item; @@ -91,14 +91,14 @@ void DebuggerBreakpointView::deleteBreakpoint(const DebuggerBreakpoint &bp) void DebuggerBreakpointView::showBreakpoint(const DebuggerBreakpoint &bp) { - QListViewItem *item = findBreakpoint(bp); + TQListViewItem *item = findBreakpoint(bp); if(!item) return; if(bp.type() == DebuggerBreakpoint::LineBreakpoint) { item->setText(DebuggerBreakpointViewColumns::Value, ""); - item->setText(DebuggerBreakpointViewColumns::Line, QString::number(bp.line() + 1)); + item->setText(DebuggerBreakpointViewColumns::Line, TQString::number(bp.line() + 1)); } else { @@ -111,7 +111,7 @@ void DebuggerBreakpointView::showBreakpoint(const DebuggerBreakpoint &bp) item->setText(DebuggerBreakpointViewColumns::Function, bp.inFunction()); } -QListViewItem* DebuggerBreakpointView::findBreakpoint(const DebuggerBreakpoint& bp, bool addIfNotExist) +TQListViewItem* DebuggerBreakpointView::findBreakpoint(const DebuggerBreakpoint& bp, bool addIfNotExist) { // Find the old item if its there DebuggerBreakpointViewItem* item = dynamic_cast(firstChild()); @@ -152,7 +152,7 @@ void DebuggerBreakpointView::slotRemoveSelected() emit removeBreakpoint(&bp); } -void DebuggerBreakpointView::keyPressEvent(QKeyEvent *e) +void DebuggerBreakpointView::keyPressEvent(TQKeyEvent *e) { if(e->key() != Qt::Key_Delete) { @@ -168,7 +168,7 @@ void DebuggerBreakpointView::clear() KListView::clear(); } -void DebuggerBreakpointView::slotBreakpointDoubleClick(QListViewItem *item, const QPoint &, int ) +void DebuggerBreakpointView::slotBreakpointDoubleClick(TQListViewItem *item, const TQPoint &, int ) { if(!item) return; @@ -182,7 +182,7 @@ void DebuggerBreakpointView::slotBreakpointDoubleClick(QListViewItem *item, cons } -void DebuggerBreakpointView::slotBreakpointContextMenu(KListView *, QListViewItem *, const QPoint& point) +void DebuggerBreakpointView::slotBreakpointContextMenu(KListView *, TQListViewItem *, const TQPoint& point) { if(!selectedItem()) return; diff --git a/quanta/components/debugger/debuggerbreakpointview.h b/quanta/components/debugger/debuggerbreakpointview.h index 1e3ca087..196cd451 100644 --- a/quanta/components/debugger/debuggerbreakpointview.h +++ b/quanta/components/debugger/debuggerbreakpointview.h @@ -21,7 +21,7 @@ #include #include -#include +#include #include "debuggerbreakpoint.h" // class DebuggerBreakpoint; @@ -46,7 +46,7 @@ class DebuggerBreakpointView : public KListView Q_OBJECT public: - DebuggerBreakpointView(QWidget *parent = 0, const char *name = 0); + DebuggerBreakpointView(TQWidget *parent = 0, const char *name = 0); ~DebuggerBreakpointView(); void showBreakpoint(const DebuggerBreakpoint& bp); @@ -58,15 +58,15 @@ class DebuggerBreakpointView : public KListView public slots: void slotRemoveSelected(); - void slotBreakpointContextMenu(KListView *list, QListViewItem * item, const QPoint& point); - void slotBreakpointDoubleClick(QListViewItem *item, const QPoint &point, int column); + void slotBreakpointContextMenu(KListView *list, TQListViewItem * item, const TQPoint& point); + void slotBreakpointDoubleClick(TQListViewItem *item, const TQPoint &point, int column); signals: void removeBreakpoint(DebuggerBreakpoint*); private: - void keyPressEvent(QKeyEvent *e); - QListViewItem* findBreakpoint(const DebuggerBreakpoint& bp, bool addIfNotExist = true); + void keyPressEvent(TQKeyEvent *e); + TQListViewItem* findBreakpoint(const DebuggerBreakpoint& bp, bool addIfNotExist = true); KPopupMenu *m_breakpointPopup; }; diff --git a/quanta/components/debugger/debuggermanager.cpp b/quanta/components/debugger/debuggermanager.cpp index bbc6336c..4c5aaa58 100644 --- a/quanta/components/debugger/debuggermanager.cpp +++ b/quanta/components/debugger/debuggermanager.cpp @@ -26,7 +26,7 @@ #include #include #include -#include +#include #include "quanta.h" #include "document.h" @@ -49,8 +49,8 @@ // dialogs #include "debuggervariablesets.h" -DebuggerManager::DebuggerManager(QObject *myparent) - : QObject(myparent) +DebuggerManager::DebuggerManager(TQObject *myparent) + : TQObject(myparent) { initActions(); @@ -62,12 +62,12 @@ DebuggerManager::DebuggerManager(QObject *myparent) m_client = NULL; } -void DebuggerManager::slotNewProjectLoaded(const QString &projectname, const KURL &, const KURL &) +void DebuggerManager::slotNewProjectLoaded(const TQString &projectname, const KURL &, const KURL &) { if(m_client) { - disconnect(m_client, SIGNAL(updateStatus(DebuggerUI::DebuggerStatus)), m_debuggerui, SLOT(slotStatus(DebuggerUI::DebuggerStatus))); + disconnect(m_client, TQT_SIGNAL(updateStatus(DebuggerUI::DebuggerStatus)), m_debuggerui, TQT_SLOT(slotStatus(DebuggerUI::DebuggerStatus))); delete m_client; m_client = NULL; @@ -98,8 +98,8 @@ void DebuggerManager::slotNewProjectLoaded(const QString &projectname, const KUR int errCode = 0; //Workaround for dynamic_cast not working correctly on SUSE 10, gcc 4.0.2 //The correct way should be a simple: -// m_client = KParts::ComponentFactory::createInstanceFromService(service, this, 0, QStringList(), &errCode); - QObject* obj = KParts::ComponentFactory::createInstanceFromService(service, this, 0, QStringList(), &errCode); +// m_client = KParts::ComponentFactory::createInstanceFromService(service, this, 0, TQStringList(), &errCode); + TQObject* obj = KParts::ComponentFactory::createInstanceFromService(service, this, 0, TQStringList(), &errCode); if (obj && obj->inherits("DebuggerClient")) m_client = static_cast(obj); @@ -118,10 +118,10 @@ void DebuggerManager::slotNewProjectLoaded(const QString &projectname, const KUR // 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"); + TQDomNode nodeThisDbg; + TQDomDocument *dom = Project::ref()->sessionDom(); + TQDomNode projectNode = dom->firstChild().firstChild(); + TQDomNode nodeDbg = projectNode.namedItem("debuggers"); if(nodeDbg.isNull()) { nodeDbg = dom->createElement("debuggers"); @@ -143,15 +143,15 @@ void DebuggerManager::slotNewProjectLoaded(const QString &projectname, const KUR // recreate UI m_debuggerui = new DebuggerUI(this, "debuggerui"); - connect(m_client, SIGNAL(updateStatus(DebuggerUI::DebuggerStatus)), m_debuggerui, SLOT(slotStatus(DebuggerUI::DebuggerStatus))); + connect(m_client, TQT_SIGNAL(updateStatus(DebuggerUI::DebuggerStatus)), m_debuggerui, TQT_SLOT(slotStatus(DebuggerUI::DebuggerStatus))); // Load saved breakpoints if(Project::ref()->debuggerPersistentBreakpoints()) { - QDomNode nodeBreakpoints = nodeDbg.namedItem("breakpoints"); + TQDomNode nodeBreakpoints = nodeDbg.namedItem("breakpoints"); if(!nodeBreakpoints.isNull()) { - QDomNode child = nodeBreakpoints.firstChild(); + TQDomNode child = nodeBreakpoints.firstChild(); while(!child.isNull()) { DebuggerBreakpoint* bp = new DebuggerBreakpoint(); @@ -180,13 +180,13 @@ void DebuggerManager::slotNewProjectLoaded(const QString &projectname, const KUR // Load saved Watches if(Project::ref()->debuggerPersistentWatches()) { - QDomNode nodeWatches = nodeDbg.namedItem("watches"); + TQDomNode nodeWatches = nodeDbg.namedItem("watches"); if(!nodeWatches.isNull()) { - QDomNode child = nodeWatches.firstChild(); + TQDomNode child = nodeWatches.firstChild(); while(!child.isNull()) { - QString watch = child.attributes().namedItem("name").nodeValue(); + TQString watch = child.attributes().namedItem("name").nodeValue(); DebuggerVariable *var = new DebuggerVariable(watch, "", DebuggerVariableTypes::Undefined); m_debuggerui->addVariable(var); m_client->addWatch(watch); @@ -212,65 +212,65 @@ void DebuggerManager::initActions() 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 = new KAction(i18n("Toggle &Breakpoint"), SmallIcon("debug_breakpoint"), Qt::CTRL+Qt::SHIFT+Qt::Key_B, this, TQT_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 = new KAction(i18n("&Clear Breakpoints"), 0, this, TQT_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 = new KAction(i18n("Break When..."), SmallIcon("math_int"), 0, this, TQT_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 = new KAction(i18n("Break When..."), SmallIcon("math_int"), 0, this, TQT_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 = new KAction(i18n("Send HTTP R&equest"), SmallIcon("debug_currentline"), 0, this, TQT_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 = new KAction(i18n("&Trace"), SmallIcon("debug_run"), 0, this, TQT_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 = new KAction(i18n("&Run"), SmallIcon("debug_leap"), 0, this, TQT_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 = new KAction(i18n("&Step"), SmallIcon("debug_stepover"), 0, this, TQT_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 = new KAction(i18n("Step &Into"), SmallIcon("debug_stepinto"), 0, this, TQT_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 = new KAction(i18n("S&kip"), SmallIcon("debug_skip"), 0, this, TQT_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 = new KAction(i18n("Step &Out"), SmallIcon("debug_stepout"), 0, this, TQT_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 = new KAction(i18n("&Pause"), SmallIcon("debug_pause"), 0, this, TQT_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 = new KAction(i18n("Kill"), SmallIcon("debug_kill"), 0, this, TQT_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 = new KAction(i18n("Start Session"), SmallIcon("debug_connect"), 0, this, TQT_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 = new KAction(i18n("End Session"), SmallIcon("debug_disconnect"), 0, this, TQT_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 = new KAction(i18n("Watch Variable"), SmallIcon("math_brace"), 0, this, TQT_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 = new KAction(i18n("Watch Variable"), SmallIcon("math_brace"), 0, this, TQT_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 = new KAction(i18n("Set Value of Variable"), SmallIcon("edit"), 0, this, TQT_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 = new KAction(i18n("Set Value of Variable"), SmallIcon("edit"), 0, this, TQT_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 = new KAction(i18n("Open Profiler Output"), SmallIcon("launch"), 0, this, TQT_SLOT(slotProfilerOpen()), ac, "debug_profiler_open"); newaction->setToolTip(i18n("Opens the profiler output file")); enableAction("*", false); @@ -299,7 +299,7 @@ DebuggerManager::~DebuggerManager() if(m_client) { - disconnect(m_client, SIGNAL(updateStatus(DebuggerUI::DebuggerStatus)), m_debuggerui, SLOT(slotStatus(DebuggerUI::DebuggerStatus))); + disconnect(m_client, TQT_SIGNAL(updateStatus(DebuggerUI::DebuggerStatus)), m_debuggerui, TQT_SLOT(slotStatus(DebuggerUI::DebuggerStatus))); delete m_client; m_client = 0L; @@ -313,7 +313,7 @@ DebuggerManager::~DebuggerManager() m_pathmapper = 0L; } -void DebuggerManager::enableAction(const QString& action, bool enable) +void DebuggerManager::enableAction(const TQString& action, bool enable) { if(action == "*") { @@ -372,7 +372,7 @@ void DebuggerManager::slotAddWatch() return; - QString watch = KInputDialog::getText(i18n("Add Watch"), i18n("Specify variable to watch:"), quantaApp->popupWord); + TQString watch = KInputDialog::getText(i18n("Add Watch"), i18n("Specify variable to watch:"), quantaApp->popupWord); quantaApp->popupWord = ""; if(!watch.isEmpty()) { @@ -392,7 +392,7 @@ void DebuggerManager::slotVariableSet() DebuggerVariableSetS dlg; dlg.lineVariable->setText(quantaApp->popupWord); quantaApp->popupWord = ""; - if(dlg.exec() == QDialog::Accepted) + if(dlg.exec() == TQDialog::Accepted) { DebuggerVariable var; var.setName(dlg.lineVariable->text()); @@ -403,7 +403,7 @@ void DebuggerManager::slotVariableSet() void DebuggerManager::slotConditionalBreakpoint() { - QString file; + TQString file; kdDebug(24002) << "DebuggerManager::slotConditionalBreakpoint() " << quantaApp->popupWord << endl; if(!m_client) @@ -415,7 +415,7 @@ void DebuggerManager::slotConditionalBreakpoint() ConditionalBreakpointDialog dlg(quantaApp->popupWord, file, "", ""); quantaApp->popupWord = ""; - if(dlg.exec() == QDialog::Accepted) + if(dlg.exec() == TQDialog::Accepted) { DebuggerBreakpoint * bp = dlg.breakpoint(); if(bp) @@ -524,7 +524,7 @@ void DebuggerManager::slotProfilerOpen( ) } // A new file was opened, tell the debugger so it can tell us about breakpoints etc -void DebuggerManager::fileOpened(const QString& file) +void DebuggerManager::fileOpened(const TQString& file) { // Set breakpoint markers if we have a bp in the file @@ -569,13 +569,13 @@ void DebuggerManager::refreshBreakpoints() // The debug server told us we have a breakpoint, mark it in the file -void DebuggerManager::haveBreakpoint (const QString& file, int line) +void DebuggerManager::haveBreakpoint (const TQString& 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) +void DebuggerManager::havenoBreakpoint (const TQString& file, int line) { DebuggerBreakpoint* br = new DebuggerBreakpoint(file, line); m_breakpointList->remove(br); @@ -584,10 +584,10 @@ void DebuggerManager::havenoBreakpoint (const QString& file, int line) } // New current line -bool DebuggerManager::setActiveLine (const QString& file, int line ) +bool DebuggerManager::setActiveLine (const TQString& file, int line ) { //Get local filename - QString filename = file; + TQString filename = file; // Remove old active line mark setMark(m_currentFile, m_currentLine, false, KTextEditor::MarkInterface::markType05); @@ -614,7 +614,7 @@ bool DebuggerManager::setActiveLine (const QString& file, int line ) } // Set/clear a mark in a document -void DebuggerManager::setMark(const QString& filename, long line, bool set, int mark) +void DebuggerManager::setMark(const TQString& filename, long line, bool set, int mark) { if((!filename.isEmpty()) && ViewManager::ref()->isOpened(filename)) { @@ -642,26 +642,26 @@ void DebuggerManager::setMark(const QString& filename, long line, bool set, int void DebuggerManager::connectBreakpointSignals(Document* qdoc) { - connect(qdoc, SIGNAL(breakpointMarked(Document*, int)), - this, SLOT(slotBreakpointMarked(Document*, int))); + connect(qdoc, TQT_SIGNAL(breakpointMarked(Document*, int)), + this, TQT_SLOT(slotBreakpointMarked(Document*, int))); - connect(qdoc, SIGNAL(breakpointUnmarked(Document*, int)), - this, SLOT(slotBreakpointUnmarked(Document*, int))); + connect(qdoc, TQT_SIGNAL(breakpointUnmarked(Document*, int)), + this, TQT_SLOT(slotBreakpointUnmarked(Document*, int))); } void DebuggerManager::disconnectBreakpointSignals(Document* qdoc) { - disconnect(qdoc, SIGNAL(breakpointMarked(Document*, int)), - this, SLOT(slotBreakpointMarked(Document*, int))); + disconnect(qdoc, TQT_SIGNAL(breakpointMarked(Document*, int)), + this, TQT_SLOT(slotBreakpointMarked(Document*, int))); - disconnect(qdoc, SIGNAL(breakpointUnmarked(Document*, int)), - this, SLOT(slotBreakpointUnmarked(Document*, int))); + disconnect(qdoc, TQT_SIGNAL(breakpointUnmarked(Document*, int)), + this, TQT_SLOT(slotBreakpointUnmarked(Document*, int))); } // Show a status message and optionally put it on the log -bool DebuggerManager::showStatus(const QString& a_message, bool log) +bool DebuggerManager::showStatus(const TQString& a_message, bool log) { - QString message = a_message; + TQString message = a_message; quantaApp->slotStatusMsg(m_client->getName() + ": " + message); if(log) @@ -729,7 +729,7 @@ void DebuggerManager::slotBreakpointMarked(Document* qdoc, int line) void DebuggerManager::slotBreakpointUnmarked(Document* qdoc, int line) { - QString filePath = qdoc->url().prettyURL(0, KURL::StripFileProtocol); + TQString filePath = qdoc->url().prettyURL(0, KURL::StripFileProtocol); DebuggerBreakpoint* br = m_breakpointList->retrieve(filePath, line); @@ -744,7 +744,7 @@ void DebuggerManager::slotBreakpointUnmarked(Document* qdoc, int line) } } -void DebuggerManager::updateBreakpointKey( const DebuggerBreakpoint & bp, const QString & newkey ) +void DebuggerManager::updateBreakpointKey( const DebuggerBreakpoint & bp, const TQString & newkey ) { m_breakpointList->updateBreakpointKey(bp, newkey); @@ -756,7 +756,7 @@ void DebuggerManager::updateBreakpointKey( const DebuggerBreakpoint & bp, const } -DebuggerBreakpoint * DebuggerManager::findDebuggerBreakpoint( const QString & key ) +DebuggerBreakpoint * DebuggerManager::findDebuggerBreakpoint( const TQString & key ) { return m_breakpointList->findDebuggerBreakpoint(key); } @@ -766,9 +766,9 @@ void DebuggerManager::saveProperties( ) if (m_client) { - QDomDocument *dom = Project::ref()->sessionDom(); - QDomNode projectNode = dom->firstChild().firstChild(); - QDomNode nodeDbg = projectNode.namedItem("debuggers"); + TQDomDocument *dom = Project::ref()->sessionDom(); + TQDomNode projectNode = dom->firstChild().firstChild(); + TQDomNode nodeDbg = projectNode.namedItem("debuggers"); if(nodeDbg.isNull()) { nodeDbg = dom->createElement("debuggers"); @@ -779,7 +779,7 @@ void DebuggerManager::saveProperties( ) if(Project::ref()->debuggerPersistentBreakpoints()) { // (Re)create breakpoints section - QDomNode nodeBreakpoints = nodeDbg.namedItem("breakpoints"); + TQDomNode nodeBreakpoints = nodeDbg.namedItem("breakpoints"); if(!nodeBreakpoints.isNull()) nodeBreakpoints.parentNode().removeChild(nodeBreakpoints); @@ -794,12 +794,12 @@ void DebuggerManager::saveProperties( ) DebuggerBreakpoint* bp; while((bp = m_breakpointList->next())) { - QDomElement child = dom->createElement("breakpoint"); + TQDomElement 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())); + child.setAttribute("line", TQString::number(bp->line())); if(bp->type() == DebuggerBreakpoint::ConditionalTrue) child.setAttribute("type", "true"); else if(bp->type() == DebuggerBreakpoint::ConditionalChange) @@ -816,7 +816,7 @@ void DebuggerManager::saveProperties( ) if(Project::ref()->debuggerPersistentWatches()) { // (Re)create watches section - QDomNode nodeWatches = nodeDbg.namedItem("watches"); + TQDomNode nodeWatches = nodeDbg.namedItem("watches"); if(!nodeWatches.isNull()) nodeWatches.parentNode().removeChild(nodeWatches); @@ -828,7 +828,7 @@ void DebuggerManager::saveProperties( ) // Loop watches and save 'em for( DebuggerVariable *v = m_debuggerui->watches()->first(); v; v = m_debuggerui->watches()->next()) { - QDomElement child = dom->createElement("watch"); + TQDomElement child = dom->createElement("watch"); child.setAttribute("name", v->name()); nodeWatches.appendChild(child); @@ -838,7 +838,7 @@ void DebuggerManager::saveProperties( ) } } -void DebuggerManager::slotHandleEvent( const QString & event, const QString &, const QString & ) +void DebuggerManager::slotHandleEvent( const TQString & event, const TQString &, const TQString & ) { if(event == "before_project_close") saveProperties(); diff --git a/quanta/components/debugger/debuggermanager.h b/quanta/components/debugger/debuggermanager.h index f7584bdf..5a88b156 100644 --- a/quanta/components/debugger/debuggermanager.h +++ b/quanta/components/debugger/debuggermanager.h @@ -18,8 +18,8 @@ #ifndef PHPDEBUGGERINTERFACE_H #define PHPDEBUGGERINTERFACE_H -#include -#include +#include +#include class DebuggerClient; class QuantaDebuggerInterface; @@ -49,11 +49,11 @@ class DebuggerManager : public QObject void connectBreakpointSignals(Document*); void disconnectBreakpointSignals(Document*); - QString m_currentFile; + TQString m_currentFile; long m_currentLine; public: - DebuggerManager(QObject *myparent); + DebuggerManager(TQObject *myparent); ~DebuggerManager(); // Access to memebers @@ -62,20 +62,20 @@ class DebuggerManager : public QObject PathMapper * Mapper() { return m_pathmapper; }; // Breakpoints - void haveBreakpoint (const QString& file, int line); - void havenoBreakpoint (const QString& file, int line); + void haveBreakpoint (const TQString& file, int line); + void havenoBreakpoint (const TQString& file, int line); void refreshBreakpoints(); // DebuggerBreakpoint *newDebuggerBreakpoint(); - DebuggerBreakpoint * findDebuggerBreakpoint(const QString& key); - void updateBreakpointKey(const DebuggerBreakpoint &bp, const QString& newkey); + DebuggerBreakpoint * findDebuggerBreakpoint(const TQString& key); + void updateBreakpointKey(const DebuggerBreakpoint &bp, const TQString& 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); + bool showStatus(const TQString& message, bool log); + bool setActiveLine (const TQString& file, int line); + void setMark(const TQString& filename, long line, bool set, int mark); - void enableAction(const QString& action, bool enable); - void fileOpened(const QString& file); + void enableAction(const TQString& action, bool enable); + void fileOpened(const TQString& file); bool hasClient() { return m_client != 0; }; @@ -111,10 +111,10 @@ class DebuggerManager : public QObject void slotProfilerOpen(); // Initiation - void slotNewProjectLoaded(const QString &, const KURL &, const KURL &); + void slotNewProjectLoaded(const TQString &, const KURL &, const KURL &); // Event handling - void slotHandleEvent(const QString &, const QString &, const QString &); + void slotHandleEvent(const TQString &, const TQString &, const TQString &); private slots: void slotBreakpointMarked(Document*, int); diff --git a/quanta/components/debugger/debuggerui.cpp b/quanta/components/debugger/debuggerui.cpp index c290bd8a..fdf32a5c 100644 --- a/quanta/components/debugger/debuggerui.cpp +++ b/quanta/components/debugger/debuggerui.cpp @@ -21,7 +21,7 @@ #include #include #include -#include +#include #include #include #include @@ -36,8 +36,8 @@ #include "resource.h" #include "whtmlpart.h" -DebuggerUI::DebuggerUI(QObject *parent, const char *name) - : QObject(parent, name), m_variablesListView(0) +DebuggerUI::DebuggerUI(TQObject *parent, const char *name) + : TQObject(parent, name), m_variablesListView(0) { // Variable watch tree @@ -64,14 +64,14 @@ DebuggerUI::DebuggerUI(QObject *parent, const char *name) 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))); + connect(m_preview, TQT_SIGNAL(openFile(const KURL&, const TQString&, bool)), quantaApp, TQT_SLOT(slotFileOpen(const KURL&, const TQString&, bool))); // Show debugger toolbar quantaApp->toolBar("debugger_toolbar")->show(); - connect(m_variablesListView, SIGNAL(removeVariable(DebuggerVariable* )), parent, SLOT(slotRemoveVariable(DebuggerVariable* ))); + connect(m_variablesListView, TQT_SIGNAL(removeVariable(DebuggerVariable* )), parent, TQT_SLOT(slotRemoveVariable(DebuggerVariable* ))); - connect(m_debuggerBreakpointView, SIGNAL(removeBreakpoint(DebuggerBreakpoint* )), parent, SLOT(slotRemoveBreakpoint(DebuggerBreakpoint* ))); + connect(m_debuggerBreakpointView, TQT_SIGNAL(removeBreakpoint(DebuggerBreakpoint* )), parent, TQT_SLOT(slotRemoveBreakpoint(DebuggerBreakpoint* ))); showMenu(); } @@ -99,7 +99,7 @@ DebuggerUI::~DebuggerUI() void DebuggerUI::showMenu() { - QPopupMenu* debuggerMenu = (QPopupMenu*)(quantaApp->guiFactory())->container("debugger_menu", quantaApp); + TQPopupMenu* debuggerMenu = (TQPopupMenu*)(quantaApp->guiFactory())->container("debugger_menu", quantaApp); if(debuggerMenu) { KMenuBar *mb = quantaApp->menuBar(); @@ -195,7 +195,7 @@ void DebuggerUI::backtraceClear( ) m_backtraceListview->clear(); } -void DebuggerUI::backtraceShow( long level, BacktraceType type, const QString & filename, long line, const QString & func ) +void DebuggerUI::backtraceShow( long level, BacktraceType type, const TQString & filename, long line, const TQString & func ) { if(m_backtraceListview) m_backtraceListview->backtraceShow(level, type, filename, line, func); diff --git a/quanta/components/debugger/debuggerui.h b/quanta/components/debugger/debuggerui.h index a86e4706..767facad 100644 --- a/quanta/components/debugger/debuggerui.h +++ b/quanta/components/debugger/debuggerui.h @@ -19,8 +19,8 @@ #ifndef DEBUGGERUI_H #define DEBUGGERUI_H -#include -#include +#include +#include #include #include "backtracelistview.h" @@ -49,14 +49,14 @@ class DebuggerUI : public QObject HaltedOnBreakpoint }; - DebuggerUI(QObject *parent = 0, const char *name = 0); + DebuggerUI(TQObject *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 parsePHPVariables(const TQString &); void sendRequest(const KURL &url); VariablesListView* watches() { return m_variablesListView; }; @@ -64,7 +64,7 @@ class DebuggerUI : public QObject void hideMenu(); void backtraceClear(); - void backtraceShow(long level, BacktraceType type, const QString &filename, long line, const QString& func); + void backtraceShow(long level, BacktraceType type, const TQString &filename, long line, const TQString& func); private: VariablesListView* m_variablesListView; diff --git a/quanta/components/debugger/debuggervariable.cpp b/quanta/components/debugger/debuggervariable.cpp index b6a4f76a..390290a7 100644 --- a/quanta/components/debugger/debuggervariable.cpp +++ b/quanta/components/debugger/debuggervariable.cpp @@ -26,7 +26,7 @@ DebuggerVariable::DebuggerVariable() , m_item(NULL) {} -DebuggerVariable::DebuggerVariable(const QString& name) +DebuggerVariable::DebuggerVariable(const TQString& name) : m_isReference(false) , m_size(0) , m_type(DebuggerVariableTypes::Undefined) @@ -35,7 +35,7 @@ DebuggerVariable::DebuggerVariable(const QString& name) m_name = name; } -DebuggerVariable::DebuggerVariable(const QString& name, const QString& value, int type) +DebuggerVariable::DebuggerVariable(const TQString& name, const TQString& value, int type) : m_isReference(false) , m_size(0) , m_item(NULL) @@ -47,7 +47,7 @@ DebuggerVariable::DebuggerVariable(const QString& name, const QString& value, in m_size = value.length(); } -DebuggerVariable::DebuggerVariable(const QString& name, const QString& value, int type, int size) +DebuggerVariable::DebuggerVariable(const TQString& name, const TQString& value, int type, int size) : m_isReference(false) , m_item(NULL) { @@ -57,7 +57,7 @@ DebuggerVariable::DebuggerVariable(const QString& name, const QString& value, in m_size = size; } -DebuggerVariable::DebuggerVariable(const QString& name, const ValueList_t& values, int type) +DebuggerVariable::DebuggerVariable(const TQString& name, const ValueList_t& values, int type) : m_isReference(false) , m_item(NULL) { @@ -88,20 +88,20 @@ DebuggerVariable::DebuggerVariable(DebuggerVariable* v, bool copyitem ) } -void DebuggerVariable::setName(const QString& name) +void DebuggerVariable::setName(const TQString& name) { m_name = name; } -QString DebuggerVariable::name() const +TQString DebuggerVariable::name() const { return m_name; } -void DebuggerVariable::setValue(const QString& value) +void DebuggerVariable::setValue(const TQString& value) { m_value = value; } -QString DebuggerVariable::value() const +TQString DebuggerVariable::value() const { if(isScalar()) return m_value; @@ -146,7 +146,7 @@ int DebuggerVariable::type() const return m_type; } -const QString DebuggerVariable::typeName() const +const TQString DebuggerVariable::typeName() const { switch(m_type) { @@ -186,7 +186,7 @@ long DebuggerVariable::size() const return m_size; } -QString DebuggerVariable::sizeName() const +TQString DebuggerVariable::sizeName() const { switch(m_type) { @@ -199,7 +199,7 @@ QString DebuggerVariable::sizeName() const case DebuggerVariableTypes::Error: return ""; } - return QString::number(m_size); + return TQString::number(m_size); } void DebuggerVariable::setReference(bool ref) @@ -241,7 +241,7 @@ void DebuggerVariable::deleteChild( DebuggerVariable * child ) } } -DebuggerVariable* DebuggerVariable::findItem( QListViewItem * item, bool traverse ) +DebuggerVariable* DebuggerVariable::findItem( TQListViewItem * item, bool traverse ) { if(item == m_item) return this; diff --git a/quanta/components/debugger/debuggervariable.h b/quanta/components/debugger/debuggervariable.h index 3c83de4b..50d28136 100644 --- a/quanta/components/debugger/debuggervariable.h +++ b/quanta/components/debugger/debuggervariable.h @@ -19,8 +19,8 @@ #ifndef DEBUGGERVARIABLE_H #define DEBUGGERVARIABLE_H -#include -#include +#include +#include #include namespace DebuggerVariableTypes @@ -41,38 +41,38 @@ namespace DebuggerVariableTypes } class DebuggerVariable; -typedef QPtrList ValueList_t; +typedef TQPtrList 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); + DebuggerVariable(const TQString& name); + DebuggerVariable(const TQString& name, const TQString& value, int type); + DebuggerVariable(const TQString& name, const TQString& value, int type, int size); + DebuggerVariable(const TQString& name, const ValueList_t& values, int type); virtual ~DebuggerVariable(); - DebuggerVariable* findItem(QListViewItem *item, bool traverse = false); + DebuggerVariable* findItem(TQListViewItem *item, bool traverse = false); - virtual void setName(const QString& name); - virtual QString name() const; + virtual void setName(const TQString& name); + virtual TQString name() const; - virtual void setValue(const QString& value); - virtual QString value() const; + virtual void setValue(const TQString& value); + virtual TQString 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 const TQString typeName() const ; virtual bool isScalar() const; virtual void setSize(long size); virtual long size() const; - virtual QString sizeName() const; + virtual TQString sizeName() const; virtual void setReference(bool ref); virtual bool isReference() const; @@ -91,8 +91,8 @@ class DebuggerVariable private: ValueList_t m_valueList; - QString m_name; - QString m_value; + TQString m_name; + TQString m_value; bool m_isReference; long m_size; int m_type; diff --git a/quanta/components/debugger/gubed/gubedsettings.cpp b/quanta/components/debugger/gubed/gubedsettings.cpp index f728d884..9464dc81 100644 --- a/quanta/components/debugger/gubed/gubedsettings.cpp +++ b/quanta/components/debugger/gubed/gubedsettings.cpp @@ -15,11 +15,11 @@ ***************************************************************************/ -#include "qlineedit.h" +#include "tqlineedit.h" #include "gubedsettings.h" #include -GubedSettings::GubedSettings(const QString &protocolversion) +GubedSettings::GubedSettings(const TQString &protocolversion) : GubedSettingsS(0, "GubedSettings", false, 0) { textAbout->setText(textAbout->text().replace("%PROTOCOLVERSION%", protocolversion)); diff --git a/quanta/components/debugger/gubed/gubedsettings.h b/quanta/components/debugger/gubed/gubedsettings.h index dc070f32..73232e06 100644 --- a/quanta/components/debugger/gubed/gubedsettings.h +++ b/quanta/components/debugger/gubed/gubedsettings.h @@ -27,7 +27,7 @@ class GubedSettings : public GubedSettingsS virtual void slotUseProxyToggle( bool useproxy); public: - GubedSettings(const QString &protocolversion); + GubedSettings(const TQString &protocolversion); ~GubedSettings(); }; diff --git a/quanta/components/debugger/gubed/quantadebuggergubed.cpp b/quanta/components/debugger/gubed/quantadebuggergubed.cpp index be703e73..f909832a 100644 --- a/quanta/components/debugger/gubed/quantadebuggergubed.cpp +++ b/quanta/components/debugger/gubed/quantadebuggergubed.cpp @@ -19,14 +19,14 @@ #include #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include -#include -#include +#include +#include #include @@ -47,7 +47,7 @@ K_EXPORT_COMPONENT_FACTORY( quantadebuggergubed, const char QuantaDebuggerGubed::protocolversion[] = "0.0.12"; -QuantaDebuggerGubed::QuantaDebuggerGubed (QObject *parent, const char* name, const QStringList&) +QuantaDebuggerGubed::QuantaDebuggerGubed (TQObject *parent, const char* name, const TQStringList&) : DebuggerClient (parent, name) { // Create a socket object and set up its signals @@ -98,10 +98,10 @@ void QuantaDebuggerGubed::startSession() { 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())); + connect(m_socket, TQT_SIGNAL(gotError(int)), this, TQT_SLOT(slotError(int))); + connect(m_socket, TQT_SIGNAL(connected(const KResolverEntry &)), this, TQT_SLOT(slotConnected(const KResolverEntry &))); + connect(m_socket, TQT_SIGNAL(closed()), this, TQT_SLOT(slotConnectionClosed())); + connect(m_socket, TQT_SIGNAL(readyRead()), this, TQT_SLOT(slotReadyRead())); m_socket->connect(); debuggerInterface()->enableAction("debug_connect", true); @@ -119,7 +119,7 @@ void QuantaDebuggerGubed::startSession() m_server = new KNetwork::KServerSocket(m_listenPort); m_server->setAddressReuseable(true); - connect(m_server, SIGNAL(readyAccept()), this, SLOT(slotReadyAccept())); + connect(m_server, TQT_SIGNAL(readyAccept()), this, TQT_SLOT(slotReadyAccept())); if(m_server->listen()) { @@ -280,7 +280,7 @@ void QuantaDebuggerGubed::slotReadyAccept() { // Perhaps this shouldnt be disconnected - instead check if connections are available at disconnect? - disconnect(m_server, SIGNAL(readyAccept()), this, SLOT(slotReadyAccept())); + disconnect(m_server, TQT_SIGNAL(readyAccept()), this, TQT_SLOT(slotReadyAccept())); m_socket = (KNetwork::KStreamSocket *)m_server->accept(); // KSocketServer returns a KStreamSocket (!) if(m_socket) @@ -288,10 +288,10 @@ void QuantaDebuggerGubed::slotReadyAccept() 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())); + connect(m_socket, TQT_SIGNAL(gotError(int)), this, TQT_SLOT(slotError(int))); + connect(m_socket, TQT_SIGNAL(connected(const KResolverEntry &)), this, TQT_SLOT(slotConnected(const KResolverEntry &))); + connect(m_socket, TQT_SIGNAL(closed()), this, TQT_SLOT(slotConnectionClosed())); + connect(m_socket, TQT_SIGNAL(readyRead()), this, TQT_SLOT(slotReadyRead())); connected(); emit updateStatus(DebuggerUI::Connected); @@ -339,7 +339,7 @@ void QuantaDebuggerGubed::slotConnectionClosed() } if(m_server) - connect(m_server, SIGNAL(readyAccept()), this, SLOT(slotReadyAccept())); + connect(m_server, TQT_SIGNAL(readyAccept()), this, TQT_SLOT(slotReadyAccept())); // Disable all session related actions and enable connection action debuggerInterface()->enableAction("*", false); @@ -365,7 +365,7 @@ void QuantaDebuggerGubed::slotReadyRead() while(m_socket && (m_socket->bytesAvailable() > 0 || m_buffer.length() >= (unsigned long)m_datalen)) { int bytes; - QString data; + TQString data; if(m_socket && m_socket->bytesAvailable() > 0) { @@ -408,7 +408,7 @@ void QuantaDebuggerGubed::slotReadyRead() } // Process a gubed command -void QuantaDebuggerGubed::processCommand(const QString& datas) +void QuantaDebuggerGubed::processCommand(const TQString& datas) { kdDebug(24002) << k_funcinfo << ", " << m_command << " : " << datas.left(50) << endl; StringMap args = parseArgs(datas); @@ -429,7 +429,7 @@ void QuantaDebuggerGubed::processCommand(const QString& datas) else if(m_command == "getrunmode") { debuggingState(true); - sendCommand("setdisplaydelay", "newdelay", QString::number(m_displaydelay).ascii(), (char*)0L); + sendCommand("setdisplaydelay", "newdelay", TQString::number(m_displaydelay).ascii(), (char*)0L); if(m_executionState == Pause) sendCommand("pause", (char*)0L); else if(m_executionState == Run) @@ -437,15 +437,15 @@ void QuantaDebuggerGubed::processCommand(const QString& datas) else if(m_executionState == Trace) sendCommand("trace", (char*)0L); - sendCommand("seterrormask", "errormask", QString::number(m_errormask).ascii(), (char*)0L); + sendCommand("seterrormask", "errormask", TQString::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? + TQString 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)]); + msg.replace("%" + TQString("%1").arg(cnt) + "%", args[TQString("arg%1").arg(cnt)]); debuggerInterface()->showStatus(msg, false); } @@ -588,28 +588,28 @@ void QuantaDebuggerGubed::sendBreakpoints() } void QuantaDebuggerGubed::sendWatches() { - for(QValueList::iterator it = m_watchlist.begin(); it != m_watchlist.end(); ++it) + for(TQValueList::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) +bool QuantaDebuggerGubed::sendCommand(const TQString& 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); + TQString buffer = phpSerialize(args); - buffer = QString(command + ":%1;" + buffer).arg(buffer.length()); + buffer = TQString(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, ...) +bool QuantaDebuggerGubed::sendCommand(const TQString& command, char * firstarg, ...) { StringMap ca; char *next; @@ -620,7 +620,7 @@ bool QuantaDebuggerGubed::sendCommand(const QString& command, char * firstarg, . next = firstarg; while(next) { - ca[(QString)next] = (QString)va_arg(l_Arg, char*); + ca[(TQString)next] = (TQString)va_arg(l_Arg, char*); // kdDebug(24002) << k_lineinfo << " Added arg/valuepair " << next << ", " << ca[next].left(30) << endl; next = va_arg(l_Arg, char*); } @@ -631,12 +631,12 @@ bool QuantaDebuggerGubed::sendCommand(const QString& command, char * firstarg, . } // Return name of debugger -QString QuantaDebuggerGubed::getName() +TQString QuantaDebuggerGubed::getName() { return "Gubed"; // no i18n on the name } -void QuantaDebuggerGubed::showWatch(const QString& data) +void QuantaDebuggerGubed::showWatch(const TQString& data) { debuggerInterface()->showVariable(parsePHPVariables(data)); } @@ -644,7 +644,7 @@ void QuantaDebuggerGubed::showWatch(const QString& data) // Send HTTP Request void QuantaDebuggerGubed::request() { - QString request; + TQString request; request = debuggerInterface()->activeFileParts(m_startsession); //if(request.startsWith(m_localBasedir, false)) @@ -711,7 +711,7 @@ void QuantaDebuggerGubed::pause() // Add a breakpoint void QuantaDebuggerGubed::addBreakpoint (DebuggerBreakpoint* breakpoint) { - QString type; + TQString type; if(breakpoint->type() == DebuggerBreakpoint::LineBreakpoint) type = "line"; else if(breakpoint->type() == DebuggerBreakpoint::ConditionalTrue) @@ -725,13 +725,13 @@ void QuantaDebuggerGubed::addBreakpoint (DebuggerBreakpoint* breakpoint) "class", breakpoint->inClass().ascii(), "function", breakpoint->inFunction().ascii(), "expression", breakpoint->condition().ascii(), - "line", QString::number(breakpoint->line()).ascii(), + "line", TQString::number(breakpoint->line()).ascii(), (char *)0L); } -// QString QuantaDebuggerGubed::bpToGubed(DebuggerBreakpoint* breakpoint) +// TQString QuantaDebuggerGubed::bpToGubed(DebuggerBreakpoint* breakpoint) // { -// return QString("^" + mapLocalPathToServer(breakpoint->filePath()) + +// return TQString("^" + mapLocalPathToServer(breakpoint->filePath()) + // "^" + breakpoint->inClass() + // "^" + breakpoint->inFunction() + // "^" + (breakpoint->type() == DebuggerBreakpoint::ConditionalTrue ? "true" : "change") + @@ -741,7 +741,7 @@ void QuantaDebuggerGubed::addBreakpoint (DebuggerBreakpoint* breakpoint) // Clear a breakpoint void QuantaDebuggerGubed::removeBreakpoint(DebuggerBreakpoint* breakpoint) { - QString type; + TQString type; if(breakpoint->type() == DebuggerBreakpoint::LineBreakpoint) type = "line"; else if(breakpoint->type() == DebuggerBreakpoint::ConditionalTrue) @@ -755,18 +755,18 @@ void QuantaDebuggerGubed::removeBreakpoint(DebuggerBreakpoint* breakpoint) "class", breakpoint->inClass().ascii(), "function", breakpoint->inFunction().ascii(), "expression", breakpoint->condition().ascii(), - "line", QString::number(breakpoint->line()).ascii(), + "line", TQString::number(breakpoint->line()).ascii(), (char*)0L); } // A file was opened... -void QuantaDebuggerGubed::fileOpened(const QString&) +void QuantaDebuggerGubed::fileOpened(const TQString&) { sendCommand("reinitialize", (char*)0L); } // Watch a variable -void QuantaDebuggerGubed::addWatch(const QString &variable) +void QuantaDebuggerGubed::addWatch(const TQString &variable) { if(m_watchlist.find(variable) == m_watchlist.end()) m_watchlist.append(variable); @@ -798,10 +798,10 @@ void QuantaDebuggerGubed::showCondition(const StringMap &args) } // Read configuration -void QuantaDebuggerGubed::readConfig(QDomNode node) +void QuantaDebuggerGubed::readConfig(TQDomNode node) { // Server - QDomNode valuenode = node.namedItem("serverhost"); + TQDomNode valuenode = node.namedItem("serverhost"); m_serverHost = valuenode.firstChild().nodeValue(); if(m_serverHost.isEmpty()) m_serverHost = "localhost"; @@ -850,7 +850,7 @@ void QuantaDebuggerGubed::readConfig(QDomNode node) // Show configuration -void QuantaDebuggerGubed::showConfig(QDomNode node) +void QuantaDebuggerGubed::showConfig(TQDomNode node) { GubedSettings set(protocolversion); @@ -872,9 +872,9 @@ void QuantaDebuggerGubed::showConfig(QDomNode node) set.checkBreakOnUserWarning->setChecked(QuantaDebuggerGubed::User_Warning & m_errormask); set.checkBreakOnUserError->setChecked(QuantaDebuggerGubed::User_Error & m_errormask); - if(set.exec() == QDialog::Accepted ) + if(set.exec() == TQDialog::Accepted ) { - QDomElement el; + TQDomElement el; el = node.namedItem("serverhost").toElement(); if (!el.isNull()) @@ -942,7 +942,7 @@ void QuantaDebuggerGubed::showConfig(QDomNode node) el = node.ownerDocument().createElement("defaultexecutionstate"); node.appendChild( el ); m_defaultExecutionState = (State)set.comboDefaultExecutionState->currentItem(); - el.appendChild(node.ownerDocument().createTextNode(QString::number(m_defaultExecutionState))); + el.appendChild(node.ownerDocument().createTextNode(TQString::number(m_defaultExecutionState))); el = node.namedItem("displaydelay").toElement(); @@ -951,7 +951,7 @@ void QuantaDebuggerGubed::showConfig(QDomNode node) el = node.ownerDocument().createElement("displaydelay"); node.appendChild( el ); m_displaydelay = set.sliderDisplayDelay->value(); - el.appendChild( node.ownerDocument().createTextNode(QString::number(m_displaydelay))); + el.appendChild( node.ownerDocument().createTextNode(TQString::number(m_displaydelay))); el = node.namedItem("errormask").toElement(); if (!el.isNull()) @@ -964,20 +964,20 @@ void QuantaDebuggerGubed::showConfig(QDomNode node) + (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))); + el.appendChild( node.ownerDocument().createTextNode(TQString::number(m_errormask))); } } // Map a server filepath to a local one using project settings -QString QuantaDebuggerGubed::mapServerPathToLocal(const QString& serverpath) +TQString QuantaDebuggerGubed::mapServerPathToLocal(const TQString& 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) +TQString QuantaDebuggerGubed::mapLocalPathToServer(const TQString& localpath) { // Translate filename from local to server return debuggerInterface()->Mapper()->mapLocalPathToServer(localpath); @@ -991,23 +991,23 @@ void QuantaDebuggerGubed::variableSetValue(const DebuggerVariable &variable) (char*)0L); } -QString QuantaDebuggerGubed::phpSerialize(StringMap args) +TQString 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()); + TQString ret = TQString("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;") + ret += TQString("s:%1:\"%2\";i:%3;") .arg(it.key().length()) .arg(it.key()) .arg(it.data()); else - ret += QString("s:%1:\"%2\";s:%3:\"%4\";") + ret += TQString("s:%1:\"%2\";s:%3:\"%4\";") .arg(it.key().length()) .arg(it.key()) .arg(it.data().length()) @@ -1020,7 +1020,7 @@ QString QuantaDebuggerGubed::phpSerialize(StringMap args) } -StringMap QuantaDebuggerGubed::parseArgs(const QString &args) +StringMap QuantaDebuggerGubed::parseArgs(const TQString &args) { StringMap ca; long cnt, length; @@ -1039,9 +1039,9 @@ StringMap QuantaDebuggerGubed::parseArgs(const QString &args) } cnt = args.mid(2, args.find("{") - 3).toLong(); - QString data = args.mid(args.find("{") + 1); + TQString data = args.mid(args.find("{") + 1); - QString tmp, func; + TQString tmp, func; while(cnt > 0) { tmp = data.left(data.find("\"")); @@ -1076,22 +1076,22 @@ StringMap QuantaDebuggerGubed::parseArgs(const QString &args) return ca; } -DebuggerVariable* QuantaDebuggerGubed::parsePHPVariables(const QString &varstring) +DebuggerVariable* QuantaDebuggerGubed::parsePHPVariables(const TQString &varstring) { - QString str = varstring; + TQString str = varstring; DebuggerVariable* var = parsePHPVariables(str); return var; } -DebuggerVariable* QuantaDebuggerGubed::parsePHPVariables(QString &str) +DebuggerVariable* QuantaDebuggerGubed::parsePHPVariables(TQString &str) { - QString key, data; - QString tempstring; + TQString key, data; + TQString tempstring; int length; DebuggerVariable* debuggervar = NULL; // get type of key - QString type = str.left(1); + TQString type = str.left(1); str.remove(0, 2); // Strings @@ -1172,7 +1172,7 @@ DebuggerVariable* QuantaDebuggerGubed::parsePHPVariables(QString &str) str.remove(0, str.find(':') + 2); length = tempstring.toUInt(); - QPtrList vars ; + TQPtrList vars ; while(length > 0) { //kdDebug(24002) << "VariablesListView::parsePHPVariables: length " << length << ", \"" << str << "\"" << endl; @@ -1201,7 +1201,7 @@ DebuggerVariable* QuantaDebuggerGubed::parsePHPVariables(QString &str) str.remove(0, str.find('{') + 1); - QPtrList vars ; + TQPtrList vars ; while(length > 0) { //kdDebug(24002) << "VariablesListView::parsePHPVariables: length " << length << ", \"" << str << "\"" << endl; diff --git a/quanta/components/debugger/gubed/quantadebuggergubed.h b/quanta/components/debugger/gubed/quantadebuggergubed.h index 62acac0b..0f41b804 100644 --- a/quanta/components/debugger/gubed/quantadebuggergubed.h +++ b/quanta/components/debugger/gubed/quantadebuggergubed.h @@ -19,21 +19,21 @@ #include #include -#include +#include #include -#include +#include #include "debuggerclient.h" -typedef QValueList WatchList; -typedef QMap StringMap; +typedef TQValueList WatchList; +typedef TQMap StringMap; class QuantaDebuggerGubed : public DebuggerClient { Q_OBJECT public: - QuantaDebuggerGubed(QObject *parent, const char* name, const QStringList&); + QuantaDebuggerGubed(TQObject *parent, const char* name, const TQStringList&); ~QuantaDebuggerGubed(); // Execution states @@ -76,14 +76,14 @@ class QuantaDebuggerGubed : public DebuggerClient void endSession(); // Return name of debugger - QString getName(); + TQString getName(); // New file opened in quanta - void fileOpened(const QString& file); + void fileOpened(const TQString& file); // Settings - void readConfig(QDomNode node); - void showConfig(QDomNode node); + void readConfig(TQDomNode node); + void showConfig(TQDomNode node); // Breakpoints void addBreakpoint(DebuggerBreakpoint* breakpoint); @@ -91,22 +91,22 @@ class QuantaDebuggerGubed : public DebuggerClient void showCondition(const StringMap &args); // Variables - void addWatch(const QString &variable); + void addWatch(const TQString &variable); void removeWatch(DebuggerVariable *var); void variableSetValue(const DebuggerVariable &variable); private: KNetwork::KStreamSocket *m_socket; KNetwork::KServerSocket *m_server; - QString m_command, m_buffer; + TQString 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; + TQString m_serverBasedir; + TQString m_localBasedir; + TQString m_serverPort; + TQString m_serverHost; + TQString m_startsession; + TQString m_listenPort; bool m_useproxy; State m_executionState, m_defaultExecutionState; long m_errormask; @@ -114,28 +114,28 @@ class QuantaDebuggerGubed : public DebuggerClient WatchList m_watchlist; -// bool sendCommand(const QString&, const QString&); - bool sendCommand(const QString& command, StringMap args); - bool sendCommand(const QString& command, char * firstarg, ...); +// bool sendCommand(const TQString&, const TQString&); + bool sendCommand(const TQString& command, StringMap args); + bool sendCommand(const TQString& command, char * firstarg, ...); - void processCommand(const QString&); + void processCommand(const TQString&); void sendWatches(); void sendBreakpoints(); void debuggingState(bool enable); void connected(); - QString mapServerPathToLocal(const QString& serverpath); - QString mapLocalPathToServer(const QString& localpath); - QString bpToGubed(DebuggerBreakpoint* breakpoint); + TQString mapServerPathToLocal(const TQString& serverpath); + TQString mapLocalPathToServer(const TQString& localpath); + TQString bpToGubed(DebuggerBreakpoint* breakpoint); // Communication helpers - QString phpSerialize(StringMap args); - StringMap parseArgs(const QString &args); + TQString phpSerialize(StringMap args); + StringMap parseArgs(const TQString &args); // Variables - DebuggerVariable* parsePHPVariables(const QString &varstring); - DebuggerVariable* parsePHPVariables(QString &str); - void showWatch(const QString& data); + DebuggerVariable* parsePHPVariables(const TQString &varstring); + DebuggerVariable* parsePHPVariables(TQString &str); + void showWatch(const TQString& data); public slots: diff --git a/quanta/components/debugger/interfaces/debuggerclient.cpp b/quanta/components/debugger/interfaces/debuggerclient.cpp index 8c3196d9..97140dbb 100644 --- a/quanta/components/debugger/interfaces/debuggerclient.cpp +++ b/quanta/components/debugger/interfaces/debuggerclient.cpp @@ -23,8 +23,8 @@ // CTor -DebuggerClient::DebuggerClient(QObject *parent, const char* name) - : QObject(parent, name) +DebuggerClient::DebuggerClient(TQObject *parent, const char* name) + : TQObject(parent, name) { m_active = false; } @@ -41,7 +41,7 @@ bool DebuggerClient::isActive() return m_active; } -void DebuggerClient::unSupportedAction(const QString &action) +void DebuggerClient::unSupportedAction(const TQString &action) { KMessageBox::error(NULL, i18n("The current debugger, %1, does not support the \"%2\" instruction.").arg(this->getName()).arg(action), i18n("Unsupported Debugger Function")); @@ -107,7 +107,7 @@ void DebuggerClient::profilerOpen( ) } // Unimplemented defaults -void DebuggerClient::fileOpened(const QString&) +void DebuggerClient::fileOpened(const TQString&) { return; } @@ -127,19 +127,19 @@ void DebuggerClient::removeBreakpoint(DebuggerBreakpoint*) // Unimplemented defaults -void DebuggerClient::showConfig(QDomNode) +void DebuggerClient::showConfig(TQDomNode) { KMessageBox::error(NULL, i18n("%1 does not have any specific settings.").arg(this->getName()), i18n("Settings")); } // Unimplemented defaults -void DebuggerClient::readConfig(QDomNode) +void DebuggerClient::readConfig(TQDomNode) { } // Unimplemented defaults: add watch -void DebuggerClient::addWatch(const QString &) +void DebuggerClient::addWatch(const TQString &) { KMessageBox::error(NULL, i18n("%1 does not support watches.").arg(this->getName()), i18n("Unsupported Debugger Function")); } diff --git a/quanta/components/debugger/interfaces/debuggerclient.h b/quanta/components/debugger/interfaces/debuggerclient.h index d50526cc..1966039f 100644 --- a/quanta/components/debugger/interfaces/debuggerclient.h +++ b/quanta/components/debugger/interfaces/debuggerclient.h @@ -18,10 +18,10 @@ #ifndef _DEBUGGERCLIENT_H #define _DEBUGGERCLIENT_H -#include -#include +#include +#include #include -#include +#include #include "debuggerui.h" @@ -66,7 +66,7 @@ class DebuggerClient : public QObject private: protected: - DebuggerClient(QObject *parent, const char* name); + DebuggerClient(TQObject *parent, const char* name); bool m_active; @@ -74,7 +74,7 @@ class DebuggerClient : public QObject virtual const uint supports(DebuggerClientCapabilities::Capabilities) = 0; virtual void startSession() = 0; virtual void endSession() = 0; - virtual QString getName() = 0; + virtual TQString getName() = 0; // Execution control virtual void request(); @@ -88,21 +88,21 @@ class DebuggerClient : public QObject virtual void pause(); // Settings - virtual void readConfig(QDomNode node); - virtual void showConfig(QDomNode node); + virtual void readConfig(TQDomNode node); + virtual void showConfig(TQDomNode node); // Profiler virtual void profilerOpen(); // Misc - virtual void fileOpened(const QString& file); + virtual void fileOpened(const TQString& file); virtual void addBreakpoint(DebuggerBreakpoint* breakpoint); virtual void removeBreakpoint(DebuggerBreakpoint* breakpoint); - virtual void addWatch(const QString &); + virtual void addWatch(const TQString &); virtual void removeWatch(DebuggerVariable*); virtual void variableSetValue(const DebuggerVariable &variable); - void unSupportedAction(const QString &action); + void unSupportedAction(const TQString &action); bool isActive(); DebuggerInterface *debuggerInterface(); diff --git a/quanta/components/debugger/interfaces/debuggerinterface.cpp b/quanta/components/debugger/interfaces/debuggerinterface.cpp index 5481180c..4d7beda6 100644 --- a/quanta/components/debugger/interfaces/debuggerinterface.cpp +++ b/quanta/components/debugger/interfaces/debuggerinterface.cpp @@ -17,8 +17,8 @@ #include "debuggerinterface.h" -DebuggerInterface::DebuggerInterface (QObject *parent, const char* name) - : QObject(parent, name) +DebuggerInterface::DebuggerInterface (TQObject *parent, const char* name) + : TQObject(parent, name) { } diff --git a/quanta/components/debugger/interfaces/debuggerinterface.h b/quanta/components/debugger/interfaces/debuggerinterface.h index 8c527979..1540a616 100644 --- a/quanta/components/debugger/interfaces/debuggerinterface.h +++ b/quanta/components/debugger/interfaces/debuggerinterface.h @@ -18,8 +18,8 @@ #ifndef DEBUGGERINTERFACE_H #define DEBUGGERINTERFACE_H -#include -#include +#include +#include #include #include "debuggervariable.h" @@ -36,40 +36,40 @@ class DebuggerInterface : public QObject public: - DebuggerInterface(QObject *parent, const char* name); + DebuggerInterface(TQObject *parent, const char* name); // Breakpoints - virtual void haveBreakpoint (const QString& file, int line) = 0; - virtual void havenoBreakpoint (const QString& file, int line) = 0; + virtual void haveBreakpoint (const TQString& file, int line) = 0; + virtual void havenoBreakpoint (const TQString& 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 bool showStatus(const TQString& message, bool log) = 0; + virtual bool setActiveLine (const TQString& file, int line) = 0; - virtual void enableAction(const QString& action, bool enable) = 0; - virtual void fileOpened(const QString& file) = 0; + virtual void enableAction(const TQString& action, bool enable) = 0; + virtual void fileOpened(const TQString& file) = 0; virtual void sendRequest(const KURL &url) = 0; - virtual const QString activeFileParts(const QString & str) = 0; + virtual const TQString activeFileParts(const TQString & 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 DebuggerVariable* newDebuggerVariable(const TQString& name, const TQString& value, int type) = 0; + virtual DebuggerVariable* newDebuggerVariable(const TQString& 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; + virtual void backtraceShow(long level, BacktraceType type, const TQString &filename, long line, const TQString& 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; + virtual DebuggerBreakpoint * findDebuggerBreakpoint(const TQString& key) = 0; + virtual void updateBreakpointKey(const DebuggerBreakpoint &bp, const TQString& newkey) = 0; // Path mapping virtual PathMapper* Mapper() = 0; diff --git a/quanta/components/debugger/pathmapper.cpp b/quanta/components/debugger/pathmapper.cpp index 194355d7..c38e2fec 100644 --- a/quanta/components/debugger/pathmapper.cpp +++ b/quanta/components/debugger/pathmapper.cpp @@ -23,12 +23,12 @@ #include #include -#include +#include #include -#include +#include -PathMapper::PathMapper(QObject *parent, const char *name) - : QObject(parent, name) +PathMapper::PathMapper(TQObject *parent, const char *name) + : TQObject(parent, name) { } @@ -38,9 +38,9 @@ PathMapper::PathMapper() } -QString PathMapper::translate(const QString & path, const QString & from, const QString &to) +TQString PathMapper::translate(const TQString & path, const TQString & from, const TQString &to) { - QString translated = path; + TQString translated = path; // Check if this dir is matched by the maps if(path.startsWith(from, false)) @@ -52,7 +52,7 @@ QString PathMapper::translate(const QString & path, const QString & from, const return translated; } -QString PathMapper::mapLocalPathToServer(const QString &localpath) +TQString PathMapper::mapLocalPathToServer(const TQString &localpath) { if(localpath.isEmpty()) return localpath; @@ -60,7 +60,7 @@ QString PathMapper::mapLocalPathToServer(const QString &localpath) if(m_localBasedir == "/" && m_serverBasedir == "/") return localpath; - QString newpath = translate(localpath, m_localBasedir, m_serverBasedir); + TQString newpath = translate(localpath, m_localBasedir, m_serverBasedir); // If no translation occurred, check and see if some of the other translations does if(newpath == localpath) @@ -89,7 +89,7 @@ QString PathMapper::mapLocalPathToServer(const QString &localpath) for (unsigned int cnt = 0; cnt < m_serverlist.count(); cnt++ ) pmdlg.addHistory(m_serverlist[cnt], m_locallist[cnt]); - if(pmdlg.exec() == QDialog::Accepted ) + if(pmdlg.exec() == TQDialog::Accepted ) { newpath = translate(localpath, pmdlg.localPath(), pmdlg.serverPath()); addHistory(pmdlg.localPath(), pmdlg.serverPath(), newpath != localpath); @@ -101,9 +101,9 @@ QString PathMapper::mapLocalPathToServer(const QString &localpath) return newpath; } -QString PathMapper::mapServerPathToLocal(const QString &serverpath) +TQString PathMapper::mapServerPathToLocal(const TQString &serverpath) { - QString newpath; + TQString newpath; if(serverpath.isEmpty()) return serverpath; @@ -130,7 +130,7 @@ QString PathMapper::mapServerPathToLocal(const QString &serverpath) for (unsigned int cnt = 0; cnt < m_serverlist.count(); cnt++ ) pmdlg.addHistory(m_serverlist[cnt], m_locallist[cnt]); - if(pmdlg.exec() == QDialog::Accepted ) + if(pmdlg.exec() == TQDialog::Accepted ) { addHistory(pmdlg.localPath(), pmdlg.serverPath(), true); newpath = translate(serverpath, pmdlg.localPath(), pmdlg.serverPath()); @@ -141,21 +141,21 @@ QString PathMapper::mapServerPathToLocal(const QString &serverpath) return serverpath; } -void PathMapper::setLocalBasedir(const QString &localpath) +void PathMapper::setLocalBasedir(const TQString &localpath) { m_localBasedir = localpath; } -void PathMapper::setServerBasedir(const QString &serverpath) +void PathMapper::setServerBasedir(const TQString &serverpath) { m_serverBasedir = serverpath; } -QDomNode PathMapper::pathMapperNode() +TQDomNode PathMapper::pathMapperNode() { - QDomNode nodeThisDbg; - QDomDocument *dom = Project::ref()->sessionDom(); - QDomNode projectNode = dom->firstChild().firstChild(); - QDomNode nodeDbg = projectNode.namedItem("debuggers"); + TQDomNode nodeThisDbg; + TQDomDocument *dom = Project::ref()->sessionDom(); + TQDomNode projectNode = dom->firstChild().firstChild(); + TQDomNode nodeDbg = projectNode.namedItem("debuggers"); if(nodeDbg.isNull()) { nodeDbg = dom->createElement("debuggers"); @@ -173,7 +173,7 @@ QDomNode PathMapper::pathMapperNode() return nodeThisDbg; } -void PathMapper::addHistory(const QString &localpath, const QString &serverpath, bool saveinproject) +void PathMapper::addHistory(const TQString &localpath, const TQString &serverpath, bool saveinproject) { bool exists = false; for (unsigned int cnt = 0; cnt < m_serverlist.count() && !exists; cnt++ ) @@ -184,12 +184,12 @@ void PathMapper::addHistory(const QString &localpath, const QString &serverpath, { if(saveinproject) { - QDomNode node = pathMapperNode(); - QDomNode newnode = Project::ref()->dom()->createElement("mapping"); + TQDomNode node = pathMapperNode(); + TQDomNode newnode = Project::ref()->dom()->createElement("mapping"); - QDomAttr serverattr = Project::ref()->dom()->createAttribute("serverpath"); + TQDomAttr serverattr = Project::ref()->dom()->createAttribute("serverpath"); serverattr.setValue(serverpath); - QDomAttr localattr = Project::ref()->dom()->createAttribute("localpath"); + TQDomAttr localattr = Project::ref()->dom()->createAttribute("localpath"); localattr.setValue(localpath); newnode.attributes().setNamedItem(serverattr); @@ -207,12 +207,12 @@ void PathMapper::addHistory(const QString &localpath, const QString &serverpath, void PathMapper::readConfig() { - QDomNode node = pathMapperNode(); + TQDomNode node = pathMapperNode(); // Server - QDomNode valuenode = node.namedItem("mappings"); - QDomNode child = valuenode.firstChild(); - QString serverpath, localpath; + TQDomNode valuenode = node.namedItem("mappings"); + TQDomNode child = valuenode.firstChild(); + TQString serverpath, localpath; while(!child.isNull()) { serverpath = child.attributes().namedItem("serverpath").nodeValue(); diff --git a/quanta/components/debugger/pathmapper.h b/quanta/components/debugger/pathmapper.h index b93b48cb..fd48e3ab 100644 --- a/quanta/components/debugger/pathmapper.h +++ b/quanta/components/debugger/pathmapper.h @@ -19,9 +19,9 @@ #ifndef PATHMAPPER_H #define PATHMAPPER_H -#include -#include -#include +#include +#include +#include class KURL; @@ -30,26 +30,26 @@ class PathMapper : public QObject Q_OBJECT public: - PathMapper(QObject *parent = 0, const char *name = 0); + PathMapper(TQObject *parent = 0, const char *name = 0); PathMapper(); - virtual QString mapLocalPathToServer(const QString &localpath); - virtual QString mapServerPathToLocal(const QString &serverpath); + virtual TQString mapLocalPathToServer(const TQString &localpath); + virtual TQString mapServerPathToLocal(const TQString &serverpath); - virtual void setLocalBasedir(const QString &localpath); - virtual void setServerBasedir(const QString &serverpath); + virtual void setLocalBasedir(const TQString &localpath); + virtual void setServerBasedir(const TQString &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); + TQDomNode pathMapperNode(); + TQString translate(const TQString & path, const TQString & from, const TQString &to); + void addHistory(const TQString &localpath, const TQString &serverpath, bool saveinproject); - QString m_localBasedir; - QString m_serverBasedir; + TQString m_localBasedir; + TQString m_serverBasedir; - QStringList m_serverlist; - QStringList m_locallist; + TQStringList m_serverlist; + TQStringList m_locallist; }; #endif diff --git a/quanta/components/debugger/pathmapperdialog.cpp b/quanta/components/debugger/pathmapperdialog.cpp index 8cfb949e..74e01956 100644 --- a/quanta/components/debugger/pathmapperdialog.cpp +++ b/quanta/components/debugger/pathmapperdialog.cpp @@ -16,13 +16,13 @@ #include "pathmapperdialog.h" -#include -#include +#include +#include #include -#include +#include #include -PathMapperDialog::PathMapperDialog(const QString& path, const PathMapperDialog::Direction direction) +PathMapperDialog::PathMapperDialog(const TQString& path, const PathMapperDialog::Direction direction) : PathMapperDialogS(0, "PathMapperDialog", false, 0) { m_direction = direction; @@ -32,18 +32,18 @@ PathMapperDialog::PathMapperDialog(const QString& path, const PathMapperDialog:: 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())); + connect(listHistory, TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(slotSelectionChanged())); + connect(lineLocalPath, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotPathsChanged())); + connect(lineServerPath, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotPathsChanged())); } PathMapperDialog::~PathMapperDialog() { } -void PathMapperDialog::addHistory(const QString &serverdir, const QString &localdir) +void PathMapperDialog::addHistory(const TQString &serverdir, const TQString &localdir) { - new QListViewItem(listHistory, localdir, serverdir); + new TQListViewItem(listHistory, localdir, serverdir); } void PathMapperDialog::slotSelectionChanged() @@ -54,7 +54,7 @@ void PathMapperDialog::slotSelectionChanged() void PathMapperDialog::slotPathsChanged() { - QString translated, from, to; + TQString translated, from, to; if(m_direction == ServerToLocal) { from = lineServerPath->text(); @@ -88,12 +88,12 @@ void PathMapperDialog::slotPathsChanged() lineTranslated->setText(translated); } -QString PathMapperDialog::serverPath() +TQString PathMapperDialog::serverPath() { return lineServerPath->text(); } -QString PathMapperDialog::localPath() +TQString PathMapperDialog::localPath() { return lineLocalPath->text(); } diff --git a/quanta/components/debugger/pathmapperdialog.h b/quanta/components/debugger/pathmapperdialog.h index 786de8ea..39eb4600 100644 --- a/quanta/components/debugger/pathmapperdialog.h +++ b/quanta/components/debugger/pathmapperdialog.h @@ -30,20 +30,20 @@ class PathMapperDialog : public PathMapperDialogS LocalToServer }; - PathMapperDialog(const QString& path, const PathMapperDialog::Direction direction); + PathMapperDialog(const TQString& path, const PathMapperDialog::Direction direction); ~PathMapperDialog(); - void addHistory(const QString &serverdir, const QString &localdir); + void addHistory(const TQString &serverdir, const TQString &localdir); - QString serverPath(); - QString localPath(); + TQString serverPath(); + TQString localPath(); public slots: void slotSelectionChanged(); void slotPathsChanged(); private: - QString m_path; + TQString m_path; Direction m_direction; }; diff --git a/quanta/components/debugger/quantadebuggerinterface.cpp b/quanta/components/debugger/quantadebuggerinterface.cpp index bd9ba2e1..af70da0a 100644 --- a/quanta/components/debugger/quantadebuggerinterface.cpp +++ b/quanta/components/debugger/quantadebuggerinterface.cpp @@ -32,7 +32,7 @@ class DebuggerBreakpoint; -QuantaDebuggerInterface::QuantaDebuggerInterface (QObject *myparent, const char* name) +QuantaDebuggerInterface::QuantaDebuggerInterface (TQObject *myparent, const char* name) : DebuggerInterface(myparent, name) { m_manager = static_cast(parent()); @@ -41,33 +41,33 @@ QuantaDebuggerInterface::QuantaDebuggerInterface (QObject *myparent, const char* QuantaDebuggerInterface::~QuantaDebuggerInterface () {} -void QuantaDebuggerInterface::haveBreakpoint (const QString& file, int line) +void QuantaDebuggerInterface::haveBreakpoint (const TQString& file, int line) { return m_manager->haveBreakpoint(file, line); } -void QuantaDebuggerInterface::havenoBreakpoint (const QString& file, int line) +void QuantaDebuggerInterface::havenoBreakpoint (const TQString& file, int line) { return m_manager->havenoBreakpoint(file, line); } // Public help functions -bool QuantaDebuggerInterface::showStatus(const QString& message, bool log) +bool QuantaDebuggerInterface::showStatus(const TQString& message, bool log) { return m_manager->showStatus(message, log); } -bool QuantaDebuggerInterface::setActiveLine(const QString& file, int line) +bool QuantaDebuggerInterface::setActiveLine(const TQString& file, int line) { return m_manager->setActiveLine(file, line); } -void QuantaDebuggerInterface::enableAction(const QString& action, bool enable) +void QuantaDebuggerInterface::enableAction(const TQString& action, bool enable) { m_manager->enableAction(action, enable); } -void QuantaDebuggerInterface::fileOpened(const QString& file) +void QuantaDebuggerInterface::fileOpened(const TQString& file) { m_manager->fileOpened(file); } @@ -77,9 +77,9 @@ void QuantaDebuggerInterface::sendRequest(const KURL &url) m_manager->UI()->sendRequest(url); } -const QString QuantaDebuggerInterface::activeFileParts(const QString & str) +const TQString QuantaDebuggerInterface::activeFileParts(const TQString & str) { - QString newstr = str; + TQString newstr = str; // a/r = absolute/relative // f/p/d = file/project/docroot @@ -111,12 +111,12 @@ void QuantaDebuggerInterface::showVariable(DebuggerVariable* var) m_manager->UI()->addVariable(var); } -DebuggerVariable *QuantaDebuggerInterface::newDebuggerVariable(const QString& name, const QString& value, int type) +DebuggerVariable *QuantaDebuggerInterface::newDebuggerVariable(const TQString& name, const TQString& value, int type) { return new DebuggerVariable(name, value, type); } -DebuggerVariable *QuantaDebuggerInterface::newDebuggerVariable(const QString& name, const ValueList_t& values, int type) +DebuggerVariable *QuantaDebuggerInterface::newDebuggerVariable(const TQString& name, const ValueList_t& values, int type) { return new DebuggerVariable(name, values, type); } @@ -136,7 +136,7 @@ DebuggerBreakpoint *QuantaDebuggerInterface::newDebuggerBreakpoint() return new DebuggerBreakpoint(); } -DebuggerBreakpoint *QuantaDebuggerInterface::findDebuggerBreakpoint(const QString& key) +DebuggerBreakpoint *QuantaDebuggerInterface::findDebuggerBreakpoint(const TQString& key) { return m_manager->findDebuggerBreakpoint(key); } @@ -158,7 +158,7 @@ PathMapper* QuantaDebuggerInterface::Mapper() return m_manager->Mapper(); } -void QuantaDebuggerInterface::updateBreakpointKey( const DebuggerBreakpoint & bp, const QString & newkey ) +void QuantaDebuggerInterface::updateBreakpointKey( const DebuggerBreakpoint & bp, const TQString & newkey ) { m_manager->updateBreakpointKey(bp, newkey); } @@ -168,7 +168,7 @@ void QuantaDebuggerInterface::backtraceClear( ) m_manager->UI()->backtraceClear(); } -void QuantaDebuggerInterface::backtraceShow( long level, BacktraceType type, const QString & filename, long line, const QString & func ) +void QuantaDebuggerInterface::backtraceShow( long level, BacktraceType type, const TQString & filename, long line, const TQString & func ) { m_manager->UI()->backtraceShow(level, type, filename, line, func); } diff --git a/quanta/components/debugger/quantadebuggerinterface.h b/quanta/components/debugger/quantadebuggerinterface.h index 44be8f4a..d18fd1cd 100644 --- a/quanta/components/debugger/quantadebuggerinterface.h +++ b/quanta/components/debugger/quantadebuggerinterface.h @@ -18,8 +18,8 @@ #ifndef MYDEBUGMANAGER_H #define MYDEBUGMANAGER_H -#include -#include +#include +#include #include "debuggerinterface.h" #include "debuggervariable.h" @@ -33,39 +33,39 @@ class QuantaDebuggerInterface : public DebuggerInterface DebuggerManager *m_manager; public: - QuantaDebuggerInterface(QObject *myparent, const char* name); + QuantaDebuggerInterface(TQObject *myparent, const char* name); ~QuantaDebuggerInterface(); // Breakpoints - void haveBreakpoint (const QString& file, int line) ; - void havenoBreakpoint (const QString& file, int line) ; + void haveBreakpoint (const TQString& file, int line) ; + void havenoBreakpoint (const TQString& file, int line) ; void refreshBreakpoints(); // Public help functions - bool showStatus(const QString& message, bool log); - bool setActiveLine (const QString& file, int line) ; + bool showStatus(const TQString& message, bool log); + bool setActiveLine (const TQString& file, int line) ; - void enableAction(const QString& action, bool enable); - void fileOpened(const QString& file) ; + void enableAction(const TQString& action, bool enable); + void fileOpened(const TQString& file) ; void sendRequest(const KURL &url); - virtual const QString activeFileParts(const QString & str); + virtual const TQString activeFileParts(const TQString & 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); + DebuggerVariable* newDebuggerVariable(const TQString& name, const TQString& value, int type); + DebuggerVariable* newDebuggerVariable(const TQString& 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); + DebuggerBreakpoint * findDebuggerBreakpoint(const TQString& key); + void updateBreakpointKey(const DebuggerBreakpoint &bp, const TQString& newkey); // Backtrace void backtraceClear(); - void backtraceShow(long level, BacktraceType type, const QString &filename, long line, const QString& func); + void backtraceShow(long level, BacktraceType type, const TQString &filename, long line, const TQString& func); // Path mapping PathMapper* Mapper(); diff --git a/quanta/components/debugger/variableslistview.cpp b/quanta/components/debugger/variableslistview.cpp index c9d77de3..03ddd7d3 100644 --- a/quanta/components/debugger/variableslistview.cpp +++ b/quanta/components/debugger/variableslistview.cpp @@ -21,7 +21,7 @@ #include #include #include -#include +#include // Quanta includes #include "variableslistview.h" @@ -47,12 +47,12 @@ namespace VariablesListViewColumns }; } -VariablesListView::VariablesListView(QWidget *parent, const char *name) +VariablesListView::VariablesListView(TQWidget *parent, const char *name) : KListView(parent, name) { // If you change here, change the VariablesListViewColumns enums above addColumn(i18n("Name")); - addColumn(QString::null); + addColumn(TQString::null); addColumn(i18n("Value")); addColumn(i18n("Type")); addColumn(i18n("Size")); @@ -60,16 +60,16 @@ VariablesListView::VariablesListView(QWidget *parent, const char *name) setSorting(-1); // No sorting m_variablePopup = new KPopupMenu(this); - m_variablePopup->insertItem(SmallIcon("editdelete"), i18n("&Remove"), this, SLOT(slotRemoveSelected()), 0, removeWatch); + m_variablePopup->insertItem(SmallIcon("editdelete"), i18n("&Remove"), this, TQT_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("edit"), i18n("&Set Value"), this, TQT_SLOT(slotVariableSetValue()), 0, setValue); - m_variablePopup->insertItem(SmallIcon("viewmag"), i18n("&Dump in Messages Log"), this, SLOT(slotVariableDump()), 0, dumpValue); + m_variablePopup->insertItem(SmallIcon("viewmag"), i18n("&Dump in Messages Log"), this, TQT_SLOT(slotVariableDump()), 0, dumpValue); - m_variablePopup->insertItem(SmallIcon("editcopy"), i18n("&Copy to Clipboard"), this, SLOT(slotVariableCopyToClipboard()), 0, copyValue); + m_variablePopup->insertItem(SmallIcon("editcopy"), i18n("&Copy to Clipboard"), this, TQT_SLOT(slotVariableCopyToClipboard()), 0, copyValue); - connect(this, SIGNAL( contextMenu( KListView *, QListViewItem *, const QPoint & ) ), this, SLOT(slotVariableContextMenu(KListView *, QListViewItem *, const QPoint &))); + connect(this, TQT_SIGNAL( contextMenu( KListView *, TQListViewItem *, const TQPoint & ) ), this, TQT_SLOT(slotVariableContextMenu(KListView *, TQListViewItem *, const TQPoint &))); } @@ -104,7 +104,7 @@ void VariablesListView::slotRemoveSelected() delete v; } -void VariablesListView::keyPressEvent(QKeyEvent *e) +void VariablesListView::keyPressEvent(TQKeyEvent *e) { if(e->key() != Qt::Key_Delete) { @@ -161,11 +161,11 @@ void VariablesListView::replaceVariable(DebuggerVariable* oldvar, DebuggerVariab KListViewItem * item; // Remove children that doesen't exist anymore - QPtrList oldlist = oldvar->values(); + TQPtrList oldlist = oldvar->values(); for(DebuggerVariable* oldchild = oldlist.last(); oldchild; oldchild = oldlist.prev()) { bool found = false; - QPtrList newlist = newvar->values(); + TQPtrList newlist = newvar->values(); for(DebuggerVariable* newchild = newlist.last(); newchild; newchild = newlist.prev()) { if(newchild->name() == oldchild->name()) @@ -179,11 +179,11 @@ void VariablesListView::replaceVariable(DebuggerVariable* oldvar, DebuggerVariab } // Update and add children - QPtrList newlist = newvar->values(); + TQPtrList newlist = newvar->values(); for(DebuggerVariable* newchild = newlist.last(); newchild; newchild = newlist.prev()) { bool found = false; - QPtrList oldlist = oldvar->values(); + TQPtrList oldlist = oldvar->values(); for(DebuggerVariable* oldchild = oldlist.last(); oldchild; oldchild = oldlist.prev()) { if(newchild->name() == oldchild->name()) @@ -215,11 +215,11 @@ void VariablesListView::replaceVariable(DebuggerVariable* oldvar, DebuggerVariab 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())); + item->setText(VariablesListViewColumns::Value, (newvar->isScalar() ? oldvar->value() : TQString())); } -void VariablesListView::slotVariableContextMenu(KListView *, QListViewItem *, const QPoint& point) +void VariablesListView::slotVariableContextMenu(KListView *, TQListViewItem *, const TQPoint& point) { if(!selectedItem()) return; @@ -242,7 +242,7 @@ void VariablesListView::slotVariableSetValue() DebuggerVariable v(selected()); - QString newvalue; + TQString newvalue; switch(v.type()) { case DebuggerVariableTypes::String: @@ -284,7 +284,7 @@ void VariablesListView::slotVariableCopyToClipboard( ) DebuggerVariable *v = selected(true); if(!v) return; - QApplication::clipboard()->setText(v->value()); + TQApplication::clipboard()->setText(v->value()); } #include "variableslistview.moc" diff --git a/quanta/components/debugger/variableslistview.h b/quanta/components/debugger/variableslistview.h index 41de5328..729aa8d8 100644 --- a/quanta/components/debugger/variableslistview.h +++ b/quanta/components/debugger/variableslistview.h @@ -21,7 +21,7 @@ #include #include -#include +#include class DebuggerVariable; @@ -38,7 +38,7 @@ class VariablesListView : public KListView }; public: - VariablesListView(QWidget *parent = 0, const char *name = 0); + VariablesListView(TQWidget *parent = 0, const char *name = 0); ~VariablesListView(); void addVariable(DebuggerVariable* variable); @@ -54,17 +54,17 @@ class VariablesListView : public KListView void slotVariableSetValue(); void slotVariableDump(); void slotVariableCopyToClipboard(); - void slotVariableContextMenu(KListView *list, QListViewItem * item, const QPoint& point); + void slotVariableContextMenu(KListView *list, TQListViewItem * item, const TQPoint& point); signals: void valueChanged(DebuggerVariable*); void removeVariable(DebuggerVariable*); private: - void keyPressEvent(QKeyEvent *e); + void keyPressEvent(TQKeyEvent *e); void replaceVariable(DebuggerVariable* oldvar, DebuggerVariable* newvar); - QPtrList m_variablesList; + TQPtrList m_variablesList; KPopupMenu *m_variablePopup; }; diff --git a/quanta/components/framewizard/areaattributedb.h b/quanta/components/framewizard/areaattributedb.h index e13682b3..6dbe92d1 100644 --- a/quanta/components/framewizard/areaattributedb.h +++ b/quanta/components/framewizard/areaattributedb.h @@ -17,9 +17,9 @@ #ifndef AREAATTRIBUTEDB_H #define AREAATTRIBUTEDB_H -#include -#include -#include +#include +#include +#include /**this is *@author gulmini luciano */ @@ -28,22 +28,22 @@ class areaAttribute : public QObject{ Q_OBJECT private: - QRect m_geometry; - QMap m_attributeMap; //tag specific attributes + TQRect m_geometry; + TQMap m_attributeMap; //tag specific attributes public: areaAttribute(); ~areaAttribute(){}; - void setAttribute(const QString& name, const QString& value){ m_attributeMap[name] = value; } - void setAllAttributes(QMap map){ m_attributeMap = map; } + void setAttribute(const TQString& name, const TQString& value){ m_attributeMap[name] = value; } + void setAllAttributes(TQMap map){ m_attributeMap = map; } void resetAttributes(); - QRect geometry() const { return m_geometry; } - QString src() const{ return m_attributeMap["src"]; } - QString attributeValue(QString l) const { return attributeMap()[l];} - QMap attributeMap() const { return m_attributeMap; } + TQRect geometry() const { return m_geometry; } + TQString src() const{ return m_attributeMap["src"]; } + TQString attributeValue(TQString l) const { return attributeMap()[l];} + TQMap attributeMap() const { return m_attributeMap; } public slots: - void setGeometry(QRect g) { m_geometry = g; } + void setGeometry(TQRect g) { m_geometry = g; } }; #endif diff --git a/quanta/components/framewizard/fmfpeditor.cpp b/quanta/components/framewizard/fmfpeditor.cpp index cc262453..e2bfb44a 100644 --- a/quanta/components/framewizard/fmfpeditor.cpp +++ b/quanta/components/framewizard/fmfpeditor.cpp @@ -16,12 +16,12 @@ ***************************************************************************/ #include "fmfpeditor.h" -#include -#include -#include -#include +#include +#include +#include +#include #include -#include +#include #include #include //#include @@ -33,11 +33,11 @@ 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"); + TQString htmlFiles = i18n("*.html *.htm|HTML Files"); + TQString phpFiles = i18n("*.php|PHP Files"); + TQString xmlFiles = i18n("*.xml|XML Files"); + TQString xhtmlFiles = i18n("*xhtml|XHTML Files"); + TQString allFiles = i18n("*|All Files"); fc->setFilter(htmlFiles+"\n"+phpFiles+"\n"+xmlFiles+"\n"+xhtmlFiles+"\n"+allFiles); @@ -45,14 +45,14 @@ fmFPeditor::fmFPeditor() : fmFPeditorS (){ fmFPeditor::~fmFPeditor(){ } -QString fmFPeditor::noresizeValue() { +TQString fmFPeditor::noresizeValue() { switch(bgNoresize->id(bgNoresize->selected())){ case 0:return "";break; default:return "noresize"; } } -QString fmFPeditor::scrollingValue() { +TQString fmFPeditor::scrollingValue() { switch(bgScrolling->id(bgScrolling->selected())){ case 0:return "yes";break; case 2:return "no";break; @@ -60,14 +60,14 @@ QString fmFPeditor::scrollingValue() { } } -QString fmFPeditor::frameborderValue() { +TQString fmFPeditor::frameborderValue() { switch(bgBorder->id(bgBorder->selected())){ case 1:return "0"; break; default:return "1"; } } -void fmFPeditor::setup(QMap m){ +void fmFPeditor::setup(TQMap m){ leId->setText(m["id"]); fc->setURL(m["src"]); leClass->setText(m["class"]); @@ -89,8 +89,8 @@ void fmFPeditor::setup(QMap m){ sbTop->setValue(m["marginheight"].toInt()); } -QMap fmFPeditor::attributeMap(){ - QMap map; +TQMap fmFPeditor::attributeMap(){ + TQMap map; map["name"] = leName->text(); map["longdesc"] = leLongdesc->text(); @@ -102,8 +102,8 @@ QMap fmFPeditor::attributeMap(){ map["class"] = leClass->text(); map["noresize"] = noresizeValue(); map["frameborder"] = frameborderValue(); - map["marginwidth"] = QString::number( sbLeft->value(),10 ); - map["marginheight"] = QString::number( sbTop->value(),10 ); + map["marginwidth"] = TQString::number( sbLeft->value(),10 ); + map["marginheight"] = TQString::number( sbTop->value(),10 ); return map; } diff --git a/quanta/components/framewizard/fmfpeditor.h b/quanta/components/framewizard/fmfpeditor.h index c434b421..1a89f0c8 100644 --- a/quanta/components/framewizard/fmfpeditor.h +++ b/quanta/components/framewizard/fmfpeditor.h @@ -30,13 +30,13 @@ class fmFPeditor : public fmFPeditorS { public: fmFPeditor(); ~fmFPeditor(); - void setup(QMap); - QMap attributeMap(); + void setup(TQMap); + TQMap attributeMap(); private: - QString noresizeValue(); - QString scrollingValue(); - QString frameborderValue(); + TQString noresizeValue(); + TQString scrollingValue(); + TQString frameborderValue(); }; #endif diff --git a/quanta/components/framewizard/fmrceditor.cpp b/quanta/components/framewizard/fmrceditor.cpp index 270b3e8c..67c36d62 100644 --- a/quanta/components/framewizard/fmrceditor.cpp +++ b/quanta/components/framewizard/fmrceditor.cpp @@ -16,8 +16,8 @@ ***************************************************************************/ #include "fmrceditor.h" -#include -#include +#include +#include fmRCeditor::fmRCeditor() : fmRCeditorS(){} @@ -27,7 +27,7 @@ int fmRCeditor::spinBoxValue() const { return sb->value(); } -void fmRCeditor::setLabelText(QString s){ +void fmRCeditor::setLabelText(TQString s){ tl->setText(s); } diff --git a/quanta/components/framewizard/fmrceditor.h b/quanta/components/framewizard/fmrceditor.h index 55441e91..254f1cc5 100644 --- a/quanta/components/framewizard/fmrceditor.h +++ b/quanta/components/framewizard/fmrceditor.h @@ -31,7 +31,7 @@ class fmRCeditor : public fmRCeditorS { ~fmRCeditor(); public: int spinBoxValue() const; - void setLabelText(QString); + void setLabelText(TQString); }; diff --git a/quanta/components/framewizard/framewizard.cpp b/quanta/components/framewizard/framewizard.cpp index 2f3903dd..e0e7d5d9 100644 --- a/quanta/components/framewizard/framewizard.cpp +++ b/quanta/components/framewizard/framewizard.cpp @@ -21,26 +21,26 @@ #include //#include #include -#include +#include #include "fwglobal.h" -static const QString info1=i18n("You must select an area."), +static const TQString 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), +FrameWizard::FrameWizard(TQWidget *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(this, TQT_SIGNAL(launchDraw()), this, TQT_SLOT(draw())); + connect(vfe, TQT_SIGNAL(areaSelected(const TQString &)), this, TQT_SLOT(catchSelectedArea(const TQString &))); - 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())); + connect(pbHorizontal, TQT_SIGNAL(clicked()), this, TQT_SLOT(split())); + connect(pbVertical, TQT_SIGNAL(clicked()), this, TQT_SLOT(split())); + connect(pbEditFrame, TQT_SIGNAL(clicked()), this, TQT_SLOT(showFrameEditorDlg())); + connect(pbReset, TQT_SIGNAL(clicked()), this, TQT_SLOT(reset())); + connect(pbDelete, TQT_SIGNAL(clicked()), this, TQT_SLOT(remove())); } FrameWizard::~FrameWizard(){ @@ -48,7 +48,7 @@ FrameWizard::~FrameWizard(){ Q_CHECK_PTR( vfe ); } -void FrameWizard::catchSelectedArea(const QString &id ){ +void FrameWizard::catchSelectedArea(const TQString &id ){ m_currSA = id; //is the current SelectableArea selected m_hasSelected = true;// a SelectableArea has been selected } @@ -56,8 +56,8 @@ void FrameWizard::catchSelectedArea(const QString &id ){ void FrameWizard::split(){ if(m_hasSelected) { int split = 0; - QString currNodeLabel = m_currSA; - QString senderName=sender()->name(); + TQString currNodeLabel = m_currSA; + TQString senderName=sender()->name(); if(senderName=="pbHorizontal"){ split = showRCeditorDlg(i18n("Enter the desired number of rows:")); if(split>=2) vfe->split(currNodeLabel,split,HORIZONTAL); @@ -77,7 +77,7 @@ void FrameWizard::draw(){ vfe->draw(); } -int FrameWizard::showRCeditorDlg(const QString &s){ +int FrameWizard::showRCeditorDlg(const TQString &s){ int res = 0; fmRCeditor *dlg = new fmRCeditor; dlg->setLabelText(s); diff --git a/quanta/components/framewizard/framewizard.h b/quanta/components/framewizard/framewizard.h index 22e93789..6a5c3a54 100644 --- a/quanta/components/framewizard/framewizard.h +++ b/quanta/components/framewizard/framewizard.h @@ -32,26 +32,26 @@ class FrameWizard : public FrameWizardS // 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; + TQString m_currSA; public: - FrameWizard( QWidget* parent=0, const char *name=0); + FrameWizard( TQWidget* parent=0, const char *name=0); ~FrameWizard(); private slots: void showFrameEditorDlg(); void reset(); void remove(); - void catchSelectedArea(const QString &id ); + void catchSelectedArea(const TQString &id ); void split(); void draw(); - int showRCeditorDlg(const QString &s); + int showRCeditorDlg(const TQString &s); public : - void loadExistingFramesetStructure(const QStringList &list){ vfe->loadExistingStructure(list);} - QString generateFramesetStructure(){ return vfe->framesetStructure(); } + void loadExistingFramesetStructure(const TQStringList &list){ vfe->loadExistingStructure(list);} + TQString generateFramesetStructure(){ return vfe->framesetStructure(); } void setSaved( bool b){ m_saved=b; } - void setMarkupLanguage(const QString& s){ vfe->setMarkupLanguage(s);} + void setMarkupLanguage(const TQString& s){ vfe->setMarkupLanguage(s);} signals: void launchDraw(); diff --git a/quanta/components/framewizard/selectablearea.cpp b/quanta/components/framewizard/selectablearea.cpp index 32ea234b..c168e323 100644 --- a/quanta/components/framewizard/selectablearea.cpp +++ b/quanta/components/framewizard/selectablearea.cpp @@ -16,34 +16,34 @@ ***************************************************************************/ #include "selectablearea.h" -#include +#include //#include #include "fwglobal.h" -SelectableArea::SelectableArea(QWidget *parent, const char *name ) : KHTMLPart(parent,name) { - view()->setFrameShape(QFrame::NoFrame); - view()->setMinimumSize(QSize(1,1)); +SelectableArea::SelectableArea(TQWidget *parent, const char *name ) : KHTMLPart(parent,name) { + view()->setFrameShape(TQFrame::NoFrame); + view()->setMinimumSize(TQSize(1,1)); view()->installEventFilter(this); } SelectableArea::~SelectableArea(){} -bool SelectableArea::eventFilter(QObject *o, QEvent *event){ +bool SelectableArea::eventFilter(TQObject *o, TQEvent *event){ switch ( event->type() ) { - case QEvent::FocusIn : { - view()->setFrameShape(QFrame::Box); - view()->setFrameShadow ( QFrame::Plain ); + case TQEvent::FocusIn : { + view()->setFrameShape(TQFrame::Box); + view()->setFrameShadow ( TQFrame::Plain ); view()->setLineWidth(2); emit selected(m_idLabel); return true; }; break; - case QEvent::FocusOut : { - view()->setFrameShape(QFrame::NoFrame); + case TQEvent::FocusOut : { + view()->setFrameShape(TQFrame::NoFrame); return true; } break; - case QEvent::Resize : { + case TQEvent::Resize : { emit Resized( view()->geometry() ); view()->hide(); view()->show(); diff --git a/quanta/components/framewizard/selectablearea.h b/quanta/components/framewizard/selectablearea.h index 252ec6c9..8de351a9 100644 --- a/quanta/components/framewizard/selectablearea.h +++ b/quanta/components/framewizard/selectablearea.h @@ -18,11 +18,11 @@ #ifndef SELECTABLEAREA_H #define SELECTABLEAREA_H -//#include +//#include #include #include -/**a QTextBrowser that can be selected +/**a TQTextBrowser that can be selected *@author gulmini luciano */ @@ -31,21 +31,21 @@ class SelectableArea : public KHTMLPart { Q_OBJECT public : - SelectableArea(QWidget *parent=0, const char *name=0); + SelectableArea(TQWidget *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) ); } + TQString idLabel() const { return m_idLabel; } + void setIdLabel(const TQString &i) { m_idLabel = i; } + void setSource(const TQString& s) { if(!s.isEmpty()) openURL( KURL(s) ); } protected : - virtual bool eventFilter(QObject*, QEvent*); + virtual bool eventFilter(TQObject*, TQEvent*); private : - QString m_idLabel; + TQString m_idLabel; signals : - void selected(const QString &); - void Resized(QRect); + void selected(const TQString &); + void Resized(TQRect); }; diff --git a/quanta/components/framewizard/treenode.cpp b/quanta/components/framewizard/treenode.cpp index fcb60231..fd1f187f 100644 --- a/quanta/components/framewizard/treenode.cpp +++ b/quanta/components/framewizard/treenode.cpp @@ -19,7 +19,7 @@ static const int SIZE = 101; -treeNode::treeNode(const QString &l, const QString &pl) : m_label(l), m_parentLabel(pl), m_splitType(NONE){ +treeNode::treeNode(const TQString &l, const TQString &pl) : m_label(l), m_parentLabel(pl), m_splitType(NONE){ m_childrenList.setAutoDelete(true); m_atts = new areaAttribute; } @@ -28,17 +28,17 @@ treeNode::~treeNode(){ delete m_atts; } -void treeNode::addChildNode(const QString &l) { +void treeNode::addChildNode(const TQString &l) { m_childrenList.append( new treeNode(l,m_label) ); } -void treeNode::removeChildNode(const QString &l,bool autoDelete) { +void treeNode::removeChildNode(const TQString &l,bool autoDelete) { m_childrenList.setAutoDelete(autoDelete); m_childrenList.remove(findChild(l)); } -treeNode* treeNode::findChild(const QString &l){ - QPtrListIterator it( m_childrenList ); +treeNode* treeNode::findChild(const TQString &l){ + TQPtrListIterator it( m_childrenList ); treeNode *node; while ( (node = it.current()) != 0 ) { ++it; @@ -50,7 +50,7 @@ treeNode* treeNode::findChild(const QString &l){ int tree::nodeId = 0; tree::tree(){ - m_root = new treeNode(QString::number(nodeId,10)); + m_root = new treeNode(TQString::number(nodeId,10)); m_nodeList.resize(SIZE); } @@ -68,10 +68,10 @@ void tree::refreshGeometries(treeNode *n){ n->nextChild(); } - QPtrList list = n->childrenList(); - QPtrListIterator it( list ); + TQPtrList list = n->childrenList(); + TQPtrListIterator it( list ); treeNode *node= it.current(); - QRect newGeometry = n->atts()->geometry(); + TQRect newGeometry = n->atts()->geometry(); if(n->splitType()==VERTICAL){ newGeometry.setHeight(node->atts()->geometry().height()); while ( (node = it.current()) != 0 ) { @@ -96,30 +96,30 @@ void tree::refreshGeometries(treeNode *n){ } } -treeNode* tree::findNode(const QString &l){ +treeNode* tree::findNode(const TQString &l){ if(l==m_root->label()) return m_root; return m_nodeList.find(l); } -QString tree::addChildNode(const QString &l){ +TQString tree::addChildNode(const TQString &l){ treeNode *node; if( (node = findNode(l)) != 0) { ++nodeId; - treeNode *newNode = new treeNode(QString::number(nodeId,10),node->label()); + treeNode *newNode = new treeNode(TQString::number(nodeId,10),node->label()); newNode->atts()->setAttribute( "src",node->atts()->src() ); node->addChildNode(newNode); - m_nodeList.insert(QString::number(nodeId,10),newNode); + m_nodeList.insert(TQString::number(nodeId,10),newNode); } - return QString::number(nodeId,10); + return TQString::number(nodeId,10); } -bool tree::insertChildNode(const QString &l){ - QString parent = findNode(l)->parentLabel(); +bool tree::insertChildNode(const TQString &l){ + TQString parent = findNode(l)->parentLabel(); int pos=findNode( parent )->childPosition( findNode(l) ); ++nodeId; - treeNode *newNode = new treeNode(QString::number(nodeId,10),parent); + treeNode *newNode = new treeNode(TQString::number(nodeId,10),parent); newNode->atts()->setAttribute( "src",findNode(l)->atts()->src() ); - m_nodeList.insert(QString::number(nodeId,10),newNode); + m_nodeList.insert(TQString::number(nodeId,10),newNode); return findNode( parent )->insertChild(pos,newNode); } @@ -130,6 +130,6 @@ void tree::reset(){ m_nodeList.clear(); } -void tree::removeChildNode(const QString &pl,const QString &l,bool autoDelete){ +void tree::removeChildNode(const TQString &pl,const TQString &l,bool autoDelete){ findNode(pl)->removeChildNode(l,autoDelete); } diff --git a/quanta/components/framewizard/treenode.h b/quanta/components/framewizard/treenode.h index c2d0f3d6..0d686630 100644 --- a/quanta/components/framewizard/treenode.h +++ b/quanta/components/framewizard/treenode.h @@ -18,9 +18,9 @@ #ifndef TREENODE_H #define TREENODE_H -#include -#include -#include +#include +#include +#include #include "fwglobal.h" #include "areaattributedb.h" @@ -30,34 +30,34 @@ */ class treeNode { private: - QString m_label, + TQString m_label, m_parentLabel; SplitType m_splitType; - QPtrList m_childrenList; + TQPtrList m_childrenList; areaAttribute *m_atts; public: - treeNode(const QString &l=QString::null, const QString &pl=QString::null); + treeNode(const TQString &l=TQString::null, const TQString &pl=TQString::null); ~treeNode(); - void addChildNode(const QString &L); + void addChildNode(const TQString &L); void addChildNode(treeNode *n){ m_childrenList.append(n); } - void removeChildNode(const QString &l, bool autoDelete); + void removeChildNode(const TQString &l, bool autoDelete); void setSplitType(SplitType s) { m_splitType = s; } - void setLabel(const QString &l) { m_label = l; } + void setLabel(const TQString &l) { m_label = l; } void removeChildren() { m_childrenList.clear(); } - void setParentLabel(const QString &s){ m_parentLabel = s;} + void setParentLabel(const TQString &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; } + TQString label() const { return m_label; } + TQString parentLabel() const { return m_parentLabel; } SplitType splitType() const { return m_splitType; } - QPtrList childrenList() { return m_childrenList; } + TQPtrList 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); + treeNode* findChild(const TQString &L); areaAttribute* atts() { return m_atts; } @@ -68,18 +68,18 @@ class treeNode { class tree{ private: treeNode *m_root; - QDict m_nodeList; + TQDict 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(); }; + TQString addChildNode(const TQString &l); + bool insertChildNode(const TQString &L); + void removeChildNode(const TQString &pl,const TQString &l,bool autoDelete);//parent node,child node + treeNode* findNode(const TQString &L); + areaAttribute* findAreaAttribute(const TQString &l){ return findNode(l)->atts(); }; void reset(); void refreshGeometries(treeNode*); }; diff --git a/quanta/components/framewizard/visualframeeditor.cpp b/quanta/components/framewizard/visualframeeditor.cpp index 3871ac61..db52da97 100644 --- a/quanta/components/framewizard/visualframeeditor.cpp +++ b/quanta/components/framewizard/visualframeeditor.cpp @@ -17,8 +17,8 @@ #include "visualframeeditor.h" -#include -#include +#include +#include //#include #include "qextfileinfo.h" @@ -28,13 +28,13 @@ static int cancelledPixels(int n){ return (n-1)*6; } -QMap > SIZES; +TQMap > SIZES; static int splitterIdNumber = 0; -VisualFrameEditor::VisualFrameEditor(QWidget * parent, const char * name) : QHBox(parent,name){ +VisualFrameEditor::VisualFrameEditor(TQWidget * parent, const char * name) : TQHBox(parent,name){ m_internalTree = new tree; - m_internalTree->root()->atts()->setGeometry(QRect(0,0,510,422)); + m_internalTree->root()->atts()->setGeometry(TQRect(0,0,510,422)); m_firstInsertedSA = 0L; m_markupLanguage = HTML; } @@ -44,11 +44,11 @@ VisualFrameEditor::~VisualFrameEditor(){ delete m_firstInsertedSA; } -void VisualFrameEditor::setGeometries(const QString &l){ +void VisualFrameEditor::setGeometries(const TQString &l){ int cP = cancelledPixels(m_internalTree->findNode(l)->countChildren()); - QRect newGeometry(m_internalTree->findNode(l)->atts()->geometry()); - QPtrList list=m_internalTree->findNode(l)->childrenList(); - QPtrListIterator it( list ); + TQRect newGeometry(m_internalTree->findNode(l)->atts()->geometry()); + TQPtrList list=m_internalTree->findNode(l)->childrenList(); + TQPtrListIterator it( list ); treeNode *node; if(m_internalTree->findNode(l)->splitType() == VERTICAL){ int dummyDimension=m_internalTree->findNode(l)->atts()->geometry().width()-cP; @@ -69,14 +69,14 @@ void VisualFrameEditor::setGeometries(const QString &l){ } } -void VisualFrameEditor::split(const QString &l, int n, SplitType type) { +void VisualFrameEditor::split(const TQString &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(); + TQString parentLabel=m_internalTree->findNode(l)->parentLabel(); SplitType parentSplit=m_internalTree->findNode(parentLabel)->splitType(); if( parentSplit != type ) { m_internalTree->findNode(l)->setSplitType(type); @@ -91,7 +91,7 @@ void VisualFrameEditor::split(const QString &l, int n, SplitType type) { } } -void VisualFrameEditor::loadExistingStructure(const QStringList &list){ +void VisualFrameEditor::loadExistingStructure(const TQStringList &list){ if(!list.isEmpty()) { m_existingStructure = list; m_existingStructure.remove("");//closure tag not needed @@ -99,8 +99,8 @@ void VisualFrameEditor::loadExistingStructure(const QStringList &list){ } } -QStringList VisualFrameEditor::convertAsterisks(const QString &s,int d){ - QStringList list=QStringList::split(",",s); +TQStringList VisualFrameEditor::convertAsterisks(const TQString &s,int d){ + TQStringList list=TQStringList::split(",",s); int leftPercentage = 100; int leftPercentageDistributedAmongAsterisks=0; int weightAsteriskCounter=0; @@ -108,7 +108,7 @@ QStringList VisualFrameEditor::convertAsterisks(const QString &s,int d){ // 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 ) { + for ( TQStringList::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("*")) { @@ -124,38 +124,38 @@ QStringList VisualFrameEditor::convertAsterisks(const QString &s,int d){ // 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 ) { + for ( TQStringList::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)+"%"); + (*it)=(TQString::number(newPercentage,10)+"%"); leftPercentage-=newPercentage; } } return list; } -void VisualFrameEditor::buildInternalTree(const QString &parent){ - QString line = m_existingStructure.first(); +void VisualFrameEditor::buildInternalTree(const TQString &parent){ + TQString line = m_existingStructure.first(); if(line.contains("findNode(parent)->atts()->geometry(); - QStringList percentages = convertAsterisks(pattern.cap(1),dummy.height()); + TQRect dummy=m_internalTree->findNode(parent)->atts()->geometry(); + TQStringList percentages = convertAsterisks(pattern.cap(1),dummy.height()); int dummyDimension=dummy.height()-cancelledPixels(line.contains(",")+1); - QPtrList list=m_internalTree->findNode(parent)->childrenList(); - QPtrListIterator it( list ); + TQPtrList list=m_internalTree->findNode(parent)->childrenList(); + TQPtrListIterator it( list ); treeNode *node; while ( (node = it.current()) != 0 ) { ++it; - QRect newGeometry(dummy); + TQRect newGeometry(dummy); double newDimension; if(percentages.first().contains("%")) newDimension=(dummyDimension*(percentages.first().remove("%").toInt()))/100.0; @@ -168,20 +168,20 @@ void VisualFrameEditor::buildInternalTree(const QString &parent){ else if(line.contains("cols")) { split(parent,(line.contains(",")+1),VERTICAL); - QRegExp pattern("cols\\s*=\"([\\s\\d%,\\*]*)\""); + TQRegExp pattern("cols\\s*=\"([\\s\\d%,\\*]*)\""); pattern.search(line); - QRect dummy=m_internalTree->findNode(parent)->atts()->geometry(); - QStringList percentages = convertAsterisks(pattern.cap(1),dummy.width()); + TQRect dummy=m_internalTree->findNode(parent)->atts()->geometry(); + TQStringList percentages = convertAsterisks(pattern.cap(1),dummy.width()); int dummyDimension=dummy.width()-cancelledPixels(line.contains(",")+1); - QPtrList list=m_internalTree->findNode(parent)->childrenList(); - QPtrListIterator it( list ); + TQPtrList list=m_internalTree->findNode(parent)->childrenList(); + TQPtrListIterator it( list ); treeNode *node; while ( (node = it.current()) != 0 ) { ++it; - QRect newGeometry(dummy); + TQRect newGeometry(dummy); double newDimension; if(percentages.first().contains("%")) newDimension=(dummyDimension*(percentages.first().remove("%").toInt()))/100.0; @@ -200,11 +200,11 @@ void VisualFrameEditor::buildInternalTree(const QString &parent){ } } else { - QMap attributeMap; - if( line.contains( QRegExp("\\s+noresize") ) ) attributeMap["noresize"] = "noresize"; - else attributeMap["noresize"] = QString::null; + TQMap attributeMap; + if( line.contains( TQRegExp("\\s+noresize") ) ) attributeMap["noresize"] = "noresize"; + else attributeMap["noresize"] = TQString::null; - QRegExp srcPattern("\\s+src\\s*=\\s*\"([%-\\w\\s\\./_\\+\\d]*)\""); //search for files + TQRegExp srcPattern("\\s+src\\s*=\\s*\"([%-\\w\\s\\./_\\+\\d]*)\""); //search for files if(srcPattern.search(line) !=-1 ) { KURL pathToConvert, basePath; pathToConvert.setPath(srcPattern.cap(1)); @@ -213,12 +213,12 @@ void VisualFrameEditor::buildInternalTree(const QString &parent){ line.remove(srcPattern);//we don't need to operate on this anymore } - QRegExp pattern("\\s+(\\w+\\s*=\\s*\"[\\w\\s\\./_\\+\\d]*\")"); + TQRegExp 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("\""); + attributeMap[ pattern.cap(1).section( TQRegExp("=\\s*\"") ,0,0) ] = pattern.cap(1).section(TQRegExp("=\\s*\""),1,1).remove("\""); if ( pos >= 0 ) pos += pattern.matchedLength(); } m_internalTree->findNode(parent)->atts()->setAllAttributes(attributeMap); @@ -226,14 +226,14 @@ void VisualFrameEditor::buildInternalTree(const QString &parent){ } } -void VisualFrameEditor::paintEvent ( QPaintEvent * ){ +void VisualFrameEditor::paintEvent ( TQPaintEvent * ){ hide(); delete m_firstInsertedSA; m_firstInsertedSA = 0L; - QObjectList* splitterList = queryList("QSplitter"); + TQObjectList* splitterList = queryList("TQSplitter"); for (uint i = 0; i < splitterList->count(); i++) { - QObject* o = splitterList->at(i); + TQObject* o = splitterList->at(i); removeChild(o); //this will delete all childr of "o" } @@ -243,24 +243,24 @@ void VisualFrameEditor::paintEvent ( QPaintEvent * ){ show(); } -void VisualFrameEditor::removeNode(const QString &l){ +void VisualFrameEditor::removeNode(const TQString &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(); + TQString parentLabel=m_internalTree->findNode(l)->parentLabel(); if(m_internalTree->findNode(parentLabel)->countChildren()>=3) m_internalTree->removeChildNode(parentLabel,l,true); else { m_internalTree->removeChildNode(parentLabel,l,true); if( !m_internalTree->findNode(parentLabel)->firstChild()->hasChildren() ){ //final nodes - QMap map = m_internalTree->findNode(parentLabel)->firstChild()->atts()->attributeMap(); + TQMap map = m_internalTree->findNode(parentLabel)->firstChild()->atts()->attributeMap(); m_internalTree->findNode(parentLabel)->removeChildren(); m_internalTree->findNode(parentLabel)->atts()->setAllAttributes( map ) ; m_internalTree->findNode(parentLabel)->setSplitType(NONE); } else { - QPtrList list = m_internalTree->findNode(parentLabel)->firstChild()->childrenList(); + TQPtrList list = m_internalTree->findNode(parentLabel)->firstChild()->childrenList(); if( parentLabel != m_internalTree->root()->label() ) { - QString grandParentLabel = m_internalTree->findNode(parentLabel)->parentLabel(); + TQString 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; @@ -283,14 +283,14 @@ void VisualFrameEditor::removeNode(const QString &l){ } } -void VisualFrameEditor::drawGUI(treeNode *n, QWidget* parent){ +void VisualFrameEditor::drawGUI(treeNode *n, TQWidget* parent){ if(n->hasChildren()) { - QString splitterName("splitter"+QString::number(++splitterIdNumber,10)); - QSplitter *splitter = new QSplitter(parent,splitterName); + TQString splitterName("splitter"+TQString::number(++splitterIdNumber,10)); + TQSplitter *splitter = new TQSplitter(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; + case VERTICAL : splitter->setOrientation(TQSplitter::Horizontal);break; + case HORIZONTAL : splitter->setOrientation(TQSplitter::Vertical);break; default:break; } n->firstChild(); @@ -301,19 +301,19 @@ void VisualFrameEditor::drawGUI(treeNode *n, QWidget* parent){ } else { SelectableArea *sa=new SelectableArea(parent,n->label()); - if(parent->isA("QSplitter")) dynamic_cast(parent)->setResizeMode(sa->view(),QSplitter::KeepSize ); + if(parent->isA("TQSplitter")) dynamic_cast(parent)->setResizeMode(sa->view(),TQSplitter::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 &))); + connect(sa, TQT_SIGNAL(Resized(TQRect)), m_internalTree->findNode(sa->idLabel())->atts(), TQT_SLOT(setGeometry(TQRect))); + connect(sa, TQT_SIGNAL(selected(const TQString &)),this, TQT_SIGNAL(areaSelected(const TQString &))); } } -QString VisualFrameEditor::createFrameTag(areaAttribute *a){ - QString Src(a->attributeValue("src")), +TQString VisualFrameEditor::createFrameTag(areaAttribute *a){ + TQString Src(a->attributeValue("src")), Longdesc(a->attributeValue("longdesc")), Name(a->attributeValue("name")), Scrolling(a->attributeValue("scrolling")), @@ -326,7 +326,7 @@ QString VisualFrameEditor::createFrameTag(areaAttribute *a){ Marginwidth(a->attributeValue("marginwidth")), Marginheight(a->attributeValue("marginheight")); - QString tagBegin=" dimMap; +TQString VisualFrameEditor::RCvalue(treeNode *n) { + TQString s; + TQMap dimMap; double percentage = 100.0; int remainingPercentage=100; int child_number = n->countChildren(); @@ -390,14 +390,14 @@ QString VisualFrameEditor::RCvalue(treeNode *n) { for(int i=1;i<=child_number-1;++i) { remainingPercentage-=proxInt(dimMap[i]*percentage); - s+=QString::number(proxInt(dimMap[i]*percentage),10); + s+=TQString::number(proxInt(dimMap[i]*percentage),10); s+="%,"; } - return s+=(QString::number(remainingPercentage,10)+"%"); + return s+=(TQString::number(remainingPercentage,10)+"%"); } -static QStringList nonFormattedStructure; +static TQStringList nonFormattedStructure; void VisualFrameEditor::createStructure(treeNode* n){ if(n==m_internalTree->root() && !n->hasChildren()) return; @@ -417,10 +417,10 @@ void VisualFrameEditor::createStructure(treeNode* n){ else nonFormattedStructure.append(createFrameTag(n->atts())); } -QString VisualFrameEditor::formatStructure(){ - QString s; +TQString VisualFrameEditor::formatStructure(){ + TQString s; int tabNum = 0; - for ( QStringList::Iterator it = nonFormattedStructure.begin(); it != nonFormattedStructure.end(); ++it ) { + for ( TQStringList::Iterator it = nonFormattedStructure.begin(); it != nonFormattedStructure.end(); ++it ) { if((*it).contains("")) { @@ -434,13 +434,13 @@ QString VisualFrameEditor::formatStructure(){ return s; } -QString VisualFrameEditor::framesetStructure() { +TQString VisualFrameEditor::framesetStructure() { m_internalTree->refreshGeometries(m_internalTree->root()); createStructure(m_internalTree->root()); return formatStructure(); } -void VisualFrameEditor::setMarkupLanguage(const QString& s){ +void VisualFrameEditor::setMarkupLanguage(const TQString& s){ if( s.contains("xhtml",false)!=0 ) m_markupLanguage = XHTML; else if( s.contains("html",false)!=0 ) m_markupLanguage = HTML; diff --git a/quanta/components/framewizard/visualframeeditor.h b/quanta/components/framewizard/visualframeeditor.h index 4924f3cb..27cef614 100644 --- a/quanta/components/framewizard/visualframeeditor.h +++ b/quanta/components/framewizard/visualframeeditor.h @@ -20,47 +20,47 @@ #include "treenode.h" #include "selectablearea.h" -#include +#include /** *@author gulmini luciano */ -class VisualFrameEditor : public QHBox { +class VisualFrameEditor : public TQHBox { Q_OBJECT private: enum MarkupLanguage{XHTML,HTML}; tree *m_internalTree; SelectableArea* m_firstInsertedSA; - QStringList m_existingStructure; + TQStringList 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); + void buildInternalTree(const TQString &parent); + void setGeometries(const TQString &l); + void drawGUI(treeNode *n, TQWidget* parent); + TQStringList convertAsterisks(const TQString &s, int d); - QString createFrameTag(areaAttribute *a); - QString formatStructure(); - QString RCvalue(treeNode *n); + TQString createFrameTag(areaAttribute *a); + TQString formatStructure(); + TQString RCvalue(treeNode *n); void createStructure(treeNode* n); public: - VisualFrameEditor( QWidget * parent = 0, const char * name = 0); + VisualFrameEditor( TQWidget * 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); + void loadExistingStructure(const TQStringList &list); + TQString framesetStructure(); + void removeNode(const TQString &l); + void split(const TQString &l, int n, SplitType type); + void setMarkupLanguage(const TQString& s); tree* internalTree() { return m_internalTree;} protected: - virtual void paintEvent ( QPaintEvent * ); + virtual void paintEvent ( TQPaintEvent * ); signals: - void areaSelected(const QString &); + void areaSelected(const TQString &); }; #endif diff --git a/quanta/components/tableeditor/tableeditor.cpp b/quanta/components/tableeditor/tableeditor.cpp index 970828a2..bb581859 100644 --- a/quanta/components/tableeditor/tableeditor.cpp +++ b/quanta/components/tableeditor/tableeditor.cpp @@ -25,16 +25,16 @@ #include //qt includes -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include //own includes #include "tagdialog.h" @@ -48,25 +48,25 @@ int newNum; -TableEditor::TableEditor(QWidget* parent, const char* name) +TableEditor::TableEditor(TQWidget* 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_cellEditId = m_popup->insertItem(i18n("&Edit Cell Properties"), this ,TQT_SLOT(slotEditCell())); + m_rowEditId = m_popup->insertItem(i18n("Edit &Row Properties"), this ,TQT_SLOT(slotEditRow())); + // m_colEditId = m_popup->insertItem(i18n("Edit &Column Properties"), this ,TQT_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_mergeCellsId = m_popup->insertItem(i18n("Merge Cells"), this, TQT_SLOT(slotMergeCells())); + m_unmergeCellsId = m_popup->insertItem(i18n("Break Merging"), this, TQT_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->insertItem(i18n("&Insert Row"), this, TQT_SLOT(slotInsertRow())); + m_popup->insertItem(i18n("Insert Co&lumn"), this, TQT_SLOT(slotInsertCol())); + m_popup->insertItem(i18n("Remove Row"), this, TQT_SLOT(slotRemoveRow())); + m_popup->insertItem(i18n("Remove Column"), this, TQT_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())); + m_popup->insertItem(i18n("Edit &Table Properties"), this, TQT_SLOT(slotEditTable())); + m_editChildId = m_popup->insertItem(i18n("Edit Child Table"), this, TQT_SLOT(slotEditChildTable())); buttonOk->setIconSet(SmallIconSet("button_ok")); buttonCancel->setIconSet(SmallIconSet("button_cancel")); @@ -79,38 +79,38 @@ TableEditor::TableEditor(QWidget* parent, const char* name) m_table = 0L; m_dtd = 0L; m_write = 0L; - m_tableDataTags = new QValueList >; - m_tableHeaderTags = new QValueList >; - m_tableFooterTags = new QValueList >; + m_tableDataTags = new TQValueList >; + m_tableHeaderTags = new TQValueList >; + m_tableFooterTags = new TQValueList >; m_tableTags = 0L; - m_tableDataRows = new QValueList; - m_tableHeaderRows = new QValueList; - m_tableFooterRows = new QValueList; + m_tableDataRows = new TQValueList; + m_tableHeaderRows = new TQValueList; + m_tableFooterRows = new TQValueList; 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))); + connect(headerColSpinBox, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(slotAddRemoveCol(int))); + connect(headerRowSpinBox, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(slotAddRemoveRow(int))); + connect(rowSpinBox, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(slotAddRemoveRow(int))); + connect(colSpinBox, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(slotAddRemoveCol(int))); + connect(footerRowSpinBox, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(slotAddRemoveRow(int))); + connect(footerColSpinBox, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(slotAddRemoveCol(int))); + connect(tableData, TQT_SIGNAL(contextMenuRequested(int,int,const TQPoint&)), + TQT_SLOT(slotContextMenuRequested(int,int,const TQPoint&))); + connect(pushButton7, TQT_SIGNAL(clicked()), TQT_SLOT(slotEditTable())); + connect(pushButton7_2, TQT_SIGNAL(clicked()), TQT_SLOT(slotEditTableBody())); + connect(pushButton7_3, TQT_SIGNAL(clicked()), TQT_SLOT(slotEditTableHeader())); + connect(pushButton7_4, TQT_SIGNAL(clicked()), TQT_SLOT(slotEditTableFooter())); + connect(headerTableData, TQT_SIGNAL(contextMenuRequested(int,int,const TQPoint&)), + TQT_SLOT(slotContextMenuRequested(int,int,const TQPoint&))); + connect(footerTableData, TQT_SIGNAL(contextMenuRequested(int,int,const TQPoint&)), + TQT_SLOT(slotContextMenuRequested(int,int,const TQPoint&))); + connect(tabWidget, TQT_SIGNAL(currentChanged(TQWidget*)), TQT_SLOT(slotTabChanged(TQWidget*))); + connect(buttonHelp, TQT_SIGNAL(clicked()), TQT_SLOT(slotHelpInvoked())); + connect(tableData, TQT_SIGNAL(valueChanged(int,int)), TQT_SLOT(slotEditCellText(int,int))); + connect(headerTableData, TQT_SIGNAL(valueChanged(int,int)), TQT_SLOT(slotEditCellText(int,int))); + connect(footerTableData, TQT_SIGNAL(valueChanged(int,int)), TQT_SLOT(slotEditCellText(int,int))); } TableEditor::~TableEditor() @@ -130,7 +130,7 @@ TableEditor::~TableEditor() kdDebug(24000) << "Undeleted new: " << newNum << endl; } -void TableEditor::slotContextMenuRequested( int row, int col, const QPoint & pos ) +void TableEditor::slotContextMenuRequested( int row, int col, const TQPoint & pos ) { m_row = row; m_col = col; @@ -149,9 +149,9 @@ void TableEditor::slotContextMenuRequested( int row, int col, const QPoint & pos 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())); + TQTableSelection selection = m_dataTable->selection(m_dataTable->currentSelection()); + TQRect rect(TQPoint(selection.topRow(), selection.leftCol()) , + TQPoint(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); @@ -257,8 +257,8 @@ bool TableEditor::setTableArea( int bLine, int bCol, int eLine, int eCol, Parser m_rowSpin = 0L; m_colSpin = 0L; m_dataTable = 0L; - QValueList tableRowTags; - QValueVector< QValueVector > mergeMatrix; + TQValueList tableRowTags; + TQValueVector< TQValueVector > mergeMatrix; mergeMatrix.resize(pInitialTableSize); for (uint i = 0; i < pInitialTableSize; i++) mergeMatrix[i].resize(pInitialTableSize); @@ -266,7 +266,7 @@ bool TableEditor::setTableArea( int bLine, int bCol, int eLine, int eCol, Parser Node *n = node; while (n != lastNode->nextSibling()) { - QString tagName = n->tag->name.lower(); + TQString tagName = n->tag->name.lower(); if (tagName == "table") { if (m_table && m_dataTable && nRow > 0 && nCol > 0) //nested table! @@ -283,7 +283,7 @@ bool TableEditor::setTableArea( int bLine, int bCol, int eLine, int eCol, Parser 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->item(nRow -1, nCol -1)->setPixmap(TQIconSet(UserIcon("quick_table")).pixmap()); m_dataTable->updateCell(nRow - 1, nCol - 1); } n = n->next; @@ -482,7 +482,7 @@ bool TableEditor::setTableArea( int bLine, int bCol, int eLine, int eCol, Parser tableNode.merged = false; tableRowTags.append(tableNode); } - QString colspanValue = n->tag->attributeValue("colspan", true); + TQString colspanValue = n->tag->attributeValue("colspan", true); int colValue = 1; int lastCol = nCol; if (!colspanValue.isEmpty()) @@ -510,7 +510,7 @@ bool TableEditor::setTableArea( int bLine, int bCol, int eLine, int eCol, Parser } else colValue = 1; } - QString rowspanValue = n->tag->attributeValue("rowspan", true); + TQString rowspanValue = n->tag->attributeValue("rowspan", true); if (!rowspanValue.isEmpty()) { bool ok; @@ -602,7 +602,7 @@ void TableEditor::slotEditTableFooter() } -void TableEditor::slotTabChanged( QWidget *w) +void TableEditor::slotTabChanged( TQWidget *w) { int i = tabWidget->indexOf(w); switch (i) @@ -636,9 +636,9 @@ void TableEditor::slotTabChanged( QWidget *w) } -QString TableEditor::readModifiedTable() +TQString TableEditor::readModifiedTable() { - QString tableString; + TQString tableString; tableString = m_table->toString(); if (!captionText->text().isEmpty()) { tableString += indent(2); @@ -646,7 +646,7 @@ QString TableEditor::readModifiedTable() tableString += captionText->text(); tableString += ""; } - for (QValueList::Iterator it = m_colTags.begin(); it != m_colTags.end(); ++it) { + for (TQValueList::Iterator it = m_colTags.begin(); it != m_colTags.end(); ++it) { tableString += indent(2); tableString += (*it)->toString(); } @@ -701,23 +701,23 @@ QString TableEditor::readModifiedTable() } -QString TableEditor::indent( int n ) +TQString TableEditor::indent( int n ) { - QString str; + TQString str; str.fill(' ', n); str.prepend('\n'); return str; } -QString TableEditor::cellValue( int row, int col ) +TQString TableEditor::cellValue( int row, int col ) { if (!m_dataTable) - return QString::null; - QString str; + return TQString::null; + TQString str; Node *node = (*m_tableTags)[row][col].node; if (!node) - return QString::null; + return TQString::null; str = node->tag->toString(); str += m_dataTable->text(row, col); str += "tag->name) + ">"; @@ -725,9 +725,9 @@ QString TableEditor::cellValue( int row, int col ) } -QString TableEditor::tableToString() +TQString TableEditor::tableToString() { - QString tableStr; + TQString tableStr; for (int i = 0; i < m_dataTable->numRows(); i++) { tableStr += indent(4); Node *node = (*m_tableRows)[i].node; @@ -755,11 +755,11 @@ QString TableEditor::tableToString() } -QString TableEditor::tagContent(Node *node) +TQString TableEditor::tagContent(Node *node) { if (!node) - return QString::null; - QString content; + return TQString::null; + TQString content; int bl, bc, el, ec; node->tag->endPos(bl, bc); bc++; @@ -775,7 +775,7 @@ QString TableEditor::tagContent(Node *node) n->tag->beginPos(el, ec); ec--; } else { - return QString::null; + return TQString::null; } } content = m_write->text(bl, bc, el, ec); @@ -798,12 +798,12 @@ void TableEditor::slotInsertRow() tableNode.node->tag = new Tag(); tableNode.node->tag->setDtd(m_dtd); tableNode.node->tag->parse("", m_write); - QValueList::Iterator rowIt = m_tableRows->at(num); + TQValueList::Iterator rowIt = m_tableRows->at(num); if (rowIt != m_tableRows->end()) m_tableRows->insert(rowIt, tableNode); else m_tableRows->append(tableNode); - QValueList tableRowTags; + TQValueList tableRowTags; for (int i = 0; i < m_dataTable->numCols(); i++) { tableNode.merged = false; tableNode.node = new Node(0L); @@ -818,7 +818,7 @@ void TableEditor::slotInsertRow() tableRowTags.append(tableNode); setCellText(m_dataTable, num, i, ""); } - QValueList >::Iterator it = m_tableTags->at(num); + TQValueList >::Iterator it = m_tableTags->at(num); if (it != m_tableTags->end()) m_tableTags->insert(it, tableRowTags); else @@ -838,7 +838,7 @@ void TableEditor::slotInsertCol() if (m_createNodes) { TableNode tableNode; int i = 0; - for (QValueList >::Iterator it = m_tableTags->begin(); it != m_tableTags->end(); ++it) { + for (TQValueList >::Iterator it = m_tableTags->begin(); it != m_tableTags->end(); ++it) { tableNode.merged = false; tableNode.node = new Node(0L); newNum++; @@ -899,9 +899,9 @@ void TableEditor::slotRemoveRow() m_row = m_dataTable->numRows() - 1; int i = 0; int j = 0; - for (QValueList >::Iterator it = m_tableTags->begin(); it != m_tableTags->end(); ++it) { + for (TQValueList >::Iterator it = m_tableTags->begin(); it != m_tableTags->end(); ++it) { j = 0; - for (QValueList::Iterator it2 = (*it).begin(); it2 != (*it).end(); ++it2) { + for (TQValueList::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)); @@ -913,9 +913,9 @@ void TableEditor::slotRemoveRow() } i++; } - QValueList updatedMainNodes; - QValueList >::Iterator it2 = m_tableTags->at(m_row); - for (QValueList::Iterator it3 = (*it2).begin(); it3 != (*it2).end(); ++it3) { + TQValueList updatedMainNodes; + TQValueList >::Iterator it2 = m_tableTags->at(m_row); + for (TQValueList::Iterator it3 = (*it2).begin(); it3 != (*it2).end(); ++it3) { if ((*it3).merged) { TableNode *mainTableNode = &((*m_tableTags)[(*it3).mergedRow][(*it3).mergedCol]); @@ -924,7 +924,7 @@ void TableEditor::slotRemoveRow() int rowspan = mainTableNode->node->tag->attributeValue("rowspan", true).toInt(); rowspan--; if (rowspan > 1) - mainTableNode->node->tag->editAttribute("rowspan", QString("%1").arg(rowspan)); + mainTableNode->node->tag->editAttribute("rowspan", TQString("%1").arg(rowspan)); else mainTableNode->node->tag->deleteAttribute("rowspan"); updatedMainNodes.append(mainTableNode); @@ -936,7 +936,7 @@ void TableEditor::slotRemoveRow() } m_tableTags->erase(it2); m_dataTable->removeRow(m_row); - QValueList::Iterator it = m_tableRows->at(m_row); + TQValueList::Iterator it = m_tableRows->at(m_row); Node::deleteNode((*it).node); newNum--; m_tableRows->erase(it); @@ -948,9 +948,9 @@ void TableEditor::slotRemoveCol() { int i = 0; int j = 0; - for (QValueList >::Iterator it = m_tableTags->begin(); it != m_tableTags->end(); ++it) { + for (TQValueList >::Iterator it = m_tableTags->begin(); it != m_tableTags->end(); ++it) { j = 0; - for (QValueList::Iterator it2 = (*it).begin(); it2 != (*it).end(); ++it2) { + for (TQValueList::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)); @@ -964,9 +964,9 @@ void TableEditor::slotRemoveCol() } if (m_col == -1) m_col = m_dataTable->numCols() - 1; - QValueList updatedMainNodes; - for (QValueList >::Iterator it = m_tableTags->begin(); it != m_tableTags->end(); ++it) { - QValueList::Iterator it2 = (*it).at(m_col); + TQValueList updatedMainNodes; + for (TQValueList >::Iterator it = m_tableTags->begin(); it != m_tableTags->end(); ++it) { + TQValueList::Iterator it2 = (*it).at(m_col); if ((*it2).merged) { TableNode *mainTableNode = &((*m_tableTags)[(*it2).mergedRow][(*it2).mergedCol]); @@ -975,7 +975,7 @@ void TableEditor::slotRemoveCol() int colspan = mainTableNode->node->tag->attributeValue("colspan", true).toInt(); colspan--; if (colspan > 1) - mainTableNode->node->tag->editAttribute("colspan", QString("%1").arg(colspan)); + mainTableNode->node->tag->editAttribute("colspan", TQString("%1").arg(colspan)); else mainTableNode->node->tag->deleteAttribute("colspan"); updatedMainNodes.append(mainTableNode); @@ -1018,9 +1018,9 @@ void TableEditor::createNewTable(Document *write, const DTDStruct *dtd) } -void TableEditor::deleteList( QValueList *table ) +void TableEditor::deleteList( TQValueList *table ) { - for (QValueList::Iterator it = table->begin(); it != table->end(); ++it) { + for (TQValueList::Iterator it = table->begin(); it != table->end(); ++it) { Node::deleteNode((*it).node); newNum--; } @@ -1029,10 +1029,10 @@ void TableEditor::deleteList( QValueList *table ) } -void TableEditor::deleteMatrix( QValueList > *matrix ) +void TableEditor::deleteMatrix( TQValueList > *matrix ) { - for (QValueList >::Iterator it = matrix->begin(); it != matrix->end(); ++it) { - for (QValueList::Iterator it2 = (*it).begin(); it2 != (*it).end(); ++it2) { + for (TQValueList >::Iterator it = matrix->begin(); it != matrix->end(); ++it) { + for (TQValueList::Iterator it2 = (*it).begin(); it2 != (*it).end(); ++it2) { Node::deleteNode((*it2).node); newNum--; } @@ -1046,7 +1046,7 @@ void TableEditor::slotMergeCells() { slotUnmergeCells(); //first unmerge all cells from the selection - QTableSelection selection = m_dataTable->selection(m_dataTable->currentSelection()); + TQTableSelection selection = m_dataTable->selection(m_dataTable->currentSelection()); int tRow, bRow, lCol, rCol; tRow = selection.topRow(); bRow = selection.bottomRow(); @@ -1054,9 +1054,9 @@ void TableEditor::slotMergeCells() rCol = selection.rightCol(); TableNode *mainTableNode = &((*m_tableTags)[tRow][lCol]); if (rCol - lCol > 0) - mainTableNode->node->tag->editAttribute("colspan", QString("%1").arg(rCol - lCol + 1)); + mainTableNode->node->tag->editAttribute("colspan", TQString("%1").arg(rCol - lCol + 1)); if (bRow - tRow > 0) - mainTableNode->node->tag->editAttribute("rowspan", QString("%1").arg(bRow - tRow + 1)); + mainTableNode->node->tag->editAttribute("rowspan", TQString("%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) { @@ -1080,7 +1080,7 @@ void TableEditor::slotUnmergeCells() int tRow, bRow, lCol, rCol; int selectionNum = m_dataTable->currentSelection(); if (selectionNum != -1) { - QTableSelection selection = m_dataTable->selection(selectionNum); + TQTableSelection selection = m_dataTable->selection(selectionNum); tRow = selection.topRow(); bRow = selection.bottomRow(); lCol = selection.leftCol(); @@ -1099,9 +1099,9 @@ void TableEditor::slotUnmergeCells() TableNode newTableNode; int i = 0; int j = 0; - for (QValueList >::Iterator it = m_tableTags->begin(); it != m_tableTags->end(); ++it) { + for (TQValueList >::Iterator it = m_tableTags->begin(); it != m_tableTags->end(); ++it) { j = 0; - QValueList::Iterator it2 = (*it).begin(); + TQValueList::Iterator it2 = (*it).begin(); while (it2 != (*it).end()) { if ((*it2).merged && tableNode.mergedRow == (*it2).mergedRow && @@ -1138,8 +1138,8 @@ void TableEditor::slotUnmergeCells() newTableNode.node = new Node(0L); newNum++; newTableNode.node->tag = new Tag(*(tmpNode.node->tag)); - QValueList >::Iterator iter1 = m_tableTags->at(tableNode.mergedRow); - QValueList::Iterator iter2 = (*iter1).at(tableNode.mergedCol); + TQValueList >::Iterator iter1 = m_tableTags->at(tableNode.mergedRow); + TQValueList::Iterator iter2 = (*iter1).at(tableNode.mergedCol); iter2 = (*iter1).erase(iter2); (*iter1).insert(iter2, newTableNode); Node::deleteNode(tmpNode.node); @@ -1153,16 +1153,16 @@ void TableEditor::slotEditChildTable() { bool tempDocCreated = false; bool error = false; - QValueList::Iterator errorIt; + TQValueList::Iterator errorIt; Parser *localParser = 0L; Document *w = 0L; Node *savedBaseNode = 0L; NestedTable table; - for (QValueList::Iterator it = m_nestedTables.begin(); it != m_nestedTables.end(); ++it) { + for (TQValueList::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); + TQString 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")); @@ -1174,7 +1174,7 @@ void TableEditor::slotEditChildTable() KTextEditor::Document *doc = KTextEditor::createDocument ("libkatepart", 0L, "KTextEditor::Document"); w = new Document(doc, 0L); - QString tableData = readModifiedTable(); + TQString 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(); @@ -1228,7 +1228,7 @@ void TableEditor::slotEditChildTable() //cleanup on error if (error) { m_nestedTables.erase(errorIt); - m_dataTable->item(table.row, table.col)->setPixmap(QPixmap()); + m_dataTable->item(table.row, table.col)->setPixmap(TQPixmap()); m_dataTable->updateCell(table.row, table.col); if (tempDocCreated) { Node::deleteNode(baseNode); @@ -1245,7 +1245,7 @@ void TableEditor::slotHelpInvoked() kapp->invokeHelp("table-editor","quanta"); } -void TableEditor::configureTable( QTable * table ) +void TableEditor::configureTable( TQTable * table ) { if (!table) return; @@ -1259,9 +1259,9 @@ void TableEditor::configureTable( QTable * table ) table->setRowMovingEnabled(true); } -void TableEditor::setCellText( QTable * table, int row, int col, const QString & text ) +void TableEditor::setCellText( TQTable * table, int row, int col, const TQString & text ) { - table->setItem(row, col, new TableItem(table, QTableItem::OnTyping, text)); + table->setItem(row, col, new TableItem(table, TQTableItem::OnTyping, text)); } void TableEditor::configureCell(int row, int col, Node * node) @@ -1273,7 +1273,7 @@ void TableEditor::configureCell(int row, int col, Node * node) item->setHeader(node->tag->name.lower() == "th"); // Horizontal alignment Qt::AlignmentFlags flags; - QString align = node->tag->attributeValue("align", true); + TQString align = node->tag->attributeValue("align", true); if (align == "right") flags = Qt::AlignRight; else if (align == "center") @@ -1286,7 +1286,7 @@ void TableEditor::configureCell(int row, int col, Node * node) flags = Qt::AlignLeft; item->setAlignment(flags); // Vertical alignment - QString valign = node->tag->attributeValue("valign", true); + TQString valign = node->tag->attributeValue("valign", true); if (valign == "top") flags = Qt::AlignTop; else if (valign == "bottom") diff --git a/quanta/components/tableeditor/tableeditor.h b/quanta/components/tableeditor/tableeditor.h index b1df7b48..15393b9c 100644 --- a/quanta/components/tableeditor/tableeditor.h +++ b/quanta/components/tableeditor/tableeditor.h @@ -16,7 +16,7 @@ #define TABLEEDITOR_H #include -#include +#include #include "tableeditors.h" #include "document.h" @@ -40,7 +40,7 @@ public: -typedef struct NestedTable{ Node *node; int row; int col; int bLine; int bCol; int eLine; int eCol; QString nestedData;}; +typedef struct NestedTable{ Node *node; int row; int col; int bLine; int bCol; int eLine; int eCol; TQString nestedData;}; class Parser; @@ -49,21 +49,21 @@ class TableEditor : public TableEditorS Q_OBJECT public: - TableEditor( QWidget* parent = 0, const char* name = 0 ); + TableEditor( TQWidget* 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 TQString 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 ); + virtual void configureTable( TQTable * table ); + virtual void setCellText( TQTable * table, int row, int col, const TQString & 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 slotContextMenuRequested( int row, int col, const TQPoint & pos ); virtual void slotEditCell(); // Wrapper for setText to use TableItem instead of QTableItem virtual void slotEditCellText( int r, int ); @@ -73,7 +73,7 @@ public slots: virtual void slotEditTableBody(); virtual void slotEditTableHeader(); virtual void slotEditTableFooter(); - virtual void slotTabChanged( QWidget * w ); + virtual void slotTabChanged( TQWidget * w ); virtual void slotInsertRow(); virtual void slotInsertCol(); virtual void slotAddRemoveRow( int num ); @@ -86,17 +86,17 @@ public slots: virtual void slotHelpInvoked(); protected: - QValueList m_colTags; + TQValueList m_colTags; int m_unmergeCellsId; int m_mergeSeparatorId; int m_mergeCellsId; bool m_createNodes; - QValueList > *m_tableTags; - QValueList > *m_tableFooterTags; - QValueList > *m_tableHeaderTags; - QValueList *m_tableFooterRows; - QValueList *m_tableHeaderRows; - QValueList *m_tableRows; + TQValueList > *m_tableTags; + TQValueList > *m_tableFooterTags; + TQValueList > *m_tableHeaderTags; + TQValueList *m_tableFooterRows; + TQValueList *m_tableHeaderRows; + TQValueList *m_tableRows; Document* m_write; Tag *m_table; Tag *m_tfoot; @@ -111,21 +111,21 @@ protected: KPopupMenu *m_popup; KURL m_baseURL; const DTDStruct *m_dtd; - QValueList > *m_tableDataTags; - QValueList *m_tableDataRows; - QTable *m_dataTable; - QSpinBox *m_rowSpin; - QSpinBox *m_colSpin; + TQValueList > *m_tableDataTags; + TQValueList *m_tableDataRows; + TQTable *m_dataTable; + TQSpinBox *m_rowSpin; + TQSpinBox *m_colSpin; int m_bLine, m_bCol, m_eLine, m_eCol; - QValueList m_nestedTables; + TQValueList m_nestedTables; int m_editChildId; - virtual QString indent( int n ); - virtual QString cellValue( int row, int col ); - virtual QString tableToString(); - virtual QString tagContent( Node * node ); - virtual void deleteList( QValueList * table ); - virtual void deleteMatrix( QValueList > * matrix ); + virtual TQString indent( int n ); + virtual TQString cellValue( int row, int col ); + virtual TQString tableToString(); + virtual TQString tagContent( Node * node ); + virtual void deleteList( TQValueList * table ); + virtual void deleteMatrix( TQValueList > * matrix ); }; diff --git a/quanta/components/tableeditor/tableitem.cpp b/quanta/components/tableeditor/tableitem.cpp index 96d7d37c..6d3da1ac 100644 --- a/quanta/components/tableeditor/tableitem.cpp +++ b/quanta/components/tableeditor/tableitem.cpp @@ -14,66 +14,66 @@ * * ***************************************************************************/ -#include -#include +#include +#include #include "tableitem.h" -TableItem::TableItem(QTable* table, EditType et) : QTableItem(table, et) +TableItem::TableItem(TQTable* table, EditType et) : TQTableItem(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) +TableItem::TableItem(TQTable* table, EditType et, const TQString& text) : TQTableItem(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) +TableItem::TableItem (TQTable* table, EditType et, const TQString& text, const TQPixmap& p) : + TQTableItem(table, et, text, p) { setReplaceable(false); m_halign = Qt::AlignLeft; m_valign = Qt::AlignVCenter; } -QWidget* TableItem::createEditor() const +TQWidget* TableItem::createEditor() const { - QTextEdit* Editor = new QTextEdit(table()->viewport()); - Editor->setTextFormat(QTextEdit::PlainText); - Editor->setHScrollBarMode(QScrollView::AlwaysOff); - Editor->setVScrollBarMode(QScrollView::AlwaysOff); + TQTextEdit* Editor = new TQTextEdit(table()->viewport()); + Editor->setTextFormat(TQTextEdit::PlainText); + Editor->setHScrollBarMode(TQScrollView::AlwaysOff); + Editor->setVScrollBarMode(TQScrollView::AlwaysOff); Editor->setBold(m_header); Editor->setText(text()); - QObject::connect(Editor, SIGNAL(textChanged()), table(), SLOT(doValueChanged())); + TQObject::connect(Editor, TQT_SIGNAL(textChanged()), table(), TQT_SLOT(doValueChanged())); return Editor; } -void TableItem::setContentFromEditor(QWidget *w) +void TableItem::setContentFromEditor(TQWidget *w) { - if (w->inherits( "QTextEdit" )) - setText(((QTextEdit*)w)->text()); + if (w->inherits( "TQTextEdit" )) + setText(((TQTextEdit*)w)->text()); else - QTableItem::setContentFromEditor(w); + TQTableItem::setContentFromEditor(w); } -void TableItem::paint(QPainter* p, const QColorGroup& cg, const QRect& cr, bool selected) +void TableItem::paint(TQPainter* p, const TQColorGroup& cg, const TQRect& cr, bool selected) { if (m_header) { - QFont editFont = p->font(); + TQFont editFont = p->font(); editFont.setBold(true); p->setFont(editFont); } - QRect cr0(0, 0, cr.width(), cr.height()); + TQRect cr0(0, 0, cr.width(), cr.height()); if (selected) { - p->fillRect(cr0, cg.brush(QColorGroup::Highlight)); + p->fillRect(cr0, cg.brush(TQColorGroup::Highlight)); p->setPen(cg.highlightedText()); } else { - p->fillRect(cr0, cg.brush(QColorGroup::Base)); + p->fillRect(cr0, cg.brush(TQColorGroup::Base)); p->setPen(cg.text()); } if (!pixmap().isNull()) { @@ -84,9 +84,9 @@ void TableItem::paint(QPainter* p, const QColorGroup& cg, const QRect& cr, bool p->drawText(4, 4, cr0.width()-8, cr0.height()-8, m_halign | m_valign | WordBreak, text()); } -QSize TableItem::sizeHint() const +TQSize TableItem::sizeHint() const { - QSize size = QTableItem::sizeHint(); + TQSize size = TQTableItem::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 index 1eff7f59..88c94e20 100644 --- a/quanta/components/tableeditor/tableitem.h +++ b/quanta/components/tableeditor/tableitem.h @@ -17,7 +17,7 @@ #ifndef TABLEITEM_H #define TABLEITEM_H -#include +#include #include class TableItem : public QTableItem @@ -28,17 +28,17 @@ private: 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; + TableItem(TQTable* table, EditType et); + TableItem(TQTable* table, EditType et, const TQString& text); + TableItem (TQTable* table, EditType et, const TQString& text, const TQPixmap& p); + // Use TQTextEdit instead of standard QLineEdit + virtual TQWidget* createEditor() const; // Get text from QTextEdit - virtual void setContentFromEditor(QWidget *w); + virtual void setContentFromEditor(TQWidget *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; + virtual void paint(TQPainter* p, const TQColorGroup& cg, const TQRect& cr, bool selected); + // Return A bit larger sizeHint because TQTextEdit has some margin around + virtual TQSize sizeHint() const; // Get and set vertical aligment Qt::AlignmentFlags vAlignment() {return m_valign;} void setVAlignment(Qt::AlignmentFlags flags) {m_valign = flags;} diff --git a/quanta/dialogs/actionconfigdialog.cpp b/quanta/dialogs/actionconfigdialog.cpp index 9a4cfb3d..a66f7499 100644 --- a/quanta/dialogs/actionconfigdialog.cpp +++ b/quanta/dialogs/actionconfigdialog.cpp @@ -13,16 +13,16 @@ ***************************************************************************/ //qt includes -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include //kde includes #include @@ -50,7 +50,7 @@ #include "tagaction.h" #include "toolbartabwidget.h" -ActionConfigDialog::ActionConfigDialog(const QDict &toolbarList, KMainWindow* parent, const char* name, bool modal, WFlags fl, const QString& defaultAction ) +ActionConfigDialog::ActionConfigDialog(const TQDict &toolbarList, KMainWindow* parent, const char* name, bool modal, WFlags fl, const TQString& defaultAction ) :ActionConfigDialogS( parent, name, modal, fl ) { m_mainWindow = parent; @@ -63,28 +63,28 @@ ActionConfigDialog::ActionConfigDialog(const QDict &toolbarList, K 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&))); + connect(actionTreeView, TQT_SIGNAL(contextMenu(KListView *,TQListViewItem *,const TQPoint &)), + TQT_SLOT(slotContextMenu(KListView *,TQListViewItem *,const TQPoint &))); + connect(actionTreeView, TQT_SIGNAL(selectionChanged(TQListViewItem *)), + TQT_SLOT(slotSelectionChanged(TQListViewItem *))); + connect(shortcutKeyButton, TQT_SIGNAL(capturedShortcut(const KShortcut &)), + TQT_SLOT(slotShortcutCaptured(const KShortcut &))); + connect(scriptPath, TQT_SIGNAL(activated(const TQString&)), + TQT_SLOT(slotTextChanged(const TQString&))); + connect(this, TQT_SIGNAL(addToolbar()), m_mainWindow, TQT_SLOT(slotAddToolbar())); + connect(this, TQT_SIGNAL(removeToolbar(const TQString&)), m_mainWindow, TQT_SLOT(slotRemoveToolbar(const TQString&))); + connect(this, TQT_SIGNAL(deleteUserAction(KAction*)), m_mainWindow, TQT_SLOT(slotDeleteAction(KAction*))); + connect(this, TQT_SIGNAL(configureToolbars(const TQString&)), m_mainWindow, TQT_SLOT(slotConfigureToolbars(const TQString&))); //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; + TQListViewItem *item, *oldItem = allActionsItem; KAction *action; - QString toolbarName; - QString toolbarId; + TQString toolbarName; + TQString toolbarId; ToolbarTabWidget *tb = ToolbarTabWidget::ref(); - QRegExp r("\\&(?!\\&)"); + TQRegExp r("\\&(?!\\&)"); KActionCollection *ac = m_mainWindow->actionCollection(); for (int i = 0; i < tb->count(); i++) { @@ -94,11 +94,11 @@ ActionConfigDialog::ActionConfigDialog(const QDict &toolbarList, K actionTreeView->insertItem(item); toolbarId = tb->id(i); - QListViewItem *oldActionItem = 0L; + TQListViewItem *oldActionItem = 0L; ToolbarEntry *p_toolbar = m_toolbarList[toolbarId]; if (p_toolbar) { - QDomNode node = p_toolbar->guiClient->domDocument().firstChild().firstChild().firstChild(); + TQDomNode node = p_toolbar->guiClient->domDocument().firstChild().firstChild().firstChild(); while (!node.isNull()) { if (node.nodeName() == "Action") @@ -122,7 +122,7 @@ ActionConfigDialog::ActionConfigDialog(const QDict &toolbarList, K actionTreeView->setCurrentItem(item->firstChild()); } else { - QListViewItem *actionItem = item->firstChild(); + TQListViewItem *actionItem = item->firstChild(); while (actionItem && actionItem->depth() > 0) { if (actionItem->text(0) == defaultAction || actionItem->text(0) == defaultAction + "...") @@ -148,9 +148,9 @@ ActionConfigDialog::ActionConfigDialog(const QDict &toolbarList, K 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())); + treeMenu->insertItem(i18n("&Add New Toolbar"), this, TQT_SLOT(slotAddToolbar())); + treeMenu->insertItem(i18n("&Remove Toolbar"), this, TQT_SLOT(slotRemoveToolbar())); + treeMenu->insertItem(i18n("&Edit Toolbar"), this, TQT_SLOT(slotEditToolbar())); globalShortcuts = KGlobal::config()->entryMap( "Global Shortcuts" ); } @@ -162,8 +162,8 @@ ActionConfigDialog::~ActionConfigDialog() void ActionConfigDialog::slotAddToolbar() { emit addToolbar(); - QString toolbarName; - QListViewItem *item; + TQString toolbarName; + TQListViewItem *item; ToolbarTabWidget *tb = ToolbarTabWidget::ref(); for (int i = 0; i < tb->count(); i++) { @@ -181,8 +181,8 @@ void ActionConfigDialog::slotAddToolbar() void ActionConfigDialog::slotRemoveToolbar() { - QListViewItem *item = actionTreeView->currentItem(); - QString s = item->text(0); + TQListViewItem *item = actionTreeView->currentItem(); + TQString s = item->text(0); if (item->parent()) { item = item->parent(); @@ -190,29 +190,29 @@ void ActionConfigDialog::slotRemoveToolbar() } 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 ) + if ( KMessageBox::warningContinueCancel(this, i18n("Do you really want to remove the \"%1\" toolbar?").arg(s),TQString::null,KStdGuiItem::del()) == KMessageBox::Continue ) { m_toolbarItem = item; - connect(m_mainWindow, SIGNAL(toolbarRemoved(const QString&)), SLOT(slotToolbarRemoved(const QString&))); + connect(m_mainWindow, TQT_SIGNAL(toolbarRemoved(const TQString&)), TQT_SLOT(slotToolbarRemoved(const TQString&))); emit removeToolbar(s.lower()); } } } -void ActionConfigDialog::slotToolbarRemoved(const QString &/*name*/) +void ActionConfigDialog::slotToolbarRemoved(const TQString &/*name*/) { actionTreeView->setCurrentItem(allActionsItem); delete m_toolbarItem; m_toolbarItem = 0L; - disconnect(m_mainWindow, SIGNAL(toolbarRemoved(const QString&)), this, SLOT(slotToolbarRemoved(const QString&))); + disconnect(m_mainWindow, TQT_SIGNAL(toolbarRemoved(const TQString&)), this, TQT_SLOT(slotToolbarRemoved(const TQString&))); } void ActionConfigDialog::slotEditToolbar() { - QString toolbarName; - QString toolbarId; - QListViewItem *oldItem; - QListViewItem *item = actionTreeView->currentItem(); + TQString toolbarName; + TQString toolbarId; + TQListViewItem *oldItem; + TQListViewItem *item = actionTreeView->currentItem(); if (item->parent()) item = item->parent(); toolbarName = item->text(0); @@ -235,7 +235,7 @@ void ActionConfigDialog::slotEditToolbar() item = new KListViewItem(actionTreeView, oldItem, toolbarName); item->setOpen(oldItem->isOpen()); delete oldItem; - QDomNode node = p_toolbar->guiClient->domDocument().firstChild().firstChild().firstChild(); + TQDomNode node = p_toolbar->guiClient->domDocument().firstChild().firstChild().firstChild(); while (!node.isNull()) { if (node.nodeName() == "Action") @@ -243,7 +243,7 @@ void ActionConfigDialog::slotEditToolbar() action = ac->action(node.toElement().attribute("name")); if (action) { - oldItem = new KListViewItem(item, oldItem, action->text().replace(QRegExp("\\&(?!\\&)"),""), action->shortcut().toString(), action->name()); + oldItem = new KListViewItem(item, oldItem, action->text().replace(TQRegExp("\\&(?!\\&)"),""), action->shortcut().toString(), action->name()); oldItem->setPixmap(0, SmallIcon(action->icon())); } } @@ -256,17 +256,17 @@ void ActionConfigDialog::slotEditToolbar() } } -void ActionConfigDialog::slotContextMenu(KListView *,QListViewItem *,const QPoint &point) +void ActionConfigDialog::slotContextMenu(KListView *,TQListViewItem *,const TQPoint &point) { treeMenu->popup(point); } -void ActionConfigDialog::slotSelectionChanged(QListViewItem *item) +void ActionConfigDialog::slotSelectionChanged(TQListViewItem *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 ) + KMessageBox::questionYesNo(this, i18n("Do you want to save the changes made to this action?"), TQString::null, KStdGuiItem::save(), KStdGuiItem::discard()) == KMessageBox::Yes ) { saveCurrentAction(); } @@ -282,7 +282,7 @@ void ActionConfigDialog::slotSelectionChanged(QListViewItem *item) for (uint i = 0; i < acCount; i++) { KAction *a = ac->action(i); - QString actionName = a->name(); + TQString actionName = a->name(); if (a && actionName == item->text(2) && a->inherits("TagAction")) { action = static_cast(a); @@ -300,20 +300,20 @@ void ActionConfigDialog::slotSelectionChanged(QListViewItem *item) if (action) { currentAction = action; - QDomElement el = action->data(); + TQDomElement el = action->data(); if ( el.hasAttribute("icon") ) { - QString s = el.attribute("icon"); - if (!QFileInfo(s).exists()) - s = QFileInfo(s).fileName(); + TQString s = el.attribute("icon"); + if (!TQFileInfo(s).exists()) + s = TQFileInfo(s).fileName(); actionIcon->setIcon(s); } - QString actionText = el.attribute("text"); - actionText.replace(QRegExp("\\&(?!\\&)"),""); + TQString actionText = el.attribute("text"); + actionText.replace(TQRegExp("\\&(?!\\&)"),""); lineText->setText(actionText); lineToolTip->setText( el.attribute("tooltip") ); selectedShortcut = action->shortcut(); - QString shortcutText = action->shortcut().toString(); + TQString shortcutText = action->shortcut().toString(); if (shortcutText.isEmpty()) { noShortcut->setChecked(true); @@ -332,12 +332,12 @@ void ActionConfigDialog::slotSelectionChanged(QListViewItem *item) ToolbarTabWidget *tb = ToolbarTabWidget::ref(); for (int i = 0; i < tb->count(); i++) { - QString toolbarName = tb->label(i); - QString toolbarId = tb->id(i); + TQString toolbarName = tb->label(i); + TQString toolbarId = tb->id(i); ToolbarEntry *p_toolbar = m_toolbarList[toolbarId]; if (p_toolbar) { - QDomNode node = p_toolbar->guiClient->domDocument().firstChild().firstChild().firstChild(); + TQDomNode node = p_toolbar->guiClient->domDocument().firstChild().firstChild().firstChild(); while (!node.isNull()) { if (node.nodeName() == "Action" && @@ -367,10 +367,10 @@ void ActionConfigDialog::slotSelectionChanged(QListViewItem *item) errorBox->setCurrentItem(5); textEdit->clear(); //set the detailed settings according to the type of the action - QString type = el.attribute("type", "tag"); + TQString type = el.attribute("type", "tag"); if (type == "tag") { - QDomElement eltag = el.namedItem("tag").toElement(); + TQDomElement eltag = el.namedItem("tag").toElement(); lineTag->setText( eltag.text() ); useActionDialog->setChecked(eltag.attribute("useDialog","false") == "true"); eltag = el.namedItem("xtag").toElement(); @@ -380,10 +380,10 @@ void ActionConfigDialog::slotSelectionChanged(QListViewItem *item) } else if (type == "script") { - QDomElement elScript = el.namedItem("script").toElement(); + TQDomElement elScript = el.namedItem("script").toElement(); scriptPath->setText( elScript.text() ); - QString s; + TQString s; s = elScript.attribute("input","none"); if (s == "current") { @@ -465,12 +465,12 @@ void ActionConfigDialog::slotSelectionChanged(QListViewItem *item) void ActionConfigDialog::saveCurrentAction() { static_cast(currentAction)->setModified(true); - QString s; - QDomElement el = static_cast(currentAction)->data(); + TQString s; + TQDomElement el = static_cast(currentAction)->data(); s = actionIcon->icon(); el.setAttribute("icon", s); currentAction->setIcon(s); - QString oldText = el.attribute("text"); + TQString oldText = el.attribute("text"); s = lineText->text(); s.replace('&', "&&"); el.setAttribute("text", s); @@ -491,8 +491,8 @@ void ActionConfigDialog::saveCurrentAction() //update the tree view - QListViewItem *listItem; - QListViewItemIterator it(actionTreeView); + TQListViewItem *listItem; + TQListViewItemIterator it(actionTreeView); while (it.current()) { listItem = it.current(); @@ -506,7 +506,7 @@ void ActionConfigDialog::saveCurrentAction() } //remove all the detailed settings - QDomElement item = el.namedItem("tag").toElement(); + TQDomElement item = el.namedItem("tag").toElement(); if ( !item.isNull() ) el.removeChild(item); item = el.namedItem("tag").toElement(); @@ -522,7 +522,7 @@ void ActionConfigDialog::saveCurrentAction() if ( !item.isNull() ) el.removeChild(item); //add the new detailed settings - QDomDocument document = QDomDocument(); + TQDomDocument document = TQDomDocument(); int type = typeCombo->currentItem(); switch (type) { @@ -611,13 +611,13 @@ void ActionConfigDialog::saveCurrentAction() ToolbarTabWidget *tb = ToolbarTabWidget::ref(); for (int i = 0; i < tb->count(); i++) { - QString toolbarName = tb->label(i); - QString toolbarId = tb->id(i); + TQString toolbarName = tb->label(i); + TQString 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(); + TQDomNode node = p_toolbar->guiClient->domDocument().firstChild().firstChild().firstChild(); bool placeOnToolbar = toolbarListBox->findItem(toolbarName, Qt::ExactMatch); while (!node.isNull()) { @@ -631,7 +631,7 @@ void ActionConfigDialog::saveCurrentAction() currentAction->unplug(tb->page(i)); currentAction->unplug(p_toolbar->menu); node.parentNode().removeChild(node); - QListViewItemIterator iter(actionTreeView); + TQListViewItemIterator iter(actionTreeView); while (iter.current()) { listItem = iter.current(); @@ -661,7 +661,7 @@ void ActionConfigDialog::saveCurrentAction() listItem = actionTreeView->findItem(toolbarName, 0); if (listItem) { - QListViewItem *after = listItem->firstChild(); + TQListViewItem *after = listItem->firstChild(); while ( after && (!after->nextSibling() || (after->nextSibling() && after->nextSibling()->depth()!=0 ) )) { if (after->text(2) == currentAction->name()) @@ -681,7 +681,7 @@ void ActionConfigDialog::saveCurrentAction() KXMLGUIFactory::saveConfigFile(p_toolbar->guiClient->domDocument(), p_toolbar->guiClient->xmlFile(), p_toolbar->guiClient->instance()); } - QWidget *toolBar = tb->page(i); + TQWidget *toolBar = tb->page(i); if (toolBar->minimumSizeHint().height() > 20) { toolBar->adjustSize(); @@ -696,23 +696,23 @@ void ActionConfigDialog::saveCurrentAction() void ActionConfigDialog::slotShortcutCaptured(const KShortcut &shortcut) { - QString shortcutText = shortcut.toString(); - QString shortcutText2; + TQString shortcutText = shortcut.toString(); + TQString shortcutText2; int pos = shortcutText.find(';'); if (pos != -1) { shortcutText2 = shortcutText.mid(pos + 1); shortcutText = shortcutText.left(pos); } - QString s = shortcutText; + TQString s = shortcutText; s.replace('+', "\\+"); - QRegExp shortcutRx("\\(" + s + "\\)|" + s + "$|" + s + ";"); + TQRegExp shortcutRx("\\(" + s + "\\)|" + s + "$|" + s + ";"); s = shortcutText2; s.replace('+', "\\+"); - QRegExp shortcutRx2("\\(" + s + "\\)|" + s + "$|" + s + ";"); - QString global; + TQRegExp shortcutRx2("\\(" + s + "\\)|" + s + "$|" + s + ";"); + TQString global; //check for conflicting global shortcuts - QMap::Iterator it; + TQMap::Iterator it; for ( it = globalShortcuts.begin(); it != globalShortcuts.end(); ++it ) { if (it.data().contains(shortcutRx)) @@ -730,8 +730,8 @@ void ActionConfigDialog::slotShortcutCaptured(const KShortcut &shortcut) if (global.isEmpty()) { - QPtrList clients = m_mainWindow->guiFactory()->clients(); - for( QPtrListIterator it( clients ); it.current(); ++it ) + TQPtrList clients = m_mainWindow->guiFactory()->clients(); + for( TQPtrListIterator it( clients ); it.current(); ++it ) { KActionCollection *ac = (*it)->actionCollection(); for (uint i = 0; i < ac->count(); i++) @@ -762,7 +762,7 @@ void ActionConfigDialog::slotShortcutCaptured(const KShortcut &shortcut) } else { global.replace('&',""); - QString s = i18n("The '%1' key combination has already been allocated " + TQString 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); @@ -779,22 +779,22 @@ void ActionConfigDialog::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 ) + if (buttonApply->isEnabled() && KMessageBox::questionYesNo(this, i18n("Do you want to save the changes made to this action?"), TQString::null, KStdGuiItem::save(), KStdGuiItem::discard()) == KMessageBox::Yes ) saveCurrentAction(); ActionConfigDialogS::reject(); } void ActionConfigDialog::slotNewAction() { - QDomDocument doc; - QDomElement el = doc.createElement("action"); + TQDomDocument doc; + TQDomElement el = doc.createElement("action"); el.setAttribute( "name", "user_"+KApplication::randomString(10) ); el.setAttribute( "icon", "ball" ); currentAction = new TagAction(&el, m_mainWindow); //add the actions to every toolbar xmlguiclient - QDictIterator it(m_toolbarList); + TQDictIterator it(m_toolbarList); while (it.current()) { it.current()->guiClient->actionCollection()->insert(currentAction); @@ -803,9 +803,9 @@ void ActionConfigDialog::slotNewAction() selectedShortcut = KShortcut(); static_cast(currentAction)->setModified(true); - QListViewItem *currentItem = actionTreeView->currentItem(); - QListViewItem *item = new KListViewItem(allActionsItem); - QString actionText = QString("Action_%1").arg(m_mainWindow->actionCollection()->count()); + TQListViewItem *currentItem = actionTreeView->currentItem(); + TQListViewItem *item = new KListViewItem(allActionsItem); + TQString actionText = TQString("Action_%1").arg(m_mainWindow->actionCollection()->count()); currentAction->setText(actionText); item->setText(2, currentAction->name()); item->setText(0, actionText); @@ -816,7 +816,7 @@ void ActionConfigDialog::slotNewAction() actionTreeView->setCurrentItem(item); } else { - QListViewItem *parentItem = currentItem->parent(); + TQListViewItem *parentItem = currentItem->parent(); if (!parentItem) parentItem = currentItem; @@ -838,14 +838,14 @@ void ActionConfigDialog::slotNewAction() void ActionConfigDialog::slotDeleteAction() { - if ( KMessageBox::warningContinueCancel(this, i18n("Removing the action removes all the references to it.\nAre you sure you want to remove the %1 action?").arg(currentAction->text()),QString::null,KStdGuiItem::del()) == KMessageBox::Continue ) + if ( KMessageBox::warningContinueCancel(this, i18n("Removing the action removes all the references to it.\nAre you sure you want to remove the %1 action?").arg(currentAction->text()),TQString::null,KStdGuiItem::del()) == KMessageBox::Continue ) { - QString actionName = currentAction->name(); + TQString actionName = currentAction->name(); emit deleteUserAction(currentAction); currentAction = 0L; //update the tree view - QListViewItem *listItem; - QListViewItemIterator it(actionTreeView); + TQListViewItem *listItem; + TQListViewItemIterator it(actionTreeView); while (it.current()) { listItem = it.current(); @@ -873,7 +873,7 @@ void ActionConfigDialog::slotAddContainerToolbar() ToolbarTabWidget *tb = ToolbarTabWidget::ref(); int i; - QStringList lst; + TQStringList lst; for (i = 0; i < tb->count(); i++) { if (!toolbarListBox->findItem(tb->label(i), Qt::ExactMatch)) @@ -883,7 +883,7 @@ void ActionConfigDialog::slotAddContainerToolbar() if (lst.count() > 0) { bool ok = false; - QString res = KInputDialog::getItem( + TQString res = KInputDialog::getItem( i18n( "Add Action to Toolbar" ), i18n( "Please select a toolbar:" ), lst, 0, false, &ok, this ); @@ -916,12 +916,12 @@ void ActionConfigDialog::slotTextChanged() buttonApply->setEnabled(true); } -void ActionConfigDialog::slotTextChanged(const QString&) +void ActionConfigDialog::slotTextChanged(const TQString&) { buttonApply->setEnabled(true); } -void ActionConfigDialog::createScriptAction(const QString& a_name, const QString& a_script) +void ActionConfigDialog::createScriptAction(const TQString& a_name, const TQString& a_script) { actionTreeView->setCurrentItem(allActionsItem); slotNewAction(); diff --git a/quanta/dialogs/actionconfigdialog.h b/quanta/dialogs/actionconfigdialog.h index f94ba67e..d58567ee 100644 --- a/quanta/dialogs/actionconfigdialog.h +++ b/quanta/dialogs/actionconfigdialog.h @@ -15,7 +15,7 @@ #ifndef ACTIONCONFIGDIALOG_H #define ACTIONCONFIGDIALOG_H -#include +#include #include "actionconfigdialogs.h" class QDomDocument; @@ -29,11 +29,11 @@ class KXMLGUIClient; typedef struct ToolbarEntry{ KXMLGUIClient *guiClient; - QDomDocument *dom; - QPopupMenu *menu; + TQDomDocument *dom; + TQPopupMenu *menu; KURL url; - QString name; - QString id; + TQString name; + TQString id; bool user; bool visible; bool nameModified; ///< True if the name of the toolbar was modified by Quanta on loading:" (n)" was added @@ -45,48 +45,48 @@ class ActionConfigDialog: public ActionConfigDialogS public: - ActionConfigDialog(const QDict &toolbarList, KMainWindow* parent = 0, const char* name = 0, bool modal = true, WFlags fl = 0 , const QString& defaultAction = QString::null); + ActionConfigDialog(const TQDict &toolbarList, KMainWindow* parent = 0, const char* name = 0, bool modal = true, WFlags fl = 0 , const TQString& defaultAction = TQString::null); ~ActionConfigDialog(); - void createScriptAction(const QString& a_name, const QString& a_script); + void createScriptAction(const TQString& a_name, const TQString& a_script); public slots: virtual void accept(); virtual void reject(); void slotToggled(bool); void slotTextChanged(); - void slotTextChanged(const QString&); + void slotTextChanged(const TQString&); void slotNewAction(); private slots: void slotAddToolbar(); void slotRemoveToolbar(); void slotEditToolbar(); - void slotContextMenu(KListView *,QListViewItem *,const QPoint &); - void slotSelectionChanged(QListViewItem *); + void slotContextMenu(KListView *,TQListViewItem *,const TQPoint &); + void slotSelectionChanged(TQListViewItem *); void slotShortcutCaptured(const KShortcut&); void slotDeleteAction(); void slotApply(); void slotAddContainerToolbar(); void slotRemoveContainerToolbar(); - void slotToolbarRemoved(const QString& toolbarName); + void slotToolbarRemoved(const TQString& toolbarName); signals: void addToolbar(); - void removeToolbar(const QString&); + void removeToolbar(const TQString&); void deleteUserAction(KAction *); - void configureToolbars(const QString&); + void configureToolbars(const TQString&); private: void saveCurrentAction(); KPopupMenu *treeMenu; KAction *currentAction; - QListViewItem *allActionsItem; - QMap globalShortcuts; + TQListViewItem *allActionsItem; + TQMap globalShortcuts; KShortcut selectedShortcut; KMainWindow *m_mainWindow; - QDict m_toolbarList; - QListViewItem *m_toolbarItem; + TQDict m_toolbarList; + TQListViewItem *m_toolbarItem; }; #endif diff --git a/quanta/dialogs/copyto.cpp b/quanta/dialogs/copyto.cpp index 429fa457..9f66cb11 100644 --- a/quanta/dialogs/copyto.cpp +++ b/quanta/dialogs/copyto.cpp @@ -63,10 +63,10 @@ KURL CopyTo::copy(const KURL& urlToCopy, const KURL& destination) destURL.adjustPath(1); KIO::CopyJob *job = KIO::copy(urlToCopy, destURL, true); - connect( job, SIGNAL(result( KIO::Job *)), - SLOT (slotResult( KIO::Job *))); + connect( job, TQT_SIGNAL(result( KIO::Job *)), + TQT_SLOT (slotResult( KIO::Job *))); - QString path = destURL.path(); + TQString path = destURL.path(); if (path != "." && path != "..") m_destList.append(destURL); } @@ -101,7 +101,7 @@ KURL::List CopyTo::copy(const KURL::List& sourceList, const KURL& destination ) KIO::UDSEntry entry; if (doCopy) { - QString path; + TQString path; for (uint i = 0; i < sourceList.count(); i++) { KURL srcURL = sourceList[i]; @@ -117,8 +117,8 @@ KURL::List CopyTo::copy(const KURL::List& sourceList, const KURL& destination ) } KIO::CopyJob *job = KIO::copy(sourceList, targetDirURL, true); - connect( job, SIGNAL(result( KIO::Job *)), - SLOT (slotResult( KIO::Job *))); + connect( job, TQT_SIGNAL(result( KIO::Job *)), + TQT_SLOT (slotResult( KIO::Job *))); } return m_destList; diff --git a/quanta/dialogs/dirtydlg.cpp b/quanta/dialogs/dirtydlg.cpp index ad9e408b..70d06c86 100644 --- a/quanta/dialogs/dirtydlg.cpp +++ b/quanta/dialogs/dirtydlg.cpp @@ -14,10 +14,10 @@ ***************************************************************************/ //qt includes -#include -#include -#include -#include +#include +#include +#include +#include //kde includes #include @@ -34,7 +34,7 @@ #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) +DirtyDlg::DirtyDlg(const TQString& srcName, const TQString& destName, bool createBackup, TQWidget *parent, const char *name ) : KDialogBase(parent, name, true, i18n("File Changed"), KDialogBase::Ok) { m_src.setPath(srcName); m_dest.setPath(destName); @@ -56,7 +56,7 @@ void DirtyDlg::slotOk() KProcess *proc = new KProcess(); *proc << "kompare" << m_src.path() << m_dest.path(); proc->start(); - connect(proc, SIGNAL(processExited(KProcess*)),SLOT(slotCompareDone(KProcess*))); + connect(proc, TQT_SIGNAL(processExited(KProcess*)),TQT_SLOT(slotCompareDone(KProcess*))); enableButton(KDialogBase::Ok, false); enableButton(KDialogBase::Cancel, false); } else @@ -88,8 +88,8 @@ void DirtyDlg::slotCompareDone(KProcess* proc) //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 *))); + connect( job, TQT_SIGNAL(result( KIO::Job *)), + TQT_SLOT (slotResult( KIO::Job *))); } @@ -101,7 +101,7 @@ void DirtyDlg::slotResult(KIO::Job *) } /** No descriptions */ -void DirtyDlg::closeEvent(QCloseEvent* ev) +void DirtyDlg::closeEvent(TQCloseEvent* ev) { if (m_busy) ev->ignore(); diff --git a/quanta/dialogs/dirtydlg.h b/quanta/dialogs/dirtydlg.h index 83d05339..4f71f64e 100644 --- a/quanta/dialogs/dirtydlg.h +++ b/quanta/dialogs/dirtydlg.h @@ -30,7 +30,7 @@ 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(const TQString& srcName, const TQString& destName, bool createBackup = false, TQWidget *parent=0, const char *name=0); ~DirtyDlg(); protected slots: // Protected slots @@ -41,7 +41,7 @@ protected slots: // Protected slots /** No descriptions */ void slotResult(KIO::Job *); /** No descriptions */ - virtual void closeEvent(QCloseEvent* ev); + virtual void closeEvent(TQCloseEvent* ev); protected: // Protected attributes KURL m_src; diff --git a/quanta/dialogs/dtepeditdlg.cpp b/quanta/dialogs/dtepeditdlg.cpp index c0bf4797..c2595716 100644 --- a/quanta/dialogs/dtepeditdlg.cpp +++ b/quanta/dialogs/dtepeditdlg.cpp @@ -13,13 +13,13 @@ * * ***************************************************************************/ -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include //kde includes @@ -40,7 +40,7 @@ #include "resource.h" #include "quantacommon.h" -DTEPEditDlg::DTEPEditDlg(const QString& descriptionFile, QWidget *parent, const char *name) +DTEPEditDlg::DTEPEditDlg(const TQString& descriptionFile, TQWidget *parent, const char *name) : DTEPEditDlgS(parent, name) { nameEdit->setFocus(); @@ -91,8 +91,8 @@ void DTEPEditDlg::readGeneral() 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()); + TQString inherits = m_config->readEntry("Inherits"); + TQStringList lst(DTDs::ref()->nameList()); inheritsCombo->insertStringList(lst); int idx = lst.findIndex(inherits); if (idx == -1) @@ -113,11 +113,11 @@ void DTEPEditDlg::readGeneral() void DTEPEditDlg::readPages() { int i = 1; - while (m_config->hasGroup(QString("Page%1").arg(i)) && i < 6) + while (m_config->hasGroup(TQString("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"); + m_config->setGroup(TQString("Page%1").arg(i)); + TQString title = m_config->readEntry("Title"); + TQString groups = m_config->readEntry("Groups"); if (i == 1) { enablePage1->setChecked(true); @@ -197,8 +197,8 @@ void DTEPEditDlg::readParserRules() void DTEPEditDlg::saveResult() { - QString targetFile = m_descriptionFile; - QFileInfo f(targetFile); + TQString targetFile = m_descriptionFile; + TQFileInfo f(targetFile); if (!f.isWritable()) { if (f.exists()) @@ -212,7 +212,7 @@ void DTEPEditDlg::saveResult() } if (!targetFile.isEmpty()) { - QFile f(targetFile); + TQFile f(targetFile); if (f.exists()) f.remove(); KConfig* newConfig = m_config->copyTo(targetFile); @@ -255,35 +255,35 @@ void DTEPEditDlg::writePages(KConfig *config) if (enablePage1->isChecked()) { num++; - config->setGroup(QString("Page%1").arg(num)); + config->setGroup(TQString("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)); + config->setGroup(TQString("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)); + config->setGroup(TQString("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)); + config->setGroup(TQString("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)); + config->setGroup(TQString("Page%1").arg(num)); writeEntry(config, "Title", pageTitleEdit5->text()); writeEntry(config, "Groups", groupsEdit5->text()); } @@ -343,10 +343,10 @@ void DTEPEditDlg::readStructures() int objectGroupId = m_config->readNumEntry("ObjectGroupIndex", -1); int i = 1; - while (m_config->hasGroup(QString("StructGroup_%1").arg(i))) + while (m_config->hasGroup(TQString("StructGroup_%1").arg(i))) { StructGroup group; - m_config->setGroup(QString("StructGroup_%1").arg(i)); + m_config->setGroup(TQString("StructGroup_%1").arg(i)); group.name = m_config->readEntry("Name"); group.noName = m_config->readEntry("No_Name"); group.icon = m_config->readEntry("Icon"); @@ -372,7 +372,7 @@ void DTEPEditDlg::readStructures() m_structGroups.append(group); i++; } - for (QValueList::ConstIterator it = m_structGroups.constBegin(); it != m_structGroups.constEnd(); ++it) + for (TQValueList::ConstIterator it = m_structGroups.constBegin(); it != m_structGroups.constEnd(); ++it) { structuresList->insertItem((*it).name); } @@ -384,10 +384,10 @@ void DTEPEditDlg::writeStructures(KConfig *config) config->writeEntry("StructGroupsCount", m_structGroups.count()); int i = 1; - for (QValueList::ConstIterator it = m_structGroups.constBegin(); it != m_structGroups.constEnd(); ++it) + for (TQValueList::ConstIterator it = m_structGroups.constBegin(); it != m_structGroups.constEnd(); ++it) { StructGroup group = *it; - config->setGroup(QString("StructGroup_%1").arg(i)); + config->setGroup(TQString("StructGroup_%1").arg(i)); writeEntry(config, "Name", group.name); writeEntry(config, "No_Name", group.noName); writeEntry(config, "Icon", group.icon); @@ -430,7 +430,7 @@ void DTEPEditDlg::writeStructures(KConfig *config) i++; } - for (QValueList::ConstIterator it = m_structGroups.constBegin(); it != m_structGroups.constEnd(); ++it) + for (TQValueList::ConstIterator it = m_structGroups.constBegin(); it != m_structGroups.constEnd(); ++it) { structuresList->insertItem((*it).name); } @@ -544,7 +544,7 @@ void DTEPEditDlg::slotDeleteStructGroup() } } -void DTEPEditDlg::writeEntry(KConfig *config, const QString &key, const QString &value) +void DTEPEditDlg::writeEntry(KConfig *config, const TQString &key, const TQString &value) { if (value.isEmpty()) config->deleteEntry(key); diff --git a/quanta/dialogs/dtepeditdlg.h b/quanta/dialogs/dtepeditdlg.h index 45bd3d6d..ed921a5a 100644 --- a/quanta/dialogs/dtepeditdlg.h +++ b/quanta/dialogs/dtepeditdlg.h @@ -17,7 +17,7 @@ #define DTEPEDITDLG_H //qt includes -#include +#include //own includes #include "dtepeditdlgs.h" @@ -30,22 +30,22 @@ class KConfig; class DTEPStructureEditDlgS; struct StructGroup { - QString name; /// m_structGroups; + TQWidget *m_pagesWidget; + TQValueList m_structGroups; }; #endif diff --git a/quanta/dialogs/filecombo.cpp b/quanta/dialogs/filecombo.cpp index 40415757..63fd1e58 100644 --- a/quanta/dialogs/filecombo.cpp +++ b/quanta/dialogs/filecombo.cpp @@ -16,9 +16,9 @@ ***************************************************************************/ // QT includes -#include -#include -#include +#include +#include +#include // KDE includes #include @@ -29,17 +29,17 @@ #include "filecombo.h" #include "qextfileinfo.h" -FileCombo::FileCombo(const KURL& a_baseURL, QWidget *parent, const char *name ) - :QWidget(parent,name) +FileCombo::FileCombo(const KURL& a_baseURL, TQWidget *parent, const char *name ) + :TQWidget(parent,name) { baseURL = a_baseURL; m_absolutePath = false; - QHBoxLayout *layout = new QHBoxLayout(this); + TQHBoxLayout *layout = new TQHBoxLayout(this); - combo = new QComboBox(true,this); + combo = new TQComboBox(true,this); combo->setEditable(true); - button = new QPushButton(this); + button = new TQPushButton(this); button ->setFixedSize(35,25); button ->setText(i18n("...")); @@ -47,21 +47,21 @@ FileCombo::FileCombo(const KURL& a_baseURL, QWidget *parent, const char *name ) 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&))); + connect( button, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotFileSelect()) ); + connect( combo, TQT_SIGNAL(activated(const TQString&)), TQT_SLOT(slotComboActivated(const TQString&))); + connect( combo, TQT_SIGNAL(textChanged(const TQString&)), TQT_SLOT(slotComboActivated(const TQString&))); setFocusProxy(combo); } -FileCombo::FileCombo( QWidget *parent, const char *name ) - :QWidget( parent, name ) +FileCombo::FileCombo( TQWidget *parent, const char *name ) + :TQWidget( parent, name ) { baseURL.setPath("."); - QHBoxLayout *layout = new QHBoxLayout(this); + TQHBoxLayout *layout = new TQHBoxLayout(this); - combo = new QComboBox(true,this); - button = new QPushButton(this); + combo = new TQComboBox(true,this); + button = new TQPushButton(this); button ->setFixedSize(35,25); button ->setText(i18n("...")); @@ -69,21 +69,21 @@ FileCombo::FileCombo( QWidget *parent, const char *name ) 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&))); + connect( button, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotFileSelect()) ); + connect( combo, TQT_SIGNAL(activated(const TQString&)), TQT_SLOT(slotComboActivated(const TQString&))); + connect( combo, TQT_SIGNAL(textChanged(const TQString&)), TQT_SLOT(slotComboActivated(const TQString&))); setFocusProxy(combo); } FileCombo::~FileCombo(){ } -QString FileCombo::text() const +TQString FileCombo::text() const { return combo->currentText(); } -void FileCombo::setText( const QString &_txt ) +void FileCombo::setText( const TQString &_txt ) { combo ->setEditText( _txt ); } @@ -114,7 +114,7 @@ void FileCombo::setReturnAbsolutePath(bool absolutePath) m_absolutePath = absolutePath; } -void FileCombo::slotComboActivated(const QString&s) +void FileCombo::slotComboActivated(const TQString&s) { emit activated(s); } diff --git a/quanta/dialogs/filecombo.h b/quanta/dialogs/filecombo.h index 9403b808..9ec8198c 100644 --- a/quanta/dialogs/filecombo.h +++ b/quanta/dialogs/filecombo.h @@ -18,7 +18,7 @@ #ifndef FILECOMBO_H #define FILECOMBO_H -#include +#include #include /** @@ -29,15 +29,15 @@ class QComboBox; class QPushButton; class KURL; -class FileCombo : public QWidget { +class FileCombo : public TQWidget { Q_OBJECT public: - FileCombo(const KURL& a_baseURL, QWidget *parent=0, const char *name=0); - FileCombo(QWidget *parent=0, const char *name=0); + FileCombo(const KURL& a_baseURL, TQWidget *parent=0, const char *name=0); + FileCombo(TQWidget *parent=0, const char *name=0); ~FileCombo(); - QString text() const; - void setText( const QString &); + TQString text() const; + void setText( const TQString &); /** 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 */ @@ -45,17 +45,17 @@ public: public slots: void slotFileSelect(); - void slotComboActivated(const QString&); + void slotComboActivated(const TQString&); signals: - void activated(const QString&); + void activated(const TQString&); protected: KURL baseURL; bool m_absolutePath; - QComboBox *combo; - QPushButton *button; + TQComboBox *combo; + TQPushButton *button; }; diff --git a/quanta/dialogs/settings/abbreviation.cpp b/quanta/dialogs/settings/abbreviation.cpp index 56f81c0e..79dc4bc1 100644 --- a/quanta/dialogs/settings/abbreviation.cpp +++ b/quanta/dialogs/settings/abbreviation.cpp @@ -13,13 +13,13 @@ ***************************************************************************/ //qt includes -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include //kde includes #include @@ -41,13 +41,13 @@ #include "dtds.h" -AbbreviationDlg::AbbreviationDlg(QWidget *parent, const char *name): +AbbreviationDlg::AbbreviationDlg(TQWidget *parent, const char *name): AbbreviationDlgS(parent, name) { m_oldItem = 0L; m_currentAbbrev = 0L; - QMapConstIterator it; + TQMapConstIterator it; for (it = qConfig.abbreviations.constBegin(); it != qConfig.abbreviations.constEnd(); ++it) { groupCombo->insertItem(it.key()); @@ -59,10 +59,10 @@ AbbreviationDlg::~AbbreviationDlg() { } -void AbbreviationDlg::slotGroupChanged(const QString& newGroupName) +void AbbreviationDlg::slotGroupChanged(const TQString& newGroupName) { //save the current template - QListViewItem *item = templatesList->currentItem(); + TQListViewItem *item = templatesList->currentItem(); if (item && m_currentAbbrev) m_currentAbbrev->abbreviations.insert(item->text(0) + " " + item->text(1), codeEdit->text()); dtepList->clear(); @@ -70,9 +70,9 @@ void AbbreviationDlg::slotGroupChanged(const QString& newGroupName) codeEdit->clear(); m_oldItem = 0L; m_currentAbbrev = &qConfig.abbreviations[newGroupName]; - QString templateStr; - QString templateName; - QMap::ConstIterator it; + TQString templateStr; + TQString templateName; + TQMap::ConstIterator it; for ( it = m_currentAbbrev->abbreviations.constBegin(); it != m_currentAbbrev->abbreviations.constEnd(); ++it ) { templateStr = it.key(); @@ -80,7 +80,7 @@ void AbbreviationDlg::slotGroupChanged(const QString& newGroupName) templateStr = templateStr.left(templateStr.find(' ')); new KListViewItem(templatesList, templateStr, templateName); } - for ( QStringList::ConstIterator dtepit = m_currentAbbrev->dteps.constBegin(); dtepit != m_currentAbbrev->dteps.constEnd(); ++dtepit ) + for ( TQStringList::ConstIterator dtepit = m_currentAbbrev->dteps.constBegin(); dtepit != m_currentAbbrev->dteps.constEnd(); ++dtepit ) { dtepList->insertItem(DTDs::ref()->getDTDNickNameFromName(*dtepit)); } @@ -92,13 +92,13 @@ void AbbreviationDlg::slotGroupChanged(const QString& newGroupName) void AbbreviationDlg::slotNewGroup() { bool ok; - QString groupName = KInputDialog::getText(i18n("New Abbreviation Group"), i18n("Group name:"), "", &ok, this); + TQString groupName = KInputDialog::getText(i18n("New Abbreviation Group"), i18n("Group name:"), "", &ok, this); if (ok && !groupName.isEmpty()) { if (qConfig.abbreviations.contains(groupName)) { KMessageBox::error(this, i18n("There is already an abbreviation group called %1. Choose an unique name for the new group.").arg(groupName), i18n("Group already exists")); - QTimer::singleShot(0, this, SLOT(slotNewGroup())); + TQTimer::singleShot(0, this, TQT_SLOT(slotNewGroup())); } else { groupCombo->insertItem(groupName); @@ -110,17 +110,17 @@ void AbbreviationDlg::slotNewGroup() void AbbreviationDlg::slotAddDTEP() { - QStringList lst = DTDs::ref()->nickNameList(false); + TQStringList 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( + TQStringList 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) + for (TQStringList::ConstIterator it = res.constBegin(); it != res.constEnd(); ++it) { m_currentAbbrev->dteps.append(DTDs::ref()->getDTDNameFromNickName(*it)); } @@ -146,18 +146,18 @@ void AbbreviationDlg::slotRemoveDTEP() } } -void AbbreviationDlg::slotTemplateSelectionChanged(QListViewItem* item) +void AbbreviationDlg::slotTemplateSelectionChanged(TQListViewItem* item) { if (!item) return; - //QListViewItem *m_oldItem = templatesList->currentItem(); + //TQListViewItem *m_oldItem = templatesList->currentItem(); if (m_oldItem) { - QString key = m_oldItem->text(0)+" " +m_oldItem->text(1); + TQString 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)]; + TQString code = m_currentAbbrev->abbreviations[item->text(0)+" " +item->text(1)]; codeEdit->setText(code); m_oldItem = item; } @@ -170,11 +170,11 @@ void AbbreviationDlg::slotAddTemplate() w.templateEdit->setFocus(); if (dlg.exec()) { - QString templateName = w.templateEdit->text(); - QString description = w.descriptionEdit->text(); + TQString templateName = w.templateEdit->text(); + TQString description = w.descriptionEdit->text(); if (!templateName.isEmpty()) { - QListViewItem *item = new KListViewItem(templatesList, templateName, description); + TQListViewItem *item = new KListViewItem(templatesList, templateName, description); templatesList->setCurrentItem(item); templatesList->setSelected(item, true); templatesList->ensureItemVisible(item); @@ -185,9 +185,9 @@ void AbbreviationDlg::slotAddTemplate() void AbbreviationDlg::slotRemoveTemplate() { - QListViewItem *item = templatesList->currentItem(); + TQListViewItem *item = templatesList->currentItem(); if (item && - KMessageBox::warningContinueCancel(this, i18n("Do you really want to remove the %1 template?").arg(item->text(1)),QString::null,KStdGuiItem::del()) == KMessageBox::Continue) + KMessageBox::warningContinueCancel(this, i18n("Do you really want to remove the %1 template?").arg(item->text(1)),TQString::null,KStdGuiItem::del()) == KMessageBox::Continue) { m_currentAbbrev->abbreviations.remove(item->text(0)+" "+item->text(1)); delete item; @@ -198,7 +198,7 @@ void AbbreviationDlg::slotRemoveTemplate() void AbbreviationDlg::slotEditTemplate() { - QListViewItem *item = templatesList->currentItem(); + TQListViewItem *item = templatesList->currentItem(); if (!item) return; KDialogBase dlg(this, 0, true, i18n("Edit Code Template"), KDialogBase::Ok | KDialogBase::Cancel); @@ -218,33 +218,33 @@ void AbbreviationDlg::slotEditTemplate() void AbbreviationDlg::saveTemplates() { - QListViewItem *item = templatesList->currentItem(); + TQListViewItem *item = templatesList->currentItem(); if (item && m_currentAbbrev) m_currentAbbrev->abbreviations.insert(item->text(0) + " " + item->text(1), codeEdit->text()); - QString abbrevFile = KGlobal::dirs()->saveLocation("data") + resourceDir + "abbreviations.xml"; - QString s = "\n\n\n"; - QString s2; - QDomDocument doc; + TQString abbrevFile = KGlobal::dirs()->saveLocation("data") + resourceDir + "abbreviations.xml"; + TQString s = "\n\n\n"; + TQString s2; + TQDomDocument doc; doc.setContent(s); - QDomNode firstNode = doc.firstChild(); + TQDomNode firstNode = doc.firstChild(); Abbreviation abbrev; - QMap::ConstIterator abbrevIt; + TQMap::ConstIterator abbrevIt; for (abbrevIt = qConfig.abbreviations.constBegin(); abbrevIt != qConfig.abbreviations.constEnd(); ++abbrevIt) { - QDomElement groupEl = doc.createElement("Group"); + TQDomElement groupEl = doc.createElement("Group"); groupEl.setAttribute("name", abbrevIt.key()); abbrev = abbrevIt.data(); - for (QStringList::ConstIterator dtepIt = abbrev.dteps.constBegin(); dtepIt != abbrev.dteps.constEnd(); ++dtepIt) + for (TQStringList::ConstIterator dtepIt = abbrev.dteps.constBegin(); dtepIt != abbrev.dteps.constEnd(); ++dtepIt) { - QDomElement el = doc.createElement("DTEP"); + TQDomElement el = doc.createElement("DTEP"); el.setAttribute("name", *dtepIt); groupEl.appendChild(el); } int pos; - QMap::ConstIterator it; + TQMap::ConstIterator it; for (it = abbrev.abbreviations.constBegin(); it != abbrev.abbreviations.constEnd(); ++it) { - QDomElement el = doc.createElement("Template"); + TQDomElement el = doc.createElement("Template"); el.setAttribute("code", it.data()); s = it.key(); s2 = ""; @@ -261,11 +261,11 @@ void AbbreviationDlg::saveTemplates() firstNode.appendChild(groupEl); } - QFile f(abbrevFile); + TQFile f(abbrevFile); if (f.open(IO_WriteOnly | IO_Truncate)) { - QTextStream str(&f); - str.setEncoding(QTextStream::UnicodeUTF8); + TQTextStream str(&f); + str.setEncoding(TQTextStream::UnicodeUTF8); str << doc.toString(); f.close(); } else diff --git a/quanta/dialogs/settings/abbreviation.h b/quanta/dialogs/settings/abbreviation.h index 0e2a34c6..24db8e3b 100644 --- a/quanta/dialogs/settings/abbreviation.h +++ b/quanta/dialogs/settings/abbreviation.h @@ -15,8 +15,8 @@ #ifndef ABBREVIATION_H #define ABBREVIATION_H -#include -#include +#include +#include #include @@ -28,25 +28,25 @@ class AbbreviationDlg : public AbbreviationDlgS { Q_OBJECT public: - AbbreviationDlg(QWidget *parent, const char *name = 0); + AbbreviationDlg(TQWidget *parent, const char *name = 0); ~AbbreviationDlg(); void saveTemplates(); public slots: - void slotGroupChanged(const QString& newGroupName); + void slotGroupChanged(const TQString& newGroupName); private slots: void slotNewGroup(); void slotAddDTEP(); void slotRemoveDTEP(); - void slotTemplateSelectionChanged(QListViewItem*); + void slotTemplateSelectionChanged(TQListViewItem*); void slotAddTemplate(); void slotRemoveTemplate(); void slotEditTemplate(); private: - QListViewItem *m_oldItem; + TQListViewItem *m_oldItem; Abbreviation *m_currentAbbrev; }; diff --git a/quanta/dialogs/settings/filemasks.cpp b/quanta/dialogs/settings/filemasks.cpp index 14e824c1..fee135f8 100644 --- a/quanta/dialogs/settings/filemasks.cpp +++ b/quanta/dialogs/settings/filemasks.cpp @@ -17,16 +17,16 @@ #include "filemasks.h" #include "filemasks.moc" // qt includes -#include -#include +#include +#include //kde includes #include -FileMasks::FileMasks(QWidget *parent, const char *name) +FileMasks::FileMasks(TQWidget *parent, const char *name) :FileMasksS(parent,name) { - connect(buttonDefault, SIGNAL(clicked()), this, SLOT(setToDefault())); + connect(buttonDefault, TQT_SIGNAL(clicked()), this, TQT_SLOT(setToDefault())); } FileMasks::~FileMasks(){ @@ -36,10 +36,10 @@ void FileMasks::setToDefault() { KMimeType::List list = KMimeType::allMimeTypes(); KMimeType::List::iterator it; - QString markup, script, image, text; + TQString 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; + TQString name; for ( it = list.begin(); it != list.end(); ++it ) { name = (*it)->name(); diff --git a/quanta/dialogs/settings/filemasks.h b/quanta/dialogs/settings/filemasks.h index 2d13c1f5..965eb190 100644 --- a/quanta/dialogs/settings/filemasks.h +++ b/quanta/dialogs/settings/filemasks.h @@ -25,7 +25,7 @@ class FileMasks : public FileMasksS { Q_OBJECT public: - FileMasks(QWidget *parent=0, const char *name=0); + FileMasks(TQWidget *parent=0, const char *name=0); ~FileMasks(); public slots: diff --git a/quanta/dialogs/settings/parseroptions.cpp b/quanta/dialogs/settings/parseroptions.cpp index 0ad00d73..24e3c6a6 100644 --- a/quanta/dialogs/settings/parseroptions.cpp +++ b/quanta/dialogs/settings/parseroptions.cpp @@ -15,8 +15,8 @@ #include "parseroptions.h" #include "parseroptions.moc" -#include -#include +#include +#include #include #include @@ -25,16 +25,16 @@ * 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 ) +ParserOptions::ParserOptions( KConfig *a_config, TQWidget* 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")); + TQString handleLBM = config->readEntry("LBM", i18n("Find Tag & Open Tree")); + TQString handleMBM = config->readEntry("MBM", i18n("Nothing")); + TQString handleRBM = config->readEntry("RBM", i18n("Popup Menu")); + TQString handleDoubleClick = config->readEntry("Double click", i18n("Select Tag Area")); if ( !name ) diff --git a/quanta/dialogs/settings/parseroptions.h b/quanta/dialogs/settings/parseroptions.h index a4bdd0f5..a4c5f6f3 100644 --- a/quanta/dialogs/settings/parseroptions.h +++ b/quanta/dialogs/settings/parseroptions.h @@ -25,7 +25,7 @@ class ParserOptions : public ParserOptionsUI Q_OBJECT public: - ParserOptions( KConfig *config, QWidget* parent = 0, const char* name = 0); + ParserOptions( KConfig *config, TQWidget* parent = 0, const char* name = 0); ~ParserOptions(); void updateConfig(); diff --git a/quanta/dialogs/settings/previewoptions.cpp b/quanta/dialogs/settings/previewoptions.cpp index c445c52d..2df03ea9 100644 --- a/quanta/dialogs/settings/previewoptions.cpp +++ b/quanta/dialogs/settings/previewoptions.cpp @@ -17,13 +17,13 @@ #include "previewoptions.h" #include "previewoptions.moc" // qt includes -#include -#include +#include +#include // kde includes #include #include -PreviewOptions::PreviewOptions(QWidget *parent, const char *name) +PreviewOptions::PreviewOptions(TQWidget *parent, const char *name) : PreviewOptionsS(parent,name) { } @@ -31,50 +31,50 @@ PreviewOptions::PreviewOptions(QWidget *parent, const char *name) PreviewOptions::~PreviewOptions(){ } -void PreviewOptions::setWindowLayout(const QString& layout ) +void PreviewOptions::setWindowLayout(const TQString& layout ) { if ( layout == "Default") resetLayout->setChecked(true); else resetLayout->setChecked(false); } -void PreviewOptions::setPosition(const QString& position ) +void PreviewOptions::setPosition(const TQString& position ) { radioEditor->setChecked(true); if ( position == "Toolview" ) radioToolview->setChecked(true); } -QString PreviewOptions::position() +TQString PreviewOptions::position() { - QString position = "Editor"; + TQString position = "Editor"; if ( radioToolview->isChecked() ) position = "Toolview"; return position; } -void PreviewOptions::setDocPosition(const QString &position) +void PreviewOptions::setDocPosition(const TQString &position) { radioNewDocTab->setChecked(true); if (position == "Toolview") radioSeparateDocView->setChecked(true); } -QString PreviewOptions::docPosition() +TQString PreviewOptions::docPosition() { - QString position = "Tab"; + TQString position = "Tab"; if (radioSeparateDocView->isChecked()) position = "Toolview"; return position; } -QString PreviewOptions::layout() +TQString PreviewOptions::layout() { - QString layout = "Custom"; + TQString layout = "Custom"; if ( resetLayout->isChecked() ) layout = "Default"; return layout; } -QString PreviewOptions::closeButtons() +TQString PreviewOptions::closeButtons() { - QString closeButtonState = "ShowAlways"; + TQString closeButtonState = "ShowAlways"; if (radioDelayedCloseButtons->isChecked()) closeButtonState = "ShowDelayed"; if (radioNoCloseButtons->isChecked()) @@ -82,7 +82,7 @@ QString PreviewOptions::closeButtons() return closeButtonState; } -void PreviewOptions::setCloseButtons(const QString &state) +void PreviewOptions::setCloseButtons(const TQString &state) { if (state == "ShowAlways") radioShowCloseButtons->setChecked(true); if (state == "ShowDelayed") radioDelayedCloseButtons->setChecked(true); diff --git a/quanta/dialogs/settings/previewoptions.h b/quanta/dialogs/settings/previewoptions.h index cb1f6719..3cc5b820 100644 --- a/quanta/dialogs/settings/previewoptions.h +++ b/quanta/dialogs/settings/previewoptions.h @@ -25,21 +25,21 @@ class KConfig; class PreviewOptions : public PreviewOptionsS { Q_OBJECT public: - PreviewOptions(QWidget *parent=0, const char *name=0); + PreviewOptions(TQWidget *parent=0, const char *name=0); ~PreviewOptions(); - QString position(); - QString layout(); - QString closeButtons(); - QString docPosition(); + TQString position(); + TQString layout(); + TQString closeButtons(); + TQString docPosition(); uint toolviewTabs(); bool hiddenFiles(); bool saveTrees(); - void setPosition(const QString&); - void setWindowLayout(const QString&); - void setCloseButtons(const QString&); + void setPosition(const TQString&); + void setWindowLayout(const TQString&); + void setCloseButtons(const TQString&); void setToolviewTabs(uint); - void setDocPosition(const QString&); + void setDocPosition(const TQString&); void setHiddenFiles(bool show); void setSaveTrees(bool show); diff --git a/quanta/dialogs/specialchardialog.cpp b/quanta/dialogs/specialchardialog.cpp index e8f662ea..200b5afe 100644 --- a/quanta/dialogs/specialchardialog.cpp +++ b/quanta/dialogs/specialchardialog.cpp @@ -15,10 +15,10 @@ * * ***************************************************************************/ -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -28,16 +28,16 @@ #include "specialchardialog.h" #include "resource.h" -SpecialCharDialog::SpecialCharDialog( QWidget* parent, const char* name, bool modal, WFlags fl) +SpecialCharDialog::SpecialCharDialog( TQWidget* 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())); + connect ( FilterLineEdit, TQT_SIGNAL(textChanged(const TQString&)), + TQT_SLOT(filterChars(const TQString&)) ); + connect ( CharsListBox, TQT_SIGNAL(doubleClicked(TQListBoxItem*)), + TQT_SLOT(insertCode()) ); + connect (buttonOk, TQT_SIGNAL(clicked()), TQT_SLOT(insertCode())); + connect (buttonChar, TQT_SIGNAL(clicked()), TQT_SLOT(insertChar())); + connect (buttonCancel, TQT_SIGNAL(clicked()), TQT_SLOT(cancel())); filterChars(""); } @@ -45,13 +45,13 @@ SpecialCharDialog::~SpecialCharDialog() { } -void SpecialCharDialog::filterChars(const QString& filter) +void SpecialCharDialog::filterChars(const TQString& filter) { CharsListBox->clear(); if (filter.isEmpty()) CharsListBox->insertStringList(charList); else { - for (QStringList::ConstIterator it = charList.begin(); it != charList.end(); ++it) + for (TQStringList::ConstIterator it = charList.begin(); it != charList.end(); ++it) if ( (*it).contains(filter, false) ) CharsListBox->insertItem(*it); } @@ -59,30 +59,30 @@ void SpecialCharDialog::filterChars(const QString& filter) CharsListBox->setCurrentItem(0); } -QString SpecialCharDialog::selection() +TQString SpecialCharDialog::selection() { return m_selection; } void SpecialCharDialog::insertCode() { - QString selected = CharsListBox->text(CharsListBox->currentItem()); + TQString 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); + done(TQDialog::Accepted); } void SpecialCharDialog::insertChar() { m_selection = CharsListBox->text(CharsListBox->currentItem()).left(1); - done(QDialog::Accepted); + done(TQDialog::Accepted); } void SpecialCharDialog::cancel() { m_selection = ""; - done(QDialog::Rejected); + done(TQDialog::Rejected); } #include "specialchardialog.moc" diff --git a/quanta/dialogs/specialchardialog.h b/quanta/dialogs/specialchardialog.h index 23e5dc8d..4155e081 100644 --- a/quanta/dialogs/specialchardialog.h +++ b/quanta/dialogs/specialchardialog.h @@ -18,7 +18,7 @@ #ifndef SPECIALCHARDIALOG_H #define SPECIALCHARDIALOG_H -#include +#include #include "specialchardialogs.h" class SpecialCharDialog : public SpecialCharDialogS @@ -27,12 +27,12 @@ class SpecialCharDialog : public SpecialCharDialogS public: - SpecialCharDialog( QWidget* parent = 0, const char* name = 0, bool modal = true, WFlags fl = 0); + SpecialCharDialog( TQWidget* parent = 0, const char* name = 0, bool modal = true, WFlags fl = 0); ~SpecialCharDialog(); - QString selection(); + TQString selection(); public slots: - void filterChars(const QString&); + void filterChars(const TQString&); void insertChar(); void insertCode(); void cancel(); @@ -40,7 +40,7 @@ public slots: private slots: private: - QString m_selection; + TQString m_selection; }; #endif diff --git a/quanta/dialogs/tagdialogs/colorcombo.cpp b/quanta/dialogs/tagdialogs/colorcombo.cpp index 2dcb6aa2..878216e3 100644 --- a/quanta/dialogs/tagdialogs/colorcombo.cpp +++ b/quanta/dialogs/tagdialogs/colorcombo.cpp @@ -32,17 +32,17 @@ #include #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -66,8 +66,8 @@ #define STANDARD_PAL_SIZE 17 -ColorCombo::ColorCombo( QWidget *parent, const char *name ) - : QComboBox( parent, name ) +ColorCombo::ColorCombo( TQWidget *parent, const char *name ) + : TQComboBox( parent, name ) { customColor.setRgb( 255, 255, 255 ); internalcolor.setRgb( 255, 255, 255 ); @@ -78,8 +78,8 @@ ColorCombo::ColorCombo( QWidget *parent, const char *name ) addColors(); - connect( this, SIGNAL( activated(int) ), SLOT( slotActivated(int) ) ); - connect( this, SIGNAL( highlighted(int) ), SLOT( slotHighlighted(int) ) ); + connect( this, TQT_SIGNAL( activated(int) ), TQT_SLOT( slotActivated(int) ) ); + connect( this, TQT_SIGNAL( highlighted(int) ), TQT_SLOT( slotHighlighted(int) ) ); } ColorCombo::~ColorCombo() @@ -91,7 +91,7 @@ ColorCombo::~ColorCombo() /** Sets the current color */ -void ColorCombo::setColor( const QColor &col ) +void ColorCombo::setColor( const TQColor &col ) { internalcolor = col; hascolor = true; @@ -103,7 +103,7 @@ void ColorCombo::setColor( const QColor &col ) /** Returns the currently selected color */ -QColor ColorCombo::color() const { +TQColor ColorCombo::color() const { return internalcolor; } @@ -113,10 +113,10 @@ bool ColorCombo::hasColor() const{ } -void ColorCombo::setColorName( const QString &color ) +void ColorCombo::setColorName( const TQString &color ) { - QColor c(color); + TQColor c(color); if ( c.isValid() && !color.isEmpty() ) { setColor( c ); @@ -128,7 +128,7 @@ void ColorCombo::setColorName( const QString &color ) } -QString ColorCombo::colorName() +TQString ColorCombo::colorName() { if ( hascolor ) { int i; @@ -145,9 +145,9 @@ QString ColorCombo::colorName() } -void ColorCombo::resizeEvent( QResizeEvent *re ) +void ColorCombo::resizeEvent( TQResizeEvent *re ) { - QComboBox::resizeEvent( re ); + TQComboBox::resizeEvent( re ); addColors(); } @@ -158,12 +158,12 @@ void ColorCombo::slotActivated( int index ) if ( index == 1 ) { - if ( KColorDialog::getColor( customColor ) == QDialog::Accepted ) + if ( KColorDialog::getColor( customColor ) == TQDialog::Accepted ) { - QRect rect( 0, 0, width(), 20 ); - QPixmap pixmap( rect.width(), rect.height() ); - QPainter painter; - QPen pen; + TQRect rect( 0, 0, width(), 20 ); + TQPixmap pixmap( rect.width(), rect.height() ); + TQPainter painter; + TQPen pen; if ( qGray( customColor.rgb() ) < 128 ) pen.setColor( white ); @@ -171,7 +171,7 @@ void ColorCombo::slotActivated( int index ) pen.setColor( black ); painter.begin( &pixmap ); - QBrush brush( customColor ); + TQBrush brush( customColor ); painter.fillRect( rect, brush ); painter.setPen( pen ); painter.drawText( 2, painter.fontMetrics().height(), @@ -203,10 +203,10 @@ void ColorCombo::slotHighlighted( int index ) void ColorCombo::addColors() { - QRect rect( 0, 0, width(), 20 ); - QPixmap pixmap( rect.width(), rect.height() ); - QPainter painter; - QPen pen; + TQRect rect( 0, 0, width(), 20 ); + TQPixmap pixmap( rect.width(), rect.height() ); + TQPainter painter; + TQPen pen; int i; clear(); @@ -225,7 +225,7 @@ void ColorCombo::addColors() pen.setColor( black ); painter.begin( &pixmap ); - QBrush brush( customColor ); + TQBrush brush( customColor ); painter.fillRect( rect, brush ); painter.setPen( pen ); @@ -240,7 +240,7 @@ void ColorCombo::addColors() for ( i = 0; i < STANDARD_PAL_SIZE; i++ ) { painter.begin( &pixmap ); - QBrush brush( standardPalette[i] ); + TQBrush brush( standardPalette[i] ); painter.fillRect( rect, brush ); painter.end(); @@ -266,7 +266,7 @@ void ColorCombo::addColors() void ColorCombo::createStandardPalette() { - standardPalette = new QColor [STANDARD_PAL_SIZE]; + standardPalette = new TQColor [STANDARD_PAL_SIZE]; int i = 0; @@ -289,7 +289,7 @@ void ColorCombo::createStandardPalette() standardPalette[i++] = Qt::black; - standardPaletteNames = new QString [STANDARD_PAL_SIZE]; + standardPaletteNames = new TQString [STANDARD_PAL_SIZE]; i = 0; diff --git a/quanta/dialogs/tagdialogs/colorcombo.h b/quanta/dialogs/tagdialogs/colorcombo.h index 35eae54a..b6f851e0 100644 --- a/quanta/dialogs/tagdialogs/colorcombo.h +++ b/quanta/dialogs/tagdialogs/colorcombo.h @@ -26,10 +26,10 @@ #ifndef COLORCOMBO_H #define COLORCOMBO_H -#include +#include #include -#include -#include +#include +#include #include #include "kselect.h" @@ -41,16 +41,16 @@ class ColorCombo : public QComboBox { Q_OBJECT public: - ColorCombo( QWidget *parent = 0L, const char *name = 0L ); + ColorCombo( TQWidget *parent = 0L, const char *name = 0L ); ~ColorCombo(); - void setColor( const QColor &col ); - void setColorName(const QString &color); - QString colorName(); + void setColor( const TQColor &col ); + void setColorName(const TQString &color); + TQString colorName(); /** * Retrieve the currently selected color. **/ - QColor color() const; + TQColor color() const; bool hasColor() const; @@ -59,25 +59,25 @@ public slots: void slotHighlighted( int index ); signals: - void activated( const QColor &col ); - void highlighted( const QColor &col ); + void activated( const TQColor &col ); + void highlighted( const TQColor &col ); protected: /** * @reimplemented */ - virtual void resizeEvent( QResizeEvent *re ); + virtual void resizeEvent( TQResizeEvent *re ); private: void createStandardPalette(); void addColors(); - QColor customColor; - QColor internalcolor; + TQColor customColor; + TQColor internalcolor; bool hascolor; - QColor *standardPalette; - QString *standardPaletteNames; + TQColor *standardPalette; + TQString *standardPaletteNames; }; diff --git a/quanta/dialogs/tagdialogs/corewidgetdlg.cpp b/quanta/dialogs/tagdialogs/corewidgetdlg.cpp index 13a488e5..8e52ae01 100644 --- a/quanta/dialogs/tagdialogs/corewidgetdlg.cpp +++ b/quanta/dialogs/tagdialogs/corewidgetdlg.cpp @@ -18,10 +18,10 @@ #include "corewidgetdlg.moc" #include "tagwidget.h" -#include -#include +#include +#include -CoreWidgetDlg::CoreWidgetDlg(QWidget *parent, const char *name) +CoreWidgetDlg::CoreWidgetDlg(TQWidget *parent, const char *name) :CoreWidgetDlgS(parent,name), TagWidget(parent,name) { } @@ -29,7 +29,7 @@ CoreWidgetDlg::CoreWidgetDlg(QWidget *parent, const char *name) CoreWidgetDlg::~CoreWidgetDlg(){ } -void CoreWidgetDlg::readAttributes( QDict *d ) +void CoreWidgetDlg::readAttributes( TQDict *d ) { dict = d; @@ -43,10 +43,10 @@ void CoreWidgetDlg::readAttributes( QDict *d ) } -void CoreWidgetDlg::writeAttributes( QDict *d ) +void CoreWidgetDlg::writeAttributes( TQDict *d ) { dict = d; - QString *t; // value of attr. + TQString *t; // value of attr. if (( t=d->find("id") )) setValue(*t, lineId); if (( t=d->find("class") )) setValue(*t, lineClass); diff --git a/quanta/dialogs/tagdialogs/listdlg.cpp b/quanta/dialogs/tagdialogs/listdlg.cpp index 396143c2..713ccf2c 100644 --- a/quanta/dialogs/tagdialogs/listdlg.cpp +++ b/quanta/dialogs/tagdialogs/listdlg.cpp @@ -20,11 +20,11 @@ #include //qt includes -#include -#include -#include +#include +#include +#include -ListDlg::ListDlg(QStringList &entryList,QWidget* parent, const char *name ) +ListDlg::ListDlg(TQStringList &entryList,TQWidget* parent, const char *name ) :KDialogBase(parent,name), listbox(new KListBox(this)) { Q_CHECK_PTR(listbox); @@ -42,13 +42,13 @@ ListDlg::ListDlg(QStringList &entryList,QWidget* parent, const char *name ) adjustSize(); resize(sizeHint()); - connect(listbox,SIGNAL(doubleClicked( QListBoxItem * )), SLOT(slotOk())); + connect(listbox,TQT_SIGNAL(doubleClicked( TQListBoxItem * )), TQT_SLOT(slotOk())); } ListDlg::~ListDlg(){ } -QString ListDlg::getEntry() +TQString ListDlg::getEntry() { return listbox->currentText(); } diff --git a/quanta/dialogs/tagdialogs/listdlg.h b/quanta/dialogs/tagdialogs/listdlg.h index be1605f2..7b84e032 100644 --- a/quanta/dialogs/tagdialogs/listdlg.h +++ b/quanta/dialogs/tagdialogs/listdlg.h @@ -33,9 +33,9 @@ selected item with the getEntry() method. class ListDlg : public KDialogBase { Q_OBJECT public: - ListDlg(QStringList &entryList,QWidget* parent=0, const char *name =0); + ListDlg(TQStringList &entryList,TQWidget* parent=0, const char *name =0); ~ListDlg(); - QString getEntry(); + TQString getEntry(); int getEntryNum(); private: // Private attributes /** */ diff --git a/quanta/dialogs/tagdialogs/pictureview.cpp b/quanta/dialogs/tagdialogs/pictureview.cpp index 0082d379..65102ba8 100644 --- a/quanta/dialogs/tagdialogs/pictureview.cpp +++ b/quanta/dialogs/tagdialogs/pictureview.cpp @@ -17,20 +17,20 @@ #include "pictureview.h" #include "pictureview.moc" -#include "qpainter.h" -#include +#include "tqpainter.h" +#include -PictureView::PictureView(QWidget *parent, char *file, const char *name ) : QFrame(parent,name) +PictureView::PictureView(TQWidget *parent, char *file, const char *name ) : TQFrame(parent,name) { if ( file ) { - pix = new QImage(file); + pix = new TQImage(file); picwidth = pix->width(); picheight = pix->height(); x_of = 0; y_of = 0; scale(); } else { - pix = new QImage(); + pix = new TQImage(); picwidth = 0; picheight = 0; x_of = 0; @@ -45,24 +45,24 @@ PictureView::~PictureView() { } -void PictureView::paintEvent( QPaintEvent * e ) +void PictureView::paintEvent( TQPaintEvent * e ) { - QPainter p; + TQPainter p; p.begin( this ); p.drawImage( x_of, y_of, *pix ); p.end(); - QFrame::paintEvent(e); + TQFrame::paintEvent(e); } -void PictureView::resizeEvent ( QResizeEvent * e){ +void PictureView::resizeEvent ( TQResizeEvent * e){ scale(); - QFrame::resizeEvent(e); + TQFrame::resizeEvent(e); } /** set image */ -void PictureView::slotSetImage(const QString& file) +void PictureView::slotSetImage(const TQString& file) { pix->load( file ); picwidth = pix->width(); diff --git a/quanta/dialogs/tagdialogs/pictureview.h b/quanta/dialogs/tagdialogs/pictureview.h index aaf9186e..1688314d 100644 --- a/quanta/dialogs/tagdialogs/pictureview.h +++ b/quanta/dialogs/tagdialogs/pictureview.h @@ -18,8 +18,8 @@ #ifndef PICTUREVIEW_H #define PICTUREVIEW_H -#include -#include +#include +#include class QImage; /**Class for images preview @@ -27,22 +27,22 @@ used by TagImgDlg *@author Dmitry Poplavsky & Yacovlev Alexander */ -class PictureView : public QFrame { +class PictureView : public TQFrame { Q_OBJECT public: - PictureView(QWidget *parent=0, char *file=0, const char *name=0); + PictureView(TQWidget *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); + void slotSetImage(const TQString& file); protected: // Protected methods /** */ - virtual void resizeEvent ( QResizeEvent * e); + virtual void resizeEvent ( TQResizeEvent * e); ~PictureView(); protected: - virtual void paintEvent( QPaintEvent * ); + virtual void paintEvent( TQPaintEvent * ); private: // Private attributes /** height of image */ @@ -53,7 +53,7 @@ private: // Private attributes int picwidth; int y_of; - QImage *pix; + TQImage *pix; }; #endif diff --git a/quanta/dialogs/tagdialogs/tagattr.cpp b/quanta/dialogs/tagdialogs/tagattr.cpp index 772da4fb..251c4b8b 100644 --- a/quanta/dialogs/tagdialogs/tagattr.cpp +++ b/quanta/dialogs/tagdialogs/tagattr.cpp @@ -23,8 +23,8 @@ #include //qt includes -#include -#include +#include +#include //app includes #include "tagattr.h" @@ -33,35 +33,35 @@ #include "qtag.h" #include "quantacommon.h" -QString Attr::attrName() const +TQString Attr::attrName() const { return name; } -Attr_list::Attr_list( QDomElement const& el, QWidget *w, QTag *dtdTag ) +Attr_list::Attr_list( TQDomElement const& el, TQWidget *w, QTag *dtdTag ) : Attr(el, w, dtdTag) { - combo = (QComboBox *)w; + combo = (TQComboBox *)w; - QString source = el.attribute("source"); + TQString 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"); + TQString method = el.attribute("method"); + TQString interface = el.attribute("interface", "QuantaIf"); + TQString arguments = el.attribute("arguments"); arguments.replace("%tagname%", m_dtdTag->name()); DCOPReply reply = QuantaCommon::callDCOPMethod(interface, method, arguments); if (reply.isValid()) { - QStringList list = reply; + TQStringList list = reply; combo->insertStringList(list); } } - for ( QDomElement n = el.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) { + for ( TQDomElement n = el.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) { if ( n.tagName() == "items" ) { - QDomElement item = n.firstChild().toElement(); + TQDomElement item = n.firstChild().toElement(); while ( !item.isNull() ) { combo->insertItem( item.text() ); item = item.nextSibling().toElement(); @@ -72,7 +72,7 @@ Attr_list::Attr_list( QDomElement const& el, QWidget *w, QTag *dtdTag ) setValue(""); } -void Attr_list::setValue(const QString &value) +void Attr_list::setValue(const TQString &value) { for ( int i=0; icount(); i++ ) @@ -87,11 +87,11 @@ void Attr_list::setValue(const QString &value) } -QDomNode findChild( QDomNode &parent, const QString &name ) +TQDomNode findChild( TQDomNode &parent, const TQString &name ) { - for ( QDomNode n = parent.firstChild(); !n.isNull(); n = n.nextSibling() ) + for ( TQDomNode n = parent.firstChild(); !n.isNull(); n = n.nextSibling() ) if ( n.nodeName() == name ) return n; - return QDomNode(); + return TQDomNode(); } diff --git a/quanta/dialogs/tagdialogs/tagattr.h b/quanta/dialogs/tagdialogs/tagattr.h index 30b5220d..2741a10c 100644 --- a/quanta/dialogs/tagdialogs/tagattr.h +++ b/quanta/dialogs/tagdialogs/tagattr.h @@ -19,10 +19,10 @@ #define TAGATTR_H //qt includes -#include -#include -#include -#include +#include +#include +#include +#include //kde includes #include @@ -37,26 +37,26 @@ class QWidget; class QTag; -QDomNode findChild( QDomNode &parent, const QString &name ); +TQDomNode findChild( TQDomNode &parent, const TQString &name ); class Attr { public: - Attr( QDomElement const& el, QWidget *, QTag *dtdTag ) + Attr( TQDomElement const& el, TQWidget *, 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; + virtual TQString value()=0; + virtual void setValue(const TQString &value)=0; - QString attrName() const; - QDomElement const& domElement() const { return domEl; } + TQString attrName() const; + TQDomElement const& domElement() const { return domEl; } protected: - QDomElement domEl; - QString name; + TQDomElement domEl; + TQString name; QTag *m_dtdTag; }; @@ -64,15 +64,15 @@ class Attr class Attr_line : public Attr { protected: - QLineEdit *line; + TQLineEdit *line; public: - Attr_line( QDomElement const& el, QWidget *w, QTag *dtdTag ) : Attr(el, w, dtdTag) - { line = (QLineEdit *)w; } + Attr_line( TQDomElement const& el, TQWidget *w, QTag *dtdTag ) : Attr(el, w, dtdTag) + { line = (TQLineEdit *)w; } virtual ~Attr_line(){}; - virtual QString value() { return line->text(); } - virtual void setValue(const QString &value) { line->setText(value); } + virtual TQString value() { return line->text(); } + virtual void setValue(const TQString &value) { line->setText(value); } }; @@ -82,12 +82,12 @@ class Attr_color : public Attr ColorCombo *color; public: - Attr_color( QDomElement const& el, QWidget *w, QTag *dtdTag ) : Attr(el, w, dtdTag) + Attr_color( TQDomElement const& el, TQWidget *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); } + virtual TQString value() { return color->colorName(); } + virtual void setValue(const TQString &value) { color->setColorName(value); } }; class Attr_file : public Attr @@ -96,40 +96,40 @@ class Attr_file : public Attr FileCombo *file; public: - Attr_file( QDomElement const& el, QWidget *w , QTag * dtdTag ) : Attr(el, w, dtdTag) + Attr_file( TQDomElement const& el, TQWidget *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); } + virtual TQString value() { return file->text(); } + virtual void setValue(const TQString &value) { file->setText(value); } }; class Attr_list : public Attr { protected: - QComboBox *combo; + TQComboBox *combo; public: - Attr_list( QDomElement const& el, QWidget *w, QTag *dtdTag ); + Attr_list( TQDomElement const& el, TQWidget *w, QTag *dtdTag ); virtual ~Attr_list(){}; - virtual QString value() { return combo->currentText(); } - virtual void setValue(const QString &value); + virtual TQString value() { return combo->currentText(); } + virtual void setValue(const TQString &value); }; class Attr_check : public Attr { protected: - QCheckBox *check; + TQCheckBox *check; public: - Attr_check( QDomElement const& el, QWidget *w, QTag *dtdTag ) : Attr(el, w, dtdTag) - { check = (QCheckBox *)w; } + Attr_check( TQDomElement const& el, TQWidget *w, QTag *dtdTag ) : Attr(el, w, dtdTag) + { check = (TQCheckBox *)w; } virtual ~Attr_check(){}; - virtual QString value() { return check->isChecked() ? "checked" : "unchecked" ; } - virtual void setValue(const QString &value) { check->setChecked( !value.isEmpty() ); } + virtual TQString value() { return check->isChecked() ? "checked" : "unchecked" ; } + virtual void setValue(const TQString &value) { check->setChecked( !value.isEmpty() ); } }; diff --git a/quanta/dialogs/tagdialogs/tagdialog.cpp b/quanta/dialogs/tagdialogs/tagdialog.cpp index b0da2f8b..bc5800ae 100644 --- a/quanta/dialogs/tagdialogs/tagdialog.cpp +++ b/quanta/dialogs/tagdialogs/tagdialog.cpp @@ -16,9 +16,9 @@ ***************************************************************************/ // include qt headers -#include -#include -#include +#include +#include +#include // include kde headers #include @@ -43,7 +43,7 @@ #include "kafkacommon.h" TagDialog::TagDialog(QTag* dtdTag, Tag *tag, KURL a_baseURL) - : QTabDialog( 0L, "tagdialog", true) + : TQTabDialog( 0L, "tagdialog", true) { init(dtdTag, a_baseURL); @@ -52,7 +52,7 @@ TagDialog::TagDialog(QTag* dtdTag, Tag *tag, KURL a_baseURL) { for (int i = 0; i < m_tag->attrCount(); i++) { - dict->insert(m_tag->attribute(i), new QString(m_tag->attributeValue(i))); + dict->insert(m_tag->attribute(i), new TQString(m_tag->attributeValue(i))); } } mainDlg = 0L; @@ -60,8 +60,8 @@ TagDialog::TagDialog(QTag* dtdTag, Tag *tag, KURL a_baseURL) } -TagDialog::TagDialog(QTag* dtdTag, Tag *tag, const QString& selection, KURL a_baseURL) - : QTabDialog( 0L, "tagdialog", true), m_selection(selection) +TagDialog::TagDialog(QTag* dtdTag, Tag *tag, const TQString& selection, KURL a_baseURL) + : TQTabDialog( 0L, "tagdialog", true), m_selection(selection) { init(dtdTag, a_baseURL); @@ -70,15 +70,15 @@ TagDialog::TagDialog(QTag* dtdTag, Tag *tag, const QString& selection, KURL a_ba { for (int i = 0; i < m_tag->attrCount(); i++) { - dict->insert(m_tag->attribute(i), new QString(m_tag->attributeValue(i))); + dict->insert(m_tag->attribute(i), new TQString(m_tag->attributeValue(i))); } } mainDlg = 0L; parseTag(); } -TagDialog::TagDialog(QTag* dtdTag, QString attrs, KURL a_baseURL) - : QTabDialog( 0L, "tagdialog", true) +TagDialog::TagDialog(QTag* dtdTag, TQString attrs, KURL a_baseURL) + : TQTabDialog( 0L, "tagdialog", true) { init(dtdTag, a_baseURL); if ( !attrs.isNull() ) @@ -90,8 +90,8 @@ TagDialog::TagDialog(QTag* dtdTag, QString attrs, KURL a_baseURL) parseTag(); } -TagDialog::TagDialog(QTag* dtdTag, const QString& selection, QString attrs, KURL a_baseURL) - : QTabDialog( 0L, "tagdialog", true), m_selection(selection) +TagDialog::TagDialog(QTag* dtdTag, const TQString& selection, TQString attrs, KURL a_baseURL) + : TQTabDialog( 0L, "tagdialog", true), m_selection(selection) { init(dtdTag, a_baseURL); if ( !attrs.isNull() ) @@ -118,8 +118,8 @@ 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()) ); + connect( this, TQT_SIGNAL(applyButtonPressed()), TQT_SLOT(slotAccept()) ); + connect( this, TQT_SIGNAL(cancelButtonPressed()), TQT_SLOT(reject()) ); if (!a_dtdTag) //the tag is invalid, let's create a default one { @@ -131,11 +131,11 @@ void TagDialog::init(QTag *a_dtdTag, KURL a_baseURL) dtdTag = a_dtdTag; deleteTag = false; } - dict = new QDict(1,false); + dict = new TQDict(1,false); dict->setAutoDelete(true); m_baseURL = a_baseURL; - QString caption = i18n("Tag Properties: "); + TQString caption = i18n("Tag Properties: "); caption += dtdTag->name(); setCaption( caption); resize(420,400); @@ -145,25 +145,25 @@ void TagDialog::parseTag() { if (dtdTag->name() != i18n("Unknown tag")) //read from the extra tags { - QDomDocument doc; + TQDomDocument 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()) + else if (TQFileInfo(dtdTag->fileName()).exists()) { - QFile f( dtdTag->fileName() ); + TQFile f( dtdTag->fileName() ); f.open( IO_ReadOnly ); if ( doc.setContent( &f ) ) { - QString tagName = dtdTag->name(); - QDomNodeList nodeList = doc.elementsByTagName("tag"); + TQString tagName = dtdTag->name(); + TQDomNodeList nodeList = doc.elementsByTagName("tag"); for ( uint i = 0; i < nodeList.count(); i++) { - QDomNode n = nodeList.item(i); - QString nodeTagName = n.toElement().attribute("name"); + TQDomNode n = nodeList.item(i); + TQString nodeTagName = n.toElement().attribute("name"); if (!dtdTag->parentDTD->caseSensitive) nodeTagName = nodeTagName.upper(); if (nodeTagName == tagName && n.toElement().elementsByTagName("attr").count() > 0) //read a tag @@ -178,12 +178,12 @@ void TagDialog::parseTag() } else { - QString docString = "\n\n"; - docString += QString("\n").arg(dtdTag->name()); + TQString docString = "\n\n"; + docString += TQString("\n").arg(dtdTag->name()); docString += QuantaCommon::xmlFromAttributes(dtdTag->attributes()); docString += "\n\n"; doc.setContent(docString); - QDomNode domNode2 = doc.firstChild().firstChild(); + TQDomNode domNode2 = doc.firstChild().firstChild(); mainDlg = new Tagxml( domNode2, dtdTag, m_selection, this ); } @@ -195,48 +195,48 @@ void TagDialog::parseTag() KConfig *dtdConfig = new KConfig(dtdTag->parentDTD->fileName); dtdConfig->setGroup("General"); int numOfPages = dtdConfig->readNumEntry("NumOfPages"); - extraPageList = new QPtrList(); + extraPageList = new TQPtrList(); 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; + dtdConfig->setGroup(TQString("Page%1").arg(i)); + TQString title = dtdConfig->readEntry("Title"); + TQStringList groupList; groupList = dtdConfig->readListEntry("Groups"); - QDomDocument extraDoc; //build an internal tag XML for the groups + TQDomDocument extraDoc; //build an internal tag XML for the groups bool addPage = false; - QString docString = "\n\n"; - docString += QString("\n").arg(i); + TQString docString = "\n\n"; + docString += TQString("\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()) + TQDomDocument commonDoc; + TQString commonFileName = TQFileInfo(dtdTag->fileName()).dirPath() + "/common.tag"; + if (TQFile(commonFileName).exists()) { - QFile commonFile(commonFileName); + TQFile commonFile(commonFileName); commonFile.open(IO_ReadOnly); if (doc.setContent(&commonFile)) { int row = 0; - QDomNodeList nodeList = doc.elementsByTagName("tag"); + TQDomNodeList nodeList = doc.elementsByTagName("tag"); for ( uint j = 0; j < nodeList.count(); j++) { - QDomNode node = nodeList.item(j); - QString nodeTagName = node.toElement().attribute("name"); + TQDomNode node = nodeList.item(j); + TQString 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() ) + TQString s; + TQTextStream str(&s, IO_ReadWrite); + TQString s2; + TQTextStream str2(&s2, IO_ReadWrite); + for ( TQDomNode n = node.firstChild(); !n.isNull(); n = n.nextSibling() ) { if (n.nodeName() == "attr") { - QDomElement el = n.toElement(); + TQDomElement el = n.toElement(); str.reset(); str << "" << el.attribute("name") << "" << endl; str << " " << endl; str << " " << endl; - QDomNodeList childNodes = n.childNodes(); + TQDomNodeList childNodes = n.childNodes(); for ( uint k = 0; k < childNodes.count(); k++) { - QDomNode childNode = childNodes.item(j); + TQDomNode childNode = childNodes.item(j); childNode.save(str2, 2); str << s2; } @@ -271,7 +271,7 @@ void TagDialog::parseTag() if (addPage) { extraDoc.setContent(docString); - QDomNode domNode = extraDoc.firstChild().firstChild(); + TQDomNode domNode = extraDoc.firstChild().firstChild(); extraPage = new Tagxml( domNode, dtdTag, m_selection, this ); extraPage->writeAttributes( dict ); addTab( extraPage, i18n(title.utf8()) ); @@ -283,30 +283,30 @@ void TagDialog::parseTag() } /** Insert an attribute to dict*/ -void TagDialog::insertAttribute(QString *attr, QString *value) +void TagDialog::insertAttribute(TQString *attr, TQString *value) { dict->insert( *attr , value ); } -/** Return the attributes in QDict format*/ -QDict * TagDialog::getAttributes() +/** Return the attributes in TQDict format*/ +TQDict * TagDialog::getAttributes() { return dict; } /** Return all the attributes in one string*/ -QString TagDialog::getAttributeString() +TQString TagDialog::getAttributeString() { - QDictIterator it( *dict ); + TQDictIterator it( *dict ); - QString attrStr; + TQString attrStr; while ( it.current() ) { - QString attr = QuantaCommon::attrCase(it.currentKey()); - QString val = *it.current(); + TQString attr = QuantaCommon::attrCase(it.currentKey()); + TQString val = *it.current(); - QString attrval = " "; // attr=value + TQString attrval = " "; // attr=value if ( val.isEmpty()) { attrval += attr; // for checkboxes dont print ="" @@ -322,9 +322,9 @@ QString TagDialog::getAttributeString() } /**Return the value of the attribute specified by attr. */ -QString TagDialog::getAttribute(const QString& attr) +TQString TagDialog::getAttribute(const TQString& attr) { - QString attrStr = getAttributeString()+" "; + TQString attrStr = getAttributeString()+" "; int pos = attrStr.upper().find(attr.upper()); if (pos != -1) { @@ -333,7 +333,7 @@ QString TagDialog::getAttribute(const QString& attr) } else { - return QString::null; + return TQString::null; } } @@ -362,9 +362,9 @@ KURL TagDialog::baseURL() } -void TagDialog::parseAttributes(const QString &attrs) +void TagDialog::parseAttributes(const TQString &attrs) { - QString t = attrs; + TQString t = attrs; t = t.stripWhiteSpace(); @@ -373,8 +373,8 @@ void TagDialog::parseAttributes(const QString &attrs) int i = 0; while ( !t[i].isSpace() && !t[i].isNull() && t[i] != '=' ) i++; - QString attr = t.left(i); - QString *value = new QString(); + TQString attr = t.left(i); + TQString *value = new TQString(); t = t.remove(0,i).stripWhiteSpace(); @@ -426,8 +426,8 @@ void TagDialog::insertTag(Document *w, bool insertInLine) { if (dtdTag->name() != i18n("Unknown tag")) { - QString newTag = getAttributeString(); - newTag = QString("<")+QuantaCommon::tagCase(dtdTag->name())+newTag; + TQString newTag = getAttributeString(); + newTag = TQString("<")+QuantaCommon::tagCase(dtdTag->name())+newTag; if ( dtdTag->parentDTD->singleTagStyle == "xml" && (dtdTag->isSingle() || (!qConfig.closeOptionalTags && dtdTag->isOptional())) @@ -437,11 +437,11 @@ void TagDialog::insertTag(Document *w, bool insertInLine) } newTag.append(">"); - QString secondPartOfTag = QString("name())+">"; + TQString secondPartOfTag = TQString("name())+">"; if ( !insertInLine ) { - QString space=""; + TQString space=""; space.fill( ' ',w->viewCursorIf->cursorColumnReal() ); newTag += "\n" + space + " "; secondPartOfTag = "\n" + space + secondPartOfTag; @@ -461,8 +461,8 @@ void TagDialog::insertTag(Document *w, bool insertInLine) Node *TagDialog::buildNode(Document *w) { Node *node; - QString attrStr(""); - QDictIterator it( *dict ); + TQString attrStr(""); + TQDictIterator it( *dict ); node = kafkaCommon::createNode(dtdTag->name(), "", Tag::XmlTag, w); @@ -476,9 +476,9 @@ Node *TagDialog::buildNode(Document *w) return node; } -void TagDialog::showEvent(QShowEvent *ev) +void TagDialog::showEvent(TQShowEvent *ev) { - QTabDialog::showEvent(ev); + TQTabDialog::showEvent(ev); if (dynamic_cast(mainDlg)) static_cast(mainDlg)->focusToFirstItem(); } diff --git a/quanta/dialogs/tagdialogs/tagdialog.h b/quanta/dialogs/tagdialogs/tagdialog.h index 67809bb0..3575c8e5 100644 --- a/quanta/dialogs/tagdialogs/tagdialog.h +++ b/quanta/dialogs/tagdialogs/tagdialog.h @@ -18,10 +18,10 @@ #ifndef TAGDIALOG_H #define TAGDIALOG_H -#include -#include -#include -#include +#include +#include +#include +#include #include "resource.h" @@ -37,7 +37,7 @@ class Tag; class KURL; class QShowEvent; -class TagDialog : public QTabDialog { +class TagDialog : public TQTabDialog { Q_OBJECT public: @@ -51,24 +51,24 @@ public: */ 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(QTag* dtdTag, Tag* tag, const TQString& selection, KURL a_baseURL = KURL()); + TagDialog(QTag* dtdTag, TQString attrs=TQString::null, KURL a_baseURL = KURL()); + TagDialog(QTag* dtdTag, const TQString& selection, TQString attrs=TQString::null, KURL a_baseURL = KURL()); ~TagDialog(); /** Insert an attribute to dict*/ - void insertAttribute(QString *attr, QString *value); + void insertAttribute(TQString *attr, TQString *value); /** */ void parseTag(); /** returen doc path */ KURL baseURL(); - /** Return the attributes in QDict format*/ - QDict * getAttributes(); + /** Return the attributes in TQDict format*/ + TQDict * getAttributes(); /** Return all the attributes in one string*/ - QString getAttributeString(); + TQString getAttributeString(); /**Return the value of the attribute specified by attr. */ - QString getAttribute(const QString& attr); + TQString getAttribute(const TQString& attr); /** Insert the new tag into the Document*/ void insertTag(Document *w, bool insertInLine = true); /** build and return the new Node.*/ @@ -76,27 +76,27 @@ public: public: - QWidget *mainDlg; + TQWidget *mainDlg; - QDict *dict; + TQDict *dict; KURL m_baseURL; public slots: // Public slots void slotAccept(); protected slots: - virtual void showEvent(QShowEvent *ev); + virtual void showEvent(TQShowEvent *ev); private: bool deleteTag; Tag *m_tag; QTag* dtdTag; - QString m_selection; + TQString m_selection; - QPtrList *extraPageList; + TQPtrList *extraPageList; void init(QTag* dtdTag, KURL a_baseURL); - void parseAttributes(const QString &attrs); + void parseAttributes(const TQString &attrs); }; #endif diff --git a/quanta/dialogs/tagdialogs/tagimgdlg.cpp b/quanta/dialogs/tagdialogs/tagimgdlg.cpp index efacc768..9448f48d 100644 --- a/quanta/dialogs/tagdialogs/tagimgdlg.cpp +++ b/quanta/dialogs/tagdialogs/tagimgdlg.cpp @@ -17,8 +17,8 @@ ***************************************************************************/ //qt includes -#include -#include +#include +#include //kde includes #include #include @@ -35,8 +35,8 @@ #include "tagimgdlg.moc" -TagImgDlg::TagImgDlg(const DTDStruct *dtd, QWidget *parent, const char *name) - : QWidget(parent,name), TagWidget(parent,name) +TagImgDlg::TagImgDlg(const DTDStruct *dtd, TQWidget *parent, const char *name) + : TQWidget(parent,name), TagWidget(parent,name) { m_dtd = dtd; img = 0L; @@ -45,9 +45,9 @@ TagImgDlg::TagImgDlg(const DTDStruct *dtd, QWidget *parent, const char *name) initDialog(); - connect( buttonImgSource, SIGNAL(clicked()), this, SLOT(slotFileSelect()) ); - connect( buttonRecalcImgSize, SIGNAL(clicked()), this, SLOT(slotRecalcImgSize()) ); - connect( lineImgSource, SIGNAL( returnPressed()), this, SLOT(slotLineFileSelect()) ); + connect( buttonImgSource, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotFileSelect()) ); + connect( buttonRecalcImgSize, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotRecalcImgSize()) ); + connect( lineImgSource, TQT_SIGNAL( returnPressed()), this, TQT_SLOT(slotLineFileSelect()) ); } TagImgDlg::~TagImgDlg() @@ -77,10 +77,10 @@ void TagImgDlg::slotImageSet(const KURL& imageURL) } widgetImg->slotSetImage(imgFileName); - img = new QImage(imgFileName); + img = new TQImage(imgFileName); if (!img->isNull() && lineWidth && lineHeight) { - QString s; + TQString s; s.setNum(img->width()); lineWidth->setText(s); s.setNum(img->height()); @@ -92,7 +92,7 @@ void TagImgDlg::slotImageSet(const KURL& imageURL) void TagImgDlg::slotRecalcImgSize() { if (img && lineWidth && lineHeight) { - QString s; + TQString s; s.setNum( img->width() ); lineWidth->setText( s ); s.setNum( img->height() ); @@ -120,7 +120,7 @@ void TagImgDlg::slotLineFileSelect() slotImageSet(url); } -void TagImgDlg::readAttributes( QDict *d ) +void TagImgDlg::readAttributes( TQDict *d ) { dict = d; @@ -140,10 +140,10 @@ void TagImgDlg::readAttributes( QDict *d ) updateDict("border",spinBorder ); } -void TagImgDlg::writeAttributes( QDict *d ) +void TagImgDlg::writeAttributes( TQDict *d ) { dict = d; - QString *t; // value of attr. + TQString *t; // value of attr. if (( t=d->find("src") )) { diff --git a/quanta/dialogs/tagdialogs/tagimgdlg.h b/quanta/dialogs/tagdialogs/tagimgdlg.h index f1229ee2..73730c84 100644 --- a/quanta/dialogs/tagdialogs/tagimgdlg.h +++ b/quanta/dialogs/tagdialogs/tagimgdlg.h @@ -20,11 +20,11 @@ #define TAGIMGDLG_H //Generated area. DO NOT EDIT!!!(begin) -#include -#include +#include +#include #include -#include -#include +#include +#include //Generated area. DO NOT EDIT!!!(end) #include "tagwidget.h" @@ -38,41 +38,41 @@ class QImage; *@author Dmitry Poplavsky & Yacovlev Alexander */ -class TagImgDlg : public QWidget, TagWidget { +class TagImgDlg : public TQWidget, TagWidget { Q_OBJECT public: - TagImgDlg(const DTDStruct *dtd, QWidget *parent=0, const char *name=0); + TagImgDlg(const DTDStruct *dtd, TQWidget *parent=0, const char *name=0); ~TagImgDlg(); public: void initDialog(); //Generated area. DO NOT EDIT!!!(begin) - QLabel *labelImgSource; + TQLabel *labelImgSource; KLineEdit *lineImgSource; - QPushButton *buttonImgSource; - QPushButton *buttonRecalcImgSize; - QLabel *QLabel_4; + TQPushButton *buttonImgSource; + TQPushButton *buttonRecalcImgSize; + TQLabel *QLabel_4; KLineEdit *lineWidth; - QLabel *QLabel_5; + TQLabel *QLabel_5; KLineEdit *lineHeight; - QLabel *QLabel_6; + TQLabel *QLabel_6; KLineEdit *lineHSpace; - QLabel *QLabel_7; + TQLabel *QLabel_7; KLineEdit *lineVSpace; - QLabel *QLabel_8; + TQLabel *QLabel_8; KLineEdit *lineAltText; - QLabel *QLabel_9; - QSpinBox *spinBorder; - QLabel *QLabel_10; - QComboBox *comboAlign; + TQLabel *QLabel_9; + TQSpinBox *spinBorder; + TQLabel *QLabel_10; + TQComboBox *comboAlign; PictureView *widgetImg; - QPushButton *buttonOk; - QPushButton *buttonCancel; + TQPushButton *buttonOk; + TQPushButton *buttonCancel; //Generated area. DO NOT EDIT!!!(end) private: - QImage *img; - QString imgFileName; + TQImage *img; + TQString imgFileName; bool isTmpFile; const DTDStruct *m_dtd; @@ -83,8 +83,8 @@ public slots: // Public slots void slotFileSelect(); void slotLineFileSelect(); - void readAttributes( QDict *d ); - void writeAttributes( QDict *d ); + void readAttributes( TQDict *d ); + void writeAttributes( TQDict *d ); /** recalculate image size */ void slotRecalcImgSize(); }; diff --git a/quanta/dialogs/tagdialogs/tagimgdlgdata.cpp b/quanta/dialogs/tagdialogs/tagimgdlgdata.cpp index ec4a6a36..69d6a72e 100644 --- a/quanta/dialogs/tagdialogs/tagimgdlgdata.cpp +++ b/quanta/dialogs/tagdialogs/tagimgdlgdata.cpp @@ -13,24 +13,24 @@ #include #include -#include -#include +#include +#include #include "pictureview.h" #include "tagimgdlg.h" void TagImgDlg::initDialog(){ - QGridLayout *grid = new QGridLayout( this ); + TQGridLayout *grid = new TQGridLayout( this ); grid->setSpacing( 13 ); grid->setMargin( 11 ); - labelImgSource= new QLabel(this,"labelImgSource"); + labelImgSource= new TQLabel(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= new TQPushButton(this,"NoName"); buttonImgSource->setText(i18n("...")); grid->addMultiCellWidget(buttonImgSource, 0, 0, 4, 4); @@ -42,7 +42,7 @@ void TagImgDlg::initDialog(){ lineWidth = 0L; if (imgTag->attribute("width")) { - QLabel_4= new QLabel(this,"NoName"); + QLabel_4= new TQLabel(this,"NoName"); QLabel_4->setText(i18n("Width:")); grid->addMultiCellWidget(QLabel_4, 1, 1, 0, 0); @@ -54,7 +54,7 @@ void TagImgDlg::initDialog(){ lineHeight = 0L; if (imgTag->attribute("height")) { - QLabel_5= new QLabel(this,"NoName"); + QLabel_5= new TQLabel(this,"NoName"); QLabel_5->setText(i18n("Height:")); grid->addMultiCellWidget(QLabel_5, 1, 1, 2, 2); @@ -63,14 +63,14 @@ void TagImgDlg::initDialog(){ grid->addMultiCellWidget(lineHeight, 1, 1, 3, 3); } - buttonRecalcImgSize= new QPushButton(this,"NoName"); + buttonRecalcImgSize= new TQPushButton(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= new TQLabel(this,"NoName"); QLabel_6->setText(i18n("HSpace:")); grid->addMultiCellWidget(QLabel_6, 2, 2, 0, 0); @@ -81,7 +81,7 @@ void TagImgDlg::initDialog(){ lineVSpace = 0L; if (imgTag->attribute("vspace")) { - QLabel_7= new QLabel(this,"NoName"); + QLabel_7= new TQLabel(this,"NoName"); QLabel_7->setText(i18n("VSpace:")); grid->addMultiCellWidget(QLabel_7, 2, 2, 2, 2); @@ -89,7 +89,7 @@ void TagImgDlg::initDialog(){ grid->addMultiCellWidget(lineVSpace, 2, 2, 3, 3); } - QLabel_8= new QLabel(this,"NoName"); + QLabel_8= new TQLabel(this,"NoName"); QLabel_8->setText(i18n("Alternate text:")); grid->addMultiCellWidget(QLabel_8, 3, 3, 0, 0); @@ -99,11 +99,11 @@ void TagImgDlg::initDialog(){ spinBorder = 0L; if (imgTag->attribute("border")) { - QLabel_9= new QLabel(this,"NoName"); + QLabel_9= new TQLabel(this,"NoName"); QLabel_9->setText(i18n("Border:")); grid->addMultiCellWidget(QLabel_9, 4, 4, 0, 0); - spinBorder= new QSpinBox(this,"NoName"); + spinBorder= new TQSpinBox(this,"NoName"); spinBorder->setRange(0,20); grid->addMultiCellWidget(spinBorder, 4, 4, 1, 1); } @@ -111,11 +111,11 @@ void TagImgDlg::initDialog(){ comboAlign = 0L; if (imgTag->attribute("align")) { - QLabel_10= new QLabel(this,"NoName"); + QLabel_10= new TQLabel(this,"NoName"); QLabel_10->setText(i18n("Align:")); grid->addMultiCellWidget(QLabel_10, 4, 4, 2, 2); - comboAlign= new QComboBox(this,"NoName"); + comboAlign= new TQComboBox(this,"NoName"); grid->addMultiCellWidget(comboAlign, 4, 4, 3, 4); comboAlign->insertStringList(imgTag->attribute("align")->values); } diff --git a/quanta/dialogs/tagdialogs/tagmaildlg.cpp b/quanta/dialogs/tagdialogs/tagmaildlg.cpp index 329ffd59..3ed62c57 100644 --- a/quanta/dialogs/tagdialogs/tagmaildlg.cpp +++ b/quanta/dialogs/tagdialogs/tagmaildlg.cpp @@ -28,21 +28,21 @@ #include //qt includes -#include +#include #include -#include -#include +#include +#include -TagMailDlg::TagMailDlg(QWidget *parent, const char *name) +TagMailDlg::TagMailDlg(TQWidget *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()) ); + connect( buttonOk, TQT_SIGNAL(clicked()), TQT_SLOT(accept()) ); + connect( buttonCancel, TQT_SIGNAL(clicked()), TQT_SLOT(reject()) ); + connect( buttonAddressSelect, TQT_SIGNAL(clicked()), TQT_SLOT(slotSelectAddress()) ); buttonOk->setIconSet(SmallIconSet("button_ok")); buttonCancel->setIconSet(SmallIconSet("button_cancel")); lineEmail->setFocus(); @@ -54,13 +54,13 @@ TagMailDlg::~TagMailDlg(){ void TagMailDlg::slotSelectAddress() { //Based on KMail - QString addr, email, emailString; - QStringList result; + TQString addr, email, emailString; + TQStringList 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() + " " + + TQStringList emails = (*it).emails(); + TQString n = (*it).prefix() + " " + (*it).givenName() + " " + (*it).additionalName() + " " + (*it).familyName() + " " + @@ -71,7 +71,7 @@ void TagMailDlg::slotSelectAddress() 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) + if (n.find(TQRegExp("[^ 0-9A-Za-z\\x0080-\\xFFFF]")) != -1) addr = qConfig.attrValueQuotation + n + qConfig.attrValueQuotation + " "; else addr = n + " "; diff --git a/quanta/dialogs/tagdialogs/tagmaildlg.h b/quanta/dialogs/tagdialogs/tagmaildlg.h index 590c646b..32dffaa5 100644 --- a/quanta/dialogs/tagdialogs/tagmaildlg.h +++ b/quanta/dialogs/tagdialogs/tagmaildlg.h @@ -25,7 +25,7 @@ class TagMailDlg : public TagMail { Q_OBJECT public: - TagMailDlg(QWidget *parent=0, const char *name=0); + TagMailDlg(TQWidget *parent=0, const char *name=0); ~TagMailDlg(); private slots: // Private slots /** Select a mail address, using the KABC */ diff --git a/quanta/dialogs/tagdialogs/tagmiscdlg.cpp b/quanta/dialogs/tagdialogs/tagmiscdlg.cpp index 13893a53..9313bb08 100644 --- a/quanta/dialogs/tagdialogs/tagmiscdlg.cpp +++ b/quanta/dialogs/tagdialogs/tagmiscdlg.cpp @@ -16,14 +16,14 @@ #include "tagmiscdlg.h" #include "tagmisc.h" #include -#include -#include +#include +#include -TagMiscDlg::TagMiscDlg( QWidget* parent, const char* name, bool addClosingTag, const QString &element ) +TagMiscDlg::TagMiscDlg( TQWidget* parent, const char* name, bool addClosingTag, const TQString &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 & ) ) ); + connect( miscWidget->elementName, TQT_SIGNAL( textChanged ( const TQString & ) ), this, TQT_SLOT( slotMiscTagChanged(const TQString & ) ) ); setMainWidget(miscWidget); miscWidget->addClosingTag->setChecked(addClosingTag); miscWidget->elementName->setText(element); @@ -35,13 +35,13 @@ TagMiscDlg::~TagMiscDlg() } -void TagMiscDlg::slotMiscTagChanged( const QString &_tag ) +void TagMiscDlg::slotMiscTagChanged( const TQString &_tag ) { enableButtonOK( !_tag.isEmpty() ); } -QString TagMiscDlg::elementTagName() const +TQString TagMiscDlg::elementTagName() const { return miscWidget->elementName->text(); } diff --git a/quanta/dialogs/tagdialogs/tagmiscdlg.h b/quanta/dialogs/tagdialogs/tagmiscdlg.h index 8e9ded91..e8d68c3d 100644 --- a/quanta/dialogs/tagdialogs/tagmiscdlg.h +++ b/quanta/dialogs/tagdialogs/tagmiscdlg.h @@ -26,14 +26,14 @@ class TagMiscDlg : public KDialogBase Q_OBJECT public: - TagMiscDlg( QWidget* parent = 0, const char* name = 0, bool addClosingTag=true, const QString &element=QString::null ); + TagMiscDlg( TQWidget* parent = 0, const char* name = 0, bool addClosingTag=true, const TQString &element=TQString::null ); ~TagMiscDlg(); - QString elementTagName() const; + TQString elementTagName() const; bool addClosingTag() const; protected slots: - void slotMiscTagChanged( const QString & ); + void slotMiscTagChanged( const TQString & ); private: TagMisc *miscWidget; diff --git a/quanta/dialogs/tagdialogs/tagquicklistdlg.cpp b/quanta/dialogs/tagdialogs/tagquicklistdlg.cpp index ef971e83..7a9edbdb 100644 --- a/quanta/dialogs/tagdialogs/tagquicklistdlg.cpp +++ b/quanta/dialogs/tagdialogs/tagquicklistdlg.cpp @@ -16,15 +16,15 @@ ***************************************************************************/ #include "tagquicklistdlg.h" #include "tagquicklistdlg.moc" -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include -TagQuickListDlg::TagQuickListDlg(QWidget *parent, const char *name) - : QDialog(parent,name,true) +TagQuickListDlg::TagQuickListDlg(TQWidget *parent, const char *name) + : TQDialog(parent,name,true) { setCaption(name); @@ -33,8 +33,8 @@ TagQuickListDlg::TagQuickListDlg(QWidget *parent, const char *name) groupBox->insert(radioOrdered); groupBox->insert(radioUnordered); - connect( buttonOk, SIGNAL(clicked()), SLOT(accept()) ); - connect( buttonCancel, SIGNAL(clicked()), SLOT(reject()) ); + connect( buttonOk, TQT_SIGNAL(clicked()), TQT_SLOT(accept()) ); + connect( buttonCancel, TQT_SIGNAL(clicked()), TQT_SLOT(reject()) ); } TagQuickListDlg::~TagQuickListDlg(){ diff --git a/quanta/dialogs/tagdialogs/tagquicklistdlg.h b/quanta/dialogs/tagdialogs/tagquicklistdlg.h index f2426fb3..90ea666b 100644 --- a/quanta/dialogs/tagdialogs/tagquicklistdlg.h +++ b/quanta/dialogs/tagdialogs/tagquicklistdlg.h @@ -18,9 +18,9 @@ #ifndef TAGQUICKLISTDLG_H #define TAGQUICKLISTDLG_H -#include +#include -#include +#include class QLabel; class QSpinBox; class QPushButton; @@ -31,22 +31,22 @@ class QButtonGroup; *@author Dmitry Poplavsky & Yacovlev Alexander */ -class TagQuickListDlg : public QDialog { +class TagQuickListDlg : public TQDialog { Q_OBJECT public: - TagQuickListDlg(QWidget *parent=0, const char *name=0); + TagQuickListDlg(TQWidget *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; + TQLabel *QLabel_1; + TQSpinBox *spinBoxRows; + TQPushButton *buttonOk; + TQLabel *QLabel_2; + TQRadioButton *radioOrdered; + TQRadioButton *radioUnordered; + TQPushButton *buttonCancel; + TQButtonGroup *groupBox; private: }; diff --git a/quanta/dialogs/tagdialogs/tagquicklistdlgdata.cpp b/quanta/dialogs/tagdialogs/tagquicklistdlgdata.cpp index 331aefbb..f7e7b713 100644 --- a/quanta/dialogs/tagdialogs/tagquicklistdlgdata.cpp +++ b/quanta/dialogs/tagdialogs/tagquicklistdlgdata.cpp @@ -9,24 +9,24 @@ **********************************************************************/ #include #include -#include +#include #include "tagquicklistdlg.h" -#include -#include +#include +#include #include -#include +#include #include void TagQuickListDlg::initDialog() { resize(230,150); - QLabel_1= new QLabel(this,"NoName"); + QLabel_1= new TQLabel(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= new TQSpinBox(this,"NoName"); spinBoxRows->setGeometry(120,10,100,25); spinBoxRows->setMinimumSize(0,0); spinBoxRows->setRange(1,99); @@ -35,27 +35,27 @@ void TagQuickListDlg::initDialog() buttonOk->setGeometry(10,110,100,30); buttonOk->setMinimumSize(0,0); - QLabel_2= new QLabel(this,"NoName"); + QLabel_2= new TQLabel(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= new TQPushButton(this,"NoName"); buttonCancel->setGeometry(120,110,100,30); buttonCancel->setMinimumSize(0,0); buttonCancel->setText(KStdGuiItem::cancel().text()); - groupBox= new QButtonGroup(this,"NoName"); + groupBox= new TQButtonGroup(this,"NoName"); groupBox->setGeometry(120,40,100,60); groupBox->setMinimumSize(0,0); - radioOrdered= new QRadioButton(groupBox,"NoName"); + radioOrdered= new TQRadioButton(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= new TQRadioButton(groupBox,"NoName"); radioUnordered->setGeometry(5,30,90,25); radioUnordered->setMinimumSize(0,0); radioUnordered->setText(i18n("Unordered")); diff --git a/quanta/dialogs/tagdialogs/tagwidget.cpp b/quanta/dialogs/tagdialogs/tagwidget.cpp index 0d01f7a3..014549bc 100644 --- a/quanta/dialogs/tagdialogs/tagwidget.cpp +++ b/quanta/dialogs/tagdialogs/tagwidget.cpp @@ -15,11 +15,11 @@ ***************************************************************************/ // QT files -#include +#include #include -#include -#include -#include +#include +#include +#include // KDE files #include @@ -30,7 +30,7 @@ #include "tagdialog.h" #include "resource.h" -TagWidget::TagWidget(QObject *parent, const char *) +TagWidget::TagWidget(TQObject *parent, const char *) { baseURL = ((TagDialog *)parent)->baseURL(); } @@ -38,9 +38,9 @@ TagWidget::TagWidget(QObject *parent, const char *) TagWidget::~TagWidget(){ } -void TagWidget::updateDict(const QString &attr, QComboBox *combo ) +void TagWidget::updateDict(const TQString &attr, TQComboBox *combo ) { - QString *s = new QString(combo->currentText()); + TQString *s = new TQString(combo->currentText()); if (s->isEmpty()) { dict->remove(attr); @@ -50,7 +50,7 @@ void TagWidget::updateDict(const QString &attr, QComboBox *combo ) dict->replace(attr, s); } -void TagWidget::setValue(const QString &val, QComboBox *combo) +void TagWidget::setValue(const TQString &val, TQComboBox *combo) { bool found = false; int num = combo->count(); @@ -68,24 +68,24 @@ void TagWidget::setValue(const QString &val, QComboBox *combo) combo->setEditText(val); } -void TagWidget::setValue(const QString &val, QLineEdit *line) +void TagWidget::setValue(const TQString &val, TQLineEdit *line) { line->setText(val); } -void TagWidget::setValue(const QString &val, QSpinBox *spin) +void TagWidget::setValue(const TQString &val, TQSpinBox *spin) { spin->setValue(val.toInt()); } -void TagWidget::setValue(const QString &val, KColorButton *button) +void TagWidget::setValue(const TQString &val, KColorButton *button) { button->setColor(val); } -void TagWidget::updateDict(const QString &attr, QLineEdit *line ) +void TagWidget::updateDict(const TQString &attr, TQLineEdit *line ) { - QString *s = new QString(line->text()); + TQString *s = new TQString(line->text()); if (s->isEmpty()) { dict->remove(attr); @@ -95,9 +95,9 @@ void TagWidget::updateDict(const QString &attr, QLineEdit *line ) dict->replace(attr, s); } -void TagWidget::updateDict(const QString &attr, QSpinBox *spin ) +void TagWidget::updateDict(const TQString &attr, TQSpinBox *spin ) { - QString *s = new QString(spin->text()); + TQString *s = new TQString(spin->text()); if (s->isEmpty()) { dict->remove(attr); @@ -107,13 +107,13 @@ void TagWidget::updateDict(const QString &attr, QSpinBox *spin ) dict->replace(attr, s); } -void TagWidget::updateDict(const QString &attr, QCheckBox *check ) +void TagWidget::updateDict(const TQString &attr, TQCheckBox *check ) { if (!check->isChecked()) dict->remove(attr); else { if (!dict->find(attr)) - dict->insert(attr, new QString("")); + dict->insert(attr, new TQString("")); } } diff --git a/quanta/dialogs/tagdialogs/tagwidget.h b/quanta/dialogs/tagdialogs/tagwidget.h index 89f8e371..83508aab 100644 --- a/quanta/dialogs/tagdialogs/tagwidget.h +++ b/quanta/dialogs/tagdialogs/tagwidget.h @@ -17,8 +17,8 @@ #ifndef TAGWIDGET_H #define TAGWIDGET_H -#include -#include +#include +#include class QComboBox; class QLineEdit; @@ -33,23 +33,23 @@ class KURL; class TagWidget { public: - TagWidget(QObject *parent=0, const char *name=0); + TagWidget(TQObject *parent=0, const char *name=0); virtual ~TagWidget(); - virtual void readAttributes(QDict *) {}; - virtual void writeAttributes(QDict *) {}; - void updateDict(const QString &attr, QComboBox *combo); - void updateDict(const QString &attr, QLineEdit *line); - void updateDict(const QString &attr, QSpinBox *spin); - void updateDict(const QString &attr, QCheckBox *check); + virtual void readAttributes(TQDict *) {}; + virtual void writeAttributes(TQDict *) {}; + void updateDict(const TQString &attr, TQComboBox *combo); + void updateDict(const TQString &attr, TQLineEdit *line); + void updateDict(const TQString &attr, TQSpinBox *spin); + void updateDict(const TQString &attr, TQCheckBox *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); + void setValue(const TQString &val, TQComboBox *combo); + void setValue(const TQString &val, TQLineEdit *line); + void setValue(const TQString &val, TQSpinBox *spin); + void setValue(const TQString &val, KColorButton *button); protected: - QDict *dict; // dictionary of attributes and values + TQDict *dict; // dictionary of attributes and values KURL baseURL; }; diff --git a/quanta/dialogs/tagdialogs/tagxml.cpp b/quanta/dialogs/tagdialogs/tagxml.cpp index c9114d62..5c07b341 100644 --- a/quanta/dialogs/tagdialogs/tagxml.cpp +++ b/quanta/dialogs/tagdialogs/tagxml.cpp @@ -21,22 +21,22 @@ #include #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include "styleeditor.h" -Tagxml::Tagxml( QDomNode &d, QTag *dtdTag, QWidget *parent, const char *name) - :QWidget(parent,name), TagWidget(parent,name), doc(d) +Tagxml::Tagxml( TQDomNode &d, QTag *dtdTag, TQWidget *parent, const char *name) + :TQWidget(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) +Tagxml::Tagxml( TQDomNode &d, QTag *dtdTag, const TQString& selection, TQWidget *parent, const char *name) + : TQWidget(parent,name), TagWidget(parent,name), doc(d), m_selection(selection) { initialize(d, dtdTag); } @@ -45,24 +45,24 @@ Tagxml::~Tagxml() { } -void Tagxml::initialize(QDomNode &d, QTag *dtdTag) +void Tagxml::initialize(TQDomNode &d, QTag *dtdTag) { m_dtd = dtdTag->parentDTD; m_dtdTag = dtdTag; - QGridLayout *grid = new QGridLayout( this ); + TQGridLayout *grid = new TQGridLayout( 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() ) + for ( TQDomNode n = d.firstChild(); !n.isNull(); n = n.nextSibling() ) { - QDomNode location = findChild(n,"location"); + TQDomNode location = findChild(n,"location"); if ( location.isNull() ) continue; //debug( n.nodeName() ); - QDomElement el = location.toElement(); + TQDomElement el = location.toElement(); int row = el.attribute("row","0").toInt(); int col = el.attribute("col","0").toInt(); @@ -78,34 +78,34 @@ void Tagxml::initialize(QDomNode &d, QTag *dtdTag) // qDebug("%s col:%d row:%d cs:%d, rs:%d", n.nodeName().data(), col,row,colspan,rowspan ); - QString tip; - QDomNode tooltip = findChild( n ,"tooltip" ); + TQString tip; + TQDomNode tooltip = findChild( n ,"tooltip" ); if ( !tooltip.isNull() ) { if ( tooltip.firstChild().isText() ) { - QDomText text = tooltip.firstChild().toText(); + TQDomText text = tooltip.firstChild().toText(); tip = text.data(); } } - QString whatsThis; - QDomNode what = findChild( n ,"whatsthis" ); + TQString whatsThis; + TQDomNode what = findChild( n ,"whatsthis" ); if ( !what.isNull() ) { if ( what.firstChild().isText() ) { - QDomText text = what.firstChild().toText(); + TQDomText 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(); + TQLabel *label = new TQLabel(this); + TQDomElement ltext = findChild(n,"text").toElement(); if ( !ltext.isNull() ) - label->setText( ltext.text().isEmpty() ? QString("") : (ltext.text()+":") ); + label->setText( ltext.text().isEmpty() ? TQString("") : (ltext.text()+":") ); if ( !tip.isNull() ) - QToolTip::add( label, tip ); + TQToolTip::add( label, tip ); if ( !whatsThis.isNull() ) - QWhatsThis::add( label, whatsThis ); + TQWhatsThis::add( label, whatsThis ); grid->addMultiCellWidget( label, row, row+rowspan, col, col+colspan ); } @@ -113,19 +113,19 @@ void Tagxml::initialize(QDomNode &d, QTag *dtdTag) if ( n.nodeName() == "attr" ) //an attribute { - QDomElement el(n.toElement()); - QString type = el.attribute("type","input"); + TQDomElement el(n.toElement()); + TQString type = el.attribute("type","input"); - QDomElement ltext = findChild(n,"text").toElement(); + TQDomElement 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()+":") ); + TQLabel *label = new TQLabel(this); + label->setText( ltext.text().isEmpty() ? TQString("") : (ltext.text()+":") ); if ( !tip.isNull() ) - QToolTip::add( label, tip ); + TQToolTip::add( label, tip ); if ( !whatsThis.isNull() ) - QWhatsThis::add( label, whatsThis ); + TQWhatsThis::add( label, whatsThis ); grid->addMultiCellWidget( label, textrow, textrow+textrowspan, textcol, textcol+textcolspan ); } @@ -137,9 +137,9 @@ void Tagxml::initialize(QDomNode &d, QTag *dtdTag) grid->addMultiCellWidget( w, row, row+rowspan, col, col+colspan ); if ( !tip.isNull() ) - QToolTip::add( w, tip ); + TQToolTip::add( w, tip ); if ( !whatsThis.isNull() ) - QWhatsThis::add( w, whatsThis ); + TQWhatsThis::add( w, whatsThis ); Attr_line *attr = new Attr_line(el, w, m_dtdTag); attributes.append(attr); @@ -149,16 +149,16 @@ void Tagxml::initialize(QDomNode &d, QTag *dtdTag) else if ( type == "check" ) { - QCheckBox *w = new QCheckBox(this); + TQCheckBox *w = new TQCheckBox(this); grid->addMultiCellWidget( w, row, row+rowspan, col, col+colspan ); - QDomElement ltext = findChild(n,"text").toElement(); + TQDomElement ltext = findChild(n,"text").toElement(); if ( !ltext.isNull() ) w->setText( ltext.text() ); if ( !tip.isNull() ) - QToolTip::add( w, tip ); + TQToolTip::add( w, tip ); if ( !whatsThis.isNull() ) - QWhatsThis::add( w, whatsThis ); + TQWhatsThis::add( w, whatsThis ); Attr_check *attr = new Attr_check(el, w, m_dtdTag); attributes.append(attr); @@ -167,12 +167,12 @@ void Tagxml::initialize(QDomNode &d, QTag *dtdTag) } else if ( type == "list" ) { - QComboBox *w = new QComboBox(true, this); + TQComboBox *w = new TQComboBox(true, this); grid->addMultiCellWidget( w, row, row+rowspan, col, col+colspan ); if ( !tip.isNull() ) - QToolTip::add( w, tip ); + TQToolTip::add( w, tip ); if ( !whatsThis.isNull() ) - QWhatsThis::add( w, whatsThis ); + TQWhatsThis::add( w, whatsThis ); Attr_list *attr = new Attr_list(el, w, dtdTag); attributes.append(attr); if (!m_firstItem) @@ -184,9 +184,9 @@ void Tagxml::initialize(QDomNode &d, QTag *dtdTag) grid->addMultiCellWidget( w, row, row+rowspan, col, col+colspan ); if ( !tip.isNull() ) - QToolTip::add( w, tip ); + TQToolTip::add( w, tip ); if ( !whatsThis.isNull() ) - QWhatsThis::add( w, whatsThis ); + TQWhatsThis::add( w, whatsThis ); Attr_color *attr = new Attr_color(el, w, m_dtdTag); attributes.append(attr); @@ -199,9 +199,9 @@ void Tagxml::initialize(QDomNode &d, QTag *dtdTag) grid->addMultiCellWidget( w, row, row+rowspan, col, col+colspan ); if ( !tip.isNull() ) - QToolTip::add( w, tip ); + TQToolTip::add( w, tip ); if ( !whatsThis.isNull() ) - QWhatsThis::add( w, whatsThis ); + TQWhatsThis::add( w, whatsThis ); Attr_file *attr = new Attr_file(el, w, m_dtdTag); attributes.append(attr); if (!m_firstItem) @@ -215,9 +215,9 @@ void Tagxml::initialize(QDomNode &d, QTag *dtdTag) grid->addMultiCellWidget( w, row, row+rowspan, col, col+colspan ); if ( !tip.isNull() ) - QToolTip::add( w, tip ); + TQToolTip::add( w, tip ); if ( !whatsThis.isNull() ) - QWhatsThis::add( w, whatsThis ); + TQWhatsThis::add( w, whatsThis ); Attr_line *attr = new Attr_line(el, w->lineEdit(), m_dtdTag); attributes.append(attr); @@ -231,14 +231,14 @@ void Tagxml::initialize(QDomNode &d, QTag *dtdTag) if ( n.nodeName() == "spacer") { - QDomElement el = n.toElement(); + TQDomElement el = n.toElement(); - QSpacerItem* spacer; + TQSpacerItem* spacer; if ( el.attribute("orientation","v") == "v" ) - spacer = new QSpacerItem( 5, 10, QSizePolicy::Fixed, QSizePolicy::Expanding ); + spacer = new TQSpacerItem( 5, 10, TQSizePolicy::Fixed, TQSizePolicy::Expanding ); else - spacer = new QSpacerItem( 10, 5, QSizePolicy::Expanding, QSizePolicy::Fixed ); + spacer = new TQSpacerItem( 10, 5, TQSizePolicy::Expanding, TQSizePolicy::Fixed ); grid->addItem(spacer,row,col); } @@ -251,9 +251,9 @@ void Tagxml::focusToFirstItem() m_firstItem->setFocus(); } -void Tagxml::readAttributes( QDict *d ) +void Tagxml::readAttributes( TQDict *d ) { - QString name,value; + TQString name,value; Attr * attr = attributes.first(); while ( attr ) { @@ -270,10 +270,10 @@ void Tagxml::readAttributes( QDict *d ) { if (m_dtd->booleanAttributes == "simple") { - d->replace(name, new QString("") ); + d->replace(name, new TQString("") ); } else { - d->replace(name, new QString(m_dtd->booleanTrue)); //it seems that browsers don't like , so if a checkbox is false, don't put in the tag at all + d->replace(name, new TQString(m_dtd->booleanTrue)); //it seems that browsers don't like , so if a checkbox is false, don't put in the tag at all } } else @@ -283,16 +283,16 @@ void Tagxml::readAttributes( QDict *d ) /* } else { value = (value == "checked")?m_dtd->booleanTrue:m_dtd->booleanFalse; - d->replace(name, new QString(value)); + d->replace(name, new TQString(value)); } */ } else if (dynamic_cast(attr)) { // value = KURL::encode_string(value); - d->replace(name, new QString(value)); + d->replace(name, new TQString(value)); } else { - value.replace(QRegExp("&(?!amp;)"), "&"); - d->replace(name, new QString(value) ); + value.replace(TQRegExp("&(?!amp;)"), "&"); + d->replace(name, new TQString(value) ); } } @@ -302,9 +302,9 @@ void Tagxml::readAttributes( QDict *d ) } -void Tagxml::writeAttributes( QDict *d ) +void Tagxml::writeAttributes( TQDict *d ) { - QString name,value; + TQString name,value; Attr * attr = attributes.first(); @@ -313,7 +313,7 @@ void Tagxml::writeAttributes( QDict *d ) name = attr->attrName(); - QString *v = d->find(name); + TQString *v = d->find(name); if ( v ) { v->replace("&","&"); if ( dynamic_cast(attr) ) // checkbox diff --git a/quanta/dialogs/tagdialogs/tagxml.h b/quanta/dialogs/tagdialogs/tagxml.h index 52c2973d..780b6b91 100644 --- a/quanta/dialogs/tagdialogs/tagxml.h +++ b/quanta/dialogs/tagdialogs/tagxml.h @@ -18,37 +18,37 @@ #ifndef TAGXML_H #define TAGXML_H -#include -#include -#include +#include +#include +#include #include "tagattr.h" #include "tagwidget.h" #include "qtag.h" -class Tagxml : public QWidget, TagWidget { +class Tagxml : public TQWidget, 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); + Tagxml(TQDomNode &d, QTag *dtdTag, TQWidget* parent=0, const char *name=0); + Tagxml(TQDomNode &d, QTag *dtdTag, const TQString& selection, TQWidget* parent=0, const char *name=0); /** destructor */ ~Tagxml(); - QPtrList attributes; + TQPtrList attributes; - void readAttributes( QDict *d); - void writeAttributes( QDict *d ); + void readAttributes( TQDict *d); + void writeAttributes( TQDict *d ); void focusToFirstItem(); private: - void initialize(QDomNode &d, QTag *dtdTag); + void initialize(TQDomNode &d, QTag *dtdTag); - QDomNode doc; + TQDomNode doc; const DTDStruct *m_dtd; - QWidget *m_firstItem; + TQWidget *m_firstItem; QTag *m_dtdTag; - QString m_selection; + TQString m_selection; }; diff --git a/quanta/messages/annotationoutput.cpp b/quanta/messages/annotationoutput.cpp index 8c8d7d90..48ebb7fd 100644 --- a/quanta/messages/annotationoutput.cpp +++ b/quanta/messages/annotationoutput.cpp @@ -10,15 +10,15 @@ // // -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -35,7 +35,7 @@ #include "quantacommon.h" #include "viewmanager.h" -AnnotationOutput::AnnotationOutput(QWidget *parent, const char *name) +AnnotationOutput::AnnotationOutput(TQWidget *parent, const char *name) : KTabWidget(parent, name) { m_currentFileAnnotations = new MessageOutput(this); @@ -50,7 +50,7 @@ AnnotationOutput::AnnotationOutput(QWidget *parent, const char *name) m_yourAnnotations->setLineWidth(2); addTab(m_yourAnnotations, i18n("For You")); - connect(m_yourAnnotations, SIGNAL(executed(QListViewItem*)), SLOT(yourAnnotationsItemExecuted(QListViewItem *))); + connect(m_yourAnnotations, TQT_SIGNAL(executed(TQListViewItem*)), TQT_SLOT(yourAnnotationsItemExecuted(TQListViewItem *))); m_allAnnotations = new KListView(this); m_allAnnotations->addColumn("1", -1); @@ -59,14 +59,14 @@ AnnotationOutput::AnnotationOutput(QWidget *parent, const char *name) m_allAnnotations->header()->hide(); m_allAnnotations->setSorting(1); m_allAnnotations->setLineWidth(2); - connect(m_allAnnotations, SIGNAL(executed(QListViewItem*)), SLOT(allAnnotationsItemExecuted(QListViewItem *))); + connect(m_allAnnotations, TQT_SIGNAL(executed(TQListViewItem*)), TQT_SLOT(allAnnotationsItemExecuted(TQListViewItem *))); addTab(m_allAnnotations, i18n("All Files")); - connect(this, SIGNAL(currentChanged(QWidget*)), SLOT(tabChanged(QWidget*))); + connect(this, TQT_SIGNAL(currentChanged(TQWidget*)), TQT_SLOT(tabChanged(TQWidget*))); - m_updateTimer = new QTimer(this); - connect(m_updateTimer, SIGNAL(timeout()), this, SLOT(slotUpdateNextFile())); + m_updateTimer = new TQTimer(this); + connect(m_updateTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotUpdateNextFile())); m_yourAnnotationsNum = 0; } @@ -75,16 +75,16 @@ AnnotationOutput::~AnnotationOutput() { } -void AnnotationOutput::tabChanged(QWidget *w) +void AnnotationOutput::tabChanged(TQWidget *w) { if (w == m_allAnnotations || w == m_yourAnnotations) readAnnotations(); } -void AnnotationOutput::insertAnnotation(uint line, const QString& fileName, const QPair& annotation) +void AnnotationOutput::insertAnnotation(uint line, const TQString& fileName, const QPair& annotation) { line++; - QString s = i18n("Line %1: %2").arg(line).arg(annotation.first); + TQString s = i18n("Line %1: %2").arg(line).arg(annotation.first); s.replace('\n', ' '); m_currentFileAnnotations->showMessage(line, 1, fileName, s); } @@ -106,8 +106,8 @@ void AnnotationOutput::readAnnotations() } KURL baseURL = Project::ref()->projectBaseURL(); - QStringList openedItems; - QListViewItem *item = m_allAnnotations->firstChild(); + TQStringList openedItems; + TQListViewItem *item = m_allAnnotations->firstChild(); while (item) { if (item->isOpen()) @@ -119,7 +119,7 @@ void AnnotationOutput::readAnnotations() m_fileNames.clear(); m_lines.clear(); - QStringList yourOpenedItems; + TQStringList yourOpenedItems; item = m_yourAnnotations->firstChild(); while (item) { @@ -134,17 +134,17 @@ void AnnotationOutput::readAnnotations() m_yourLines.clear(); m_yourAnnotationsNum = 0; - QDomElement annotationElement = Project::ref()->dom()->firstChild().firstChild().namedItem("annotations").toElement(); + TQDomElement 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(); + TQString yourself = Project::ref()->yourself().lower(); + TQStringList roles = Project::ref()->yourRoles(); + TQDomNodeList 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"); + TQDomElement el = nodes.item(i).toElement(); + TQString fileName = el.attribute("url"); KURL u = baseURL; QuantaCommon::setUrl(u, fileName); u = QExtFileInfo::toAbsolute(u, baseURL); @@ -152,13 +152,13 @@ void AnnotationOutput::readAnnotations() { bool ok; int line = el.attribute("line").toInt(&ok, 10); - QString text = el.attribute("text"); - QString receiver = el.attribute("receiver"); + TQString text = el.attribute("text"); + TQString receiver = el.attribute("receiver"); text.replace('\n',' '); - QString lineText = QString("%1").arg(line); + TQString lineText = TQString("%1").arg(line); if (lineText.length() < 20) { - QString s; + TQString s; s.fill('0', 20 - lineText.length()); lineText.prepend(s); } @@ -205,7 +205,7 @@ void AnnotationOutput::readAnnotations() } } -void AnnotationOutput::writeAnnotations(const QString &fileName, const QMap > &a_annotations) +void AnnotationOutput::writeAnnotations(const TQString &fileName, const TQMap > &a_annotations) { m_annotatedFileItems.clear(); m_fileNames.clear(); @@ -215,23 +215,23 @@ void AnnotationOutput::writeAnnotations(const QString &fileName, const QMap > annotations = a_annotations; - QDomDocument *dom = Project::ref()->dom(); - QDomElement annotationElement = dom->firstChild().firstChild().namedItem("annotations").toElement(); + TQMap > annotations = a_annotations; + TQDomDocument *dom = Project::ref()->dom(); + TQDomElement annotationElement = dom->firstChild().firstChild().namedItem("annotations").toElement(); if (annotationElement.isNull()) { annotationElement = dom->createElement("annotations"); dom->firstChild().firstChild().appendChild(annotationElement); } - QDomNode n = annotationElement.firstChild(); + TQDomNode n = annotationElement.firstChild(); while ( !n.isNull() ) { - QDomElement el = n.toElement(); - QString fName = el.attribute("url"); - QDomNode n2 = n.nextSibling(); + TQDomElement el = n.toElement(); + TQString fName = el.attribute("url"); + TQDomNode n2 = n.nextSibling(); if (fileName == fName) { - QString text = el.attribute("text"); + TQString text = el.attribute("text"); bool ok; int line = el.attribute("line").toInt(&ok, 10); if (!annotations.contains(line) || (annotations[line].first != text)) @@ -243,9 +243,9 @@ void AnnotationOutput::writeAnnotations(const QString &fileName, const QMap >::ConstIterator it = annotations.constBegin(); it != annotations.constEnd(); ++it) + for (TQMap >::ConstIterator it = annotations.constBegin(); it != annotations.constEnd(); ++it) { - QDomElement el = dom->createElement("annotation"); + TQDomElement el = dom->createElement("annotation"); el.setAttribute("url", fileName); el.setAttribute("line", it.key()); el.setAttribute("text", it.data().first); @@ -259,7 +259,7 @@ void AnnotationOutput::writeAnnotations(const QString &fileName, const QMap (item->parent()) != m_allAnnotations) { @@ -268,7 +268,7 @@ void AnnotationOutput::allAnnotationsItemExecuted(QListViewItem *item) emit clicked(m_fileNames[item], 0, 0); } -void AnnotationOutput::yourAnnotationsItemExecuted(QListViewItem *item) +void AnnotationOutput::yourAnnotationsItemExecuted(TQListViewItem *item) { if (dynamic_cast (item->parent()) != m_yourAnnotations) { @@ -292,25 +292,25 @@ void AnnotationOutput::updateAnnotations() void AnnotationOutput::updateAnnotationForFile(const KURL& url) { - static const QRegExp rx("-->|\\*/"); + static const TQRegExp rx("-->|\\*/"); if (!ViewManager::ref()->isOpened(url) && QuantaCommon::checkMimeGroup(url, "text" )) { // kdDebug(24000) << "Testing " << url << endl; - QFile f(url.path()); + TQFile f(url.path()); if (f.open(IO_ReadOnly)) { - QMap > annotations; + TQMap > annotations; uint i = 0; - QTextStream stream(&f); - stream.setEncoding(QTextStream::UnicodeUTF8); - QString line; + TQTextStream stream(&f); + stream.setEncoding(TQTextStream::UnicodeUTF8); + TQString line; while (!stream.atEnd()) { line = stream.readLine(); int pos = line.find("@annotation"); if (pos != -1) { - QString receiver; + TQString receiver; pos += 11; if (line[pos] == '(') { diff --git a/quanta/messages/annotationoutput.h b/quanta/messages/annotationoutput.h index 0c5ab748..50e293d6 100644 --- a/quanta/messages/annotationoutput.h +++ b/quanta/messages/annotationoutput.h @@ -38,12 +38,12 @@ class AnnotationOutput : public KTabWidget { Q_OBJECT public: - AnnotationOutput(QWidget *parent = 0, const char *name = 0); + AnnotationOutput(TQWidget *parent = 0, const char *name = 0); ~AnnotationOutput(); MessageOutput *currentFileAnnotations() const {return m_currentFileAnnotations;} KListView *allAnnotations() const {return m_allAnnotations;} - void writeAnnotations(const QString &fileName, const QMap > &annotations); + void writeAnnotations(const TQString &fileName, const TQMap > &annotations); public slots: /** @@ -52,16 +52,16 @@ public slots: void updateAnnotations(); void readAnnotations(); void clearAnnotations(); - void insertAnnotation(uint line, const QString& fileName, const QPair& annotation); + void insertAnnotation(uint line, const TQString& fileName, const QPair& annotation); private slots: - void tabChanged(QWidget *w); - void allAnnotationsItemExecuted(QListViewItem *item); - void yourAnnotationsItemExecuted(QListViewItem *item); + void tabChanged(TQWidget *w); + void allAnnotationsItemExecuted(TQListViewItem *item); + void yourAnnotationsItemExecuted(TQListViewItem *item); void slotUpdateNextFile(); signals: - void clicked(const QString& fname, int line, int col); + void clicked(const TQString& fname, int line, int col); private: /** @@ -72,17 +72,17 @@ private: MessageOutput *m_currentFileAnnotations; KListView *m_allAnnotations; - QDict m_annotatedFileItems; - QMap m_fileNames; - QMap m_lines; + TQDict m_annotatedFileItems; + TQMap m_fileNames; + TQMap m_lines; uint m_yourAnnotationsNum; KListView *m_yourAnnotations; - QDict m_yourFileItems; - QMap m_yourFileNames; - QMap m_yourLines; + TQDict m_yourFileItems; + TQMap m_yourFileNames; + TQMap m_yourLines; - QTimer *m_updateTimer; + TQTimer *m_updateTimer; KURL::List m_files; uint m_fileIndex; }; diff --git a/quanta/messages/messageitem.cpp b/quanta/messages/messageitem.cpp index 7f906041..dc1c7ad8 100644 --- a/quanta/messages/messageitem.cpp +++ b/quanta/messages/messageitem.cpp @@ -16,11 +16,11 @@ ***************************************************************************/ #include "messageitem.h" -#include +#include #include -MessageItem::MessageItem( QListBox * listbox, const QString &text, int line, int column, const QString &fname ) - :QListBoxText(listbox,text),lineNumber(line),columnNumber(column),filename(fname) +MessageItem::MessageItem( TQListBox * listbox, const TQString &text, int line, int column, const TQString &fname ) + :TQListBoxText(listbox,text),lineNumber(line),columnNumber(column),filename(fname) { } @@ -30,14 +30,14 @@ int MessageItem::line() return lineNumber; } else { // try to find first number in text - QString s = text(); - int pos = s.find( QRegExp("[0-9]")); + TQString s = text(); + int pos = s.find( TQRegExp("[0-9]")); if ( pos == -1 ) return lineNumber; int pos2 = pos; while ( s[pos2].isDigit() ) pos2++; - QString snum = s.mid(pos, pos2-pos); + TQString snum = s.mid(pos, pos2-pos); return snum.toInt(); } @@ -50,8 +50,8 @@ int MessageItem::column() return columnNumber; } else { - QString s = text(); - QRegExp exp("(?:\\D|^)(\\d{1,4})(?:\\D|$)"); + TQString s = text(); + TQRegExp exp("(?:\\D|^)(\\d{1,4})(?:\\D|$)"); int pos = exp.search(s); if ( pos == -1 ) @@ -64,12 +64,12 @@ int MessageItem::column() } } -QString MessageItem::fileName() +TQString MessageItem::fileName() { if (filename.isEmpty()) { - QString fname; - QString s = text(); + TQString fname; + TQString s = text(); int pos = s.find(i18n("File: ")); if (pos != -1) { @@ -85,7 +85,7 @@ QString MessageItem::fileName() return filename; } -void MessageItem::addText(const QString &t) +void MessageItem::addText(const TQString &t) { setText( text() + t ); } diff --git a/quanta/messages/messageitem.h b/quanta/messages/messageitem.h index 01e04b35..64894e25 100644 --- a/quanta/messages/messageitem.h +++ b/quanta/messages/messageitem.h @@ -19,34 +19,34 @@ #ifndef MESSAGEITEM_H #define MESSAGEITEM_H -#include +#include /** - Like QListBoxText with storing of filename and line in it. + Like TQListBoxText with storing of filename and line in it. */ -class MessageItem : public QListBoxText { +class MessageItem : public TQListBoxText { public: - MessageItem( QListBox *listbox, const QString &text = QString::null, int line = -1, int column = -1, const QString &fname = QString::null); + MessageItem( TQListBox *listbox, const TQString &text = TQString::null, int line = -1, int column = -1, const TQString &fname = TQString::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(); + TQString 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); + void setFileName(const TQString &fileName ) { filename = fileName; } + void addText(const TQString &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 + TQString filename; ///< the filename (URL) of the item. Empty if not defined }; diff --git a/quanta/messages/messageoutput.cpp b/quanta/messages/messageoutput.cpp index 6b89aaa9..de4627ca 100644 --- a/quanta/messages/messageoutput.cpp +++ b/quanta/messages/messageoutput.cpp @@ -25,40 +25,40 @@ #include // Qt includes -#include -#include -#include +#include +#include +#include #include "messageoutput.h" #include "messageitem.h" -MessageOutput::MessageOutput(QWidget *parent, const char *name ) - : QListBox(parent,name) +MessageOutput::MessageOutput(TQWidget *parent, const char *name ) + : TQListBox(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)); + TQPalette pal = palette(); + pal.setColor(TQColorGroup::HighlightedText, pal.color(TQPalette::Normal, TQColorGroup::Text)); + pal.setColor(TQColorGroup::Highlight, pal.color(TQPalette::Normal, TQColorGroup::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()) ) ; + connect(this, TQT_SIGNAL(contextMenuRequested(TQListBoxItem*, const TQPoint&)), + this, TQT_SLOT(showMenu(TQListBoxItem*, const TQPoint&))); + m_popupMenu->insertItem( SmallIconSet("editcopy"), i18n("&Copy"), this, TQT_SLOT(copyContent()) ) ; + m_popupMenu->insertItem( SmallIconSet("filesaveas"), i18n("&Save As..."), this, TQT_SLOT(saveContent()) ) ; m_popupMenu->insertSeparator(); - m_popupMenu->insertItem( SmallIconSet("editclear"), i18n("Clear"), this, SLOT(clear()) ) ; + m_popupMenu->insertItem( SmallIconSet("editclear"), i18n("Clear"), this, TQT_SLOT(clear()) ) ; - connect( this, SIGNAL(clicked(QListBoxItem*)), SLOT(clickItem(QListBoxItem*)) ); + connect( this, TQT_SIGNAL(clicked(TQListBoxItem*)), TQT_SLOT(clickItem(TQListBoxItem*)) ); } MessageOutput::~MessageOutput() { } -MessageItem *MessageOutput::insertItem(const QString& s) +MessageItem *MessageOutput::insertItem(const TQString& s) { checkMaxItems(); MessageItem *it = new MessageItem(this, s); @@ -66,7 +66,7 @@ MessageItem *MessageOutput::insertItem(const QString& s) return it; } -void MessageOutput::addToLastItem(const QString& s) +void MessageOutput::addToLastItem(const TQString& s) { int ind = count() - 1; if ( ind != -1 ) { @@ -78,10 +78,10 @@ void MessageOutput::addToLastItem(const QString& s) } } -void MessageOutput::showMessage(int line, int col, const QString &fileName, const QString& s, bool append) +void MessageOutput::showMessage(int line, int col, const TQString &fileName, const TQString& s, bool append) { MessageItem *it = 0L; - QString message = s; + TQString message = s; int endPos; if ( !count() || (!append && !text(count()-1).stripWhiteSpace().isEmpty()) ) it = insertItem(""); @@ -109,7 +109,7 @@ void MessageOutput::showMessage(int line, int col, const QString &fileName, cons setBottomItem(count()>0?count()-1:0); } -void MessageOutput::showMessage(const QString& s, bool append) +void MessageOutput::showMessage(const TQString& s, bool append) { showMessage(-1, -1, "", s, append); } @@ -121,7 +121,7 @@ void MessageOutput::checkMaxItems() removeItem( index(firstItem()) ); } -void MessageOutput::clickItem( QListBoxItem * l_item ) +void MessageOutput::clickItem( TQListBoxItem * l_item ) { MessageItem *item = dynamic_cast(l_item); if ( item ) { @@ -131,14 +131,14 @@ void MessageOutput::clickItem( QListBoxItem * l_item ) } } -void MessageOutput::showMenu( QListBoxItem*, const QPoint& l_point ) +void MessageOutput::showMenu( TQListBoxItem*, const TQPoint& l_point ) { m_popupMenu->exec(l_point); } -QString MessageOutput::content() +TQString MessageOutput::content() { - QString p_content; + TQString p_content; for (uint i=0; iFile
%1
already exists. Overwrite it?") - .arg(url.path()), QString::null, i18n("Overwrite")) == KMessageBox::Cancel) + .arg(url.path()), TQString::null, i18n("Overwrite")) == KMessageBox::Cancel) return; - QFile file(url.path()); + TQFile file(url.path()); if (!file.open(IO_WriteOnly)) { KMessageBox::error(0, i18n("Cannot save log file
%1
") .arg(url.url())); return; } - QTextStream textfile(&file); + TQTextStream textfile(&file); textfile << content(); file.close(); diff --git a/quanta/messages/messageoutput.h b/quanta/messages/messageoutput.h index 223470bd..125b85e2 100644 --- a/quanta/messages/messageoutput.h +++ b/quanta/messages/messageoutput.h @@ -18,7 +18,7 @@ #ifndef MESSAGEOUTPUT_H #define MESSAGEOUTPUT_H -#include +#include class KProcess; class KPopupMenu; @@ -30,17 +30,17 @@ weblint output *@author Yacovlev Alexander & Dmitry Poplavski */ -class MessageOutput : public QListBox { +class MessageOutput : public TQListBox { Q_OBJECT public: - MessageOutput(QWidget *parent=0, const char *name=0); + MessageOutput(TQWidget *parent=0, const char *name=0); ~MessageOutput(); // Return whole content as a single string with EOLs - QString content(); + TQString content(); public slots: /** Inserts an item with the content s to the end of the list*/ - MessageItem *insertItem(const QString& s); + MessageItem *insertItem(const TQString& 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) @@ -49,19 +49,19 @@ public slots: @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); + void showMessage(int line, int column, const TQString &fileName, const TQString& 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); + void showMessage(const TQString& 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); + void addToLastItem(const TQString& message); // Copy message content to clipboard void copyContent(); // Save message content to clipboard @@ -75,12 +75,12 @@ public: void checkMaxItems(); signals: - void clicked(const QString& fname, int line, int col); + void clicked(const TQString& fname, int line, int col); protected slots: - void clickItem( QListBoxItem *); + void clickItem( TQListBoxItem *); // Show context menu - void showMenu(QListBoxItem*, const QPoint&); + void showMenu(TQListBoxItem*, const TQPoint&); private: uint m_maxItems; diff --git a/quanta/parsers/dtd/dtd.cpp b/quanta/parsers/dtd/dtd.cpp index 18e3d712..964c35fb 100644 --- a/quanta/parsers/dtd/dtd.cpp +++ b/quanta/parsers/dtd/dtd.cpp @@ -16,11 +16,11 @@ ***************************************************************************/ -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include @@ -34,42 +34,42 @@ #include "../qextfileinfo.h" -DTD::DTD(const KURL &dtdURL, const QString &dtepDir) +DTD::DTD(const KURL &dtdURL, const TQString &dtepDir) { m_dtdURL = dtdURL; - m_dtepDir = dtepDir + "/"+QFileInfo(dtdURL.fileName()).baseName(); //TODO: get the dir name from the DTD or from the user + m_dtepDir = dtepDir + "/"+TQFileInfo(dtdURL.fileName()).baseName(); //TODO: get the dir name from the DTD or from the user } DTD::~DTD() { } -QStringList DTD::getTags() +TQStringList DTD::getTags() { return tags; } -AttributeList* DTD::getTagAttributes(QString tag) +AttributeList* DTD::getTagAttributes(TQString tag) { return tagAttributes.find(tag); } -QStringList DTD::getTextCompletion(QString tag) +TQStringList DTD::getTextCompletion(TQString tag) { - return QStringList(); + return TQStringList(); } void DTD::printContents() { - for ( QStringList::Iterator tagIt = tags.begin(); tagIt != tags.end(); ++tagIt ) { - QString tag = *tagIt; + for ( TQStringList::Iterator tagIt = tags.begin(); tagIt != tags.end(); ++tagIt ) { + TQString 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 + ": "; + TQString s = " " + attribute->name + ": "; for (uint j = 0; j < attribute->values.count(); j++) { s += attribute->values[j] + ", "; @@ -81,7 +81,7 @@ void DTD::printContents() void DTD::writeTagFiles() { - QString dirName = m_dtepDir; + TQString dirName = m_dtepDir; KURL u; u.setPath(dirName); if (!QExtFileInfo::createDir(dirName)) { @@ -89,13 +89,13 @@ void DTD::writeTagFiles() return; } dirName.append("/"); - for ( QStringList::Iterator tagIt = tags.begin(); tagIt != tags.end(); ++tagIt ) { - QString tag = *tagIt; + for ( TQStringList::Iterator tagIt = tags.begin(); tagIt != tags.end(); ++tagIt ) { + TQString tag = *tagIt; - QFile file( dirName + tag.lower() + ".tag" ); + TQFile file( dirName + tag.lower() + ".tag" ); if ( file.open( IO_WriteOnly ) ) { - QTextStream stream( &file ); - stream.setEncoding(QTextStream::UnicodeUTF8); + TQTextStream stream( &file ); + stream.setEncoding(TQTextStream::UnicodeUTF8); stream << "" << endl << "" << endl << "" << endl << endl; @@ -114,31 +114,31 @@ void DTD::writeTagFiles() 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.writeEntry("Name", TQFileInfo(m_dtdURL.fileName()).baseName()); //TODO: get from the DTD! + config.writeEntry("NickName", TQFileInfo(m_dtdURL.fileName()).baseName()); //TODO: get from the user! config.sync(); } bool DTD::parseDTD(const KURL &url) { - QString fileName = QString::null; + TQString fileName = TQString::null; if (!KIO::NetAccess::download(url, fileName)) { KMessageBox::error(0, i18n("Cannot download the DTD from %1.").arg(url.prettyURL(0, KURL::StripFileProtocol))); return false; } - QFile file(fileName); + TQFile file(fileName); if (file.open(IO_ReadOnly)) { - QTextStream fileStream(&file); - fileStream.setEncoding(QTextStream::UnicodeUTF8); - QString entireDTD = fileStream.read(); + TQTextStream fileStream(&file); + fileStream.setEncoding(TQTextStream::UnicodeUTF8); + TQString entireDTD = fileStream.read(); file.close(); removeComments(entireDTD); - QString line; - QStringList lines = QStringList::split("\n",entireDTD); - QStringList::Iterator it = lines.begin(); + TQString line; + TQStringList lines = TQStringList::split("\n",entireDTD); + TQStringList::Iterator it = lines.begin(); while (it != lines.end()) { line = *it; @@ -183,7 +183,7 @@ bool DTD::parseDTD(const KURL &url) parseDTD(entityURL); } else { - kdDebug(24000) << QString("Unknown tag: [%1]").arg(line) << endl; + kdDebug(24000) << TQString("Unknown tag: [%1]").arg(line) << endl; } if (it != lines.end()) ++it; @@ -191,16 +191,16 @@ bool DTD::parseDTD(const KURL &url) } } -void DTD::parseDTDEntity(QString line) { - QString name; - QString *value; +void DTD::parseDTDEntity(TQString line) { + TQString name; + TQString *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 = new TQString(line.mid(11+firstSpace)); value->remove(0, value->find("\"")+1); value->remove(value->findRev("\""), value->length()); @@ -212,17 +212,17 @@ void DTD::parseDTDEntity(QString line) { //kdDebug() << "Entity --- Name: " << name << " --- Value: " << *value << endl; } -void DTD::parseDTDElement(const QString &l) { - QString name; - QString *value; +void DTD::parseDTDElement(const TQString &l) { + TQString name; + TQString *value; - QString line = l; + TQString 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 = new TQString(line.mid(10+firstSpace)); //value->remove(0, value->find("\"")+1); value->remove(value->find(">"), 10000); @@ -232,8 +232,8 @@ void DTD::parseDTDElement(const QString &l) { 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(); + TQStringList multipleTags = TQStringList::split("|", name); + TQStringList::Iterator it = multipleTags.begin(); while(it != multipleTags.end()) { name = *it; name = name.stripWhiteSpace(); @@ -249,17 +249,17 @@ void DTD::parseDTDElement(const QString &l) { } } -void DTD::parseDTDAttlist(const QString &l) { - QString name; - QString *value; +void DTD::parseDTDAttlist(const TQString &l) { + TQString name; + TQString *value; - QString line = l; + TQString 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 = new TQString(line.mid(10+firstSpace)); //value->remove(0, value->find("\"")+1); value->remove(value->find(">"), 10000); @@ -269,8 +269,8 @@ void DTD::parseDTDAttlist(const QString &l) { 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(); + TQStringList multipleTags = TQStringList::split("|", name); + TQStringList::Iterator it = multipleTags.begin(); while(it != multipleTags.end()) { name = *it; name = name.stripWhiteSpace(); @@ -287,16 +287,16 @@ void DTD::parseDTDAttlist(const QString &l) { } -void DTD::parseTagAttributeValues(const QString &name, QString *value) { +void DTD::parseTagAttributeValues(const TQString &name, TQString *value) { AttributeList *attributes = new AttributeList(); - QStringList attrLines = QStringList::split("\\end",*value); - QStringList::Iterator lineIt = attrLines.begin(); + TQStringList attrLines = TQStringList::split("\\end",*value); + TQStringList::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(); + TQStringList all = TQStringList::split(" ", *lineIt); + TQStringList::Iterator it = all.begin(); while(it != all.end()) { Attribute *attr = new Attribute(); @@ -304,14 +304,14 @@ void DTD::parseTagAttributeValues(const QString &name, QString *value) { //kdDebug() << "Inserting for tag " << name << ": " << *it << endl; ++it; - QString values = *it; + TQString 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(); + attr->values = TQStringList::split("|", values); + TQString s = (attr->values[0]+attr->values[1]).lower(); stripSpaces(&s); if ((s == "truefalse") || (s == "falsetrue")) { @@ -330,7 +330,7 @@ void DTD::parseTagAttributeValues(const QString &name, QString *value) { if (it != all.end()) { ++it; - QString s=*it; + TQString s=*it; if (s.startsWith("\"") && s.endsWith("\"") && it!=all.end()) { s.remove(0,1); @@ -360,13 +360,13 @@ void DTD::parseTagAttributeValues(const QString &name, QString *value) { tagAttributes.insert(name, attributes); } -void DTD::parseDTDReplace(QString *value) { +void DTD::parseDTDReplace(TQString *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); + TQString replaceText = value->mid(begin+1, end-begin-1); + TQString *replaceValue = entities.find(replaceText); if (replaceValue != 0L) { value->replace(begin, end-begin+1, *replaceValue); @@ -380,7 +380,7 @@ void DTD::parseDTDReplace(QString *value) { } } -void DTD::stripSpaces(QString *value) { +void DTD::stripSpaces(TQString *value) { int index=-1; while ( (index=value->find(' ',++index)) != -1 ) { if ( value->findRev('(',index) != -1 && value->find(')',index) != -1) @@ -388,7 +388,7 @@ void DTD::stripSpaces(QString *value) { } } -void DTD::removeComments(QString &value) { +void DTD::removeComments(TQString &value) { int begin, end; begin = value.find("",begin+2); @@ -406,7 +406,7 @@ void DTD::removeComments(QString &value) { end = value.find("--",begin+2); } - value.replace(QRegExp(""), ""); + value.replace(TQRegExp(""), ""); } bool DTD::parseDTD() diff --git a/quanta/parsers/dtd/dtd.h b/quanta/parsers/dtd/dtd.h index 45b0e213..cc0cf238 100644 --- a/quanta/parsers/dtd/dtd.h +++ b/quanta/parsers/dtd/dtd.h @@ -19,7 +19,7 @@ #define DTD_H //qt includes -#include +#include //app includes #include "qtag.h" @@ -30,13 +30,13 @@ class DTD { public: - DTD(const KURL &dtdURL, const QString& dtepDir); + DTD(const KURL &dtdURL, const TQString& dtepDir); ~DTD(); public: - QStringList getTags(); - AttributeList* getTagAttributes(QString tag); - QStringList getTextCompletion(QString tag); + TQStringList getTags(); + AttributeList* getTagAttributes(TQString tag); + TQStringList getTextCompletion(TQString tag); void printContents(); void writeTagFiles(); /** No descriptions */ @@ -44,21 +44,21 @@ public: 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); + void parseDTDEntity(const TQString &line); + void parseDTDElement(const TQString &line); + void parseDTDAttlist(const TQString &line); + void parseTagAttributeValues(const TQString &name, TQString *value); + void parseDTDReplace(TQString *value); + void stripSpaces(TQString *value); + void removeComments(TQString &value); - QDict entities; - QDict elements; - QStringList tags; - QDict tagAttributes; + TQDict entities; + TQDict elements; + TQStringList tags; + TQDict tagAttributes; /** From where to load the DTD file. */ KURL m_dtdURL; - QString m_dtepDir; + TQString m_dtepDir; }; #endif diff --git a/quanta/parsers/dtd/dtdparser.cpp b/quanta/parsers/dtd/dtdparser.cpp index 86060967..0d623978 100644 --- a/quanta/parsers/dtd/dtdparser.cpp +++ b/quanta/parsers/dtd/dtdparser.cpp @@ -14,13 +14,13 @@ ***************************************************************************/ //qt includes -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include //kde includes #include @@ -51,15 +51,15 @@ namespace DTD { - QString dirName; + TQString dirName; xmlDtdPtr dtd_ptr; /* Pointer to the parsed DTD */ - QTextStream entityStream; + TQTextStream entityStream; } void saveElement(xmlElementPtr elem, xmlBufferPtr buf); void saveEntity(xmlEntityPtr entity, xmlBufferPtr buf); -DTDParser::DTDParser(const KURL& dtdURL, const QString &dtepDir) +DTDParser::DTDParser(const KURL& dtdURL, const TQString &dtepDir) { m_dtdURL = dtdURL; m_dtepDir = dtepDir; @@ -69,10 +69,10 @@ DTDParser::~DTDParser() { } -bool DTDParser::parse(const QString &targetDir, bool entitiesOnly) +bool DTDParser::parse(const TQString &targetDir, bool entitiesOnly) { bool fineTune = false; - QString fileName = QString::null; + TQString fileName = TQString::null; if (!KIO::NetAccess::download(m_dtdURL, fileName, 0)) { KMessageBox::error(0, i18n("Cannot download the DTD from %1.").arg( m_dtdURL.prettyURL(0, KURL::StripFileProtocol))); @@ -81,24 +81,24 @@ bool DTDParser::parse(const QString &targetDir, bool entitiesOnly) DTD::dtd_ptr = xmlParseDTD(NULL, xmlCharStrndup(fileName.utf8(), fileName.utf8().length())); if( DTD::dtd_ptr == NULL ) { - QString errorStr = i18n("Unknown"); + TQString errorStr = i18n("Unknown"); #ifndef LIBXML_2_5 xmlErrorPtr errorPtr = xmlGetLastError(); if (errorPtr != NULL) { - QString s = QString::fromLatin1(errorPtr->message); + TQString s = TQString::fromLatin1(errorPtr->message); if (!s.isEmpty()) errorStr = s; - s = QString::fromLatin1(errorPtr->str1); + s = TQString::fromLatin1(errorPtr->str1); if (!s.isEmpty()) errorStr += "
" + s; - s = QString::fromLatin1(errorPtr->str2); + s = TQString::fromLatin1(errorPtr->str2); if (!s.isEmpty()) errorStr += "
" + s; - s = QString::fromLatin1(errorPtr->str2); + s = TQString::fromLatin1(errorPtr->str2); if (!s.isEmpty()) errorStr += "
" + s; - errorStr += QString("(%1, %2)").arg(errorPtr->line).arg(errorPtr->int2); + errorStr += TQString("(%1, %2)").arg(errorPtr->line).arg(errorPtr->int2); xmlResetError(errorPtr); } #endif @@ -110,20 +110,20 @@ bool DTDParser::parse(const QString &targetDir, bool entitiesOnly) 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); + TQString name = TQString((const char*)DTD::dtd_ptr->name); if (name == "none") - name = QFileInfo(m_dtdURL.fileName()).baseName(); + name = TQFileInfo(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)); + w.directory->setText(TQFileInfo(m_dtdURL.fileName()).baseName()); + w.doctype->setText(TQString((const char*)DTD::dtd_ptr->ExternalID)); + w.dtdURL->setText(TQString((const char*)DTD::dtd_ptr->SystemID)); if (!dlg.exec()) return false; m_name = w.dtdName->text(); m_nickName = w.nickName->text(); m_doctype = w.doctype->text(); - m_doctype.replace(QRegExp("")); m_dtdURLLine = w.dtdURL->text(); m_defaultExtension = w.defaultExtension->text(); @@ -141,11 +141,11 @@ bool DTDParser::parse(const QString &targetDir, bool entitiesOnly) DTD::dirName.append("/"); if (DTD::dtd_ptr->entities) { - QFile file( DTD::dirName + "entities.tag" ); + TQFile file( DTD::dirName + "entities.tag" ); if ( file.open( IO_WriteOnly ) ) { DTD::entityStream.setDevice(&file); - DTD::entityStream.setEncoding(QTextStream::UnicodeUTF8); + DTD::entityStream.setEncoding(TQTextStream::UnicodeUTF8); DTD::entityStream << "" << endl; DTD::entityStream << "" << endl << "" << endl; @@ -211,12 +211,12 @@ void saveElement(xmlElementPtr elem, xmlBufferPtr buf) Q_UNUSED(buf); if (elem) { - QString elemName = QString((const char*)elem->name); - QFile file( DTD::dirName + elemName + ".tag" ); + TQString elemName = TQString((const char*)elem->name); + TQFile file( DTD::dirName + elemName + ".tag" ); if ( file.open( IO_WriteOnly ) ) { - QTextStream stream( &file ); - stream.setEncoding(QTextStream::UnicodeUTF8); + TQTextStream stream( &file ); + stream.setEncoding(TQTextStream::UnicodeUTF8); stream << "" << endl; stream << "" << endl << "" << endl @@ -232,21 +232,21 @@ void saveElement(xmlElementPtr elem, xmlBufferPtr buf) at_ptr = el_ptr->attributes; while (at_ptr) { Attribute *attr = new Attribute; - attr->name = QString((const char*)at_ptr->name); + attr->name = TQString((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); + attr->defaultValue = TQString((const char*)at_ptr->defaultValue); xmlEnumerationPtr enum_ptr; enum_ptr = at_ptr->tree; while (enum_ptr) { - attr->values += QString((const char*)enum_ptr->name); + attr->values += TQString((const char*)enum_ptr->name); enum_ptr = enum_ptr->next; } - QString attrtype; + TQString attrtype; switch (at_ptr->atype) { case 9: {attrtype = "list"; break;} default: {attrtype = "input"; break;} //TODO handle the rest of types @@ -268,7 +268,7 @@ void saveElement(xmlElementPtr elem, xmlBufferPtr buf) stream << "" << endl; for( int i = 0; i < childNum; i++ ) { - stream << " content && child_ptr->content->ocur) { @@ -276,7 +276,7 @@ void saveElement(xmlElementPtr elem, xmlBufferPtr buf) //{ // stream << " usage=\"required\""; // } - QString ocur; + TQString ocur; switch (child_ptr->content->ocur) { case 1: {ocur = "once"; break;} @@ -285,7 +285,7 @@ void saveElement(xmlElementPtr elem, xmlBufferPtr buf) case 4: {ocur = "plus"; break;} } stream << " usage=\"" << ocur << "\""; - QString name = QString((const char*)child_ptr->content->name); + TQString name = TQString((const char*)child_ptr->content->name); if (name == "#PCDATA") name == "#text"; stream << " name2=\"" << name << "\""; @@ -303,10 +303,10 @@ void saveElement(xmlElementPtr elem, xmlBufferPtr buf) stream << "" << endl; while (content_ptr) { - if (!QString((const char*)content_ptr->name).isEmpty()) + if (!TQString((const char*)content_ptr->name).isEmpty()) { - stream << " name) << "\""; - QString ocur; + stream << " name) << "\""; + TQString ocur; switch (content_ptr->ocur) { case 1: {ocur = "once"; break;} @@ -350,12 +350,12 @@ void saveEntity(xmlEntityPtr entity, xmlBufferPtr buf) Q_UNUSED(buf); if (entity) { - QString name = QString((const char*)entity->name); + TQString name = TQString((const char*)entity->name); DTD::entityStream << "" << endl << endl; } } -QString DTDParser::dirName() +TQString DTDParser::dirName() { return DTD::dirName; } diff --git a/quanta/parsers/dtd/dtdparser.h b/quanta/parsers/dtd/dtdparser.h index b5b66d01..77c608ee 100644 --- a/quanta/parsers/dtd/dtdparser.h +++ b/quanta/parsers/dtd/dtdparser.h @@ -16,7 +16,7 @@ #define DTDPARSER_H //qt includes -#include +#include //forward declarations class KURL; @@ -26,30 +26,30 @@ struct Attribute; /** libxml2 based XML DTD parser and DTEP creation class*/ class DTDParser { public: - DTDParser(const KURL& dtdURL, const QString &dtepDir); + DTDParser(const KURL& dtdURL, const TQString &dtepDir); ~DTDParser(); - QString dirName(); + TQString 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); + bool parse(const TQString &targetDir = TQString::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; + TQString m_dtepDir; + TQString m_name; + TQString m_nickName; + TQString m_doctype; + TQString m_dtdURLLine; bool m_caseSensitive; - QString m_defaultExtension; - QDict m_tags; + TQString m_defaultExtension; + TQDict m_tags; }; #endif diff --git a/quanta/parsers/node.cpp b/quanta/parsers/node.cpp index 0831a67c..219716e9 100644 --- a/quanta/parsers/node.cpp +++ b/quanta/parsers/node.cpp @@ -15,8 +15,8 @@ * * ***************************************************************************/ //qt includes -#include -#include +#include +#include #include @@ -27,7 +27,7 @@ #include "structtreetag.h" #include "kafkacommon.h" -QMap nodes; //list of all created nodes. Used to do some own memory management and avoid double deletes, for whatever reason they happen... +TQMap 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 @@ -112,10 +112,10 @@ Node::~Node() NN--; } -void Node::save(QDomElement& element) const +void Node::save(TQDomElement& element) const { //kdDebug(25001) << "Save:\n" << element.ownerDocument().toString() << endl; - QDomElement child_element; + TQDomElement child_element; if(next) { child_element = element.ownerDocument().createElement("nodeNext"); @@ -150,26 +150,26 @@ void Node::save(QDomElement& element) const element.setAttribute("specialInsideXml", specialInsideXml); // bool element.setAttribute("fileName", fileName); // QString -/* QString s_element; - QTextStream stream(&s_element, IO_WriteOnly); +/* TQString s_element; + TQTextStream 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) +bool Node::load(TQDomElement const& element) { -/* QString s_element; - QTextStream stream(&s_element, IO_WriteOnly); +/* TQString s_element; + TQTextStream stream(&s_element, IO_WriteOnly); element.save(stream, 3);*/ //kdDebug(25001) << "Load:\n" << s_element << endl; - QDomNodeList list = element.childNodes(); + TQDomNodeList list = element.childNodes(); for(unsigned int i = 0; i != list.count(); ++i) { if(list.item(i).isElement()) { - QDomElement e = list.item(i).toElement(); + TQDomElement e = list.item(i).toElement(); if(e.tagName() == "nodeNext") { next = new Node(0); @@ -196,11 +196,11 @@ bool Node::load(QDomElement const& element) } } - 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 + closesPrevious = TQString(element.attribute("closesPrevious")).toInt(); // bool + opened = TQString(element.attribute("opened")).toInt(); // bool + removeAll = TQString(element.attribute("removeAll")).toInt(); // bool + insideSpecial = TQString(element.attribute("insideSpecial")).toInt(); // bool + specialInsideXml = TQString(element.attribute("specialInsideXml")).toInt(); // bool fileName = element.attribute("fileName"); // QString //kafkaCommon::coutTree(this, 3); @@ -287,21 +287,21 @@ Node *Node::nextNotChild() } } -QString Node::nodeName() +TQString Node::nodeName() { if(tag) return tag->name; - return QString::null; + return TQString::null; } -QString Node::nodeValue() +TQString Node::nodeValue() { if(tag) return tag->tagStr(); - return QString::null; + return TQString::null; } -void Node::setNodeValue(const QString &value) +void Node::setNodeValue(const TQString &value) { if(!tag) tag = new Tag(); @@ -500,7 +500,7 @@ Node *Node::getOpeningNode() int Node::size() { int l = tag->size(); - l += 5*sizeof(Node*) + sizeof(QListViewItem*) + 2*sizeof(Tag*) + 2*sizeof(DOM::Node); + l += 5*sizeof(Node*) + sizeof(TQListViewItem*) + 2*sizeof(Tag*) + 2*sizeof(DOM::Node); return l; } @@ -530,7 +530,7 @@ void Node::detachNode() //kdDebug(24000) << &m_groupElements << " " << this << endl; //Remove the references to this node from the list of group elements. //They are actually stored in globalGroupMap. - for (QValueListIterator it = m_groupElements.begin(); it != m_groupElements.end(); ++it) + for (TQValueListIterator it = m_groupElements.begin(); it != m_groupElements.end(); ++it) { GroupElement *groupElement = (*it); groupElement->node = 0L; @@ -546,7 +546,7 @@ void Node::detachNode() kdDebug(24001) << count << " GroupElement scheduled for deletion. " << &m_groupElements << endl; #endif - QValueListIterator listItem; + TQValueListIterator listItem; for ( listItem = listItems.begin(); listItem != listItems.end(); ++listItem) { static_cast(*listItem)->node = 0L; diff --git a/quanta/parsers/node.h b/quanta/parsers/node.h index e3587c05..87d54141 100644 --- a/quanta/parsers/node.h +++ b/quanta/parsers/node.h @@ -18,9 +18,9 @@ #ifndef NODE_H #define NODE_H -#include -#include -#include +#include +#include +#include #include class QDomElement; @@ -40,12 +40,12 @@ struct GroupElement{ Node *parentNode; bool global; bool deleted; - QString type; + TQString type; XMLStructGroup *group; /// GroupElementList; -typedef QMap GroupElementMapList; +typedef TQValueList GroupElementList; +typedef TQMap GroupElementMapList; /** * A Node is a basic unit of a Tree. It keeps track of his parent, his left neighbour, his right neighbour @@ -79,8 +79,8 @@ public: void operator =(Node* node); /** For Kafka copy/paste */ - void save(QDomElement& element) const; - bool load(QDomElement const& element); + void save(TQDomElement& element) const; + bool load(TQDomElement const& element); Node *next; Node *prev; @@ -96,9 +96,9 @@ public: Node *nextNotChild(); /** DOM like functions cf dom/dom_node.h */ - QString nodeName(); - QString nodeValue(); - void setNodeValue(const QString &value); + TQString nodeName(); + TQString nodeValue(); + void setNodeValue(const TQString &value); Node* parentNode() {return parent;} Node* firstChild() {return child;} Node* lastChild(); @@ -162,15 +162,15 @@ public: */ Tag *tag; - QValueList listItems; /// listItems; /// - QString fileName; //the node is in this file. If empty, it's in the current document - QValueList m_groupElements; ///< all the group elements pointing to this node + TQString fileName; //the node is in this file. If empty, it's in the current document + TQValueList m_groupElements; ///< all the group elements pointing to this node private: /** diff --git a/quanta/parsers/parser.cpp b/quanta/parsers/parser.cpp index 7559f1ec..1225aaa3 100644 --- a/quanta/parsers/parser.cpp +++ b/quanta/parsers/parser.cpp @@ -14,18 +14,18 @@ ***************************************************************************/ //qt includes -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include //standard library includes #include @@ -65,10 +65,10 @@ #include extern GroupElementMapList globalGroupMap; -static const QChar space(' '); +static const TQChar space(' '); extern int NN; -extern QMap nodes; +extern TQMap nodes; Parser::Parser() { @@ -79,10 +79,10 @@ Parser::Parser() 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())); + connect(m_saParser, TQT_SIGNAL(rebuildStructureTree(bool)), TQT_SIGNAL(rebuildStructureTree(bool))); + connect(m_saParser, TQT_SIGNAL(cleanGroups()), TQT_SLOT(cleanGroups())); ParserCommon::includeWatch = new KDirWatch(); - connect(ParserCommon::includeWatch, SIGNAL(dirty(const QString&)), SLOT(slotIncludedFileChanged(const QString&))); + connect(ParserCommon::includeWatch, TQT_SIGNAL(dirty(const TQString&)), TQT_SLOT(slotIncludedFileChanged(const TQString&))); } Parser::~Parser() @@ -94,7 +94,7 @@ Parser::~Parser() Node *Parser::parseArea(int startLine, int startCol, int endLine, int endCol, Node **lastNode, Node *a_node) { //first parse as an XML document - QString textLine; + TQString textLine; textLine.fill(space, startCol); int line = startLine; int col = 0; @@ -147,7 +147,7 @@ Node *Parser::parseArea(int startLine, int startCol, int endLine, int endCol, No currentNode = ParserCommon::createTextNode(write, currentNode, line, specialStartPos, parentNode); if (!rootNode) rootNode = currentNode; - QString foundText = m_dtd->specialAreaStartRx.cap(); + TQString 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); @@ -247,7 +247,7 @@ Node *Parser::parseArea(int startLine, int startCol, int endLine, int endCol, No //build an xml tag node here AreaStruct area(tagStartLine, tagStartPos, tagEndLine, tagEndCol); tag = new Tag(area, write, m_dtd, true); - QString tagStr = tag->tagStr(); + TQString tagStr = tag->tagStr(); tag->type = Tag::XmlTag; tag->validXMLTag = (openNum == 0); tag->single = QuantaCommon::isSingleTag(m_dtd->name, tag->name); @@ -282,15 +282,15 @@ Node *Parser::parseArea(int startLine, int startCol, int endLine, int endCol, No if (!rootNode) rootNode = node; //find the DTD that needs to be used for the special area - QString tmpStr = m_dtd->specialTags[tag->name.lower()]; + TQString tmpStr = m_dtd->specialTags[tag->name.lower()]; int defPos = tmpStr.find('['); - QString defValue; + TQString defValue; if (defPos != 0) { defValue = tmpStr.mid(defPos+1, tmpStr.findRev(']')-defPos-1).stripWhiteSpace(); tmpStr = tmpStr.left(defPos); } - QString s = tag->attributeValue(tmpStr); + TQString s = tag->attributeValue(tmpStr); if (s.isEmpty()) s = defValue; const DTDStruct *dtd = DTDs::ref()->find(s); @@ -325,7 +325,7 @@ Node *Parser::parseArea(int startLine, int startCol, int endLine, int endCol, No qTag = QuantaCommon::tagFromDTD(m_dtd, parentNode->tag->name); if ( qTag ) { - QString searchFor = (m_dtd->caseSensitive)?tag->name:tag->name.upper(); + TQString searchFor = (m_dtd->caseSensitive)?tag->name:tag->name.upper(); searchFor.remove('/'); if ( qTag->stoppingTags.contains(searchFor)) { @@ -364,7 +364,7 @@ Node *Parser::parseArea(int startLine, int startCol, int endLine, int endCol, No { //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(); + TQString searchFor = (m_dtd->caseSensitive)?tag->name:tag->name.upper(); while (qTag && n) { qTag = QuantaCommon::tagFromDTD(m_dtd, n->tag->name); @@ -505,7 +505,7 @@ Node *Parser::parseArea(int startLine, int startCol, int endLine, int endCol, No from Nodes */ Node *Parser::parse(Document *w, bool force) { - QTime t; + TQTime t; t.start(); QuantaView *view = ViewManager::ref()->activeView(); //If VPL is loaded, there shouldn't be any rebuild @@ -527,8 +527,8 @@ Node *Parser::parse(Document *w, bool force) Node::deleteNode(baseNode); baseNode = 0L; kdDebug(24000) << "Node objects after delete = " << NN << " ; list count = " << nodes.count() << endl; -/* QMap nList = nodes; - for (QValueList::ConstIterator it = nList.constBegin(); it != nList.constEnd(); ++it) +/* TQMap nList = nodes; + for (TQValueList::ConstIterator it = nList.constBegin(); it != nList.constEnd(); ++it) Node::deleteNode(*it); kdDebug(24000) << "Node objects after cleanup = " << NN << " ; list count = " << nodes.count() << endl; */ } @@ -567,7 +567,7 @@ Node *Parser::parse(Document *w, bool force) emit nodeTreeChanged(); if (saParserEnabled) - QTimer::singleShot(0, this, SLOT(slotParseInDetail())); + TQTimer::singleShot(0, this, TQT_SLOT(slotParseInDetail())); return m_node; } @@ -702,8 +702,8 @@ bool Parser::invalidArea(Document *w, AreaStruct &area, Node **firstNode, Node * w->viewCursorIf->cursorPositionReal(&line, &col); Node *node = nodeAt(line, col, false); int bl, bc, el, ec; - QString text; - QString tagStr; + TQString text; + TQString tagStr; area.bLine = area.bCol = 0; area.eLine = maxLines; area.eCol = w->editIf->lineLength(maxLines) - 1; @@ -976,7 +976,7 @@ void Parser::deleteNodes(Node *firstNode, Node *lastNode, NodeModifsSet *modifs) Node *Parser::rebuild(Document *w) { kdDebug(24000) << "Rebuild started. " << endl; - QTime t; + TQTime t; t.start(); bool saParserEnabled = m_saParser->parsingEnabled(); @@ -1002,8 +1002,8 @@ Node *Parser::rebuild(Document *w) m_saParser->setParsingEnabled(false); m_saParser->init(0L, w); parsingEnabled = true; - QString text; - QString tagStr; + TQString text; + TQString tagStr; Node *firstNode = 0L; Node *lastNode = 0L; @@ -1020,7 +1020,7 @@ Node *Parser::rebuild(Document *w) 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) << TQString("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); @@ -1082,7 +1082,7 @@ Node *Parser::rebuild(Document *w) lastNode->tag->endPos(area.eLine, area.eCol); Tag *_tag = new Tag(*(lastNode->tag)); lastNode->tag->setTagPosition(area); - QString s = write->text(area); + TQString s = write->text(area); lastNode->tag->setStr(s); if (!s.simplifyWhiteSpace().isEmpty()) { @@ -1141,7 +1141,7 @@ Node *Parser::rebuild(Document *w) qTag = QuantaCommon::tagFromDTD(m_dtd, node->parent->tag->name); if ( qTag ) { - QString searchFor = (m_dtd->caseSensitive)?lastNode->tag->name:lastNode->tag->name.upper(); + TQString searchFor = (m_dtd->caseSensitive)?lastNode->tag->name:lastNode->tag->name.upper(); searchFor.remove('/'); if ( qTag->stoppingTags.contains( searchFor ) ) { @@ -1172,7 +1172,7 @@ Node *Parser::rebuild(Document *w) { //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(); + TQString searchFor = (m_dtd->caseSensitive) ? lastNode->tag->name : lastNode->tag->name.upper(); while (qTag && n) { qTag = QuantaCommon::tagFromDTD(m_dtd, n->tag->name); @@ -1226,7 +1226,7 @@ Node *Parser::rebuild(Document *w) return n; } /* if (lastNode) - QString s = lastNode->tag->tagStr();*/ + TQString s = lastNode->tag->tagStr();*/ } } /* kdDebug(24000)<< "END"<< endl; @@ -1244,7 +1244,7 @@ Node *Parser::rebuild(Document *w) m_saParser->init(m_node, w); if (saParserEnabled) - QTimer::singleShot(0, this, SLOT(slotParseInDetail())); + TQTimer::singleShot(0, this, TQT_SLOT(slotParseInDetail())); emit nodeTreeChanged(); m_parsingNeeded = false; return m_node; @@ -1297,7 +1297,7 @@ void Parser::clearGroups() ParserCommon::includedFilesDTD.clear(); delete ParserCommon::includeWatch; ParserCommon::includeWatch = new KDirWatch(); - connect(ParserCommon::includeWatch, SIGNAL(dirty(const QString&)), SLOT(slotIncludedFileChanged(const QString&))); + connect(ParserCommon::includeWatch, TQT_SIGNAL(dirty(const TQString&)), TQT_SLOT(slotIncludedFileChanged(const TQString&))); m_parseIncludedFiles = true; } @@ -1345,7 +1345,7 @@ void Parser::cleanGroups() { delete ParserCommon::includeWatch; ParserCommon::includeWatch = new KDirWatch(); - connect(ParserCommon::includeWatch, SIGNAL(dirty(const QString&)), SLOT(slotIncludedFileChanged(const QString&))); + connect(ParserCommon::includeWatch, TQT_SIGNAL(dirty(const TQString&)), TQT_SLOT(slotIncludedFileChanged(const TQString&))); parseIncludedFiles(); } } @@ -1404,33 +1404,33 @@ struct GroupElementPosition{ int endPos; }; -void Parser::parseIncludedFile(const QString& fileName, const DTDStruct *dtd) +void Parser::parseIncludedFile(const TQString& fileName, const DTDStruct *dtd) { #ifdef DEBUG_PARSER kdDebug(24000) << "parseIncludedFile: " << fileName << endl; #endif StructTreeGroup group; - QString content; - QFile file(fileName); + TQString content; + TQFile file(fileName); if (file.open(IO_ReadOnly)) { IncludedGroupElements *elements = &includedMap[fileName]; - QTextStream str(&file); - QString encoding; + TQTextStream str(&file); + TQString encoding; KTextEditor::EncodingInterface* encodingIf = dynamic_cast(write->doc()); if (encodingIf) encoding = encodingIf->encoding(); if (encoding.isEmpty()) encoding = "utf8"; //final fallback - str.setCodec(QTextCodec::codecForName(encoding)); + str.setCodec(TQTextCodec::codecForName(encoding)); content = str.read(); file.close(); if (dtd->specialAreas.count()) { int areaPos = 0; int lastAreaPos = 0; - QString foundStr; - QString specialEndStr; + TQString foundStr; + TQString specialEndStr; while (areaPos != -1) { areaPos = content.find(dtd->specialAreaStartRx, lastAreaPos); @@ -1452,7 +1452,7 @@ void Parser::parseIncludedFile(const QString& fileName, const DTDStruct *dtd) QuantaCommon::removeCommentsAndQuotes(foundStr, dtd); //gather the starting position of structures - QValueList structPositions; + TQValueList structPositions; int structPos = 0; while (structPos !=-1) { @@ -1464,10 +1464,10 @@ void Parser::parseIncludedFile(const QString& fileName, const DTDStruct *dtd) } } - QValueList gPositions; + TQValueList 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; + TQString savedStr = foundStr; for (uint i = 0; i < structPositions.count(); i++) { foundStr = savedStr; @@ -1492,7 +1492,7 @@ void Parser::parseIncludedFile(const QString& fileName, const DTDStruct *dtd) pos = foundStr.length(); int structEndPos = pos; foundStr = foundStr.left(pos); - QString spaces; + TQString spaces; spaces.fill(' ', pos - structPos + 1); foundStr.replace(structPos, pos - structPos + 1, spaces); @@ -1522,7 +1522,7 @@ void Parser::parseIncludedFile(const QString& fileName, const DTDStruct *dtd) //now check which groups are present in this area structPos = pos + 1; - QValueList::ConstIterator it; + TQValueList::ConstIterator it; for (it = dtd->structTreeGroups.begin(); it != dtd->structTreeGroups.end(); ++it) { group = *it; @@ -1535,7 +1535,7 @@ void Parser::parseIncludedFile(const QString& fileName, const DTDStruct *dtd) if (pos != -1) { int l; - QString ss = group.definitionRx.cap(); + TQString ss = group.definitionRx.cap(); if (group.definitionRx.pos(1) > pos) { pos = group.definitionRx.pos(1); @@ -1546,7 +1546,7 @@ void Parser::parseIncludedFile(const QString& fileName, const DTDStruct *dtd) { l = group.definitionRx.cap().length(); } - QString s = content.mid(areaPos + pos, l); + TQString s = content.mid(areaPos + pos, l); pos += l; if (!(*elements)[group.name].contains(s)) { @@ -1554,7 +1554,7 @@ void Parser::parseIncludedFile(const QString& fileName, const DTDStruct *dtd) tag->name = s; tag->setDtd(dtd); tag->setWrite(write); - QString s2 = content.left(areaPos + pos); + TQString 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); @@ -1565,7 +1565,7 @@ void Parser::parseIncludedFile(const QString& fileName, const DTDStruct *dtd) groupElement->node = node; groupElement->parentNode = 0L; int minPos = areaPos + pos + 1; - for (QValueList::Iterator gPosIt = gPositions.begin(); gPosIt != gPositions.end(); ++gPosIt) + for (TQValueList::Iterator gPosIt = gPositions.begin(); gPosIt != gPositions.end(); ++gPosIt) { GroupElementPosition gPos = (*gPosIt); if ( (areaPos + pos > gPos.startPos) && (areaPos + pos < gPos.endPos) && (gPos.startPos < minPos)) @@ -1604,7 +1604,7 @@ void Parser::parseIncludedFile(const QString& fileName, const DTDStruct *dtd) } } -void Parser::slotIncludedFileChanged(const QString& fileName) +void Parser::slotIncludedFileChanged(const TQString& fileName) { int pos = ParserCommon::includedFiles.findIndex(fileName); if (pos != -1) @@ -1640,8 +1640,8 @@ void Parser::parseForXMLGroup(Node *node) { XMLStructGroup group = xmlGroupIt.data(); Tag *newTag = new Tag(*node->tag); - QString title = ""; - QStringList::Iterator it; + TQString title = ""; + TQStringList::Iterator it; for (it = group.attributes.begin(); it != group.attributes.end(); ++it) { if (newTag->hasAttribute(*it)) @@ -1674,10 +1674,10 @@ bool Parser::parseScriptInsideTag(Node *startNode) const DTDStruct *dtd = startNode->tag->dtd(); if (dtd->specialAreas.count()) { - QString foundText; - QString s; - QString specialEndStr; - QString text = startNode->tag->tagStr(); + TQString foundText; + TQString s; + TQString specialEndStr; + TQString text = startNode->tag->tagStr(); int pos = 0; int col = startNode->tag->structBeginStr.length(); @@ -1751,7 +1751,7 @@ void Parser::synchParseInDetail() void Parser::setSAParserEnabled(bool enabled) { m_saParser->setParsingEnabled(enabled); - //kapp->processEvents(QEventLoop::ExcludeUserInput | QEventLoop::ExcludeSocketNotifiers); //this makes sure that the parsing is really disabled + //kapp->processEvents(TQEventLoop::ExcludeUserInput | TQEventLoop::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 index db797df0..94f24aff 100644 --- a/quanta/parsers/parser.h +++ b/quanta/parsers/parser.h @@ -16,13 +16,13 @@ #ifndef PARSER_H #define PARSER_H -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include -#include +#include #include "node.h" #include "tag.h" @@ -38,11 +38,11 @@ class QRegExp; class NodeModifsSet; class SAParser; -typedef QMap IncludedGroupElements; -typedef QMap IncludedGroupElementsMap; +typedef TQMap IncludedGroupElements; +typedef TQMap IncludedGroupElementsMap; -class Parser: public QObject { +class Parser: public TQObject { Q_OBJECT @@ -95,7 +95,7 @@ public slots: void cleanGroups(); private slots: - void slotIncludedFileChanged(const QString& fileName); + void slotIncludedFileChanged(const TQString& fileName); signals: void nodeTreeChanged(); @@ -103,19 +103,19 @@ signals: private: Node* m_node; //the internal Node pointer - QString m_dtdName; //the DTD name of write + TQString m_dtdName; //the DTD name of write const DTDStruct* m_dtd; //the dtd used for main parsing - QGuardedPtr write; //pointer to the parsed document + TQGuardedPtr write; //pointer to the parsed document int maxLines; // how many lines are in the current document int oldMaxLines; int treeSize; - QMap::ConstIterator xmlGroupIt; + TQMap::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); + void parseIncludedFile(const TQString &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