summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kfilereplace/commandengine.cpp80
-rw-r--r--kfilereplace/commandengine.h20
-rw-r--r--kfilereplace/configurationclasses.cpp24
-rw-r--r--kfilereplace/configurationclasses.h116
-rw-r--r--kfilereplace/kaddstringdlg.cpp68
-rw-r--r--kfilereplace/kaddstringdlg.h6
-rw-r--r--kfilereplace/kfilereplace.cpp16
-rw-r--r--kfilereplace/kfilereplaceiface.h2
-rw-r--r--kfilereplace/kfilereplacelib.cpp62
-rw-r--r--kfilereplace/kfilereplacelib.h12
-rw-r--r--kfilereplace/kfilereplacepart.cpp352
-rw-r--r--kfilereplace/kfilereplacepart.h24
-rw-r--r--kfilereplace/kfilereplaceview.cpp128
-rw-r--r--kfilereplace/kfilereplaceview.h20
-rw-r--r--kfilereplace/knewprojectdlg.cpp124
-rw-r--r--kfilereplace/knewprojectdlg.h12
-rw-r--r--kfilereplace/koptionsdlg.cpp54
-rw-r--r--kfilereplace/koptionsdlg.h4
-rw-r--r--kfilereplace/report.cpp36
-rw-r--r--kfilereplace/report.h4
-rw-r--r--kfilereplace/whatthis.h70
-rw-r--r--kimagemapeditor/arealistview.cpp24
-rw-r--r--kimagemapeditor/arealistview.h10
-rw-r--r--kimagemapeditor/drawzone.cpp192
-rw-r--r--kimagemapeditor/drawzone.h78
-rw-r--r--kimagemapeditor/imagemap.cpp112
-rw-r--r--kimagemapeditor/imagemap.h50
-rw-r--r--kimagemapeditor/imageslistview.cpp24
-rw-r--r--kimagemapeditor/imageslistview.h6
-rw-r--r--kimagemapeditor/kimagemapeditor.cpp542
-rw-r--r--kimagemapeditor/kimagemapeditor.h88
-rw-r--r--kimagemapeditor/kimearea.cpp412
-rw-r--r--kimagemapeditor/kimearea.h196
-rw-r--r--kimagemapeditor/kimecommands.cpp8
-rw-r--r--kimagemapeditor/kimecommands.h10
-rw-r--r--kimagemapeditor/kimedialogs.cpp340
-rw-r--r--kimagemapeditor/kimedialogs.h102
-rw-r--r--kimagemapeditor/kimeshell.cpp36
-rw-r--r--kimagemapeditor/mapslistview.cpp70
-rw-r--r--kimagemapeditor/mapslistview.h34
-rw-r--r--kimagemapeditor/qextfileinfo.cpp84
-rw-r--r--kimagemapeditor/qextfileinfo.h22
-rw-r--r--klinkstatus/src/actionmanager.cpp34
-rw-r--r--klinkstatus/src/actionmanager.h6
-rw-r--r--klinkstatus/src/engine/linkchecker.cpp60
-rw-r--r--klinkstatus/src/engine/linkchecker.h20
-rw-r--r--klinkstatus/src/engine/linkfilter.cpp2
-rw-r--r--klinkstatus/src/engine/linkfilter.h8
-rw-r--r--klinkstatus/src/engine/linkstatus.cpp16
-rw-r--r--klinkstatus/src/engine/linkstatus.h56
-rw-r--r--klinkstatus/src/engine/linkstatus_impl.h32
-rw-r--r--klinkstatus/src/engine/searchmanager.cpp62
-rw-r--r--klinkstatus/src/engine/searchmanager.h40
-rw-r--r--klinkstatus/src/engine/searchmanager_impl.h10
-rw-r--r--klinkstatus/src/global.cpp56
-rw-r--r--klinkstatus/src/global.h12
-rw-r--r--klinkstatus/src/klinkstatus.cpp22
-rw-r--r--klinkstatus/src/klinkstatus_part.cpp12
-rw-r--r--klinkstatus/src/klinkstatus_part.h6
-rw-r--r--klinkstatus/src/parser/htmlparser.cpp74
-rw-r--r--klinkstatus/src/parser/htmlparser.h20
-rw-r--r--klinkstatus/src/parser/http.cpp12
-rw-r--r--klinkstatus/src/parser/http.h28
-rw-r--r--klinkstatus/src/parser/mstring.cpp34
-rw-r--r--klinkstatus/src/parser/mstring.h64
-rw-r--r--klinkstatus/src/parser/node.cpp14
-rw-r--r--klinkstatus/src/parser/node.h96
-rw-r--r--klinkstatus/src/parser/node_impl.h64
-rw-r--r--klinkstatus/src/parser/url.cpp42
-rw-r--r--klinkstatus/src/parser/url.h14
-rw-r--r--klinkstatus/src/ui/celltooltip.cpp14
-rw-r--r--klinkstatus/src/ui/celltooltip.h6
-rw-r--r--klinkstatus/src/ui/documentrootdialog.cpp30
-rw-r--r--klinkstatus/src/ui/documentrootdialog.h14
-rw-r--r--klinkstatus/src/ui/klshistorycombo.cpp40
-rw-r--r--klinkstatus/src/ui/klshistorycombo.h6
-rw-r--r--klinkstatus/src/ui/resultssearchbar.cpp76
-rw-r--r--klinkstatus/src/ui/resultssearchbar.h10
-rw-r--r--klinkstatus/src/ui/resultview.cpp18
-rw-r--r--klinkstatus/src/ui/resultview.h34
-rw-r--r--klinkstatus/src/ui/sessionwidget.cpp102
-rw-r--r--klinkstatus/src/ui/sessionwidget.h18
-rw-r--r--klinkstatus/src/ui/settings/configidentificationdialog.cpp6
-rw-r--r--klinkstatus/src/ui/settings/configidentificationdialog.h2
-rw-r--r--klinkstatus/src/ui/tablelinkstatus.cpp166
-rw-r--r--klinkstatus/src/ui/tablelinkstatus.h64
-rw-r--r--klinkstatus/src/ui/tabwidgetsession.cpp54
-rw-r--r--klinkstatus/src/ui/tabwidgetsession.h12
-rw-r--r--klinkstatus/src/ui/treeview.cpp110
-rw-r--r--klinkstatus/src/ui/treeview.h40
-rw-r--r--klinkstatus/src/utils/utils.cpp18
-rw-r--r--klinkstatus/src/utils/utils.h8
-rw-r--r--klinkstatus/src/utils/xsl.cpp130
-rw-r--r--klinkstatus/src/utils/xsl.h14
-rw-r--r--kommander/editor/actiondnd.cpp500
-rw-r--r--kommander/editor/actiondnd.h222
-rw-r--r--kommander/editor/actioneditorimpl.cpp88
-rw-r--r--kommander/editor/actioneditorimpl.h12
-rw-r--r--kommander/editor/actionlistview.cpp46
-rw-r--r--kommander/editor/actionlistview.h18
-rw-r--r--kommander/editor/asciivalidator.cpp20
-rw-r--r--kommander/editor/asciivalidator.h12
-rw-r--r--kommander/editor/assistproc.cpp14
-rw-r--r--kommander/editor/assistproc.h16
-rw-r--r--kommander/editor/assoctexteditorimpl.cpp126
-rw-r--r--kommander/editor/assoctexteditorimpl.h48
-rw-r--r--kommander/editor/choosewidgetimpl.cpp56
-rw-r--r--kommander/editor/choosewidgetimpl.h12
-rw-r--r--kommander/editor/command.cpp472
-rw-r--r--kommander/editor/command.h374
-rw-r--r--kommander/editor/connectioneditorimpl.cpp118
-rw-r--r--kommander/editor/connectioneditorimpl.h24
-rw-r--r--kommander/editor/defs.cpp50
-rw-r--r--kommander/editor/defs.h10
-rw-r--r--kommander/editor/filechooser.cpp32
-rw-r--r--kommander/editor/filechooser.h16
-rw-r--r--kommander/editor/formfile.cpp56
-rw-r--r--kommander/editor/formfile.h18
-rw-r--r--kommander/editor/formsettingsimpl.cpp6
-rw-r--r--kommander/editor/formsettingsimpl.h2
-rw-r--r--kommander/editor/formwindow.cpp852
-rw-r--r--kommander/editor/formwindow.h212
-rw-r--r--kommander/editor/functionsimpl.cpp106
-rw-r--r--kommander/editor/functionsimpl.h26
-rw-r--r--kommander/editor/globaldefs.h14
-rw-r--r--kommander/editor/hierarchyview.cpp294
-rw-r--r--kommander/editor/hierarchyview.h94
-rw-r--r--kommander/editor/iconvieweditorimpl.cpp36
-rw-r--r--kommander/editor/iconvieweditorimpl.h8
-rw-r--r--kommander/editor/layout.cpp226
-rw-r--r--kommander/editor/layout.h66
-rw-r--r--kommander/editor/listboxeditorimpl.cpp56
-rw-r--r--kommander/editor/listboxeditorimpl.h8
-rw-r--r--kommander/editor/listvieweditorimpl.cpp148
-rw-r--r--kommander/editor/listvieweditorimpl.h34
-rw-r--r--kommander/editor/mainwindow.cpp598
-rw-r--r--kommander/editor/mainwindow.h110
-rw-r--r--kommander/editor/mainwindowactions.cpp322
-rw-r--r--kommander/editor/messagelog.cpp48
-rw-r--r--kommander/editor/messagelog.h12
-rw-r--r--kommander/editor/metadatabase.cpp362
-rw-r--r--kommander/editor/metadatabase.h206
-rw-r--r--kommander/editor/multilineeditorimpl.cpp20
-rw-r--r--kommander/editor/multilineeditorimpl.h8
-rw-r--r--kommander/editor/newformimpl.cpp72
-rw-r--r--kommander/editor/newformimpl.h20
-rw-r--r--kommander/editor/orderindicator.cpp36
-rw-r--r--kommander/editor/orderindicator.h12
-rw-r--r--kommander/editor/paletteeditoradvancedimpl.cpp208
-rw-r--r--kommander/editor/paletteeditoradvancedimpl.h38
-rw-r--r--kommander/editor/paletteeditorimpl.cpp134
-rw-r--r--kommander/editor/paletteeditorimpl.h20
-rw-r--r--kommander/editor/parser.cpp26
-rw-r--r--kommander/editor/parser.h4
-rw-r--r--kommander/editor/pics/images.h12
-rw-r--r--kommander/editor/pixmapchooser.cpp142
-rw-r--r--kommander/editor/pixmapchooser.h44
-rw-r--r--kommander/editor/previewframe.cpp18
-rw-r--r--kommander/editor/previewframe.h14
-rw-r--r--kommander/editor/previewwidgetimpl.cpp32
-rw-r--r--kommander/editor/previewwidgetimpl.h6
-rw-r--r--kommander/editor/propertyeditor.cpp1172
-rw-r--r--kommander/editor/propertyeditor.h286
-rw-r--r--kommander/editor/qcompletionedit.cpp68
-rw-r--r--kommander/editor/qcompletionedit.h26
-rw-r--r--kommander/editor/resource.cpp1174
-rw-r--r--kommander/editor/resource.h144
-rw-r--r--kommander/editor/sizehandle.cpp52
-rw-r--r--kommander/editor/sizehandle.h38
-rw-r--r--kommander/editor/styledbutton.cpp136
-rw-r--r--kommander/editor/styledbutton.h50
-rw-r--r--kommander/editor/tableeditorimpl.cpp108
-rw-r--r--kommander/editor/tableeditorimpl.h20
-rw-r--r--kommander/editor/timestamp.cpp24
-rw-r--r--kommander/editor/timestamp.h18
-rw-r--r--kommander/editor/widgetdatabase.cpp176
-rw-r--r--kommander/editor/widgetdatabase.h36
-rw-r--r--kommander/editor/widgetfactory.cpp926
-rw-r--r--kommander/editor/widgetfactory.h304
-rw-r--r--kommander/editor/wizardeditorimpl.cpp20
-rw-r--r--kommander/editor/wizardeditorimpl.h8
-rw-r--r--kommander/editor/workspace.cpp192
-rw-r--r--kommander/editor/workspace.h46
-rw-r--r--kommander/executor/dcopkommanderif.h100
-rw-r--r--kommander/executor/instance.cpp362
-rw-r--r--kommander/executor/instance.h126
-rw-r--r--kommander/executor/main.cpp14
-rw-r--r--kommander/executor/register.cpp36
-rw-r--r--kommander/factory/domtool.cpp154
-rw-r--r--kommander/factory/domtool.h22
-rw-r--r--kommander/factory/kommanderfactory.cpp888
-rw-r--r--kommander/factory/kommanderfactory.h132
-rw-r--r--kommander/part/kommander_part.cpp20
-rw-r--r--kommander/part/kommander_part.h8
-rw-r--r--kommander/plugin/kommanderplugin.cpp20
-rw-r--r--kommander/plugin/kommanderplugin.h40
-rw-r--r--kommander/plugin/specialinformation.cpp366
-rw-r--r--kommander/plugin/specialinformation.h74
-rw-r--r--kommander/pluginmanager/main.cpp10
-rw-r--r--kommander/pluginmanager/mainwindow.cpp14
-rw-r--r--kommander/pluginmanager/mainwindow.h4
-rw-r--r--kommander/pluginmanager/pluginmanager.cpp20
-rw-r--r--kommander/pluginmanager/pluginmanager.h14
-rw-r--r--kommander/widget/expression.cpp100
-rw-r--r--kommander/widget/expression.h46
-rw-r--r--kommander/widget/function.h6
-rw-r--r--kommander/widget/functionlib.cpp248
-rw-r--r--kommander/widget/invokeclass.cpp18
-rw-r--r--kommander/widget/invokeclass.h28
-rw-r--r--kommander/widget/kmdrmainwindow.cpp6
-rw-r--r--kommander/widget/kmdrmainwindow.h2
-rw-r--r--kommander/widget/kommanderfunctions.cpp160
-rw-r--r--kommander/widget/kommanderwidget.cpp244
-rw-r--r--kommander/widget/kommanderwidget.h114
-rw-r--r--kommander/widget/kommanderwindow.cpp6
-rw-r--r--kommander/widget/kommanderwindow.h8
-rw-r--r--kommander/widget/myprocess.cpp36
-rw-r--r--kommander/widget/myprocess.h12
-rw-r--r--kommander/widget/parsenode.cpp32
-rw-r--r--kommander/widget/parsenode.h22
-rw-r--r--kommander/widget/parser.cpp98
-rw-r--r--kommander/widget/parser.h56
-rw-r--r--kommander/widget/parserdata.cpp16
-rw-r--r--kommander/widget/parserdata.h18
-rw-r--r--kommander/widgets/aboutdialog.cpp64
-rw-r--r--kommander/widgets/aboutdialog.h60
-rw-r--r--kommander/widgets/buttongroup.cpp52
-rw-r--r--kommander/widgets/buttongroup.h34
-rw-r--r--kommander/widgets/checkbox.cpp60
-rw-r--r--kommander/widgets/checkbox.h36
-rw-r--r--kommander/widgets/closebutton.cpp56
-rw-r--r--kommander/widgets/closebutton.h28
-rw-r--r--kommander/widgets/combobox.cpp60
-rw-r--r--kommander/widgets/combobox.h32
-rw-r--r--kommander/widgets/datepicker.cpp46
-rw-r--r--kommander/widgets/datepicker.h34
-rw-r--r--kommander/widgets/dialog.cpp80
-rw-r--r--kommander/widgets/dialog.h42
-rw-r--r--kommander/widgets/execbutton.cpp74
-rw-r--r--kommander/widgets/execbutton.h30
-rw-r--r--kommander/widgets/fileselector.cpp70
-rw-r--r--kommander/widgets/fileselector.h60
-rw-r--r--kommander/widgets/fontdialog.cpp38
-rw-r--r--kommander/widgets/fontdialog.h28
-rw-r--r--kommander/widgets/groupbox.cpp62
-rw-r--r--kommander/widgets/groupbox.h42
-rw-r--r--kommander/widgets/konsole.cpp42
-rw-r--r--kommander/widgets/konsole.h22
-rw-r--r--kommander/widgets/label.cpp42
-rw-r--r--kommander/widgets/label.h34
-rw-r--r--kommander/widgets/lineedit.cpp60
-rw-r--r--kommander/widgets/lineedit.h38
-rw-r--r--kommander/widgets/listbox.cpp72
-rw-r--r--kommander/widgets/listbox.h32
-rw-r--r--kommander/widgets/pixmaplabel.cpp50
-rw-r--r--kommander/widgets/pixmaplabel.h36
-rw-r--r--kommander/widgets/plugin.cpp12
-rw-r--r--kommander/widgets/popupmenu.cpp72
-rw-r--r--kommander/widgets/popupmenu.h32
-rw-r--r--kommander/widgets/progressbar.cpp54
-rw-r--r--kommander/widgets/progressbar.h26
-rw-r--r--kommander/widgets/radiobutton.cpp52
-rw-r--r--kommander/widgets/radiobutton.h36
-rw-r--r--kommander/widgets/richtexteditor.cpp116
-rw-r--r--kommander/widgets/richtexteditor.h44
-rw-r--r--kommander/widgets/scriptobject.cpp54
-rw-r--r--kommander/widgets/scriptobject.h32
-rw-r--r--kommander/widgets/slider.cpp38
-rw-r--r--kommander/widgets/slider.h30
-rw-r--r--kommander/widgets/spinboxint.cpp50
-rw-r--r--kommander/widgets/spinboxint.h38
-rw-r--r--kommander/widgets/statusbar.cpp42
-rw-r--r--kommander/widgets/statusbar.h28
-rw-r--r--kommander/widgets/subdialog.cpp54
-rw-r--r--kommander/widgets/subdialog.h42
-rw-r--r--kommander/widgets/table.cpp136
-rw-r--r--kommander/widgets/table.h36
-rw-r--r--kommander/widgets/tabwidget.cpp76
-rw-r--r--kommander/widgets/tabwidget.h26
-rw-r--r--kommander/widgets/textbrowser.cpp46
-rw-r--r--kommander/widgets/textbrowser.h28
-rw-r--r--kommander/widgets/textedit.cpp98
-rw-r--r--kommander/widgets/textedit.h34
-rw-r--r--kommander/widgets/timer.cpp40
-rw-r--r--kommander/widgets/timer.h26
-rw-r--r--kommander/widgets/toolbox.cpp80
-rw-r--r--kommander/widgets/toolbox.h28
-rw-r--r--kommander/widgets/treewidget.cpp194
-rw-r--r--kommander/widgets/treewidget.h66
-rw-r--r--kommander/widgets/wizard.cpp62
-rw-r--r--kommander/widgets/wizard.h38
-rw-r--r--kommander/working/plugintemplate/plugin.cpp6
-rw-r--r--kommander/working/plugintemplate/widget.cpp32
-rw-r--r--kommander/working/plugintemplate/widget.h28
-rw-r--r--kxsldbg/kxsldbg.cpp26
-rw-r--r--kxsldbg/kxsldbg.h4
-rw-r--r--kxsldbg/kxsldbgif.h4
-rw-r--r--kxsldbg/kxsldbgpart/kxsldbg_part.cpp266
-rw-r--r--kxsldbg/kxsldbgpart/kxsldbg_part.h36
-rw-r--r--kxsldbg/kxsldbgpart/libqtnotfier/qtnotifier2.cpp4
-rw-r--r--kxsldbg/kxsldbgpart/libqtnotfier/xsldbgdebuggerbase.cpp34
-rw-r--r--kxsldbg/kxsldbgpart/libqtnotfier/xsldbgdebuggerbase.h82
-rw-r--r--kxsldbg/kxsldbgpart/libqtnotfier/xsldbgevent.cpp56
-rw-r--r--kxsldbg/kxsldbgpart/libxsldbg/breakpoint_cmds.cpp24
-rw-r--r--kxsldbg/kxsldbgpart/libxsldbg/debugXSL.cpp8
-rw-r--r--kxsldbg/kxsldbgpart/libxsldbg/file_cmds.cpp2
-rw-r--r--kxsldbg/kxsldbgpart/libxsldbg/help_unix.cpp6
-rw-r--r--kxsldbg/kxsldbgpart/libxsldbg/options.cpp38
-rw-r--r--kxsldbg/kxsldbgpart/libxsldbg/param_cmds.cpp6
-rw-r--r--kxsldbg/kxsldbgpart/libxsldbg/template_cmds.cpp8
-rw-r--r--kxsldbg/kxsldbgpart/libxsldbg/xsldbg.cpp44
-rw-r--r--kxsldbg/kxsldbgpart/libxsldbg/xsldbg.h12
-rw-r--r--kxsldbg/kxsldbgpart/libxsldbg/xsldbgevent.h144
-rw-r--r--kxsldbg/kxsldbgpart/qxsldbgdoc.cpp22
-rw-r--r--kxsldbg/kxsldbgpart/qxsldbgdoc.h14
-rw-r--r--kxsldbg/kxsldbgpart/xsldbgbreakpointlistitem.cpp8
-rw-r--r--kxsldbg/kxsldbgpart/xsldbgbreakpointlistitem.h12
-rw-r--r--kxsldbg/kxsldbgpart/xsldbgbreakpointsimpl.cpp60
-rw-r--r--kxsldbg/kxsldbgpart/xsldbgbreakpointsimpl.h10
-rw-r--r--kxsldbg/kxsldbgpart/xsldbgcallstackimpl.cpp20
-rw-r--r--kxsldbg/kxsldbgpart/xsldbgcallstackimpl.h8
-rw-r--r--kxsldbg/kxsldbgpart/xsldbgconfigimpl.cpp92
-rw-r--r--kxsldbg/kxsldbgpart/xsldbgconfigimpl.h44
-rw-r--r--kxsldbg/kxsldbgpart/xsldbgdebugger.cpp118
-rw-r--r--kxsldbg/kxsldbgpart/xsldbgdebugger.h34
-rw-r--r--kxsldbg/kxsldbgpart/xsldbgdialogbase.h2
-rw-r--r--kxsldbg/kxsldbgpart/xsldbgdoc.cpp10
-rw-r--r--kxsldbg/kxsldbgpart/xsldbgdoc.h12
-rw-r--r--kxsldbg/kxsldbgpart/xsldbgdocmap.h4
-rw-r--r--kxsldbg/kxsldbgpart/xsldbgentitiesimpl.cpp22
-rw-r--r--kxsldbg/kxsldbgpart/xsldbgentitiesimpl.h8
-rw-r--r--kxsldbg/kxsldbgpart/xsldbggloballistitem.cpp6
-rw-r--r--kxsldbg/kxsldbgpart/xsldbggloballistitem.h8
-rw-r--r--kxsldbg/kxsldbgpart/xsldbgglobalvariablesimpl.cpp18
-rw-r--r--kxsldbg/kxsldbgpart/xsldbgglobalvariablesimpl.h8
-rw-r--r--kxsldbg/kxsldbgpart/xsldbginspector.cpp76
-rw-r--r--kxsldbg/kxsldbgpart/xsldbginspector.h14
-rw-r--r--kxsldbg/kxsldbgpart/xsldbglistitem.cpp10
-rw-r--r--kxsldbg/kxsldbgpart/xsldbglistitem.h12
-rw-r--r--kxsldbg/kxsldbgpart/xsldbglocallistitem.cpp10
-rw-r--r--kxsldbg/kxsldbgpart/xsldbglocallistitem.h16
-rw-r--r--kxsldbg/kxsldbgpart/xsldbglocalvariablesimpl.cpp34
-rw-r--r--kxsldbg/kxsldbgpart/xsldbglocalvariablesimpl.h12
-rw-r--r--kxsldbg/kxsldbgpart/xsldbgmsgdialogimpl.h10
-rw-r--r--kxsldbg/kxsldbgpart/xsldbgoutputview.cpp54
-rw-r--r--kxsldbg/kxsldbgpart/xsldbgoutputview.h12
-rw-r--r--kxsldbg/kxsldbgpart/xsldbgsourcesimpl.cpp18
-rw-r--r--kxsldbg/kxsldbgpart/xsldbgsourcesimpl.h8
-rw-r--r--kxsldbg/kxsldbgpart/xsldbgtemplatelistitem.cpp4
-rw-r--r--kxsldbg/kxsldbgpart/xsldbgtemplatelistitem.h12
-rw-r--r--kxsldbg/kxsldbgpart/xsldbgtemplatesimpl.cpp18
-rw-r--r--kxsldbg/kxsldbgpart/xsldbgtemplatesimpl.h8
-rw-r--r--kxsldbg/kxsldbgpart/xsldbgwalkspeedimpl.cpp4
-rw-r--r--kxsldbg/kxsldbgpart/xsldbgwalkspeedimpl.h2
-rw-r--r--kxsldbg/xsldbgmain.cpp10
-rw-r--r--lib/compatibility/kmdi/qextmdi/kdelibs_export.h2
-rw-r--r--lib/compatibility/kmdi/qextmdi/kdockwidget.cpp784
-rw-r--r--lib/compatibility/kmdi/qextmdi/kdockwidget.h194
-rw-r--r--lib/compatibility/kmdi/qextmdi/kdockwidget_p.h26
-rw-r--r--lib/compatibility/kmdi/qextmdi/kdockwidget_private.cpp82
-rw-r--r--lib/compatibility/kmdi/qextmdi/kdockwidget_private.h52
-rw-r--r--lib/compatibility/kmdi/qextmdi/kmdichildarea.cpp84
-rw-r--r--lib/compatibility/kmdi/qextmdi/kmdichildarea.h42
-rw-r--r--lib/compatibility/kmdi/qextmdi/kmdichildfrm.cpp384
-rw-r--r--lib/compatibility/kmdi/qextmdi/kmdichildfrm.h108
-rw-r--r--lib/compatibility/kmdi/qextmdi/kmdichildfrmcaption.cpp54
-rw-r--r--lib/compatibility/kmdi/qextmdi/kmdichildfrmcaption.h20
-rw-r--r--lib/compatibility/kmdi/qextmdi/kmdichildview.cpp196
-rw-r--r--lib/compatibility/kmdi/qextmdi/kmdichildview.h114
-rw-r--r--lib/compatibility/kmdi/qextmdi/kmdidefines.h6
-rw-r--r--lib/compatibility/kmdi/qextmdi/kmdidockcontainer.cpp154
-rw-r--r--lib/compatibility/kmdi/qextmdi/kmdidockcontainer.h50
-rw-r--r--lib/compatibility/kmdi/qextmdi/kmdidocumentviewtabwidget.cpp24
-rw-r--r--lib/compatibility/kmdi/qextmdi/kmdidocumentviewtabwidget.h22
-rw-r--r--lib/compatibility/kmdi/qextmdi/kmdifocuslist.cpp30
-rw-r--r--lib/compatibility/kmdi/qextmdi/kmdifocuslist.h14
-rw-r--r--lib/compatibility/kmdi/qextmdi/kmdiguiclient.cpp62
-rw-r--r--lib/compatibility/kmdi/qextmdi/kmdiguiclient.h18
-rw-r--r--lib/compatibility/kmdi/qextmdi/kmdilistiterator.h6
-rw-r--r--lib/compatibility/kmdi/qextmdi/kmdimainfrm.cpp594
-rw-r--r--lib/compatibility/kmdi/qextmdi/kmdimainfrm.h114
-rw-r--r--lib/compatibility/kmdi/qextmdi/kmditaskbar.cpp68
-rw-r--r--lib/compatibility/kmdi/qextmdi/kmditaskbar.h34
-rw-r--r--lib/compatibility/kmdi/qextmdi/kmditoolviewaccessor.cpp40
-rw-r--r--lib/compatibility/kmdi/qextmdi/kmditoolviewaccessor.h24
-rw-r--r--lib/compatibility/kmdi/qextmdi/kmditoolviewaccessor_p.h10
-rw-r--r--lib/compatibility/kmdi/qextmdi/kmultitabbar.cpp244
-rw-r--r--lib/compatibility/kmdi/qextmdi/kmultitabbar.h64
-rw-r--r--lib/compatibility/kmdi/qextmdi/kmultitabbar_p.h24
-rw-r--r--lib/compatibility/kmdi/qextmdi/ktabbar.cpp154
-rw-r--r--lib/compatibility/kmdi/qextmdi/ktabbar.h44
-rw-r--r--lib/compatibility/kmdi/qextmdi/ktabwidget.cpp162
-rw-r--r--lib/compatibility/kmdi/qextmdi/ktabwidget.h72
-rw-r--r--lib/compatibility/knewstuff/downloaddialog.cpp162
-rw-r--r--lib/compatibility/knewstuff/downloaddialog.h52
-rw-r--r--lib/compatibility/knewstuff/engine.cpp94
-rw-r--r--lib/compatibility/knewstuff/engine.h38
-rw-r--r--lib/compatibility/knewstuff/entry.cpp104
-rw-r--r--lib/compatibility/knewstuff/entry.h86
-rw-r--r--lib/compatibility/knewstuff/knewstuff.cpp16
-rw-r--r--lib/compatibility/knewstuff/knewstuff.h22
-rw-r--r--lib/compatibility/knewstuff/knewstuffgeneric.cpp42
-rw-r--r--lib/compatibility/knewstuff/knewstuffgeneric.h12
-rw-r--r--lib/compatibility/knewstuff/knewstuffsecure.cpp46
-rw-r--r--lib/compatibility/knewstuff/knewstuffsecure.h18
-rw-r--r--lib/compatibility/knewstuff/provider.cpp48
-rw-r--r--lib/compatibility/knewstuff/provider.h34
-rw-r--r--lib/compatibility/knewstuff/providerdialog.cpp14
-rw-r--r--lib/compatibility/knewstuff/providerdialog.h2
-rw-r--r--lib/compatibility/knewstuff/security.cpp70
-rw-r--r--lib/compatibility/knewstuff/security.h20
-rw-r--r--lib/compatibility/knewstuff/uploaddialog.cpp66
-rw-r--r--lib/compatibility/knewstuff/uploaddialog.h20
-rw-r--r--lib/ksavealldialog.cpp50
-rw-r--r--lib/ksavealldialog.h6
-rw-r--r--lib/qextfileinfo.cpp186
-rw-r--r--lib/qextfileinfo.h48
-rw-r--r--quanta/components/csseditor/colorrequester.cpp38
-rw-r--r--quanta/components/csseditor/colorrequester.h14
-rw-r--r--quanta/components/csseditor/colorslider.cpp42
-rw-r--r--quanta/components/csseditor/colorslider.h14
-rw-r--r--quanta/components/csseditor/csseditor.cpp164
-rw-r--r--quanta/components/csseditor/csseditor.h60
-rw-r--r--quanta/components/csseditor/csseditor_globals.cpp20
-rw-r--r--quanta/components/csseditor/csseditor_globals.h22
-rw-r--r--quanta/components/csseditor/cssselector.cpp190
-rw-r--r--quanta/components/csseditor/cssselector.h36
-rw-r--r--quanta/components/csseditor/cssshpropertyparser.cpp40
-rw-r--r--quanta/components/csseditor/cssshpropertyparser.h18
-rw-r--r--quanta/components/csseditor/doubleeditors.cpp46
-rw-r--r--quanta/components/csseditor/doubleeditors.h26
-rw-r--r--quanta/components/csseditor/encodingselector.cpp8
-rw-r--r--quanta/components/csseditor/encodingselector.h6
-rw-r--r--quanta/components/csseditor/fontfamilychooser.cpp100
-rw-r--r--quanta/components/csseditor/fontfamilychooser.h20
-rw-r--r--quanta/components/csseditor/minieditor.h4
-rw-r--r--quanta/components/csseditor/percentageeditor.cpp8
-rw-r--r--quanta/components/csseditor/percentageeditor.h12
-rw-r--r--quanta/components/csseditor/propertysetter.cpp44
-rw-r--r--quanta/components/csseditor/propertysetter.h20
-rw-r--r--quanta/components/csseditor/qmyhighlighter.cpp16
-rw-r--r--quanta/components/csseditor/qmyhighlighter.h8
-rw-r--r--quanta/components/csseditor/shorthandformer.cpp178
-rw-r--r--quanta/components/csseditor/shorthandformer.h70
-rw-r--r--quanta/components/csseditor/specialsb.cpp38
-rw-r--r--quanta/components/csseditor/specialsb.h28
-rw-r--r--quanta/components/csseditor/styleeditor.cpp26
-rw-r--r--quanta/components/csseditor/styleeditor.h4
-rw-r--r--quanta/components/csseditor/stylesheetparser.cpp36
-rw-r--r--quanta/components/csseditor/stylesheetparser.h18
-rw-r--r--quanta/components/csseditor/tlpeditors.cpp66
-rw-r--r--quanta/components/csseditor/tlpeditors.h34
-rw-r--r--quanta/components/cvsservice/cvsservice.cpp146
-rw-r--r--quanta/components/cvsservice/cvsservice.h44
-rw-r--r--quanta/components/cvsservice/cvsservicedcopif.h4
-rw-r--r--quanta/components/debugger/backtracelistview.cpp16
-rw-r--r--quanta/components/debugger/backtracelistview.h24
-rw-r--r--quanta/components/debugger/conditionalbreakpointdialog.cpp22
-rw-r--r--quanta/components/debugger/conditionalbreakpointdialog.h10
-rw-r--r--quanta/components/debugger/dbgp/dbgpnetwork.cpp42
-rw-r--r--quanta/components/debugger/dbgp/dbgpnetwork.h12
-rw-r--r--quanta/components/debugger/dbgp/dbgpsettings.cpp8
-rw-r--r--quanta/components/debugger/dbgp/dbgpsettings.h2
-rw-r--r--quanta/components/debugger/dbgp/qbytearrayfifo.cpp8
-rw-r--r--quanta/components/debugger/dbgp/qbytearrayfifo.h10
-rw-r--r--quanta/components/debugger/dbgp/quantadebuggerdbgp.cpp136
-rw-r--r--quanta/components/debugger/dbgp/quantadebuggerdbgp.h70
-rw-r--r--quanta/components/debugger/debuggerbreakpoint.cpp30
-rw-r--r--quanta/components/debugger/debuggerbreakpoint.h44
-rw-r--r--quanta/components/debugger/debuggerbreakpointlist.cpp8
-rw-r--r--quanta/components/debugger/debuggerbreakpointlist.h18
-rw-r--r--quanta/components/debugger/debuggerbreakpointview.cpp24
-rw-r--r--quanta/components/debugger/debuggerbreakpointview.h12
-rw-r--r--quanta/components/debugger/debuggermanager.cpp142
-rw-r--r--quanta/components/debugger/debuggermanager.h30
-rw-r--r--quanta/components/debugger/debuggerui.cpp16
-rw-r--r--quanta/components/debugger/debuggerui.h10
-rw-r--r--quanta/components/debugger/debuggervariable.cpp24
-rw-r--r--quanta/components/debugger/debuggervariable.h32
-rw-r--r--quanta/components/debugger/gubed/gubedsettings.cpp4
-rw-r--r--quanta/components/debugger/gubed/gubedsettings.h2
-rw-r--r--quanta/components/debugger/gubed/quantadebuggergubed.cpp132
-rw-r--r--quanta/components/debugger/gubed/quantadebuggergubed.h58
-rw-r--r--quanta/components/debugger/interfaces/debuggerclient.cpp14
-rw-r--r--quanta/components/debugger/interfaces/debuggerclient.h20
-rw-r--r--quanta/components/debugger/interfaces/debuggerinterface.cpp4
-rw-r--r--quanta/components/debugger/interfaces/debuggerinterface.h30
-rw-r--r--quanta/components/debugger/pathmapper.cpp56
-rw-r--r--quanta/components/debugger/pathmapper.h30
-rw-r--r--quanta/components/debugger/pathmapperdialog.cpp24
-rw-r--r--quanta/components/debugger/pathmapperdialog.h10
-rw-r--r--quanta/components/debugger/quantadebuggerinterface.cpp28
-rw-r--r--quanta/components/debugger/quantadebuggerinterface.h30
-rw-r--r--quanta/components/debugger/variableslistview.cpp34
-rw-r--r--quanta/components/debugger/variableslistview.h10
-rw-r--r--quanta/components/framewizard/areaattributedb.h24
-rw-r--r--quanta/components/framewizard/fmfpeditor.cpp36
-rw-r--r--quanta/components/framewizard/fmfpeditor.h10
-rw-r--r--quanta/components/framewizard/fmrceditor.cpp6
-rw-r--r--quanta/components/framewizard/fmrceditor.h2
-rw-r--r--quanta/components/framewizard/framewizard.cpp28
-rw-r--r--quanta/components/framewizard/framewizard.h14
-rw-r--r--quanta/components/framewizard/selectablearea.cpp22
-rw-r--r--quanta/components/framewizard/selectablearea.h20
-rw-r--r--quanta/components/framewizard/treenode.cpp38
-rw-r--r--quanta/components/framewizard/treenode.h40
-rw-r--r--quanta/components/framewizard/visualframeeditor.cpp134
-rw-r--r--quanta/components/framewizard/visualframeeditor.h36
-rw-r--r--quanta/components/tableeditor/tableeditor.cpp230
-rw-r--r--quanta/components/tableeditor/tableeditor.h54
-rw-r--r--quanta/components/tableeditor/tableitem.cpp46
-rw-r--r--quanta/components/tableeditor/tableitem.h20
-rw-r--r--quanta/dialogs/actionconfigdialog.cpp208
-rw-r--r--quanta/dialogs/actionconfigdialog.h34
-rw-r--r--quanta/dialogs/copyto.cpp12
-rw-r--r--quanta/dialogs/dirtydlg.cpp18
-rw-r--r--quanta/dialogs/dirtydlg.h4
-rw-r--r--quanta/dialogs/dtepeditdlg.cpp58
-rw-r--r--quanta/dialogs/dtepeditdlg.h36
-rw-r--r--quanta/dialogs/filecombo.cpp44
-rw-r--r--quanta/dialogs/filecombo.h20
-rw-r--r--quanta/dialogs/settings/abbreviation.cpp90
-rw-r--r--quanta/dialogs/settings/abbreviation.h12
-rw-r--r--quanta/dialogs/settings/filemasks.cpp12
-rw-r--r--quanta/dialogs/settings/filemasks.h2
-rw-r--r--quanta/dialogs/settings/parseroptions.cpp14
-rw-r--r--quanta/dialogs/settings/parseroptions.h2
-rw-r--r--quanta/dialogs/settings/previewoptions.cpp30
-rw-r--r--quanta/dialogs/settings/previewoptions.h18
-rw-r--r--quanta/dialogs/specialchardialog.cpp38
-rw-r--r--quanta/dialogs/specialchardialog.h10
-rw-r--r--quanta/dialogs/tagdialogs/colorcombo.cpp70
-rw-r--r--quanta/dialogs/tagdialogs/colorcombo.h30
-rw-r--r--quanta/dialogs/tagdialogs/corewidgetdlg.cpp12
-rw-r--r--quanta/dialogs/tagdialogs/listdlg.cpp12
-rw-r--r--quanta/dialogs/tagdialogs/listdlg.h4
-rw-r--r--quanta/dialogs/tagdialogs/pictureview.cpp22
-rw-r--r--quanta/dialogs/tagdialogs/pictureview.h16
-rw-r--r--quanta/dialogs/tagdialogs/tagattr.cpp32
-rw-r--r--quanta/dialogs/tagdialogs/tagattr.h64
-rw-r--r--quanta/dialogs/tagdialogs/tagdialog.cpp146
-rw-r--r--quanta/dialogs/tagdialogs/tagdialog.h38
-rw-r--r--quanta/dialogs/tagdialogs/tagimgdlg.cpp26
-rw-r--r--quanta/dialogs/tagdialogs/tagimgdlg.h48
-rw-r--r--quanta/dialogs/tagdialogs/tagimgdlgdata.cpp30
-rw-r--r--quanta/dialogs/tagdialogs/tagmaildlg.cpp24
-rw-r--r--quanta/dialogs/tagdialogs/tagmaildlg.h2
-rw-r--r--quanta/dialogs/tagdialogs/tagmiscdlg.cpp12
-rw-r--r--quanta/dialogs/tagdialogs/tagmiscdlg.h6
-rw-r--r--quanta/dialogs/tagdialogs/tagquicklistdlg.cpp20
-rw-r--r--quanta/dialogs/tagdialogs/tagquicklistdlg.h24
-rw-r--r--quanta/dialogs/tagdialogs/tagquicklistdlgdata.cpp22
-rw-r--r--quanta/dialogs/tagdialogs/tagwidget.cpp34
-rw-r--r--quanta/dialogs/tagdialogs/tagwidget.h28
-rw-r--r--quanta/dialogs/tagdialogs/tagxml.cpp124
-rw-r--r--quanta/dialogs/tagdialogs/tagxml.h26
-rw-r--r--quanta/messages/annotationoutput.cpp102
-rw-r--r--quanta/messages/annotationoutput.h28
-rw-r--r--quanta/messages/messageitem.cpp24
-rw-r--r--quanta/messages/messageitem.h16
-rw-r--r--quanta/messages/messageoutput.cpp56
-rw-r--r--quanta/messages/messageoutput.h22
-rw-r--r--quanta/parsers/dtd/dtd.cpp128
-rw-r--r--quanta/parsers/dtd/dtd.h34
-rw-r--r--quanta/parsers/dtd/dtdparser.cpp84
-rw-r--r--quanta/parsers/dtd/dtdparser.h22
-rw-r--r--quanta/parsers/node.cpp50
-rw-r--r--quanta/parsers/node.h30
-rw-r--r--quanta/parsers/parser.cpp134
-rw-r--r--quanta/parsers/parser.h28
-rw-r--r--quanta/parsers/parsercommon.cpp26
-rw-r--r--quanta/parsers/parsercommon.h12
-rw-r--r--quanta/parsers/qtag.cpp28
-rw-r--r--quanta/parsers/qtag.h170
-rw-r--r--quanta/parsers/sagroupparser.cpp28
-rw-r--r--quanta/parsers/sagroupparser.h4
-rw-r--r--quanta/parsers/saparser.cpp50
-rw-r--r--quanta/parsers/saparser.h30
-rw-r--r--quanta/parsers/tag.cpp114
-rw-r--r--quanta/parsers/tag.h56
-rw-r--r--quanta/parts/kafka/cursors.h10
-rw-r--r--quanta/parts/kafka/domtreeview.cpp40
-rw-r--r--quanta/parts/kafka/domtreeview.h24
-rw-r--r--quanta/parts/kafka/htmldocumentproperties.cpp82
-rw-r--r--quanta/parts/kafka/htmldocumentproperties.h16
-rw-r--r--quanta/parts/kafka/htmlenhancer.cpp4
-rw-r--r--quanta/parts/kafka/kafkacommon.cpp216
-rw-r--r--quanta/parts/kafka/kafkacommon.h94
-rw-r--r--quanta/parts/kafka/kafkadragobject.cpp34
-rw-r--r--quanta/parts/kafka/kafkadragobject.h14
-rw-r--r--quanta/parts/kafka/kafkahtmlpart.cpp88
-rw-r--r--quanta/parts/kafka/kafkahtmlpart.h22
-rw-r--r--quanta/parts/kafka/kafkasyncoptions.cpp12
-rw-r--r--quanta/parts/kafka/kafkasyncoptions.h2
-rw-r--r--quanta/parts/kafka/undoredo.cpp46
-rw-r--r--quanta/parts/kafka/undoredo.h36
-rw-r--r--quanta/parts/kafka/wkafkapart.cpp178
-rw-r--r--quanta/parts/kafka/wkafkapart.h36
-rw-r--r--quanta/parts/preview/whtmlpart.cpp38
-rw-r--r--quanta/parts/preview/whtmlpart.h26
-rw-r--r--quanta/plugins/quantaplugin.cpp76
-rw-r--r--quanta/plugins/quantaplugin.h54
-rw-r--r--quanta/plugins/quantapluginconfig.cpp28
-rw-r--r--quanta/plugins/quantapluginconfig.h4
-rw-r--r--quanta/plugins/quantaplugineditor.cpp76
-rw-r--r--quanta/plugins/quantaplugineditor.h22
-rw-r--r--quanta/plugins/quantaplugininterface.cpp58
-rw-r--r--quanta/plugins/quantaplugininterface.h36
-rw-r--r--quanta/project/eventconfigurationdlg.cpp38
-rw-r--r--quanta/project/eventconfigurationdlg.h6
-rw-r--r--quanta/project/eventeditordlg.cpp90
-rw-r--r--quanta/project/eventeditordlg.h24
-rw-r--r--quanta/project/membereditdlg.cpp42
-rw-r--r--quanta/project/membereditdlg.h6
-rw-r--r--quanta/project/project.cpp302
-rw-r--r--quanta/project/project.h82
-rw-r--r--quanta/project/projectlist.cpp30
-rw-r--r--quanta/project/projectlist.h18
-rw-r--r--quanta/project/projectnewfinal.cpp6
-rw-r--r--quanta/project/projectnewfinal.h2
-rw-r--r--quanta/project/projectnewgeneral.cpp68
-rw-r--r--quanta/project/projectnewgeneral.h14
-rw-r--r--quanta/project/projectnewlocal.cpp66
-rw-r--r--quanta/project/projectnewlocal.h6
-rw-r--r--quanta/project/projectnewweb.cpp78
-rw-r--r--quanta/project/projectnewweb.h18
-rw-r--r--quanta/project/projectprivate.cpp382
-rw-r--r--quanta/project/projectprivate.h78
-rw-r--r--quanta/project/projectupload.cpp168
-rw-r--r--quanta/project/projectupload.h40
-rw-r--r--quanta/project/projecturl.h16
-rw-r--r--quanta/project/rescanprj.cpp70
-rw-r--r--quanta/project/rescanprj.h12
-rw-r--r--quanta/project/teammembersdlg.cpp66
-rw-r--r--quanta/project/teammembersdlg.h10
-rw-r--r--quanta/project/uploadprofiles.cpp28
-rw-r--r--quanta/project/uploadprofiles.h26
-rw-r--r--quanta/src/dcopquanta.cpp34
-rw-r--r--quanta/src/dcopquanta.h6
-rw-r--r--quanta/src/dcopquantaif.h8
-rw-r--r--quanta/src/dcopsettings.cpp8
-rw-r--r--quanta/src/dcopsettings.h6
-rw-r--r--quanta/src/dcopsettingsif.h8
-rw-r--r--quanta/src/dcopwindowmanagerif.h30
-rw-r--r--quanta/src/document.cpp556
-rw-r--r--quanta/src/document.h140
-rw-r--r--quanta/src/dtds.cpp274
-rw-r--r--quanta/src/dtds.h36
-rw-r--r--quanta/src/kqapp.cpp32
-rw-r--r--quanta/src/kqapp.h2
-rw-r--r--quanta/src/main.cpp14
-rw-r--r--quanta/src/quanta.cpp960
-rw-r--r--quanta/src/quanta.h162
-rw-r--r--quanta/src/quanta_init.cpp830
-rw-r--r--quanta/src/quanta_init.h18
-rw-r--r--quanta/src/quantadoc.cpp68
-rw-r--r--quanta/src/quantadoc.h6
-rw-r--r--quanta/src/quantaview.cpp152
-rw-r--r--quanta/src/quantaview.h52
-rw-r--r--quanta/src/viewmanager.cpp112
-rw-r--r--quanta/src/viewmanager.h16
-rw-r--r--quanta/treeviews/basetreeview.cpp228
-rw-r--r--quanta/treeviews/basetreeview.h50
-rw-r--r--quanta/treeviews/docfolder.cpp34
-rw-r--r--quanta/treeviews/docfolder.h12
-rw-r--r--quanta/treeviews/docitem.cpp8
-rw-r--r--quanta/treeviews/docitem.h12
-rw-r--r--quanta/treeviews/doctreeview.cpp74
-rw-r--r--quanta/treeviews/doctreeview.h22
-rw-r--r--quanta/treeviews/filestreeview.cpp70
-rw-r--r--quanta/treeviews/filestreeview.h8
-rw-r--r--quanta/treeviews/newtemplatedirdlg.cpp8
-rw-r--r--quanta/treeviews/newtemplatedirdlg.h4
-rw-r--r--quanta/treeviews/projecttreeview.cpp112
-rw-r--r--quanta/treeviews/projecttreeview.h24
-rw-r--r--quanta/treeviews/scripttreeview.cpp114
-rw-r--r--quanta/treeviews/scripttreeview.h20
-rw-r--r--quanta/treeviews/servertreeview.cpp62
-rw-r--r--quanta/treeviews/servertreeview.h10
-rw-r--r--quanta/treeviews/structtreetag.cpp26
-rw-r--r--quanta/treeviews/structtreetag.h8
-rw-r--r--quanta/treeviews/structtreeview.cpp176
-rw-r--r--quanta/treeviews/structtreeview.h64
-rw-r--r--quanta/treeviews/tagattributeitems.cpp124
-rw-r--r--quanta/treeviews/tagattributeitems.h60
-rw-r--r--quanta/treeviews/tagattributetree.cpp108
-rw-r--r--quanta/treeviews/tagattributetree.h36
-rw-r--r--quanta/treeviews/templatestreeview.cpp270
-rw-r--r--quanta/treeviews/templatestreeview.h32
-rw-r--r--quanta/treeviews/uploadtreefile.cpp22
-rw-r--r--quanta/treeviews/uploadtreefile.h6
-rw-r--r--quanta/treeviews/uploadtreefolder.cpp28
-rw-r--r--quanta/treeviews/uploadtreefolder.h16
-rw-r--r--quanta/treeviews/uploadtreeview.cpp64
-rw-r--r--quanta/treeviews/uploadtreeview.h30
-rw-r--r--quanta/utility/newstuff.cpp22
-rw-r--r--quanta/utility/newstuff.h12
-rw-r--r--quanta/utility/qpevents.cpp64
-rw-r--r--quanta/utility/qpevents.h32
-rw-r--r--quanta/utility/quantabookmarks.cpp58
-rw-r--r--quanta/utility/quantabookmarks.h16
-rw-r--r--quanta/utility/quantacommon.cpp212
-rw-r--r--quanta/utility/quantacommon.h102
-rw-r--r--quanta/utility/quantanetaccess.cpp40
-rw-r--r--quanta/utility/quantanetaccess.h28
-rw-r--r--quanta/utility/resource.h18
-rw-r--r--quanta/utility/tagaction.cpp232
-rw-r--r--quanta/utility/tagaction.h40
-rw-r--r--quanta/utility/tagactionmanager.cpp8
-rw-r--r--quanta/utility/tagactionmanager.h10
-rw-r--r--quanta/utility/tagactionset.cpp74
-rw-r--r--quanta/utility/tagactionset.h36
-rw-r--r--quanta/utility/toolbartabwidget.cpp154
-rw-r--r--quanta/utility/toolbartabwidget.h50
-rw-r--r--quanta/utility/toolbarxmlgui.cpp2
-rw-r--r--quanta/utility/toolbarxmlgui.h2
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 <qdatetime.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qdom.h>
+#include <tqdatetime.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqdom.h>
// KDE
#include <kuser.h>
@@ -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 <philnelson@acm.org> */
//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 <qobject.h>
+#include <tqobject.h>
//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 <qstring.h>
-#include <qstringlist.h>
-#include <qdatetime.h>
-#include <qmap.h>
-#include <qregexp.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqdatetime.h>
+#include <tqmap.h>
+#include <tqregexp.h>
-typedef QMap<QString,QString> KeyValueMap;
+typedef TQMap<TQString,TQString> 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 <qtextedit.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qradiobutton.h>
-#include <qlistview.h>
-#include <qwhatsthis.h>
-#include <qwidgetstack.h>
+#include <tqtextedit.h>
+#include <tqlabel.h>
+#include <tqpushbutton.h>
+#include <tqradiobutton.h>
+#include <tqlistview.h>
+#include <tqwhatsthis.h>
+#include <tqwidgetstack.h>
// KDE
#include <kmessagebox.h>
@@ -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<KXMLGUIClient> clients = guiFactory()->clients();
- for( QPtrListIterator<KXMLGUIClient> it( clients );
+ TQPtrList<KXMLGUIClient> clients = guiFactory()->clients();
+ for( TQPtrListIterator<KXMLGUIClient> 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 <qstringlist.h>
-#include <qwidget.h>
-#include <qlistview.h>
-#include <qfileinfo.h>
+#include <tqstringlist.h>
+#include <tqwidget.h>
+#include <tqlistview.h>
+#include <tqfileinfo.h>
//KDE
#include <kdebug.h>
@@ -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 <qdir.h>
-#include <qdatastream.h>
-#include <qregexp.h>
-#include <qimage.h>
-#include <qtextcodec.h>
+#include <tqdir.h>
+#include <tqdatastream.h>
+#include <tqregexp.h>
+#include <tqimage.h>
+#include <tqtextcodec.h>
// KDE
#include <dcopclient.h>
@@ -60,7 +60,7 @@ typedef KParts::GenericFactory<KFileReplacePart> FileReplaceFactory;
K_EXPORT_COMPONENT_FACTORY( libkfilereplacepart, FileReplaceFactory )
-KFileReplacePart::KFileReplacePart(QWidget* parentWidget, const char* , QObject* parent, const char* name, const QStringList & ) : KParts::ReadOnlyPart(parent,name)
+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("<qt>A folder or a file named <b>%1</b> already exists.</qt>").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("<qt>Cannot open file <b>%1</b> for reading.</qt>").arg(oldFileName),QString::null, rcNotifyOnErrors);
+ KMessageBox::information(m_w, i18n("<qt>Cannot open file <b>%1</b> for reading.</qt>").arg(oldFileName),TQString::null, rcNotifyOnErrors);
return ;
}
- QTextStream currentStream(&currentFile);
+ TQTextStream currentStream(&currentFile);
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("<qt>Cannot open file <b>%1</b> for writing.</qt>").arg(oldFileName),QString::null, rcNotifyOnErrors);
+ KMessageBox::information(m_w, i18n("<qt>Cannot open file <b>%1</b> for writing.</qt>").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("<qt>Cannot open file <b>%1</b> for reading.</qt>").arg(oldFile.name()),QString::null, rcNotifyOnErrors);
+ KMessageBox::information(m_w, i18n("<qt>Cannot open file <b>%1</b> for reading.</qt>").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("<qt>Cannot open file <b>%1</b> for writing.</qt>").arg(newFile.name()),QString::null, rcNotifyOnErrors);
+ KMessageBox::information(m_w, i18n("<qt>Cannot open file <b>%1</b> for writing.</qt>").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("<qt>Cannot open file <b>%1</b> for reading.</qt>").arg(fileName), QString::null, rcNotifyOnErrors);
+ KMessageBox::information(m_w, i18n("<qt>Cannot open file <b>%1</b> for reading.</qt>").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 <qwhatsthis.h>
-#include <qmap.h>
-#include <qfileinfo.h>
+#include <tqwhatsthis.h>
+#include <tqmap.h>
+#include <tqfileinfo.h>
// KDE
#include <klistview.h>
@@ -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<KListViewItem*>(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("<?xml version=\"1.0\" ?>\n<kfr>"),
+ TQString header("<?xml version=\"1.0\" ?>\n<kfr>"),
footer("\n</kfr>"),
body;
if(m_option->m_searchingOnlyMode)
@@ -410,11 +410,11 @@ void KFileReplaceView::slotStringsSave()
else
header += "\n\t<mode search=\"false\"/>";
- QListViewItem* lvi = sv->firstChild();
+ TQListViewItem* lvi = sv->firstChild();
while( lvi )
{
- body += QString("\n\t<replacement>"
+ body += TQString("\n\t<replacement>"
"\n\t\t<oldstring><![CDATA[%1]]></oldstring>"
"\n\t\t<newstring><![CDATA[%2]]></newstring>"
"\n\t</replacement>").arg(lvi->text(0)).arg(lvi->text(1));
@@ -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 <qlcdnumber.h>
-#include <qwidgetstack.h>
+#include <tqlcdnumber.h>
+#include <tqwidgetstack.h>
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 <qwhatsthis.h>
-#include <qcheckbox.h>
-#include <qspinbox.h>
-#include <qdatetimeedit.h>
-#include <qlabel.h>
-#include <qradiobutton.h>
-#include <qtextedit.h>
-#include <qlistview.h>
+#include <tqwhatsthis.h>
+#include <tqcheckbox.h>
+#include <tqspinbox.h>
+#include <tqdatetimeedit.h>
+#include <tqlabel.h>
+#include <tqradiobutton.h>
+#include <tqtextedit.h>
+#include <tqlistview.h>
//KDE
#include <kseparator.h>
@@ -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 <qcheckbox.h>
-#include <qspinbox.h>
-#include <qwhatsthis.h>
-#include <qpushbutton.h>
-#include <qlabel.h>
-#include <qlineedit.h>
+#include <tqcheckbox.h>
+#include <tqspinbox.h>
+#include <tqwhatsthis.h>
+#include <tqpushbutton.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
// KDE
#include <kcharsets.h>
@@ -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 <qstring.h>
-#include <qfile.h>
+#include <tqstring.h>
+#include <tqfile.h>
// KDE
#include <klistview.h>
@@ -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("<qt>Cannot open the file <b>%1</b>.</qt>").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 << "<?xml version=\"1.0\"?>\n"
"<?xml-stylesheet href=\""+css+"\" type=\"text/css\"?>"
"<report>\n"
@@ -81,7 +81,7 @@ void Report::createReportFile()
oTStream<< " </row>\n"
" </header>\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 = "<row >\n"
+ { TQString rowTag = "<row >\n"
" <searchfor class=\""+rowType+"\"><![CDATA["+lviCurItem->text(0)+"]]></searchfor>\n"
" <replacewith class=\""+rowType+"\"><![CDATA["+lviCurItem->text(1)+"]]></replacewith>\n"
"</row>\n";
@@ -140,7 +140,7 @@ void Report::createReportFile()
rowType="a1";
do
- { QString rowTag = " <row >\n"
+ { TQString rowTag = " <row >\n"
" <name class=\""+rowType+"\"><![CDATA["+lviCurItem->text(0)+"]]></name>\n"
" <folder class=\""+rowType+"\"><![CDATA["+lviCurItem->text(1)+"]]></folder>\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("<qt>Cannot open the file <b>%1</b>.</qt>").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 <qstring.h>
+#include <tqstring.h>
// KDE
#include <klocale.h>
@@ -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 <klistview.h>
-#include <qpushbutton.h>
-#include <qhbox.h>
-#include <qwhatsthis.h>
-#include <qtooltip.h>
+#include <tqpushbutton.h>
+#include <tqhbox.h>
+#include <tqwhatsthis.h>
+#include <tqtooltip.h>
// KDE
#include <kiconloader.h>
@@ -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("<h3>Area List</h3>The area list shows you all areas of the map.<br>"
+ TQWhatsThis::add( listView, i18n("<h3>Area List</h3>The area list shows you all areas of the map.<br>"
"The left column shows the link associated with the area; the right "
"column shows the part of the image that is covered by the area.<br>"
"The maximum size of the preview images can be configured."));
- QToolTip::add( listView, i18n("A list of all areas"));
+ 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 <qwidget.h>
-#include <qvbox.h>
+#include <tqwidget.h>
+#include <tqvbox.h>
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 <qbitmap.h>
-#include <qpainter.h>
-#include <qdragobject.h>
-#include <qpixmap.h>
+#include <tqbitmap.h>
+#include <tqpainter.h>
+#include <tqdragobject.h>
+#include <tqpixmap.h>
// KDE
#include <kdebug.h>
@@ -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 <qscrollview.h>
-#include <qimage.h>
-#include <qpoint.h>
-#include <qrect.h>
-#include <qcursor.h>
+#include <tqscrollview.h>
+#include <tqimage.h>
+#include <tqpoint.h>
+#include <tqrect.h>
+#include <tqcursor.h>
#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 <qbitmap.h>
+#include <tqbitmap.h>
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;i<region.rects().count();i++) {
p->eraseRect(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 <qscrollview.h>
-#include <qimage.h>
-#include <qpoint.h>
-#include <qrect.h>
+#include <tqscrollview.h>
+#include <tqimage.h>
+#include <tqpoint.h>
+#include <tqrect.h>
#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 <qptrlist.h>
+#include <tqptrlist.h>
// 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<ImageTag> * images)
+void ImagesListView::addImages(TQPtrList<ImageTag> * images)
{
for (ImageTag *tag = images->first(); tag!=0L; tag=images->next()) {
addImage(tag);
@@ -87,7 +87,7 @@ void ImagesListView::addImages(QPtrList<ImageTag> * 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<ImagesListViewItem*>(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<ImageTag> *);
+ void addImages(TQPtrList<ImageTag> *);
/**
* 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 <assert.h>
// QT
-#include <qlayout.h>
-#include <qlistview.h>
-#include <qpushbutton.h>
-#include <qvbox.h>
-#include <qpixmap.h>
-#include <qcombobox.h>
-#include <qsplitter.h>
-#include <qfileinfo.h>
-#include <qmultilineedit.h>
-#include <qtextstream.h>
-#include <qpopupmenu.h>
-#include <qdict.h>
-#include <qwhatsthis.h>
-#include <qtooltip.h>
-#include <qpainter.h>
-#include <qtabwidget.h>
-#include <qfontdatabase.h>
-#include <qfile.h>
+#include <tqlayout.h>
+#include <tqlistview.h>
+#include <tqpushbutton.h>
+#include <tqvbox.h>
+#include <tqpixmap.h>
+#include <tqcombobox.h>
+#include <tqsplitter.h>
+#include <tqfileinfo.h>
+#include <tqmultilineedit.h>
+#include <tqtextstream.h>
+#include <tqpopupmenu.h>
+#include <tqdict.h>
+#include <tqwhatsthis.h>
+#include <tqtooltip.h>
+#include <tqpainter.h>
+#include <tqtabwidget.h>
+#include <tqfontdatabase.h>
+#include <tqfile.h>
// KDE
#include <kcommand.h>
@@ -61,7 +61,7 @@
#if KDE_IS_VERSION(3,1,90)
#include <kinputdialog.h>
#else
-#include <qinputdialog.h>
+#include <tqinputdialog.h>
#endif
// local
@@ -84,8 +84,8 @@
typedef KParts::GenericFactory<KImageMapEditor> 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<KDockMainWindow*>(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("<html>\n");
_htmlContent.append(el);
el = new HtmlElement("<head>\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("<h3>Open File</h3>Click this to <em>open</em> a new picture or HTML file."));
temp->setToolTip(i18n("Open new picture or HTML file"));
// File Open Recent
- recentFilesAction = KStdAction::openRecent(this, SLOT(openURL(const KURL&)),
+ 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("<h3>Save File</h3>Click this to <em>save</em> the changes to the HTML file."));
temp->setToolTip(i18n("Save HTML file"));
// File Save As
- (void)KStdAction::saveAs(this, SLOT(fileSaveAs()), actionCollection());
+ (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("<h3>Close File</h3>Click this to <em>close</em> the currently open HTML file."));
temp->setToolTip(i18n("Close HTML file"));
// Edit Copy
- copyAction=KStdAction::copy(this, SLOT(slotCopy()), actionCollection());
- QMimeSourceFactory::defaultFactory()->setPixmap( "editcopyimage", SmallIcon("editcopy") );
+ copyAction=KStdAction::copy(this, TQT_SLOT(slotCopy()), actionCollection());
+ TQMimeSourceFactory::defaultFactory()->setPixmap( "editcopyimage", SmallIcon("editcopy") );
copyAction->setWhatsThis(i18n("<h3>Copy</h3>"
"Click this to <em>copy</em> the selected area."));
copyAction->setEnabled(false);
// Edit Cut
- cutAction=KStdAction::cut(this, SLOT(slotCut()), actionCollection());
- QMimeSourceFactory::defaultFactory()->setPixmap( "editcutimage", SmallIcon("editcut") );
+ cutAction=KStdAction::cut(this, TQT_SLOT(slotCut()), actionCollection());
+ TQMimeSourceFactory::defaultFactory()->setPixmap( "editcutimage", SmallIcon("editcut") );
cutAction->setWhatsThis(i18n("<h3>Cut</h3>"
"Click this to <em>cut</em> the selected area."));
cutAction->setEnabled(false);
// Edit Paste
- pasteAction=KStdAction::paste(this, SLOT(slotPaste()), actionCollection());
- QMimeSourceFactory::defaultFactory()->setPixmap( "editpasteimage", SmallIcon("editpaste") );
+ pasteAction=KStdAction::paste(this, TQT_SLOT(slotPaste()), actionCollection());
+ TQMimeSourceFactory::defaultFactory()->setPixmap( "editpasteimage", SmallIcon("editpaste") );
pasteAction->setWhatsThis(i18n("<h3>Paste</h3>"
"Click this to <em>paste</em> 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("<h3>Delete</h3>"
"Click this to <em>delete</em> 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("<h3>Zoom</h3>"
"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("<h3>Selection</h3>"
"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("<h3>Circle</h3>"
"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("<h3>Rectangle</h3>"
"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("<h3>Polygon</h3>"
"Click this to start drawing a polygon."));
polygonAction->setExclusiveGroup("drawing");
// Freehand
freehandAction=new KRadioAction(i18n("&Freehand Polygon"), "freehand",
- 0,this,SLOT (slotDrawFreehand()),
+ 0,this,TQT_SLOT (slotDrawFreehand()),
actionCollection(), "tool_freehand");
- QMimeSourceFactory::defaultFactory()->setPixmap( "freehandimage", SmallIcon("freehand") );
+ TQMimeSourceFactory::defaultFactory()->setPixmap( "freehandimage", SmallIcon("freehand") );
freehandAction->setWhatsThis(i18n("<h3>Freehandpolygon</h3>"
"Click this to start drawing a freehand polygon."));
freehandAction->setExclusiveGroup("drawing");
// Add Point
addPointAction=new KRadioAction(i18n("&Add Point"), "addpoint",
- 0,this,SLOT (slotDrawAddPoint()),
+ 0,this,TQT_SLOT (slotDrawAddPoint()),
actionCollection(), "tool_addpoint");
- QMimeSourceFactory::defaultFactory()->setPixmap( "addpointimage", SmallIcon("addpoint") );
+ TQMimeSourceFactory::defaultFactory()->setPixmap( "addpointimage", SmallIcon("addpoint") );
addPointAction->setWhatsThis(i18n("<h3>Add Point</h3>"
"Click this to add points to a polygon."));
addPointAction->setExclusiveGroup("drawing");
// Remove Point
removePointAction=new KRadioAction(i18n("&Remove Point"), "removepoint",
- 0,this,SLOT (slotDrawRemovePoint()),
+ 0,this,TQT_SLOT (slotDrawRemovePoint()),
actionCollection(), "tool_removepoint");
- QMimeSourceFactory::defaultFactory()->setPixmap( "removepointimage", SmallIcon("removepoint") );
+ TQMimeSourceFactory::defaultFactory()->setPixmap( "removepointimage", SmallIcon("removepoint") );
removePointAction->setWhatsThis(i18n("<h3>Remove Point</h3>"
"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<QPopupMenu *>(factory()->container(name, this));
+ TQPopupMenu* pop = static_cast<TQPopupMenu *>(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<int> smoothies = fdb.smoothSizes( family, style );
- for ( QValueList<int>::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<int> smoothies = fdb.smoothSizes( family, style );
+ for ( TQValueList<int>::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+="<map "+QString("name=\"")+_mapName+"\">\n";
+TQString KImageMapEditor::getHTMLImageMap() const {
+ TQString retStr;
+ retStr+="<map "+TQString("name=\"")+_mapName+"\">\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 &lt; of a tag. It now reads all attributes of the tag until a &gt;
* The tagname itself is also read and stored as a <em>tagname</em>
- * attribute. After parsing the whole tag it returns a QDict<QString>
+ * attribute. After parsing the whole tag it returns a TQDict<TQString>
* with all attributes and their values. It stores the whole read text in the
* parameter readText.
*/
-QDict<QString> KImageMapEditor::getTagAttributes(QTextStream & s, QString & readText)
+TQDict<TQString> KImageMapEditor::getTagAttributes(TQTextStream & s, TQString & readText)
{
- QDict<QString> dict(17,false);
+ TQDict<TQString> 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<QString> 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<QString> 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<QString> 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<QString> 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<QString> *attr=0L;
- QPtrList<ImageTag> *images= new QPtrList<ImageTag>;
+ TQTextStream s(&f);
+ TQString str;
+ TQChar w;
+ TQDict<TQString> *attr=0L;
+ TQPtrList<ImageTag> *images= new TQPtrList<ImageTag>;
MapTag *map=0L;
- QPtrList<MapTag> *maps = new QPtrList<MapTag>;
+ TQPtrList<MapTag> *maps = new TQPtrList<MapTag>;
_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<QString>(getTagAttributes(s,temp));
+ attr=new TQDict<TQString>(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<map></map>");
MapTag* map = new MapTag();
map->name = name;
@@ -2062,7 +2062,7 @@ void KImageMapEditor::addMap(const QString & name = QString::null) {
* to the given map name.<br>
* 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<HtmlMapElement*>(el)) {
HtmlMapElement *tagEl = static_cast<HtmlMapElement*>(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<QString> *dict = new QDict<QString>(17,false);
- QString *shapeStr = 0L;
+ TQDict<TQString> *dict = new TQDict<TQString>(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<QString> *dict = new QDict<QString>(17,false);
- dict->insert("shape",new QString("default"));
+ TQDict<TQString> *dict = new TQDict<TQString>(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("<qt>The file <i>%1</i> could not be saved, because you do not have the required write permissions.</qt>").arg(url.path()));
return;
}
if (!backupFileCreated) {
- QString backupFile = url.path()+"~";
+ 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 << "<html>\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("<qt>Are you sure you want to delete the map <i>%1</i>?"
@@ -2631,7 +2631,7 @@ bool KImageMapEditor::queryClose() {
return true;
switch ( KMessageBox::warningYesNoCancel( widget(),
- i18n("<qt>The file <i>%1</i> has been modified.<br>Do you want to save it?</qt>").arg(url().fileName()), QString::null, KStdGuiItem::save(), KStdGuiItem::discard()) ) {
+ i18n("<qt>The file <i>%1</i> has been modified.<br>Do you want to save it?</qt>").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("<img src=\"")+relativePath+QString("\">");
+ TQString imgHtml = TQString("<img src=\"")+relativePath+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<QString> it( *imgEl->imgTag );
+ TQDictIterator<TQString> 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 <qptrlist.h>
-#include <qobjectlist.h>
-#include <qdict.h>
-#include <qimage.h>
+#include <tqptrlist.h>
+#include <tqobjectlist.h>
+#include <tqdict.h>
+#include <tqimage.h>
#include <kurl.h>
#include <kparts/part.h>
#include <kparts/browserextension.h>
@@ -49,39 +49,39 @@ class KToggleAction;
/**
* Stores an area tag and all its attributes
*/
-typedef QDict<QString> AreaTag;
+typedef TQDict<TQString> AreaTag;
/**
* Stores an image tag and all its attributes
* the origcode attribute hold the original htmlcode
* of this tag
*/
-typedef QDict<QString> ImageTag;
+typedef TQDict<TQString> ImageTag;
/**
* Only a small class to give a list of AreaTags a name
*/
-class MapTag : public QPtrList<AreaTag> {
+class MapTag : public TQPtrList<AreaTag> {
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<HtmlElement> {}
+class HtmlContent : public TQPtrList<HtmlElement> {}
;
@@ -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<QString> getTagAttributes(QTextStream & s,QString &);
+ TQDict<TQString> 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 <qbitmap.h>
-#include <qpointarray.h>
-#include <qpainter.h>
-#include <qpixmap.h>
-#include <qimage.h>
-#include <qpen.h>
-#include <qbrush.h>
-#include <qpalette.h>
-#include <qcolor.h>
-#include <qlistview.h>
+#include <tqbitmap.h>
+#include <tqpointarray.h>
+#include <tqpainter.h>
+#include <tqpixmap.h>
+#include <tqimage.h>
+#include <tqpen.h>
+#include <tqbrush.h>
+#include <tqpalette.h>
+#include <tqcolor.h>
+#include <tqlistview.h>
#include <kdebug.h>
@@ -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+="<area ";
retStr+="shape=\"rect\" ";
@@ -766,13 +766,13 @@ CircleArea::CircleArea()
: Area()
{
_type=Area::Circle;
- 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);
}
@@ -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+="<area ";
retStr+="shape=\"circle\" ";
@@ -981,12 +981,12 @@ Area* PolyArea::clone() const
return areaClone;
}
-void PolyArea::draw(QPainter & p)
+void PolyArea::draw(TQPainter & p)
{
drawHighlighting(p);
p.setRasterOp(Qt::XorROP);
- p.setPen(QPen(QColor("white"),1));
+ p.setPen(TQPen(TQColor("white"),1));
if (_coords->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+="<area ";
retStr+="shape=\"poly\" ";
@@ -1243,12 +1243,12 @@ void PolyArea::setFinished(bool b)
_finished=b;
}
-QRect PolyArea::selectionRect() const
+TQRect PolyArea::selectionRect() const
{
- QRect r = _rect;
+ TQRect r = _rect;
r.moveBy(-10,-10);
- r.setSize(r.size()+QSize(21,21));
+ r.setSize(r.size()+TQSize(21,21));
return r;
}
@@ -1276,12 +1276,12 @@ Area* DefaultArea::clone() const
return areaClone;
}
-void DefaultArea::draw(QPainter &)
+void DefaultArea::draw(TQPainter &)
{}
-QString DefaultArea::getHTMLCode() const {
- QString retStr;
+TQString DefaultArea::getHTMLCode() const {
+ TQString retStr;
retStr+="<area ";
retStr+="shape=\"default\" ";
@@ -1378,7 +1378,7 @@ void AreaSelection::reset()
invalidate();
}
-bool AreaSelection::contains(const QPoint & p) const
+bool AreaSelection::contains(const TQPoint & p) const
{
bool b=false;
AreaListIterator it=getAreaListIterator();
@@ -1395,14 +1395,14 @@ bool AreaSelection::contains(const QPoint & p) const
return b;
}
-QRect* AreaSelection::onSelectionPoint(const QPoint & p, double zoom) const
+TQRect* AreaSelection::onSelectionPoint(const TQPoint & p, double zoom) const
{
AreaListIterator it=getAreaListIterator();
if (it.count() != 1)
return 0L;
- QRect* retRect=0L;
+ TQRect* retRect=0L;
for ( ; it.current() != 0L; ++it )
{
@@ -1415,7 +1415,7 @@ QRect* AreaSelection::onSelectionPoint(const QPoint & p, double zoom) const
return retRect;
}
-void AreaSelection::moveSelectionPoint(QRect* selectionPoint, const QPoint & p)
+void AreaSelection::moveSelectionPoint(TQRect* selectionPoint, const TQPoint & p)
{
// It's only possible to move a SelectionPoint if only one Area is selected
if (_areas->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 <qrect.h>
-#include <qpoint.h>
-#include <qptrlist.h>
+#include <tqrect.h>
+#include <tqpoint.h>
+#include <tqptrlist.h>
#include <klocale.h>
-#include <qmap.h>
+#include <tqmap.h>
#include "kdeversion.h"
@@ -31,10 +31,10 @@ class QPointArray;
class QListViewItem;
class QBitmap;
-typedef QPtrList<QRect> SelectionPointList;
+typedef TQPtrList<TQRect> SelectionPointList;
-typedef QMap<QString,QString> AttributeMap;
-typedef QMapConstIterator<QString,QString> AttributeIterator;
+typedef TQMap<TQString,TQString> AttributeMap;
+typedef TQMapConstIterator<TQString,TQString> 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<Area> AreaList;
-typedef QPtrListIterator<Area> AreaListIterator;
+typedef TQPtrList<Area> AreaList;
+typedef TQPtrListIterator<Area> 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 <qstring.h>
+#include <tqstring.h>
#include <kdebug.h>
#include <klocale.h>
@@ -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 <qstring.h>
-#include <qcheckbox.h>
-#include <qmultilineedit.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qhbox.h>
-#include <qvbox.h>
-#include <qlineedit.h>
-#include <qlistbox.h>
-#include <qtable.h>
-#include <qgroupbox.h>
-#include <qspinbox.h>
-#include <qtabwidget.h>
-#include <qpointarray.h>
-#include <qimage.h>
-//#include <qwidget.h>
+//#include <tqstring.h>
+#include <tqcheckbox.h>
+#include <tqmultilineedit.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqhbox.h>
+#include <tqvbox.h>
+#include <tqlineedit.h>
+#include <tqlistbox.h>
+#include <tqtable.h>
+#include <tqgroupbox.h>
+#include <tqspinbox.h>
+#include <tqtabwidget.h>
+#include <tqpointarray.h>
+#include <tqimage.h>
+//#include <tqwidget.h>
// KDE
#include <kiconloader.h>
#include <kfiledialog.h>
@@ -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;i<numPoints;i++) {
- coordsTable->setText(i,0, QString::number(area->coords()->point(i).x()) );
- coordsTable->setText(i,1, QString::number(area->coords()->point(i).y()) );
+ 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;i<count;i++) {
- coordsTable->setText(i,0, QString::number(area->coords()->point(i).x()) );
- coordsTable->setText(i,1, QString::number(area->coords()->point(i).y()) );
+ 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;i<count;i++) {
- coordsTable->setText(i,0, QString::number(area->coords()->point(i).x()) );
- coordsTable->setText(i,1, QString::number(area->coords()->point(i).y()) );
+ 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;i<count;i++) {
- QPoint newPoint( coordsTable->text(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("<b>"+shape+"</b>",this);
+ TQLabel *lbl = new TQLabel("<b>"+shape+"</b>",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<MapTag> *_maps,QPtrList<ImageTag> *_images,const KURL & _baseUrl)
+ImageMapChooseDialog::ImageMapChooseDialog(TQWidget* parent,TQPtrList<MapTag> *_maps,TQPtrList<ImageTag> *_images,const KURL & _baseUrl)
: KDialogBase(parent,"",true,i18n( "Choose Map & Image to Edit" ),Ok,Ok,true)
{
baseUrl=_baseUrl;
maps=_maps;
images=_images;
currentMap=0L;
- QWidget *page=new QWidget(this);
+ 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<MapTag> *_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<MapTag> *_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; i<imageListTable->numRows(); 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<MapTag> *maps;
- QPtrList<ImageTag> *images;
+ TQTable *imageListTable;
+ TQLabel *imagePreview;
+ TQListBox *mapListBox;
+ TQLineEdit *mapNameEdit;
+ TQPtrList<MapTag> *maps;
+ TQPtrList<ImageTag> *images;
KURL baseUrl;
- void initImageListTable(QWidget*);
+ void initImageListTable(TQWidget*);
public:
- ImageMapChooseDialog(QWidget* parent,QPtrList<MapTag> *_maps,QPtrList<ImageTag> *_images, const KURL & _baseUrl);
+ ImageMapChooseDialog(TQWidget* parent,TQPtrList<MapTag> *_maps,TQPtrList<ImageTag> *_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 <kapplication.h>
#include <kdebug.h>
-#include <qhbox.h>
+#include <tqhbox.h>
#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<MapTag> * maps) {
+void MapsListView::addMaps(TQPtrList<MapTag> * maps) {
for (MapTag *tag = maps->first(); tag!=0L; tag=maps->next()) {
addMap(tag->name);
}
}
-void MapsListView::selectMap(const QString & name) {
- QListViewItem* item = _listView->findItem(name,0);
+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 <qvbox.h>
+#include <tqvbox.h>
#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<MapTag> *);
+ void addMaps(TQPtrList<MapTag> *);
/**
* 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 <qdir.h>
-#include <qapplication.h>
-#include <qptrlist.h>
-#include <qstringlist.h>
-#include <qregexp.h>
-#include <qtimer.h>
+#include <tqdir.h>
+#include <tqapplication.h>
+#include <tqptrlist.h>
+#include <tqstringlist.h>
+#include <tqregexp.h>
+#include <tqtimer.h>
//kde includes
#include <kurl.h>
@@ -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"<<endl;
enter_loop();
// kdDebug(24000)<<"QExtFileInfo::internalExists:after enter_loop"<<endl;
@@ -259,28 +259,28 @@ bool QExtFileInfo::internalExists(const KURL& url)
}
bool QExtFileInfo::internalCopy(const KURL& src, const KURL& target, int permissions,
- bool overwrite, bool resume, QWidget* window)
+ bool overwrite, bool resume, TQWidget* window)
{
bJobOK = true; // success unless further error occurs
KIO::Scheduler::checkSlaveOnHold(true);
KIO::Job * job = KIO::file_copy( src, target, permissions, overwrite, resume );
job->setWindow (window);
- connect( job, SIGNAL( result (KIO::Job *) ),
- this, SLOT( slotResult (KIO::Job *) ) );
+ 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();
@@ -306,15 +306,15 @@ void QExtFileInfo::slotNewEntries(KIO::Job *job, const KIO::UDSEntryList& udsLis
KURL url = static_cast<KIO::ListJob *>(job)->url();
url.adjustPath(-1);
// avoid creating these QStrings again and again
- static const QString& dot = KGlobal::staticQString(".");
- static const QString& dotdot = KGlobal::staticQString("..");
+ 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<QRegExp> filterIt( lstFilters ); filterIt.current(); ++filterIt )
+ for ( TQPtrListIterator<TQRegExp> 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 <kurl.h>
#include <kfileitem.h>
-#include <qobject.h>
-#include <qptrlist.h>
-#include <qregexp.h>
+#include <tqobject.h>
+#include <tqptrlist.h>
+#include <tqregexp.h>
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<QRegExp> lstFilters;
+ TQPtrList<TQRegExp> 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 <kaction.h>
#include <kguiitem.h>
-#include <qbuttongroup.h>
+#include <tqbuttongroup.h>
#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 <qobject.h>
+#include <tqobject.h>
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 <qstring.h>
-#include <qtimer.h>
-#include <qtextcodec.h>
-#include <qcstring.h>
+#include <tqstring.h>
+#include <tqtimer.h>
+#include <tqtextcodec.h>
+#include <tqcstring.h>
#include <kio/netaccess.h>
#include <kio/global.h>
@@ -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 <qobject.h>
-#include <qthread.h>
-#include <qstring.h>
+#include <tqobject.h>
+#include <tqthread.h>
+#include <tqstring.h>
#include <kio/jobclasses.h>
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 <klocale.h>
#include <kcharsets.h>
-#include <qdom.h>
+#include <tqdom.h>
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");
// <url>
- 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
// <referers>
tmp_1 = element.ownerDocument().createElement("referrers");
- for(QValueVector<KURL>::const_iterator it = referrers_.begin(); it != referrers_.end(); ++it)
+ for(TQValueVector<KURL>::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 <qstring.h>
-#include <qobject.h>
-#include <qvaluevector.h>
+#include <tqstring.h>
+#include <tqobject.h>
+#include <tqvaluevector.h>
class QDomElement;
#include <vector>
@@ -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<Node*> 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<KURL> const& referrers() const;
+ TQValueVector<KURL> 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<KURL> referrers_;
+ TQValueVector<KURL> 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<KURL> const& LinkStatus::referrers() const
+inline TQValueVector<KURL> 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 <khtml_part.h>
#include <kprotocolmanager.h>
-#include <qstring.h>
-#include <qvaluevector.h>
-#include <qdom.h>
+#include <tqstring.h>
+#include <tqvaluevector.h>
+#include <tqdom.h>
#include <iostream>
#include <unistd.h>
@@ -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<KURL> referrers(tmp->referrers());
+ TQValueVector<KURL> 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<LinkStatus*> 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<LinkStatus*> 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<QString> referencia = tokenizeWordsSeparatedBy(domain_, QChar('/'));
- vector<QString> a_comparar = tokenizeWordsSeparatedBy(url.host() + url.directory(), QChar('/'));
+ vector<TQString> referencia = tokenizeWordsSeparatedBy(domain_, TQChar('/'));
+ vector<TQString> 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<QString> referencia = tokenizeWordsSeparatedBy(domain_, QChar('/'));
- vector<QString> a_comparar = tokenizeWordsSeparatedBy(url.host() + url.directory(), QChar('/'));
+ vector<TQString> referencia = tokenizeWordsSeparatedBy(domain_, TQChar('/'));
+ vector<TQString> 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<QString> palavras = tokenizeWordsSeparatedByDots(domain_);
+ vector<TQString> 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
{
// <url>
- 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
// <depth>
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);
// <check_parent_folders>
@@ -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 <kurl.h>
-#include <qobject.h>
-#include <qstring.h>
-#include <qdatetime.h>
-#include <qregexp.h>
-#include <qmap.h>
+#include <tqobject.h>
+#include <tqstring.h>
+#include <tqdatetime.h>
+#include <tqregexp.h>
+#include <tqmap.h>
class QDomElement;
#include <vector>
@@ -39,7 +39,7 @@ class QDomElement;
using namespace std;
-typedef QMap<QString, KHTMLPart*> KHTMLPartMap;
+typedef TQMap<TQString, KHTMLPart*> 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 <qstring.h>
-#include <qtimer.h>
+#include <tqstring.h>
+#include <tqtimer.h>
#include <dcopclient.h>
#include <dcopref.h>
@@ -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 <qobject.h>
+#include <tqobject.h>
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<KXMLGUIClient> clients = guiFactory()->clients();
- for( QPtrListIterator<KXMLGUIClient> it( clients );
+ TQPtrList<KXMLGUIClient> clients = guiFactory()->clients();
+ for( TQPtrListIterator<KXMLGUIClient> 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 <kaccel.h>
#include <kkeydialog.h>
-#include <qbuttongroup.h>
+#include <tqbuttongroup.h>
#include "global.h"
#include "cfg/klsconfig.h"
@@ -55,9 +55,9 @@ const char KLinkStatusPart::version_[] = "0.3.2";
typedef KParts::GenericFactory<KLinkStatusPart> KLinkStatusFactory;
K_EXPORT_COMPONENT_FACTORY( libklinkstatuspart, KLinkStatusFactory )
-KLinkStatusPart::KLinkStatusPart(QWidget *parentWidget, const char *widgetName,
- QObject *parent, const char *name,
- const QStringList & /*string_list*/)
+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 <kdebug.h>
-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<QString> const& HtmlParser::parseNodesOfType(QString const& element)
+vector<TQString> const& HtmlParser::parseNodesOfType(TQString const& element)
{
HtmlParser::parseNodesOfType(element, document_, aux_);
return aux_;
}
-void HtmlParser::parseNodesOfType(QString const& tipo, QString const& document, vector<QString>& nodes)
+void HtmlParser::parseNodesOfType(TQString const& tipo, TQString const& document, vector<TQString>& 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<Node*> const& HtmlParser::nodes() const
void HtmlParser::parseNodesOfTypeA()
{
- vector<QString> const& aux = parseNodesOfType("A");
+ vector<TQString> const& aux = parseNodesOfType("A");
- for(vector<QString>::size_type i = 0; i != aux.size(); ++i)
+ for(vector<TQString>::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<QString> const& aux = parseNodesOfType("AREA");
+ vector<TQString> const& aux = parseNodesOfType("AREA");
- for(vector<QString>::size_type i = 0; i != aux.size(); ++i)
+ for(vector<TQString>::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<QString> const& aux = parseNodesOfType("LINK");
+ vector<TQString> const& aux = parseNodesOfType("LINK");
- for(vector<QString>::size_type i = 0; i != aux.size(); ++i)
+ for(vector<TQString>::size_type i = 0; i != aux.size(); ++i)
nodes_.push_back( new NodeLINK(aux[i]) );
}
void HtmlParser::parseNodesOfTypeMETA()
{
- vector<QString> const& aux = parseNodesOfType("META");
+ vector<TQString> const& aux = parseNodesOfType("META");
- for(vector<QString>::size_type i = 0; i != aux.size(); ++i)
+ for(vector<TQString>::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<QString> metaTags;
+ vector<TQString> metaTags;
parseNodesOfType("META", html, metaTags);
- for(vector<QString>::size_type i = 0; i != metaTags.size(); ++i)
+ for(vector<TQString>::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<QString> const& aux = parseNodesOfType("IMG");
+ vector<TQString> const& aux = parseNodesOfType("IMG");
- for(vector<QString>::size_type i = 0; i != aux.size(); ++i)
+ for(vector<TQString>::size_type i = 0; i != aux.size(); ++i)
nodes_.push_back( new NodeIMG(aux[i]) );
}
void HtmlParser::parseNodesOfTypeFRAME()
{
- vector<QString> const& aux = parseNodesOfType("FRAME");
+ vector<TQString> const& aux = parseNodesOfType("FRAME");
- for(vector<QString>::size_type i = 0; i != aux.size(); ++i)
+ for(vector<TQString>::size_type i = 0; i != aux.size(); ++i)
nodes_.push_back( new NodeFRAME(aux[i]) );
}
void HtmlParser::parseNodesOfTypeIFRAME()
{
- vector<QString> const& aux = parseNodesOfType("IFRAME");
+ vector<TQString> const& aux = parseNodesOfType("IFRAME");
- for(vector<QString>::size_type i = 0; i != aux.size(); ++i)
+ for(vector<TQString>::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, "<BASE");
@@ -269,8 +269,8 @@ void HtmlParser::parseNodesOfTypeBASE()
void HtmlParser::parseNodesOfTypeTITLE()
{
- QString node;
- QString doc = document_;
+ TQString node;
+ TQString doc = document_;
int inicio = 0, fim = 0;
inicio = findSeparableWord(doc, "<TITLE>");
@@ -289,8 +289,8 @@ void HtmlParser::parseNodesOfTypeTITLE()
void HtmlParser::stripComments()
{
- QString begin_comment = "<!--";
- QString end_comment = "-->";
+ TQString begin_comment = "<!--";
+ TQString end_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 = "<script";
- QString const end_script = "</script>";
+ TQString const begin_script = "<script";
+ TQString const end_script = "</script>";
uint const begin_script_length = begin_script.length();
do
@@ -425,7 +425,7 @@ int main()
//ifstream stream("/var/www/html/qt-doc/functions.html");
ifstream stream("/var/www/html/index.html");
- QString content;
+ TQString content;
while(stream)
{
char c;
diff --git a/klinkstatus/src/parser/htmlparser.h b/klinkstatus/src/parser/htmlparser.h
index cf487ebf..c9e5ef10 100644
--- a/klinkstatus/src/parser/htmlparser.h
+++ b/klinkstatus/src/parser/htmlparser.h
@@ -21,7 +21,7 @@
#ifndef HTML_PARSER_H
#define HTML_PARSER_H
-#include <qstring.h>
+#include <tqstring.h>
#include <vector>
@@ -42,7 +42,7 @@ class HtmlParser
public:
HtmlParser();
- HtmlParser(QString const& documento);
+ HtmlParser(TQString const& documento);
~HtmlParser();
vector<Node*> 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<QString> const& parseNodesOfType(QString const& element);
+ vector<TQString> const& parseNodesOfType(TQString const& element);
/**
* Vector nodes passed for performance.
*/
- static void parseNodesOfType(QString const& element, QString const& doc, vector<QString>& nodes);
+ static void parseNodesOfType(TQString const& element, TQString const& doc, vector<TQString>& nodes);
void parseNodesOfTypeA();
void parseNodesOfTypeAREA();
@@ -89,20 +89,20 @@ private:
e.g.
endOfTag("<img src=\"bad > 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<QString> aux_; // for what the hell is this? looks ugly... maybe I was drunk, can't remember
+ vector<TQString> aux_; // for what the hell is this? looks ugly... maybe I was drunk, can't remember
vector<Node*> nodes_;
NodeBASE node_BASE_;
NodeTITLE node_TITLE_;
NodeMETA node_META_content_type_;
bool is_content_type_set_;
- QString document_;
- QString script_; // Fica aqui guardado (JavaScript, etc)
- QString comments_;
+ 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 <qhttp.h>
-#include <qstring.h>
+#include <tqhttp.h>
+#include <tqstring.h>
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<QString> tokenize(QString s)
+vector<TQString> tokenize(TQString s)
{
Q_ASSERT(!s.isEmpty());
- vector<QString> v;
+ vector<TQString> v;
while(true)
{
@@ -154,22 +154,22 @@ vector<QString> 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<QString> tokenizeWordsSeparatedByDots(QString s)
+vector<TQString> tokenizeWordsSeparatedByDots(TQString s)
{
- vector<QString> v;
+ vector<TQString> 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<QString> 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<QString> tokenizeWordsSeparatedBy(QString s, QChar criteria)
+vector<TQString> tokenizeWordsSeparatedBy(TQString s, TQChar criteria)
{
- vector<QString> v;
+ vector<TQString> v;
while(true)
{
@@ -208,7 +208,7 @@ vector<QString> 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 <qstring.h>
+#include <tqstring.h>
#include <vector>
#include <cctype>
@@ -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=""></a>", "<a") => -1
findSeparableWord("<\na href=""></a>", "<a") => 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<QString> tokenize(QString s);
-std::vector<QString> tokenizeWordsSeparatedByDots(QString s);
-std::vector<QString> tokenizeWordsSeparatedBy(QString s, QChar criteria);
+std::vector<TQString> tokenize(TQString s);
+std::vector<TQString> tokenizeWordsSeparatedByDots(TQString s);
+std::vector<TQString> 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 <qstring.h>
+#include <tqstring.h>
#include <kdebug.h>
#include <kcharsets.h>
@@ -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 <kcharsets.h>
-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<LinkStatus*> 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<QString> v1 = tokenizeWordsSeparatedByDots(host1_);
- vector<QString> v2 = tokenizeWordsSeparatedByDots(host2_);
+ vector<TQString> v1 = tokenizeWordsSeparatedByDots(host1_);
+ vector<TQString> 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<QString>::size_type aux = 0;
- vector<QString>::size_type aux2 = 0;
+ vector<TQString>::size_type aux = 0;
+ vector<TQString>::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<QString> tokens_1 = tokenizeWordsSeparatedBy(url1.directory(true, false), QChar('/'));
- vector<QString> tokens_2 = tokenizeWordsSeparatedBy(url2.directory(true, false), QChar('/'));
+ vector<TQString> tokens_1 = tokenizeWordsSeparatedBy(url1.directory(true, false), TQChar('/'));
+ vector<TQString> 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<QString>::size_type size = 0;
+ vector<TQString>::size_type size = 0;
if(tokens_1.size() < tokens_2.size())
size = tokens_1.size();
else
size = tokens_2.size();
- for(vector<QString>::size_type i = 0; i != size; ++i)
+ for(vector<TQString>::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 <kurl.h>
-#include <qstring.h>
+#include <tqstring.h>
#include <vector>
@@ -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<LinkStatus*> const& v);
-bool equalHost(QString const& host1, QString const& host2, bool restrict = false);
-bool hasProtocol(QString const& url);
-QString convertToLocal(LinkStatus const* ls);
+bool 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 <qscrollview.h>
+#include <tqscrollview.h>
#include <iostream>
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 <qtooltip.h>
+#include <tqtooltip.h>
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 <klocale.h>
#include <kurl.h>
-#include <qstring.h>
-#include <qlayout.h>
-#include <qlabel.h>
+#include <tqstring.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
-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<QKeyEvent *>( ev );
+ TQKeyEvent *e = static_cast<TQKeyEvent *>( 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<QChar> chars;
- chars << QChar('/') << QChar('.') << QChar('?') << QChar('#') << QChar(':');
+ TQValueList<TQChar> 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 <kstandarddirs.h>
#include <kdebug.h>
-#include <qapplication.h>
-#include <qhbox.h>
-#include <qlabel.h>
-#include <qpixmap.h>
-#include <qstring.h>
-#include <qtimer.h>
-#include <qtoolbutton.h>
-#include <qtooltip.h>
-#include <qlayout.h>
+#include <tqapplication.h>
+#include <tqhbox.h>
+#include <tqlabel.h>
+#include <tqpixmap.h>
+#include <tqstring.h>
+#include <tqtimer.h>
+#include <tqtoolbutton.h>
+#include <tqtooltip.h>
+#include <tqlayout.h>
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 <qstring.h>
+#include <tqstring.h>
#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 <qpainter.h>
-#include <qcolor.h>
+#include <tqpainter.h>
+#include <tqcolor.h>
#include <klocale.h>
#include <kurl.h>
#include <kiconloader.h>
-const QString ResultView::URL_LABEL = "URL";
-const QString ResultView::STATUS_LABEL = "Status";
-const QString ResultView::MARKUP_LABEL = "Markup";
-const QString ResultView::LINK_LABEL_LABEL = "Label";
+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 <qvaluevector.h>
-#include <qpopupmenu.h>
-#include <qstringlist.h>
+#include <tqvaluevector.h>
+#include <tqpopupmenu.h>
+#include <tqstringlist.h>
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<KURL> const& referrers, bool is_root = false) = 0;
+ virtual void loadContextTableMenu(TQValueVector<KURL> 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 <kstandarddirs.h>
#include <kio/netaccess.h>
-#include <qevent.h>
-#include <qlineedit.h>
-#include <qspinbox.h>
-#include <qcheckbox.h>
-#include <qpushbutton.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qlistbox.h>
-#include <qstringlist.h>
-#include <qbuttongroup.h>
-#include <qtoolbutton.h>
-#include <qregexp.h>
+#include <tqevent.h>
+#include <tqlineedit.h>
+#include <tqspinbox.h>
+#include <tqcheckbox.h>
+#include <tqpushbutton.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqlistbox.h>
+#include <tqstringlist.h>
+#include <tqbuttongroup.h>
+#include <tqtoolbutton.h>
+#include <tqregexp.h>
#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<KToggleAction*> (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 <qtimer.h>
-#include <qstring.h>
+#include <tqtimer.h>
+#include <tqstring.h>
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 <kpushbutton.h>
#include <klineedit.h>
-#include <qstring.h>
+#include <tqstring.h>
#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 <qmemarray.h>
-#include <qtooltip.h>
-#include <qpixmap.h>
-#include <qclipboard.h>
-#include <qpainter.h>
-#include <qprocess.h>
+#include <tqmemarray.h>
+#include <tqtooltip.h>
+#include <tqpixmap.h>
+#include <tqclipboard.h>
+#include <tqpainter.h>
+#include <tqprocess.h>
#include <kapplication.h>
#include <kstandarddirs.h>
@@ -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<TableItem*> TableLinkstatus::generateRowOfTableItems(LinkStatus const* li
vector<TableItem*> 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<TableItem*> items)
void TableLinkstatus::clear()
{
- QMemArray<int> linhas(numRows());
+ TQMemArray<int> 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<int> columns(numCols());
+ TQMemArray<int> 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<TableItem*> (QTable::item(row, col));
+ TableItem* _item = dynamic_cast<TableItem*> (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<KURL> referrers = table_item->linkStatus()->referrers();
+ TQValueVector<KURL> referrers = table_item->linkStatus()->referrers();
loadContextTableMenu(referrers, table_item->linkStatus()->isRoot());
context_table_menu_.popup(pos);
}
}
-void TableLinkstatus::loadContextTableMenu(QValueVector<KURL> const& referrers, bool is_root)
+void TableLinkstatus::loadContextTableMenu(TQValueVector<KURL> const& referrers, bool is_root)
{
context_table_menu_.clear();
sub_menu_->clear();
if(!is_root)
{
- sub_menu_->insertItem(i18n("All"), this, SLOT(slotEditReferrersWithQuanta()));
+ sub_menu_->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<KURL> 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<KURL> referrers = _item->linkStatus()->referrers();
+ TQValueVector<KURL> 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<KURL> referrers = _item->linkStatus()->referrers();
+ TQValueVector<KURL> 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("<qt>File <b>%1</b> cannot be opened. Might be a DCOP problem.</qt>").arg(filePath);
+ TQString message = i18n("<qt>File <b>%1</b> cannot be opened. Might be a DCOP problem.</qt>").arg(filePath);
KMessageBox::error(parentWidget(), message);
}
}
else
{
- QStringList args(url.url());
+ 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 <qtable.h>
-#include <qstring.h>
-#include <qcolor.h>
-#include <qpopupmenu.h>
-#include <qvaluevector.h>
+#include <tqtable.h>
+#include <tqstring.h>
+#include <tqcolor.h>
+#include <tqpopupmenu.h>
+#include <tqvaluevector.h>
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<KURL> const& referrers, bool is_root = false);
+ virtual void loadContextTableMenu(TQValueVector<KURL> 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 <qtoolbutton.h>
-#include <qcursor.h>
-#include <qtooltip.h>
-#include <qpushbutton.h>
-#include <qpixmap.h>
-#include <qiconset.h>
-#include <qstringlist.h>
+#include <tqtoolbutton.h>
+#include <tqcursor.h>
+#include <tqtooltip.h>
+#include <tqpushbutton.h>
+#include <tqpixmap.h>
+#include <tqiconset.h>
+#include <tqstringlist.h>
#include <kapplication.h>
#include <kstandarddirs.h>
@@ -42,10 +42,10 @@
#include <kiconloader.h>
-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<SessionWidget> const& TabWidgetSession::sessions() const
+TQIntDict<SessionWidget> 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 <ktabwidget.h>
#include <kurl.h>
-#include <qintdict.h>
+#include <tqintdict.h>
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<SessionWidget> const& sessions() const;
+ TQIntDict<SessionWidget> 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<SessionWidget> tabs_;
- QToolButton* tabs_close_;
+ TQIntDict<SessionWidget> 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 <dcopclient.h>
#include <kcharsets.h>
-#include <qvaluevector.h>
-#include <qheader.h>
-#include <qclipboard.h>
+#include <tqvaluevector.h>
+#include <tqheader.h>
+#include <tqclipboard.h>
#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<KListView*> (this));
+ TQListViewItemIterator it(static_cast<KListView*> (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<KURL> referrers = tree_item->linkStatus()->referrers();
+ TQValueVector<KURL> 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<KURL> referrers = _item->linkStatus()->referrers();
+ TQValueVector<KURL> 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<KURL> referrers = _item->linkStatus()->referrers();
+ TQValueVector<KURL> 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("<qt>File <b>%1</b> cannot be opened. Might be a DCOP problem.</qt>").arg(filePath);
+ TQString message = i18n("<qt>File <b>%1</b> cannot be opened. Might be a DCOP problem.</qt>").arg(filePath);
KMessageBox::error(parentWidget(), message);
}
}
else
{
- QStringList args(url.url());
+ TQStringList args(url.url());
Global::openQuanta(args);
}
}
@@ -338,21 +338,21 @@ void TreeView::slotViewParentUrlInBrowser()
}
}
-void TreeView::loadContextTableMenu(QValueVector<KURL> const& referrers, bool is_root)
+void TreeView::loadContextTableMenu(TQValueVector<KURL> const& referrers, bool is_root)
{
context_table_menu_.clear();
sub_menu_->clear();
if(!is_root)
{
- sub_menu_->insertItem(i18n("All"), this, SLOT(slotEditReferrersWithQuanta()));
+ sub_menu_->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<KURL> 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<TreeViewItem*> (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<KURL> const& referrers, bool is_root = false);
+ virtual void loadContextTableMenu(TQValueVector<KURL> 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<TreeColumnViewItem> column_items_;
- QListViewItem* last_child_;
+ TQValueVector<TreeColumnViewItem> 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 <qprocess.h>
-#include <qwidget.h>
+#include <tqprocess.h>
+#include <tqwidget.h>
#include <kapplication.h>
#include <kmessagebox.h>
#include <kdebug.h>
-QString htmlDocCharset[NUMBER_OF_HTML_CODES][2] = {
+TQString htmlDocCharset[NUMBER_OF_HTML_CODES][2] = {
{ "&euro;", "@" },
{ "&#09;", "\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 <kurl.h>
-#include <qstring.h>
+#include <tqstring.h>
//#include <string>
@@ -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&#64;server&#46;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 <stdlib.h>
-#include <qregexp.h>
-#include <qsignal.h>
-#include <qstylesheet.h>
-#include <qthread.h>
-#include <qevent.h>
-#include <qmutex.h>
+#include <tqregexp.h>
+#include <tqsignal.h>
+#include <tqstylesheet.h>
+#include <tqthread.h>
+#include <tqevent.h>
+#include <tqmutex.h>
#include <kapplication.h>
#include <kdebug.h>
@@ -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 '<kopete-i18n>' elements and feed them through i18n().
// After that replace the %VAR% variables with their proper XSLT counterpart.
//
- // FIXME: Preprocessing the document using the QString API is fast and simple,
+ // 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( "<kopete-i18n>(.*)</kopete-i18n>" ) );
+ TQRegExp elementMatch( TQString::fromLatin1( "<kopete-i18n>(.*)</kopete-i18n>" ) );
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( "<xsl:value-of select=\"@time\"/>" );
+ trans += TQString::fromLatin1( "<xsl:value-of select=\"@time\"/>" );
}
- else if ( *it == QString::fromLatin1( "TIMESTAMP" ) )
+ else if ( *it == TQString::fromLatin1( "TIMESTAMP" ) )
{
- trans += QString::fromLatin1( "<xsl:value-of select=\"@timestamp\"/>" );
+ trans += TQString::fromLatin1( "<xsl:value-of select=\"@timestamp\"/>" );
}
- else if ( *it == QString::fromLatin1( "FORMATTEDTIMESTAMP" ) )
+ else if ( *it == TQString::fromLatin1( "FORMATTEDTIMESTAMP" ) )
{
- trans += QString::fromLatin1( "<xsl:value-of select=\"@formattedTimestamp\"/>" );
+ trans += TQString::fromLatin1( "<xsl:value-of select=\"@formattedTimestamp\"/>" );
}
- else if ( *it == QString::fromLatin1( "FROM_CONTACT_DISPLAYNAME" ) )
+ else if ( *it == TQString::fromLatin1( "FROM_CONTACT_DISPLAYNAME" ) )
{
- trans += QString::fromLatin1( "<span><xsl:attribute name=\"title\">"
+ trans += TQString::fromLatin1( "<span><xsl:attribute name=\"title\">"
"<xsl:choose>"
"<xsl:when test='from/contact/@contactId=from/contact/contactDisplayName/@text'>"
"<xsl:value-of disable-output-escaping=\"yes\" select=\"from/contact/metaContactDisplayName/@text\"/>"
@@ -290,9 +290,9 @@ void XSLT::setXSLT( const QString &_document )
"</xsl:attribute>"
"<xsl:value-of disable-output-escaping=\"yes\" select=\"from/contact/contactDisplayName/@text\"/></span>" );
}
- else if ( *it == QString::fromLatin1( "TO_CONTACT_DISPLAYNAME" ) )
+ else if ( *it == TQString::fromLatin1( "TO_CONTACT_DISPLAYNAME" ) )
{
- trans += QString::fromLatin1( "<span><xsl:attribute name=\"title\">"
+ trans += TQString::fromLatin1( "<span><xsl:attribute name=\"title\">"
"<xsl:choose>"
"<xsl:when test='to/contact/@contactId=from/contact/contactDisplayName/@text'>"
"<xsl:value-of disable-output-escaping=\"yes\" select=\"to/contact/metaContactDisplayName/@text\"/>"
@@ -307,37 +307,37 @@ void XSLT::setXSLT( const QString &_document )
"</xsl:attribute>"
"<xsl:value-of disable-output-escaping=\"yes\" select=\"to/contact/contactDisplayName/@text\"/></span>" );
}
- else if ( *it == QString::fromLatin1( "FROM_METACONTACT_DISPLAYNAME" ) )
+ else if ( *it == TQString::fromLatin1( "FROM_METACONTACT_DISPLAYNAME" ) )
{
- trans += QString::fromLatin1( "<span>"
+ trans += TQString::fromLatin1( "<span>"
"<xsl:attribute name=\"dir\">"
"<xsl:value-of select=\"from/contact/metaContactDisplayName/@dir\"/>"
"</xsl:attribute>"
"<xsl:value-of disable-output-escaping=\"yes\" select=\"from/contact/metaContactDisplayName/@text\"/></span>" );
}
- else if ( *it == QString::fromLatin1( "TO_METACONTACT_DISPLAYNAME" ) )
+ else if ( *it == TQString::fromLatin1( "TO_METACONTACT_DISPLAYNAME" ) )
{
- trans += QString::fromLatin1( "<span>"
+ trans += TQString::fromLatin1( "<span>"
"<xsl:attribute name=\"dir\">"
"<xsl:value-of select=\"to/contact/metaContactDisplayName/@dir\"/>"
"</xsl:attribute>"
"<xsl:value-of disable-output-escaping=\"yes\" select=\"to/contact/metaContactDisplayName/@text\"/></span>" );
}
- else if ( *it == QString::fromLatin1( "FROM_CONTACT_ID" ) )
+ else if ( *it == TQString::fromLatin1( "FROM_CONTACT_ID" ) )
{
- trans += QString::fromLatin1( "<span><xsl:attribute name=\"title\">"
+ trans += TQString::fromLatin1( "<span><xsl:attribute name=\"title\">"
"<xsl:value-of disable-output-escaping=\"yes\" select=\"from/contact/contactDisplayName/@text\"/></xsl:attribute>"
"<xsl:value-of disable-output-escaping=\"yes\" select=\"from/contact/@contactId\"/></span>" );
}
- else if ( *it == QString::fromLatin1( "TO_CONTACT_ID" ) )
+ else if ( *it == TQString::fromLatin1( "TO_CONTACT_ID" ) )
{
- trans += QString::fromLatin1( "<span><xsl:attribute name=\"title\">"
+ trans += TQString::fromLatin1( "<span><xsl:attribute name=\"title\">"
"<xsl:value-of disable-output-escaping=\"yes\" select=\"to/contact/contactDisplayName/@text\"/></xsl:attribute>"
"<xsl:value-of disable-output-escaping=\"yes\" select=\"to/contact/@contactId\"/></span>" );
}
- else if ( *it == QString::fromLatin1( "BODY" ) )
+ else if ( *it == TQString::fromLatin1( "BODY" ) )
{
- trans += QString::fromLatin1( "<xsl:value-of disable-output-escaping=\"yes\" select=\"body\"/>" );
+ trans += TQString::fromLatin1( "<xsl:value-of disable-output-escaping=\"yes\" select=\"body\"/>" );
}
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 <qobject.h>
+#include <tqobject.h>
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 <qaction.h>
-#include <qapplication.h>
-#include <qbitmap.h>
-#include <qdragobject.h>
+#include <tqaction.h>
+#include <tqapplication.h>
+#include <tqbitmap.h>
+#include <tqdragobject.h>
#include <kinputdialog.h>
-#include <qlayout.h>
-#include <qmainwindow.h>
-#include <qmenudata.h>
-#include <qmessagebox.h>
-#include <qobjectlist.h>
-#include <qpainter.h>
-#include <qstyle.h>
-#include <qtimer.h>
+#include <tqlayout.h>
+#include <tqmainwindow.h>
+#include <tqmenudata.h>
+#include <tqmessagebox.h>
+#include <tqobjectlist.h>
+#include <tqpainter.h>
+#include <tqstyle.h>
+#include <tqtimer.h>
#include "actiondnd.h"
#include "command.h"
@@ -42,23 +42,23 @@
#include <klocale.h>
-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<QWidget*, QAction*>::Iterator it = actionMap.find( (QWidget*)o );
+ TQMap<TQWidget*, TQAction*>::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<QWidget*, QAction*>::Iterator it = actionMap.find( (QWidget*)o );
+ TQMap<TQWidget*, TQAction*>::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<QWidget*, QAction*>::Iterator it = actionMap.find( w );
+ TQMap<TQWidget*, TQAction*>::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<QWidget*, QAction*>::Iterator it = actionMap.find( (QWidget*)o );
+ TQMap<TQWidget*, TQAction*>::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 <qaction.h>
-#include <qmap.h>
-#include <qmenubar.h>
-#include <qpixmap.h>
-#include <qpopupmenu.h>
-#include <qptrlist.h>
-#include <qtoolbar.h>
-#include <qguardedptr.h>
+#include <tqaction.h>
+#include <tqmap.h>
+#include <tqmenubar.h>
+#include <tqpixmap.h>
+#include <tqpopupmenu.h>
+#include <tqptrlist.h>
+#include <tqtoolbar.h>
+#include <tqguardedptr.h>
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<QAction *, QWidget *> widgets;
+ TQWidget *wid;
+ TQMap<TQAction *, TQWidget *> 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<QAction> insertedActions() const { return actionList; }
- void addAction( QAction *a );
+ QDesignerToolBar( TQMainWindow *mw );
+ QDesignerToolBar( TQMainWindow *mw, Dock dock );
+ TQPtrList<TQAction> 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<QAction> actionList;
- QMap<QWidget*, QAction*> actionMap;
- QPoint dragStartPos;
+ TQPtrList<TQAction> actionList;
+ TQMap<TQWidget*, TQAction*> 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<QAction> insertedActions() const { return actionList; }
- void addAction( QAction *a );
+ QDesignerPopupMenu( TQWidget *w );
+ TQPtrList<TQAction> 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<QAction> actionList;
- QPoint dragStartPos;
+ TQPtrList<TQAction> actionList;
+ TQPoint dragStartPos;
bool mousePressed;
QDesignerIndicatorWidget *indicator;
FormWindow *formWindow;
- QGuardedPtr<QPopupMenu> popupMenu;
- QPoint popupPos;
- QPoint popupLocalPos;
+ TQGuardedPtr<TQPopupMenu> 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 <qaction.h>
-#include <qlineedit.h>
-#include <qlabel.h>
-#include <qtoolbutton.h>
-#include <qlistview.h>
-#include <qcheckbox.h>
-#include <qpushbutton.h>
-#include <qpopupmenu.h>
-#include <qobjectlist.h>
+#include <tqaction.h>
+#include <tqlineedit.h>
+#include <tqlabel.h>
+#include <tqtoolbutton.h>
+#include <tqlistview.h>
+#include <tqcheckbox.h>
+#include <tqpushbutton.h>
+#include <tqpopupmenu.h>
+#include <tqobjectlist.h>
#include <klocale.h>
-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<MetaDataBase::Connection> conns =
+ TQValueList<MetaDataBase::Connection> conns =
MetaDataBase::connections( formWindow, currentAction );
- for ( QValueList<MetaDataBase::Connection>::Iterator it2 = conns.begin();
+ for ( TQValueList<MetaDataBase::Connection>::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<MetaDataBase::Connection> conns =
+ TQValueList<MetaDataBase::Connection> conns =
MetaDataBase::connections( formWindow, currentAction );
- for ( QValueList<MetaDataBase::Connection>::Iterator it2 = conns.begin();
+ for ( TQValueList<MetaDataBase::Connection>::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 <qdragobject.h>
-#include <qheader.h>
+#include <tqdragobject.h>
+#include <tqheader.h>
#include <klocale.h>
-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 <qlistview.h>
+#include <tqlistview.h>
#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 <qstring.h>
+#include <tqstring.h>
-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 <qvalidator.h>
+#include <tqvalidator.h>
class AsciiValidator: public QValidator
{
Q_OBJECT
public:
- AsciiValidator( QObject * parent, const char *name = 0 );
- AsciiValidator( bool funcName, QObject * parent, const char *name = 0 );
- AsciiValidator( const QString &allow, QObject * parent, const char *name = 0 );
+ AsciiValidator( 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 <qprocess.h>
-#include <qtimer.h>
-#include <qsocket.h>
-#include <qstring.h>
+#include <tqprocess.h>
+#include <tqtimer.h>
+#include <tqsocket.h>
+#include <tqstring.h>
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 <kparts/partmanager.h>
/* QT INCLUDES */
-#include <qstringlist.h>
-#include <qmetaobject.h>
-#include <qcombobox.h>
-#include <qstring.h>
-#include <qfile.h>
-#include <qobject.h>
-#include <qobjectlist.h>
-#include <qtimer.h>
-#include <qevent.h>
-#include <qvaluelist.h>
+#include <tqstringlist.h>
+#include <tqmetaobject.h>
+#include <tqcombobox.h>
+#include <tqstring.h>
+#include <tqfile.h>
+#include <tqobject.h>
+#include <tqobjectlist.h>
+#include <tqtimer.h>
+#include <tqevent.h>
+#include <tqvaluelist.h>
/* OTHER INCLUDES */
#include <cstdio>
@@ -61,10 +61,10 @@
#include "choosewidgetimpl.h"
#include "functionsimpl.h"
-QValueList<QWidget *> openedWidgets;
+TQValueList<TQWidget *> 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<KommanderWidget *>(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<KTextEditor::ViewCursorInterface*>(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<KTextEditor::HighlightingInterface*>(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; i<widgetsComboBox->count(); 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<KTextEditor::ViewCursorInterface*>(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("<qt>Cannot open file<br><b>%1</b></qt").arg( fileName ) );
return;
}
- QTextStream insertStream(&insertFile);
- QString insertText = insertStream.read();
+ TQTextStream insertStream(&insertFile);
+ TQString insertText = insertStream.read();
insertAssociatedText(insertText);
insertFile.close();
}
void AssocTextEditor::insertWidgetName(int index)
{
- QString prefix;
+ TQString prefix;
if (!useInternalParser())
- prefix = QString(QChar(ESCCHAR));
+ prefix = TQString(TQChar(ESCCHAR));
insertAssociatedText(prefix + widgetToString(widgetFromString(widgetComboBox->text(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 <qdict.h>
-#include <qstringlist.h>
-#include <qstring.h>
-#include <qwidget.h>
-#include <qobject.h>
-#include <qmap.h>
-#include <qptrvector.h>
-#include <qpixmap.h>
+#include <tqdict.h>
+#include <tqstringlist.h>
+#include <tqstring.h>
+#include <tqwidget.h>
+#include <tqobject.h>
+#include <tqmap.h>
+#include <tqptrvector.h>
+#include <tqpixmap.h>
#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<QWidget> m_widgetList;
+ TQDict<TQWidget> m_widgetList;
// Dictionary for current widget; contains pairs (state, script associated with current state)
- QMap<QString, QString> m_atdict;
+ TQMap<TQString, TQString> 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 <klocale.h>
/** QT INCLUDES */
-#include <qptrstack.h>
-#include <qobject.h>
-#include <qobjectlist.h>
-#include <qlineedit.h>
-#include "qmetaobject.h"
+#include <tqptrstack.h>
+#include <tqobject.h>
+#include <tqobjectlist.h>
+#include <tqlineedit.h>
+#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<QWidget> p_widgets;
- QPtrStack<QListViewItem> p_items;
+ TQListViewItem* item;
+ TQPtrStack<TQWidget> p_widgets;
+ TQPtrStack<TQListViewItem> 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 <qmap.h>
-#include <qfeatures.h>
-#include <qwidget.h>
-#include <qmetaobject.h>
-#include <qapplication.h>
-#include <qlayout.h>
-#include <qmessagebox.h>
-#include <qlistbox.h>
-#include <qiconview.h>
-#include <qmultilineedit.h>
-#include <qptrstack.h>
-#include <qheader.h>
+#include <tqmap.h>
+#include <tqfeatures.h>
+#include <tqwidget.h>
+#include <tqmetaobject.h>
+#include <tqapplication.h>
+#include <tqlayout.h>
+#include <tqmessagebox.h>
+#include <tqlistbox.h>
+#include <tqiconview.h>
+#include <tqmultilineedit.h>
+#include <tqptrstack.h>
+#include <tqheader.h>
#ifndef QT_NO_TABLE
-#include <qtable.h>
+#include <tqtable.h>
#endif
-#include <qaction.h>
+#include <tqaction.h>
#include <klocale.h>
@@ -84,7 +84,7 @@ void CommandHistory::addCommand( Command *cmd, bool tryCompress )
if ( current < savedAt )
savedAt = -2;
- QPtrList<Command> commands;
+ TQPtrList<Command> 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<QPoint> op,
- const QValueList<QPoint> np,
- QWidget *opr, QWidget *npr )
+MoveCommand::MoveCommand( const TQString &n, FormWindow *fw,
+ const TQWidgetList &w,
+ const TQValueList<TQPoint> op,
+ const TQValueList<TQPoint> 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<MetaDataBase::Connection> conns = MetaDataBase::connections( formWindow(), w );
+ TQValueList<MetaDataBase::Connection> conns = MetaDataBase::connections( formWindow(), w );
connections.insert( w, conns );
- QValueList<MetaDataBase::Connection>::Iterator it = conns.begin();
+ TQValueList<MetaDataBase::Connection>::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<MetaDataBase::Connection> conns = *connections.find( w );
- QValueList<MetaDataBase::Connection>::Iterator it = conns.begin();
+ TQValueList<MetaDataBase::Connection> conns = *connections.find( w );
+ TQValueList<MetaDataBase::Connection>::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<MetaDataBase::Property>::Iterator it = cw->lstProperties.begin(); it != cw->lstProperties.end(); ++it ) {
- if ( QString( (*it ).property ) == propName ) {
+ for ( TQValueList<MetaDataBase::Property>::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 &currentItemText, bool select )
+void SetPropertyCommand::setProperty( const TQVariant &v, const TQString &currentItemText, 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 &currentI
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 &currentI
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 &currentI
( ( 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 &currentI
} 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 &currentI
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 &currentI
// ------------------------------------------------------------
-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<Command> &cmds )
+MacroCommand::MacroCommand( const TQString &n, FormWindow *fw,
+ const TQPtrList<Command> &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<Item> &items )
+PopulateListBoxCommand::PopulateListBoxCommand( const TQString &n, FormWindow *fw,
+ TQListBox *lb, const TQValueList<Item> &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<Item>::Iterator it = newItems.begin(); it != newItems.end(); ++it ) {
+ for ( TQValueList<Item>::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<Item>::Iterator it = oldItems.begin(); it != oldItems.end(); ++it ) {
+ for ( TQValueList<Item>::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<Item> &items )
+PopulateIconViewCommand::PopulateIconViewCommand( const TQString &n, FormWindow *fw,
+ TQIconView *iv, const TQValueList<Item> &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<Item>::Iterator it = newItems.begin(); it != newItems.end(); ++it ) {
+ for ( TQValueList<Item>::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<Item>::Iterator it = oldItems.begin(); it != oldItems.end(); ++it ) {
+ for ( TQValueList<Item>::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<QListViewItem> fromParents, toParents;
+ TQListViewItemIterator it( from );
+ TQPtrStack<TQListViewItem> fromParents, toParents;
fromParents.push( 0 );
toParents.push( 0 );
- QPtrStack<QListViewItem> toLasts;
- QListViewItem *fromLast = 0;
+ TQPtrStack<TQListViewItem> 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<Row> &rows,
- const QValueList<Column> &columns )
+PopulateTableCommand::PopulateTableCommand( const TQString &n, FormWindow *fw, TQTable *t,
+ const TQValueList<Row> &rows,
+ const TQValueList<Column> &columns )
: Command( n, fw ), newRows( rows ), newColumns( columns ), table( t )
{
#ifndef QT_NO_TABLE
int i = 0;
- QMap<QString, QString> columnFields = MetaDataBase::columnFields( table );
+ TQMap<TQString, TQString> 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<QString, QString> columnFields;
+ TQMap<TQString, TQString> columnFields;
table->setNumCols( newColumns.count() );
int i = 0;
- for ( QValueList<Column>::Iterator cit = newColumns.begin(); cit != newColumns.end(); ++cit, ++i ) {
+ for ( TQValueList<Column>::Iterator cit = newColumns.begin(); cit != newColumns.end(); ++cit, ++i ) {
table->horizontalHeader()->setLabel( i, (*cit).pix, (*cit).text );
if ( !(*cit).field.isEmpty() )
columnFields.insert( (*cit).text, (*cit).field );
@@ -1549,7 +1549,7 @@ void PopulateTableCommand::execute()
MetaDataBase::setColumnFields( table, columnFields );
table->setNumRows( newRows.count() );
i = 0;
- for ( QValueList<Row>::Iterator rit = newRows.begin(); rit != newRows.end(); ++rit, ++i )
+ for ( TQValueList<Row>::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<QString, QString> columnFields;
+ TQMap<TQString, TQString> columnFields;
table->setNumCols( oldColumns.count() );
int i = 0;
- for ( QValueList<Column>::Iterator cit = oldColumns.begin(); cit != oldColumns.end(); ++cit, ++i ) {
+ for ( TQValueList<Column>::Iterator cit = oldColumns.begin(); cit != oldColumns.end(); ++cit, ++i ) {
table->horizontalHeader()->setLabel( i, (*cit).pix, (*cit).text );
if ( !(*cit).field.isEmpty() )
columnFields.insert( (*cit).text, (*cit).field );
@@ -1568,15 +1568,15 @@ void PopulateTableCommand::unexecute()
MetaDataBase::setColumnFields( table, columnFields );
table->setNumRows( oldRows.count() );
i = 0;
- for ( QValueList<Row>::Iterator rit = oldRows.begin(); rit != oldRows.end(); ++rit, ++i )
+ for ( TQValueList<Row>::Iterator rit = oldRows.begin(); rit != oldRows.end(); ++rit, ++i )
table->verticalHeader()->setLabel( i, (*rit).pix, (*rit).text );
#endif
}
// ------------------------------------------------------------
-AddActionToToolBarCommand::AddActionToToolBarCommand( const QString &n, FormWindow *fw,
- QAction *a, QDesignerToolBar *tb, int idx )
+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 <qstring.h>
-#include <qrect.h>
-#include <qvaluelist.h>
-#include <qvariant.h>
-#include <qobject.h>
-#include <qlistview.h>
-#include <qptrlist.h>
-#include <qmap.h>
+#include <tqstring.h>
+#include <tqrect.h>
+#include <tqvaluelist.h>
+#include <tqvariant.h>
+#include <tqobject.h>
+#include <tqlistview.h>
+#include <tqptrlist.h>
+#include <tqmap.h>
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<Command> history;
+ TQPtrList<Command> 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<QPoint> op,
- const QValueList<QPoint> np,
- QWidget *opr, QWidget *npr );
+ MoveCommand( const TQString &n, FormWindow *fw,
+ const TQWidgetList &w,
+ const TQValueList<TQPoint> op,
+ const TQValueList<TQPoint> 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<QPoint> oldPos, newPos;
- QWidget *oldParent, *newParent;
+ TQWidgetList widgets;
+ TQValueList<TQPoint> 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<MetaDataBase::Connection> > connections;
+ TQWidgetList widgets;
+ TQMap< TQWidget*, TQValueList<MetaDataBase::Connection> > connections;
};
class SetPropertyCommand : public Command
{
public:
- SetPropertyCommand( const QString &n, FormWindow *fw,
- QObject *w, PropertyEditor *e,
- const QString &pn, const QVariant &ov,
- const QVariant &nv, const QString &ncut,
- const QString &ocut,
+ 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 &currentItemText, bool select = TRUE );
+ void setProperty( const TQVariant &v, const TQString &currentItemText, 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<Command> &cmds );
+ MacroCommand( const TQString &n, FormWindow *fw,
+ const TQPtrList<Command> &cmds );
void execute();
void unexecute();
Type type() const { return Macro; }
private:
- QPtrList<Command> commands;
+ TQPtrList<Command> 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<Item> &items );
+ PopulateListBoxCommand( const TQString &n, FormWindow *fw,
+ TQListBox *lb, const TQValueList<Item> &items );
void execute();
void unexecute();
Type type() const { return PopulateListBox; }
@@ -672,8 +672,8 @@ public:
bool operator==( const PopulateListBoxCommand & ) const;
private:
- QValueList<Item> oldItems, newItems;
- QListBox *listbox;
+ TQValueList<Item> 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<Item> &items );
+ PopulateIconViewCommand( const TQString &n, FormWindow *fw,
+ TQIconView *iv, const TQValueList<Item> &items );
void execute();
void unexecute();
Type type() const { return PopulateIconView; }
@@ -698,41 +698,41 @@ public:
bool operator==( const PopulateIconViewCommand & ) const;
private:
- QValueList<Item> oldItems, newItems;
- QIconView *iconview;
+ TQValueList<Item> 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<Row> &rows,
- const QValueList<Column> &columns );
+ PopulateTableCommand( const TQString &n, FormWindow *fw, TQTable *t,
+ const TQValueList<Row> &rows,
+ const TQValueList<Column> &columns );
void execute();
void unexecute();
Type type() const { return PopulateTable; }
private:
- QValueList<Row> oldRows, newRows;
- QValueList<Column> oldColumns, newColumns;
- QTable *table;
+ TQValueList<Row> oldRows, newRows;
+ TQValueList<Column> 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 <qmetaobject.h>
-#include <qlabel.h>
-#include <qregexp.h>
+#include <tqmetaobject.h>
+#include <tqlabel.h>
+#include <tqregexp.h>
#include <klistbox.h>
#include <klistview.h>
@@ -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<QWidget> it(*m_formWindow->widgets()); it.current(); ++it)
+ for (TQPtrDictIterator<TQWidget> 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<QAction> it(m_formWindow->actionList()); it.current(); ++it)
+ for (TQPtrListIterator<TQAction> 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; i<comboSender->count(); 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 <QWidget> it(*m_formWindow->widgets()); it.current(); ++it)
- if (QString(it.current()->name()) == s)
+ for (TQPtrDictIterator <TQWidget> it(*m_formWindow->widgets()); it.current(); ++it)
+ if (TQString(it.current()->name()) == s)
return it.current();
- for (QPtrListIterator<QAction> it(m_formWindow->actionList()); it.current(); ++it)
- if (QString(it.current()->name()) == s)
+ for (TQPtrListIterator<TQAction> 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 <QListViewItem*, MetaDataBase::Connection>::Iterator it = m_connections.find(p_item);
+ TQMap <TQListViewItem*, MetaDataBase::Connection>::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 <MetaDataBase::Connection>::Iterator cit;
+ TQValueList <MetaDataBase::Connection>::Iterator cit;
if (!m_oldConnections.isEmpty())
{
- QPtrList <Command> commands;
+ TQPtrList <Command> commands;
for (cit = m_oldConnections.begin(); cit != m_oldConnections.end(); ++cit)
commands.append(new RemoveConnectionCommand(i18n("Remove Connection"), m_formWindow, *cit));
rmConn = new MacroCommand(i18n("Remove Connections"), m_formWindow, commands);
}
if (!m_connections.isEmpty())
{
- QMap<QListViewItem*, MetaDataBase::Connection>::Iterator it = m_connections.begin();
- QPtrList<Command> commands;
+ TQMap<TQListViewItem*, MetaDataBase::Connection>::Iterator it = m_connections.begin();
+ TQPtrList<Command> 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 <MetaDataBase::Connection>::Iterator it = m_oldConnections.begin();
+ TQValueList <MetaDataBase::Connection>::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 <qmap.h>
+#include <tqmap.h>
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 <signal,slot> 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 <QListViewItem*, MetaDataBase::Connection> m_connections;
- QValueList <MetaDataBase::Connection> 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 <TQListViewItem*, MetaDataBase::Connection> m_connections;
+ TQValueList <MetaDataBase::Connection> 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 <qsizepolicy.h>
-#include <qstring.h>
+#include <tqsizepolicy.h>
+#include <tqstring.h>
#define POINTER_TOOL 32000
#define CONNECT_TOOL 32001
#define ORDER_TOOL 32002
-int size_type_to_int( QSizePolicy::SizeType t );
-QString size_type_to_string( QSizePolicy::SizeType t );
-QSizePolicy::SizeType int_to_size_type( int i );
+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 <qlineedit.h>
-#include <qpushbutton.h>
+#include <tqlineedit.h>
+#include <tqpushbutton.h>
#include <kfiledialog.h>
-#include <qlayout.h>
+#include <tqlayout.h>
-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 <qwidget.h>
+#include <tqwidget.h>
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 <qfile.h>
-#include <qregexp.h>
-#include <qstatusbar.h>
-#include <qtimer.h>
+#include <tqfile.h>
+#include <tqregexp.h>
+#include <tqstatusbar.h>
+#include <tqtimer.h>
// KDE includes
#include <kdebug.h>
@@ -42,18 +42,18 @@
#include <sys/stat.h>
-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 <qobject.h>
+#include <tqobject.h>
#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 <qmultilineedit.h>
+#include <tqmultilineedit.h>
#include <klineedit.h>
-#include <qspinbox.h>
+#include <tqspinbox.h>
-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 <qaccel.h>
-#include <qapplication.h>
-#include <qbitmap.h>
-#include <qevent.h>
-#include <qfeatures.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qmap.h>
-#include <qmetaobject.h>
-#include <qobjectlist.h>
-#include <qpainter.h>
-#include <qpalette.h>
-#include <qpen.h>
-#include <qpixmapcache.h>
-#include <qpopupmenu.h>
-#include <qpushbutton.h>
-#include <qsizegrip.h>
-#include <qspinbox.h>
-#include <qstatusbar.h>
-#include <qtimer.h>
-#include <qtooltip.h>
-#include <qwhatsthis.h>
+#include <tqaccel.h>
+#include <tqapplication.h>
+#include <tqbitmap.h>
+#include <tqevent.h>
+#include <tqfeatures.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqmap.h>
+#include <tqmetaobject.h>
+#include <tqobjectlist.h>
+#include <tqpainter.h>
+#include <tqpalette.h>
+#include <tqpen.h>
+#include <tqpixmapcache.h>
+#include <tqpopupmenu.h>
+#include <tqpushbutton.h>
+#include <tqsizegrip.h>
+#include <tqspinbox.h>
+#include <tqstatusbar.h>
+#include <tqtimer.h>
+#include <tqtooltip.h>
+#include <tqwhatsthis.h>
// KDE includes
#include <klocale.h>
@@ -67,30 +67,30 @@
#include <stdlib.h>
-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("<b>A %1 (custom widget)</b> "
+ TQWhatsThis::add(w, i18n("<b>A %1 (custom widget)</b> "
"<p>Click <b>Edit Custom Widgets...</b> in the <b>Tools|Custom</b> "
"menu to add and change custom widgets. You can add "
"properties as well as signals and slots to integrate custom widgets into "
"<i>Qt Designer</i>, and provide a pixmap which will be used to represent "
"the widget on the form.</p>")
.arg(WidgetDatabase::toolTip(id)));
- QToolTip::add(w, i18n("A %1 (custom widget)").arg(WidgetDatabase::toolTip(id)));
+ 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("<b>A %1</b><p>%2</p>").arg(tt).arg(wt));
+ TQWhatsThis::add(w, i18n("<b>A %1</b><p>%2</p>").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<QPoint> op, np;
- for (QWidget *i = lst.first(); i; i = lst.next())
+ TQWidget *pw = WidgetFactory::containerOfWidget(w);
+ TQValueList<TQPoint> 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<Command> commands;
+ TQPtrList<Command> 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("<b>A %1 (custom widget)</b> "
+ TQWhatsThis::add(w, i18n("<b>A %1 (custom widget)</b> "
"<p>Click <b>Edit Custom Widgets...</b> in the <b>Tools|Custom</b> "
"menu to add and change custom widgets. You can add "
"properties as well as signals and slots to integrate custom widgets into "
"<i>Qt Designer</i>, and provide a pixmap which will be used to represent "
"the widget on the form.</p>")
.arg(WidgetDatabase::toolTip(id)));
- QToolTip::add(w, i18n("A %1 (custom widget)").arg(WidgetDatabase::toolTip(id)));
+ 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("<b>A %1</b><p>%2</p>").arg(tt).arg(wt));
+ TQWhatsThis::add(w, i18n("<b>A %1</b><p>%2</p>").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<ulong, QPoint> it = moving.begin();
- QWidget* wa = containerAt(e->globalPos(), ((QWidget*)it.key()));
+ TQMapConstIterator<ulong, TQPoint> 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<WidgetSelection> it(usedSelections); it.current(); ++it)
+ TQWidgetList widgets;
+ for (TQPtrDictIterator<WidgetSelection> 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<QWidget> it(insertedWidgets);
+ TQPtrDictIterator<TQWidget> 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<QAction> al;
- QAction *a = 0;
+ TQPtrList<TQAction> 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<QWidget> it(insertedWidgets);
+ TQPtrDictIterator<TQWidget> 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<QWidget> it(insertedWidgets);
+ TQStringList dbClasses;
+ dbClasses << "TQDataTable"; // add more here
+ TQPtrDictIterator<TQWidget> 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<QWidget> it(insertedWidgets);
- QWidget *container = 0;
+ TQPtrDictIterator<TQWidget> 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 <qwidget.h>
-#include <qmap.h>
-#include <qptrdict.h>
-#include <qpixmap.h>
-#include <qwidgetlist.h>
-#include <qmap.h>
+#include <tqwidget.h>
+#include <tqmap.h>
+#include <tqptrdict.h>
+#include <tqpixmap.h>
+#include <tqwidgetlist.h>
+#include <tqmap.h>
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<QWidget> *widgets();
- virtual QWidgetList selectedWidgets() const;
+ virtual TQPtrDict<TQWidget> *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<QAction> &actionList() { return actions; }
- QAction *findAction( const QString &name );
+ TQPtrList<TQAction> &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<WidgetSelection> selections;
- QPtrDict<WidgetSelection> usedSelections;
- QRect widgetGeom, rubber;
- QPoint oldPressPos, origPressPos;
+ TQPtrList<WidgetSelection> selections;
+ TQPtrDict<WidgetSelection> usedSelections;
+ TQRect widgetGeom, rubber;
+ TQPoint oldPressPos, origPressPos;
CommandHistory commands;
- QMap<ulong, QPoint> moving;
- QWidget *insertParent;
- QObject *propertyWidget;
- QLabel *sizePreviewLabel;
- QTimer *checkSelectionsTimer;
- QPtrDict<QWidget> insertedWidgets;
+ TQMap<ulong, TQPoint> moving;
+ TQWidget *insertParent;
+ TQObject *propertyWidget;
+ TQLabel *sizePreviewLabel;
+ TQTimer *checkSelectionsTimer;
+ TQPtrDict<TQWidget> insertedWidgets;
bool propShowBlocked;
- QTimer* updatePropertiesTimer, *showPropertiesTimer, *selectionChangedTimer;
- QPoint connectStartPos, currentConnectPos;
- QObject *connectSender, *connectReceiver;
- QPixmap *buffer;
- QPtrList<OrderIndicator> orderIndicators;
- QWidgetList orderedWidgets;
- QWidgetList stackedWidgets;
- QWidget *mContainer;
+ TQTimer* updatePropertiesTimer, *showPropertiesTimer, *selectionChangedTimer;
+ TQPoint connectStartPos, currentConnectPos;
+ TQObject *connectSender, *connectReceiver;
+ TQPixmap *buffer;
+ TQPtrList<OrderIndicator> orderIndicators;
+ TQWidgetList orderedWidgets;
+ TQWidgetList stackedWidgets;
+ TQWidget *mContainer;
bool pixInline;
- QString pixLoader;
+ TQString pixLoader;
bool toolFixed;
- QPtrList<QAction> actions;
- QWidget* targetContainer;
- QPalette restorePalette;
+ TQPtrList<TQAction> 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 <qcheckbox.h>
-#include <qlabel.h>
-#include <qmetaobject.h>
-#include <qstringlist.h>
-#include <qregexp.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
+#include <tqmetaobject.h>
+#include <tqstringlist.h>
+#include <tqregexp.h>
/* KDE INCLUDES */
#include <kcombobox.h>
@@ -41,7 +41,7 @@
const int MaxFunctionArgs = 6;
-FunctionsDialog::FunctionsDialog(QWidget* a_parent, const QDict<QWidget>& a_widgetList, bool useInternalParser, char* a_name,
+FunctionsDialog::FunctionsDialog(TQWidget* a_parent, const TQDict<TQWidget>& 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<QWidget>& 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<QWidget> It(m_widgetList); It.current(); ++It)
+ for (TQDictIterator<TQWidget> 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<KommanderWidget *>(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; i<pFunctions.count(); i++)
{
- QString slot = pFunctions[i];
- QString slotArgStr = slot.section(QRegExp("\\(|\\)"), 1);
+ TQString slot = pFunctions[i];
+ TQString slotArgStr = slot.section(TQRegExp("\\(|\\)"), 1);
if (slotArgStr.isEmpty() || m_acceptedSlots.contains(slotArgStr))
{
- QString name = slot.remove("()");
+ TQString name = slot.remove("()");
if (!m_slotList.contains(name))
{
m_slotList[name] = slot;
@@ -164,8 +164,8 @@ void FunctionsDialog::groupChanged(int index)
}
} else
{
- QString s = (index != m_DCOP ) ? groupComboBox->text(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<KommanderWidget *>(m_widgetList[widgetComboBox->currentText()]);
@@ -194,10 +194,10 @@ void FunctionsDialog::functionChanged(int)
if (groupComboBox->currentItem() == m_Slots)
{
KommanderWidget* w = dynamic_cast<KommanderWidget *>(m_widgetList[widgetComboBox->currentText()]);
- QObject *o = w->object();
- QString slotHelp = i18n("To learn more about the slot, look at the documentation of the base Qt/KDE class, most probably <i>%1</i>.").arg(o->metaObject()->superClassName() ? QString(o->metaObject()->superClassName()) : QString(o->className()) );
- QString slotName = functionListBox->currentText();
- QString slot = m_slotList[slotName];
+ 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 <i>%1</i>.").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("<qt><h3>%1</h3>"
"<p><b>Description:</b> %2\n<p><b>Syntax:</b> <i>%3</i>%4</qt>")
@@ -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("<p>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(&para, &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; i<MaxFunctionArgs; i++)
{
if (edits[i]->isShown())
{
- 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 <qstring.h>
-#include <qstringlist.h>
-#include <qwidget.h>
-#include <qdict.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqwidget.h>
+#include <tqdict.h>
#include "functions.h"
#include "specialinformation.h"
@@ -27,12 +27,12 @@ class FunctionsDialog : public FunctionsDialogBase
{
Q_OBJECT
public:
- FunctionsDialog(QWidget*, const QDict<QWidget>&, bool m_useInternalParser, char* = 0, bool = true);
+ FunctionsDialog(TQWidget*, const TQDict<TQWidget>&, 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<QWidget> m_widgetList;
- QStringList m_widgetNames;
- QStringList m_widgetTypes;
+ const TQDict<TQWidget> m_widgetList;
+ TQStringList m_widgetNames;
+ TQStringList m_widgetTypes;
bool m_useInternalParser;
- QStringList m_acceptedSlots;
- QMap<QString, QString> m_slotList;
+ TQStringList m_acceptedSlots;
+ TQMap<TQString, TQString> 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 <qcolor.h>
+#include <tqcolor.h>
#define BOXLAYOUT_DEFAULT_MARGIN 11
#define BOXLAYOUT_DEFAULT_SPACING 6
#ifndef NO_STATIC_COLORS
-static QColor *backColor1 = 0;
-static QColor *backColor2 = 0;
-static QColor *selectedBack = 0;
+static 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 <qpalette.h>
-#include <qobjectlist.h>
-#include <qheader.h>
-#include <qpopupmenu.h>
-#include <qtabwidget.h>
-#include <qwizard.h>
-#include <qwidgetstack.h>
-#include <qtabbar.h>
-#include <qfeatures.h>
-#include <qapplication.h>
-#include <qtimer.h>
-#include <qworkspace.h>
-#include <qaccel.h>
+#include <tqpalette.h>
+#include <tqobjectlist.h>
+#include <tqheader.h>
+#include <tqpopupmenu.h>
+#include <tqtabwidget.h>
+#include <tqwizard.h>
+#include <tqwidgetstack.h>
+#include <tqtabbar.h>
+#include <tqfeatures.h>
+#include <tqapplication.h>
+#include <tqtimer.h>
+#include <tqworkspace.h>
+#include <tqaccel.h>
#include <klocale.h>
@@ -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<QToolBox*>(o->parent()->parent()->parent())) )
- name = tb->itemLabel( tb->indexOf((QWidget*)o) );
+ (tb = ::qt_cast<TQToolBox*>(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<QToolBox*>(it.current()->parent()) ) {
- if ( !::qt_cast<QScrollView*>(it.current()) )
+ } else if ( ::qt_cast<TQToolBox*>(it.current()->parent()) ) {
+ if ( !::qt_cast<TQScrollView*>(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 <qvariant.h>
-#include <qlistview.h>
-#include <qtabwidget.h>
-#include <qguardedptr.h>
+#include <tqvariant.h>
+#include <tqlistview.h>
+#include <tqtabwidget.h>
+#include <tqguardedptr.h>
#include <private/qcom_p.h>
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 <qlineedit.h>
-#include <qlabel.h>
-#include <qiconview.h>
-#include <qpushbutton.h>
-#include <qcheckbox.h>
+#include <tqlineedit.h>
+#include <tqlabel.h>
+#include <tqiconview.h>
+#include <tqpushbutton.h>
+#include <tqcheckbox.h>
#include <klocale.h>
-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<PopulateIconViewCommand::Item> items;
+ TQIconViewItem *i = 0;
+ TQValueList<PopulateIconViewCommand::Item> 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 <qlayout.h>
-#include <qevent.h>
-#include <qpainter.h>
-#include <qpen.h>
-#include <qbitmap.h>
-#include <qsplitter.h>
+#include <tqlayout.h>
+#include <tqevent.h>
+#include <tqpainter.h>
+#include <tqpen.h>
+#include <tqbitmap.h>
+#include <tqsplitter.h>
-bool operator<( const QGuardedPtr<QWidget> &p1, const QGuardedPtr<QWidget> &p2 )
+bool operator<( const TQGuardedPtr<TQWidget> &p1, const TQGuardedPtr<TQWidget> &p2 )
{
return p1.operator->() < p2.operator->();
}
@@ -53,7 +53,7 @@ bool operator<( const QGuardedPtr<QWidget> &p1, const QGuardedPtr<QWidget> &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<QWidgetList> lists;
- QWidget *lastParent = 0;
- QWidgetList *lastList = 0;
- QWidget *w = 0;
+ startPoint = TQPoint( 32767, 32767 );
+ TQValueList<TQWidgetList> 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<QWidgetList>::Iterator it = lists.begin();
+ TQValueList<TQWidgetList>::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<QWidgetList>::Iterator it = lists.begin();
+ TQValueList<TQWidgetList>::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<QGuardedPtr<QWidget>, QRect>::Iterator it = geometries.begin();
+ TQMap<TQGuardedPtr<TQWidget>, 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<QWidget*, QRect> rects;
+ TQMap<TQWidget*, TQRect> 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<QWidget*, QRect>::Iterator it = rects.find( w );
+ TQMap<TQWidget*, TQRect>::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 <qwidget.h>
-#include <qmap.h>
-#include <qguardedptr.h>
-#include <qobject.h>
-#include <qlayout.h>
-#include <qwidgetlist.h>
+#include <tqwidget.h>
+#include <tqmap.h>
+#include <tqguardedptr.h>
+#include <tqobject.h>
+#include <tqlayout.h>
+#include <tqwidgetlist.h>
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<QGuardedPtr<QWidget>, QRect> geometries;
- QWidget *layoutBase;
+ TQWidgetList widgets;
+ TQWidget *parent;
+ TQPoint startPoint;
+ TQMap<TQGuardedPtr<TQWidget>, 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<QWidget*, Item> items;
+ TQMap<TQWidget*, Item> 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 <qlineedit.h>
-#include <qlabel.h>
-#include <qlistbox.h>
-#include <qpushbutton.h>
-#include <qcheckbox.h>
+#include <tqlineedit.h>
+#include <tqlabel.h>
+#include <tqlistbox.h>
+#include <tqpushbutton.h>
+#include <tqcheckbox.h>
#include <klocale.h>
-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<PopulateListBoxCommand::Item> items;
+ TQListBoxItem *i = 0;
+ TQValueList<PopulateListBoxCommand::Item> 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 <qlistview.h>
-#include <qheader.h>
-#include <qlistbox.h>
-#include <qlineedit.h>
-#include <qcheckbox.h>
-#include <qlabel.h>
-#include <qtabwidget.h>
-#include <qspinbox.h>
-#include <qpushbutton.h>
-#include <qptrstack.h>
+#include <tqlistview.h>
+#include <tqheader.h>
+#include <tqlistbox.h>
+#include <tqlineedit.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
+#include <tqtabwidget.h>
+#include <tqspinbox.h>
+#include <tqpushbutton.h>
+#include <tqptrstack.h>
#include <klocale.h>
-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<Column>::Iterator it = columns.begin(); it != columns.end(); ++it ) {
+ for ( TQValueList<Column>::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<Column>::Iterator it = columns.begin(); it != columns.end(); ++it ) {
+ for ( TQValueList<Column>::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 <qmap.h>
-#include <qpixmap.h>
-#include <qvaluelist.h>
+#include <tqmap.h>
+#include <tqpixmap.h>
+#include <tqvaluelist.h>
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<Column> columns;
+ TQListView *listview;
+ TQValueList<Column> 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 <qaccel.h>
-#include <qbuffer.h>
-#include <qclipboard.h>
-#include <qdir.h>
-#include <qfeatures.h>
-#include <qfile.h>
-#include <qlabel.h>
-#include <qmetaobject.h>
-#include <qpixmap.h>
-#include <qregexp.h>
-#include <qstylefactory.h>
-#include <qstyle.h>
-#include <qtimer.h>
-#include <qtooltip.h>
-#include <qvbox.h>
-#include <qwhatsthis.h>
-#include <qwidget.h>
-#include <qwizard.h>
-#include <qworkspace.h>
+#include <tqaccel.h>
+#include <tqbuffer.h>
+#include <tqclipboard.h>
+#include <tqdir.h>
+#include <tqfeatures.h>
+#include <tqfile.h>
+#include <tqlabel.h>
+#include <tqmetaobject.h>
+#include <tqpixmap.h>
+#include <tqregexp.h>
+#include <tqstylefactory.h>
+#include <tqstyle.h>
+#include <tqtimer.h>
+#include <tqtooltip.h>
+#include <tqvbox.h>
+#include <tqwhatsthis.h>
+#include <tqwidget.h>
+#include <tqwizard.h>
+#include <tqworkspace.h>
#include "qcompletionedit.h"
@@ -88,25 +88,25 @@
#include <kparts/partmanager.h>
#include <kio/netaccess.h>
-extern QMap<QWidget*, QString> *qwf_functions;
-extern QMap<QWidget*, QString> *qwf_forms;
-extern QString *qwf_language;
+extern TQMap<TQWidget*, TQString> *qwf_functions;
+extern TQMap<TQWidget*, TQString> *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("<h2>The Property Editor</h2>"
"<p>You can change the appearance and behavior of the selected widget in the "
"property editor.</p>"
@@ -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("<h2>The Object Explorer</h2>"
"<p>The Object Explorer provides an overview of the relationships "
"between the widgets in a form. You can use the clipboard functions using "
@@ -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("<h2>The File Overview Window</h2>"
+ TQWhatsThis::add(wspace, i18n("<h2>The File Overview Window</h2>"
"<p>The File Overview Window displays all open dialogs.</p>"));
}
void MainWindow::setupActionEditor()
{
- KDockWidget *dw = createDockWidget("Action Editor", QPixmap(), 0, i18n("Actions"));
+ 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("<b>The Action Editor</b>"
+ TQWhatsThis::add(actionEditor, i18n("<b>The Action Editor</b>"
"<p>The Action Editor is used to add actions and action groups to "
"a form, and to connect actions to slots. Actions and action "
"groups can be dragged into menus and into toolbars, and may "
@@ -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<FormWindow*>(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<KommanderWidget *>(o))
+ case TQEvent::MouseButtonPress:
+ if (((TQMouseEvent*)e)->button() == MidButton && dynamic_cast<KommanderWidget *>(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("<b>The Form Window</b>"
+ TQWhatsThis::add(fw, i18n("<b>The Form Window</b>"
"<p>Use the various tools to add widgets or to change the layout "
"and behavior of the components in the form. Select one or multiple "
"widgets to move them or lay them out. If a single widget is chosen it can "
@@ -859,16 +859,16 @@ void MainWindow::insertFormWindow(FormWindow *fw)
"<p>You can have several forms open, and all open forms are listed "
"in the <b>Form List</b>."));
- connect(fw, SIGNAL(showProperties(QObject *)),
- this, SLOT(showProperties(QObject *)));
- connect(fw, SIGNAL(updateProperties(QObject *)),
- this, SLOT(updateProperties(QObject *)));
- connect(this, SIGNAL(currentToolChanged()),
- fw, SLOT(currentToolChanged()));
- connect(fw, SIGNAL(selectionChanged()),
- this, SLOT(selectionChanged()));
- connect(fw, SIGNAL(undoRedoChanged(bool, bool, const QString &, const QString &)),
- this, SLOT(updateUndoRedo(bool, bool, const QString &, const QString &)));
+ 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<int> ids;
- QMap<QString, int> commands;
+ TQValueList<int> ids;
+ TQMap<TQString, int> 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<int>::Iterator i = ids.begin(); i != ids.end(); ++i)
+ for (TQValueList<int>::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<int> ids;
- QMap<QString, int> commands;
+ TQValueList<int> ids;
+ TQMap<TQString, int> 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<int>::Iterator i = ids.begin(); i != ids.end(); ++i)
+ for (TQValueList<int>::Iterator i = ids.begin(); i != ids.end(); ++i)
rmbWidgets->removeItem(*i);
}
-void MainWindow::setupRMBProperties(QValueList<int> &ids, QMap<QString, int> &props, QWidget *w)
+void MainWindow::setupRMBProperties(TQValueList<int> &ids, TQMap<TQString, int> &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<int> &ids, QMap<QString, int> &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<int> &ids, QMap<QString, int> &pr
}
}
-void MainWindow::setupRMBSpecialCommands(QValueList<int> &ids, QMap<QString, int> &commands, QWidget *w)
+void MainWindow::setupRMBSpecialCommands(TQValueList<int> &ids, TQMap<TQString, int> &commands, TQWidget *w)
{
int id;
// KommanderWidget doesn't derive from QObject
@@ -1068,7 +1068,7 @@ void MainWindow::setupRMBSpecialCommands(QValueList<int> &ids, QMap<QString, int
commands.insert("assoc", id);
}
- if (w->inherits("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<int> &ids, QMap<QString, int
ids << (id = rmbWidgets->insertItem(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<int> &ids, QMap<QString, int
}
}
-void MainWindow::setupRMBSpecialCommands(QValueList<int> &ids, QMap<QString, int> &commands, FormWindow *fw)
+void MainWindow::setupRMBSpecialCommands(TQValueList<int> &ids, TQMap<TQString, int> &commands, FormWindow *fw)
{
int id;
@@ -1113,11 +1113,11 @@ void MainWindow::setupRMBSpecialCommands(QValueList<int> &ids, QMap<QString, int
commands.insert("assoc", id);
}
- if (fw->mainContainer()->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<int> &ids, QMap<QString, int
ids << (id = rmbFormWindow->insertItem(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<int> &ids, QMap<QString, int
}
}
-void MainWindow::handleRMBProperties(int id, QMap<QString, int> &props, QWidget *w)
+void MainWindow::handleRMBProperties(int id, TQMap<TQString, int> &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<QString, int> &props, QWidget
}
}
-void MainWindow::handleRMBSpecialCommands(int id, QMap<QString, int> &commands, QWidget *w)
+void MainWindow::handleRMBSpecialCommands(int id, TQMap<TQString, int> &commands, TQWidget *w)
{
// associated text menu
// we assume all widgets derive from KommanderWidget [MB02]
@@ -1211,8 +1211,8 @@ void MainWindow::handleRMBSpecialCommands(int id, QMap<QString, int> &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<QString, int> &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<QString, int> &commands,
}
}
-void MainWindow::handleRMBSpecialCommands(int id, QMap<QString, int> &commands, FormWindow *fw)
+void MainWindow::handleRMBSpecialCommands(int id, TQMap<TQString, int> &commands, FormWindow *fw)
{
if(id == commands["assoc"])
@@ -1264,8 +1264,8 @@ void MainWindow::handleRMBSpecialCommands(int id, QMap<QString, int> &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<QString, int> &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<QString, int> &commands,
void MainWindow::clipboardChanged()
{
- QString text(kapp->clipboard()->text());
- QString start("<!DOCTYPE UI-SELECTION>");
+ TQString text(kapp->clipboard()->text());
+ TQString start("<!DOCTYPE UI-SELECTION>");
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("<qt>Could not open file:<br><b>%1</b><br>File does not exist.</qt>").
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 <kparts/dockmainwindow.h>
#include <kdockwidget.h>
-#include <qmap.h>
-#include <qguardedptr.h>
-#include <qobjectlist.h>
+#include <tqmap.h>
+#include <tqguardedptr.h>
+#include <tqobjectlist.h>
class ActionEditor;
class AssistProc;
@@ -54,7 +54,7 @@ class ReplaceDialog;
class Workspace;
#if defined(Q_FULL_TEMPLATE_INSTANTIATION)
-#include <qtoolbar.h>
+#include <tqtoolbar.h>
#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<int> &ids, QMap<QString, int> &props, QWidget *w );
- void handleRMBProperties( int id, QMap<QString, int> &props, QWidget *w );
- void setupRMBSpecialCommands( QValueList<int> &ids, QMap<QString, int> &commands, QWidget *w );
- void handleRMBSpecialCommands( int id, QMap<QString, int> &commands, QWidget *w );
- void setupRMBSpecialCommands( QValueList<int> &ids, QMap<QString, int> &commands, FormWindow *w );
- void handleRMBSpecialCommands( int id, QMap<QString, int> &commands, FormWindow *w );
- bool openEditor( QWidget *w, FormWindow *fw );
+ void setupRMBProperties( TQValueList<int> &ids, TQMap<TQString, int> &props, TQWidget *w );
+ void handleRMBProperties( int id, TQMap<TQString, int> &props, TQWidget *w );
+ void setupRMBSpecialCommands( TQValueList<int> &ids, TQMap<TQString, int> &commands, TQWidget *w );
+ void handleRMBSpecialCommands( int id, TQMap<TQString, int> &commands, TQWidget *w );
+ void setupRMBSpecialCommands( TQValueList<int> &ids, TQMap<TQString, int> &commands, FormWindow *w );
+ void handleRMBSpecialCommands( int id, TQMap<TQString, int> &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<QString,QString> propertyDocumentation;
+ TQMap<TQString,TQString> 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 <qapplication.h>
-#include <qclipboard.h>
-#include <qfileinfo.h>
-#include <qlineedit.h>
-#include <qlistbox.h>
-#include <qsignalmapper.h>
-#include <qspinbox.h>
-#include <qstatusbar.h>
-#include <qstylefactory.h>
-#include <qtooltip.h>
-#include <qwhatsthis.h>
-#include <qworkspace.h>
+#include <tqapplication.h>
+#include <tqclipboard.h>
+#include <tqfileinfo.h>
+#include <tqlineedit.h>
+#include <tqlistbox.h>
+#include <tqsignalmapper.h>
+#include <tqspinbox.h>
+#include <tqstatusbar.h>
+#include <tqstylefactory.h>
+#include <tqtooltip.h>
+#include <tqwhatsthis.h>
+#include <tqworkspace.h>
#include "defs.h"
#include "widgetdatabase.h"
@@ -76,15 +76,15 @@
#include <stdlib.h>
-const QString toolbarHelp = "<p>Toolbars contain a number of buttons to "
+const TQString toolbarHelp = "<p>Toolbars contain a number of buttons to "
"provide quick access to often used functions.%1"
"<br>Click on the toolbar handle to hide the toolbar, "
"or drag and place the toolbar to a different location.</p>";
-static QIconSet createIconSet( const QString &name )
+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("<b>The Edit toolbar</b>%1").arg(toolbarHelp));
+ TQWhatsThis::add(tb, i18n("<b>The Edit toolbar</b>%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("<b>The Layout toolbar</b>%1").arg(toolbarHelp));
+ TQWhatsThis::add(layoutToolBar, i18n("<b>The Layout toolbar</b>%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("<b>The Tools toolbar</b>%1").arg(toolbarHelp));
+ TQWhatsThis::add(tb, i18n("<b>The Tools toolbar</b>%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("<b>The %1</b>%2").arg(grp).arg(toolbarHelp).
+ TQWhatsThis::add(tb, i18n("<b>The %1</b>%2").arg(grp).arg(toolbarHelp).
arg(i18n(" Click on a button to insert a single widget, "
"or double click to insert multiple %1.")).arg(grp));
} else
{
- QWhatsThis::add(tb, i18n("<b>The %1 Widgets</b>%2").arg(grp).arg(toolbarHelp).
+ TQWhatsThis::add(tb, i18n("<b>The %1 Widgets</b>%2").arg(grp).arg(toolbarHelp).
arg(i18n(" Click on a button to insert a single %1 widget, "
"or double click to insert multiple widgets.")).arg(grp));
}
addToolBar(tb, grp);
- QPopupMenu *menu = new QPopupMenu(this, grp.latin1());
+ 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("<b>A %1</b>").arg(WidgetDatabase::className(i));
+ TQString whats = i18n("<b>A %1</b>").arg(WidgetDatabase::className(i));
if (!WidgetDatabase::whatsThis(i).isEmpty())
- whats += QString("<p>%1</p>").arg(WidgetDatabase::whatsThis(i));
+ whats += TQString("<p>%1</p>").arg(WidgetDatabase::whatsThis(i));
a->setWhatsThis(whats + i18n("<p>Double click on this tool to keep it selected.</p>"));
if (grp != "KDE")
@@ -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("<b>The File toolbar</b>%1").arg(toolbarHelp));
+ TQWhatsThis::add(fileTb, i18n("<b>The File toolbar</b>%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<FormWindow*>(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 << "<!DOCTYPE UI><UI>" << endl;
ts << "<widget>" << 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 <kpopupmenu.h>
#include <kprocess.h>
-#include <qclipboard.h>
-#include <qfile.h>
-#include <qtextstream.h>
+#include <tqclipboard.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
-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("<qt>File<br><b>%1</b><br>already exists. Overwrite it?</qt>")
- .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("<qt>Cannot save log file<br><b>%1</b></qt>")
.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 <qtabwidget.h>
+#include <tqtabwidget.h>
#include <klocale.h>
@@ -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 <qapplication.h>
-#include <qobject.h>
-#include <qlayout.h>
-#include <qptrdict.h>
-#include <qobjectlist.h>
-#include <qstrlist.h>
-#include <qmetaobject.h>
-#include <qwidgetlist.h>
-#include <qmainwindow.h>
-#include <qregexp.h>
+#include <tqapplication.h>
+#include <tqobject.h>
+#include <tqlayout.h>
+#include <tqptrdict.h>
+#include <tqobjectlist.h>
+#include <tqstrlist.h>
+#include <tqmetaobject.h>
+#include <tqwidgetlist.h>
+#include <tqmainwindow.h>
+#include <tqregexp.h>
#include <private/qpluginmanager_p.h>
-#include <qdatetime.h>
-#include <qfile.h>
-#include <qfileinfo.h>
-#include <qtextstream.h>
+#include <tqdatetime.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
+#include <tqtextstream.h>
#include <stdlib.h>
@@ -46,33 +46,33 @@
class MetaDataBaseRecord
{
public:
- QObject *object;
- QStringList changedProperties;
- QMap<QString,QVariant> fakeProperties;
- QMap<QString, QString> propertyComments;
+ TQObject *object;
+ TQStringList changedProperties;
+ TQMap<TQString,TQVariant> fakeProperties;
+ TQMap<TQString, TQString> propertyComments;
int spacing, margin;
- QValueList<MetaDataBase::Connection> connections;
- QValueList<MetaDataBase::Slot> slotList;
- QValueList<MetaDataBase::Include> includes;
- QStringList forwards, variables, sigs;
- QWidgetList tabOrder;
+ TQValueList<MetaDataBase::Connection> connections;
+ TQValueList<MetaDataBase::Slot> slotList;
+ TQValueList<MetaDataBase::Include> includes;
+ TQStringList forwards, variables, sigs;
+ TQWidgetList tabOrder;
MetaDataBase::MetaInfo metaInfo;
- QCursor cursor;
- QMap<int, QString> pixmapArguments;
- QMap<int, QString> pixmapKeys;
- QMap<QString, QString> columnFields;
- QMap<QString, QStringList> eventFunctions;
- QMap<QString, QString> functionBodies;
- QMap<QString, QString> functionComments;
- QValueList<int> breakPoints;
- QString exportMacro;
+ TQCursor cursor;
+ TQMap<int, TQString> pixmapArguments;
+ TQMap<int, TQString> pixmapKeys;
+ TQMap<TQString, TQString> columnFields;
+ TQMap<TQString, TQStringList> eventFunctions;
+ TQMap<TQString, TQString> functionBodies;
+ TQMap<TQString, TQString> functionComments;
+ TQValueList<int> breakPoints;
+ TQString exportMacro;
};
-static QPtrDict<MetaDataBaseRecord> *db = 0;
-static QPtrList<MetaDataBase::CustomWidget> *cWidgets = 0;
+static TQPtrDict<MetaDataBaseRecord> *db = 0;
+static TQPtrList<MetaDataBase::CustomWidget> *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<MetaDataBaseRecord>( 1481 );
+ db = new TQPtrDict<MetaDataBaseRecord>( 1481 );
db->setAutoDelete( true );
- cWidgets = new QPtrList<MetaDataBase::CustomWidget>;
+ cWidgets = new TQPtrList<MetaDataBase::CustomWidget>;
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<QString, QVariant>::Iterator it = r->fakeProperties.find( property );
+ TQMap<TQString, TQVariant>::Iterator it = r->fakeProperties.find( property );
if ( it != r->fakeProperties.end() )
return r->fakeProperties[property];
return WidgetFactory::defaultValue( o, property );
}
-QMap<QString,QVariant>* MetaDataBase::fakeProperties( QObject* o )
+TQMap<TQString,TQVariant>* MetaDataBase::fakeProperties( TQObject* o )
{
setupDataBase();
MetaDataBaseRecord *r = db->find( (void*)o );
@@ -256,7 +256,7 @@ QMap<QString,QVariant>* 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<Connection>::Iterator it = r->connections.begin(); it != r->connections.end(); ++it ) {
+ for ( TQValueList<Connection>::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::Connection> MetaDataBase::connections( QObject *o )
+TQValueList<MetaDataBase::Connection> 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<Connection>();
+ return TQValueList<Connection>();
}
return r->connections;
}
-QValueList<MetaDataBase::Connection> MetaDataBase::connections( QObject *o, QObject *sender,
- QObject *receiver )
+TQValueList<MetaDataBase::Connection> 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<Connection>();
+ return TQValueList<Connection>();
}
- QValueList<Connection>::Iterator it = r->connections.begin();
- QValueList<Connection> ret;
- QValueList<Connection>::Iterator conn;
+ TQValueList<Connection>::Iterator it = r->connections.begin();
+ TQValueList<Connection> ret;
+ TQValueList<Connection>::Iterator conn;
while ( ( conn = it ) != r->connections.end() ) {
++it;
if ( (*conn).sender == sender &&
@@ -406,18 +406,18 @@ QValueList<MetaDataBase::Connection> MetaDataBase::connections( QObject *o, QObj
return ret;
}
-QValueList<MetaDataBase::Connection> MetaDataBase::connections( QObject *o, QObject *object )
+TQValueList<MetaDataBase::Connection> 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<Connection>();
+ return TQValueList<Connection>();
}
- QValueList<Connection>::Iterator it = r->connections.begin();
- QValueList<Connection> ret;
- QValueList<Connection>::Iterator conn;
+ TQValueList<Connection>::Iterator it = r->connections.begin();
+ TQValueList<Connection> ret;
+ TQValueList<Connection>::Iterator conn;
while ( ( conn = it ) != r->connections.end() ) {
++it;
if ( (*conn).sender == object ||
@@ -427,7 +427,7 @@ QValueList<MetaDataBase::Connection> 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<Connection>::Iterator it = r->connections.begin();
+ TQObject *sender = 0, *receiver = 0;
+ TQObjectList *l = 0;
+ TQValueList<Connection>::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<MetaDataBase::Slot>::Iterator it = r->slotList.find( s );
+ TQValueList<MetaDataBase::Slot>::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<Slot> &slotList )
+void MetaDataBase::setSlotList( TQObject *o, const TQValueList<Slot> &slotList )
{
setupDataBase();
MetaDataBaseRecord *r = db->find( (void*)o );
@@ -519,8 +519,8 @@ void MetaDataBase::setSlotList( QObject *o, const QValueList<Slot> &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<Slot>::Iterator it = r->slotList.begin(); it != r->slotList.end(); ++it ) {
+ for ( TQValueList<Slot>::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<Slot>::Iterator it = r->slotList.begin(); it != r->slotList.end(); ++it ) {
+ for ( TQValueList<Slot>::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::Slot> MetaDataBase::slotList( QObject *o )
+TQValueList<MetaDataBase::Slot> 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<Slot>();
+ return TQValueList<Slot>();
}
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<Connection> conns = connections( o );
- for ( QValueList<Connection>::Iterator it = conns.begin(); it != conns.end(); ++it ) {
+ TQValueList<Connection> conns = connections( o );
+ for ( TQValueList<Connection>::Iterator it = conns.begin(); it != conns.end(); ++it ) {
if ( (*it).slot == slot )
return true;
}
return false;
}
-void MetaDataBase::changeSlot( QObject *o, const QCString &slot, const QCString &newName )
+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<Slot>::Iterator it = r->slotList.begin(); it != r->slotList.end(); ++it ) {
+ for ( TQValueList<Slot>::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<Slot>::Iterator it = r->slotList.begin(); it != r->slotList.end(); ++it ) {
+ for ( TQValueList<Slot>::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<Slot>::Iterator it = w->lstSlots.begin(); it != w->lstSlots.end(); ++it ) {
- QCString s = (*it).slot;
+ for ( TQValueList<Slot>::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<Slot>::Iterator it = r->slotList.begin(); it != r->slotList.end(); ++it ) {
+ for ( TQValueList<Slot>::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<Slot>::Iterator it = r->slotList.begin(); it != r->slotList.end(); ++it ) {
+ for ( TQValueList<Slot>::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<QCString>::ConstIterator it = wid->lstSignals.begin(); it != wid->lstSignals.end(); ++it ) {
+ for ( TQValueList<TQCString>::ConstIterator it = wid->lstSignals.begin(); it != wid->lstSignals.end(); ++it ) {
if ( !w->hasSignal( *it ) )
w->lstSignals.append( *it );
}
- for ( QValueList<Slot>::ConstIterator it2 = wid->lstSlots.begin(); it2 != wid->lstSlots.end(); ++it2 ) {
+ for ( TQValueList<Slot>::ConstIterator it2 = wid->lstSlots.begin(); it2 != wid->lstSlots.end(); ++it2 ) {
if ( !w->hasSlot( MetaDataBase::normalizeSlot( (*it2).slot ).latin1() ) )
w->lstSlots.append( *it2 );
}
- for ( QValueList<Property>::ConstIterator it3 = wid->lstProperties.begin(); it3 != wid->lstProperties.end(); ++it3 ) {
+ for ( TQValueList<Property>::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::CustomWidget> *MetaDataBase::customWidgets()
+TQPtrList<MetaDataBase::CustomWidget> *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<Include> &incs )
+void MetaDataBase::setIncludes( TQObject *o, const TQValueList<Include> &incs )
{
setupDataBase();
MetaDataBaseRecord *r = db->find( (void*)o );
@@ -815,20 +815,20 @@ void MetaDataBase::setIncludes( QObject *o, const QValueList<Include> &incs )
r->includes = incs;
}
-QValueList<MetaDataBase::Include> MetaDataBase::includes( QObject *o )
+TQValueList<MetaDataBase::Include> 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<Include>();
+ return TQValueList<Include>();
}
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<QCString>::ConstIterator it = lstSignals.begin(); it != lstSignals.end(); ++it ) {
+ for ( TQValueList<TQCString>::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<MetaDataBase::Slot>::ConstIterator it = lstSlots.begin(); it != lstSlots.end(); ++it ) {
+ for ( TQValueList<MetaDataBase::Slot>::ConstIterator it = lstSlots.begin(); it != lstSlots.end(); ++it ) {
if ( normalizeSlot( (*it).slot ) == normalizeSlot( slot ) )
return true;
}
return false;
}
-bool MetaDataBase::CustomWidget::hasProperty( const QCString &prop ) const
+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<MetaDataBase::Property>::ConstIterator it = lstProperties.begin(); it != lstProperties.end(); ++it ) {
+ for ( TQValueList<MetaDataBase::Property>::ConstIterator it = lstProperties.begin(); it != lstProperties.end(); ++it ) {
if ( (*it).property == prop )
return true;
}
return false;
}
-void MetaDataBase::setPixmapArgument( QObject *o, int pixmap, const QString &arg )
+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<QString, QString> &columnFields )
+void MetaDataBase::setColumnFields( TQObject *o, const TQMap<TQString, TQString> &columnFields )
{
if ( !o )
return;
@@ -1152,37 +1152,37 @@ void MetaDataBase::setColumnFields( QObject *o, const QMap<QString, QString> &co
r->columnFields = columnFields;
}
-QMap<QString, QString> MetaDataBase::columnFields( QObject *o )
+TQMap<TQString, TQString> MetaDataBase::columnFields( TQObject *o )
{
if ( !o )
- return QMap<QString, QString>();
+ return TQMap<TQString, TQString>();
setupDataBase();
MetaDataBaseRecord *r = db->find( (void*)o );
if ( !r ) {
qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
o, o->name(), o->className() );
- return QMap<QString, QString>();
+ return TQMap<TQString, TQString>();
}
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<QWidget> it( *( (FormWindow*)o )->widgets() ); it.current(); ++it )
+ for ( TQPtrDictIterator<TQWidget> it( *( (FormWindow*)o )->widgets() ); it.current(); ++it )
db->remove( (void*)it.current() );
}
-void MetaDataBase::setExportMacro( QObject *o, const QString &macro )
+void MetaDataBase::setExportMacro( TQObject *o, const TQString &macro )
{
if ( !o )
return;
@@ -1197,7 +1197,7 @@ void MetaDataBase::setExportMacro( QObject *o, const QString &macro )
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 <qvariant.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qmap.h>
-#include <qptrlist.h>
-#include <qsizepolicy.h>
-#include <qsize.h>
-#include <qwidgetlist.h>
-#include <qcursor.h>
+#include <tqvariant.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqmap.h>
+#include <tqptrlist.h>
+#include <tqsizepolicy.h>
+#include <tqsize.h>
+#include <tqwidgetlist.h>
+#include <tqcursor.h>
#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<QCString> lstSignals;
- QValueList<Slot> lstSlots;
- QValueList<Property> lstProperties;
+ TQSize sizeHint;
+ TQSizePolicy sizePolicy;
+ TQPixmap *pixmap;
+ TQValueList<TQCString> lstSignals;
+ TQValueList<Slot> lstSlots;
+ TQValueList<Property> 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<QString,QVariant>* fakeProperties( QObject* o );
-
- static void setSpacing( QObject *o, int spacing );
- static int spacing( QObject *o );
- static void setMargin( QObject *o, int margin );
- static int margin( QObject *o );
-
- static void addConnection( QObject *o, QObject *sender, const QCString &signal,
- QObject *receiver, const QCString &slot );
- static void removeConnection( QObject *o, QObject *sender, const QCString &signal,
- QObject *receiver, const QCString &slot );
- static QValueList<Connection> connections( QObject *o );
- static QValueList<Connection> connections( QObject *o, QObject *sender, QObject *receiver );
- static QValueList<Connection> connections( QObject *o, QObject *object );
- static void doConnections( QObject *o );
-
- static void addSlot( QObject *o, const QCString &slot, const QString& specifier, const QString &access, const QString &language, const QString &returnType );
- static void removeSlot( QObject *o, const QCString &slot, const QString& specifier, const QString &access, const QString &language, const QString &returnType );
- static void removeSlot( QObject *o, const QString &slot );
- static QValueList<Slot> slotList( QObject *o );
- static bool isSlotUsed( QObject *o, const QCString &slot );
- static bool hasSlot( QObject *o, const QCString &slot, bool onlyCustom = FALSE );
- static void changeSlot( QObject *o, const QCString &slot, const QCString &newName );
- static void changeSlotAttributes( QObject *o, const QCString &slot,
- const QString& specifier, const QString &access,
- const QString &language, const QString &returnType );
- static QString languageOfSlot( QObject *o, const QCString &slot );
- static void setSlotList( QObject *o, const QValueList<Slot> &slotList );
+ static 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<TQString,TQVariant>* 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<Connection> connections( TQObject *o );
+ static TQValueList<Connection> connections( TQObject *o, TQObject *sender, TQObject *receiver );
+ static TQValueList<Connection> 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<Slot> 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<Slot> &slotList );
static bool addCustomWidget( CustomWidget *w );
static void removeCustomWidget( CustomWidget *w );
- static QPtrList<CustomWidget> *customWidgets();
+ static TQPtrList<CustomWidget> *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<Include> &incs );
- static QValueList<Include> includes( QObject *o );
+ static void setIncludes( TQObject *o, const TQValueList<Include> &incs );
+ static TQValueList<Include> 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<QString, QString> &columnFields );
- static QMap<QString, QString> columnFields( QObject *o );
+ static void setColumnFields( TQObject *o, const TQMap<TQString, TQString> &columnFields );
+ static TQMap<TQString, TQString> 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 &macro );
- static QString exportMacro( QObject *o );
+ static void setExportMacro( TQObject *o, const TQString &macro );
+ 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 <qmultilineedit.h>
-#include <qpushbutton.h>
+#include <tqmultilineedit.h>
+#include <tqpushbutton.h>
#include <klocale.h>
-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 <qiconview.h>
-#include <qlabel.h>
-#include <qfileinfo.h>
-#include <qdir.h>
-#include <qregexp.h>
-#include <qpushbutton.h>
+#include <tqiconview.h>
+#include <tqlabel.h>
+#include <tqfileinfo.h>
+#include <tqdir.h>
+#include <tqregexp.h>
+#include <tqpushbutton.h>
#include <stdlib.h>
-#include <qcombobox.h>
-#include <qworkspace.h>
-#include <qmessagebox.h>
+#include <tqcombobox.h>
+#include <tqworkspace.h>
+#include <tqmessagebox.h>
#include <klocale.h>
#include <kglobal.h>
@@ -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 <qiconview.h>
+#include <tqiconview.h>
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<QIconViewItem> allItems;
+ TQPtrList<TQIconViewItem> 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 <qvariant.h> // HP-UX compiler need this here
+#include <tqvariant.h> // HP-UX compiler need this here
#include "orderindicator.h"
#include "formwindow.h"
-#include <qpainter.h>
-#include <qbitmap.h>
-#include <qapplication.h>
+#include <tqpainter.h>
+#include <tqbitmap.h>
+#include <tqapplication.h>
-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 <qwidget.h>
+#include <tqwidget.h>
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 <qcheckbox.h>
-#include <qcombobox.h>
-#include <qapplication.h>
-#include <qpushbutton.h>
-#include <qlistbox.h>
-#include <qpainter.h>
-#include <qgroupbox.h>
+#include <tqcheckbox.h>
+#include <tqcombobox.h>
+#include <tqapplication.h>
+#include <tqpushbutton.h>
+#include <tqlistbox.h>
+#include <tqpainter.h>
+#include <tqgroupbox.h>
/*!
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 <qcheckbox.h>
-#include <qcombobox.h>
-#include <qapplication.h>
-#include <qpushbutton.h>
+#include <tqcheckbox.h>
+#include <tqcombobox.h>
+#include <tqapplication.h>
+#include <tqpushbutton.h>
-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 <qobject.h>
-#include <qstringlist.h>
+#include <tqobject.h>
+#include <tqstringlist.h>
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 <qstring.h>
+#include <tqstring.h>
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 <qcstring.h>
-#include <qdict.h>
+#include <tqcstring.h>
+#include <tqdict.h>
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<QByteArray> dict;
- QByteArray* ba = dict.find( name );
+ static TQDict<TQByteArray> 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 <qvariant.h> // HP-UX compiler needs this here
+#include <tqvariant.h> // HP-UX compiler needs this here
#include "pixmapchooser.h"
#include "formwindow.h"
@@ -37,13 +37,13 @@
#include "project.h"
#endif
-#include <qapplication.h>
-#include <qimage.h>
-#include <qpainter.h>
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qpushbutton.h>
-#include <qiconview.h>
+#include <tqapplication.h>
+#include <tqimage.h>
+#include <tqpainter.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
+#include <tqpushbutton.h>
+#include <tqiconview.h>
#include <klocale.h>
@@ -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 <qfiledialog.h>
-#include <qscrollview.h>
-#include <qpixmap.h>
-#include <qurl.h>
+#include <tqfiledialog.h>
+#include <tqscrollview.h>
+#include <tqpixmap.h>
+#include <tqurl.h>
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 <qvbox.h>
-#include <qpainter.h>
+#include <tqvbox.h>
+#include <tqpainter.h>
#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 <qvbox.h>
-#include <qworkspace.h>
+#include <tqvbox.h>
+#include <tqworkspace.h>
#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 <qvariant.h> // HP-UX compiler needs this here
+#include <tqvariant.h> // HP-UX compiler needs this here
#include "propertyeditor.h"
#include "pixmapchooser.h"
@@ -40,38 +40,38 @@
#include <limits.h>
-#include <qpainter.h>
-#include <qpalette.h>
-#include <qapplication.h>
-#include <qheader.h>
-#include <qlineedit.h>
-#include <qstrlist.h>
-#include <qmetaobject.h>
-#include <qcombobox.h>
-#include <qpushbutton.h>
-#include <qhbox.h>
-#include <qfontdialog.h>
-#include <qspinbox.h>
-#include <qevent.h>
-#include <qobjectlist.h>
-#include <qlistbox.h>
-#include <qfontdatabase.h>
-#include <qcolor.h>
+#include <tqpainter.h>
+#include <tqpalette.h>
+#include <tqapplication.h>
+#include <tqheader.h>
+#include <tqlineedit.h>
+#include <tqstrlist.h>
+#include <tqmetaobject.h>
+#include <tqcombobox.h>
+#include <tqpushbutton.h>
+#include <tqhbox.h>
+#include <tqfontdialog.h>
+#include <tqspinbox.h>
+#include <tqevent.h>
+#include <tqobjectlist.h>
+#include <tqlistbox.h>
+#include <tqfontdatabase.h>
+#include <tqcolor.h>
#include <kcolordialog.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qsizepolicy.h>
-#include <qbitmap.h>
-#include <qtooltip.h>
-#include <qwhatsthis.h>
-#include <qaccel.h>
-#include <qworkspace.h>
-#include <qtimer.h>
-#include <qdragobject.h>
-#include <qdom.h>
-#include <qprocess.h>
-#include <qstyle.h>
-#include <qdatetimeedit.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqsizepolicy.h>
+#include <tqbitmap.h>
+#include <tqtooltip.h>
+#include <tqwhatsthis.h>
+#include <tqaccel.h>
+#include <tqworkspace.h>
+#include <tqtimer.h>
+#include <tqdragobject.h>
+#include <tqdom.h>
+#include <tqprocess.h>
+#include <tqstyle.h>
+#include <tqdatetimeedit.h>
#include "pics/arrow.xbm"
#include "pics/uparrow.xbm"
@@ -90,8 +90,8 @@
#include <klocale.h>
-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<QString, bool> unique;
- QObject *w = editor->widget();
- QStringList valueSet;
+ TQMap<TQString, bool> 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<char> 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<char> 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<MetaDataBase::Property>::Iterator it = cw->lstProperties.begin(); it != cw->lstProperties.end(); ++it ) {
- if ( unique.contains( QString( (*it).property ) ) )
+ for ( TQValueList<MetaDataBase::Property>::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<QString, QString>::Iterator it;
+ TQString s;
+ s = TQString( mo->className() ) + "::" + prop;
+ TQMap<TQString, TQString>::Iterator it;
if ( ( it = propertyDocs.find( s ) ) != propertyDocs.end() ) {
return *it;
}
mo = mo->superClass();
}
- return i18n("<p><b>QWidget::%1</b></p><p>There is no documentation available for this property.</p>" ).arg( prop );
+ return i18n("<p><b>TQWidget::%1</b></p><p>There is no documentation available for this property.</p>" ).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<MetaDataBase::EventDescription> events =
+ TQValueList<MetaDataBase::EventDescription> 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<MetaDataBase::EventDescription>::Iterator it = events.begin(); it != events.end(); ++it ) {
+ for ( TQValueList<MetaDataBase::EventDescription>::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<MetaDataBase::Connection> conns =
+ TQValueList<MetaDataBase::Connection> conns =
MetaDataBase::connections( formWindow, editor->widget(), formWindow->mainContainer() );
- for ( QValueList<MetaDataBase::Connection>::Iterator cit = conns.begin(); cit != conns.end(); ++cit ) {
- if ( MetaDataBase::normalizeSlot( QString( (*cit).signal ) ) !=
- MetaDataBase::normalizeSlot( QString( it.current() ) ) )
+ for ( TQValueList<MetaDataBase::Connection>::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 <qfeatures.h>
-#include <qvariant.h>
-#include <qlistview.h>
-#include <qptrlist.h>
-#include <qguardedptr.h>
-#include <qtabwidget.h>
-#include <qmodules.h>
+#include <tqfeatures.h>
+#include <tqvariant.h>
+#include <tqlistview.h>
+#include <tqptrlist.h>
+#include <tqguardedptr.h>
+#include <tqtabwidget.h>
+#include <tqmodules.h>
#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<PropertyItem> children;
- QColor backColor;
- QPushButton *resetButton;
+ TQString propertyName;
+ TQPtrList<PropertyItem> 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<QLineEdit> lin;
- QGuardedPtr<QHBox> box;
- QPushButton *button;
+ TQLineEdit *lined();
+ TQGuardedPtr<TQLineEdit> lin;
+ TQGuardedPtr<TQHBox> 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<QComboBox> comb;
+ TQComboBox *combo();
+ TQGuardedPtr<TQComboBox> 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<QSpinBox> spinBx;
+ TQSpinBox *spinBox();
+ TQGuardedPtr<TQSpinBox> 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<QLineEdit> lin;
+ TQLineEdit *lined();
+ TQGuardedPtr<TQLineEdit> 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<QComboBox> comb;
+ TQComboBox *combo();
+ TQGuardedPtr<TQComboBox> 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<QLineEdit> lined;
- QGuardedPtr<QPushButton> button;
- QGuardedPtr<QHBox> box;
+ TQGuardedPtr<TQLineEdit> lined;
+ TQGuardedPtr<TQPushButton> button;
+ TQGuardedPtr<TQHBox> 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<QLineEdit> lin;
+ TQLineEdit *lined();
+ TQGuardedPtr<TQLineEdit> 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<QHBox> box;
- QGuardedPtr<QFrame> colorPrev;
- QGuardedPtr<QPushButton> button;
+ TQGuardedPtr<TQHBox> box;
+ TQGuardedPtr<TQFrame> colorPrev;
+ TQGuardedPtr<TQPushButton> 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<QHBox> box;
- QGuardedPtr<QLabel> pixPrev;
- QPushButton *button;
+ TQGuardedPtr<TQHBox> box;
+ TQGuardedPtr<TQLabel> 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<QLineEdit> lin;
+ TQLineEdit *lined();
+ TQGuardedPtr<TQLineEdit> 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<QHBox> box;
- QGuardedPtr<QLabel> palettePrev;
- QGuardedPtr<QPushButton> button;
+ TQGuardedPtr<TQHBox> box;
+ TQGuardedPtr<TQLabel> palettePrev;
+ TQGuardedPtr<TQPushButton> 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<QComboBox> comb;
+ TQComboBox *combo();
+ TQGuardedPtr<TQComboBox> 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<QLineEdit> lined;
- QGuardedPtr<QPushButton> button;
- QGuardedPtr<QHBox> box;
+ TQGuardedPtr<TQLineEdit> lined;
+ TQGuardedPtr<TQPushButton> button;
+ TQGuardedPtr<TQHBox> 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<QString, QString> propertyDocs;
+ TQMap<TQString, TQString> 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<QDateEdit> lin;
+ TQGuardedPtr<QDateEdit> 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<QTimeEdit> lin;
+ TQGuardedPtr<QTimeEdit> 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<QDateTimeEdit> lin;
+ TQGuardedPtr<QDateTimeEdit> 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 <qlistbox.h>
-#include <qsizegrip.h>
-#include <qapplication.h>
-#include <qvbox.h>
+#include <tqlistbox.h>
+#include <tqsizegrip.h>
+#include <tqapplication.h>
+#include <tqvbox.h>
-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 <qlineedit.h>
-#include <qstringlist.h>
+#include <tqlineedit.h>
+#include <tqstringlist.h>
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 <qmenudata.h>
+#include <tqmenudata.h>
#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 <qfeatures.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qobject.h>
-#include <qwidget.h>
-#include <qobjectlist.h>
-#include <qmetaobject.h>
-#include <qworkspace.h>
-#include <qtabwidget.h>
-#include <qapplication.h>
-#include <qbuffer.h>
-#include <qlayout.h>
-#include <qtooltip.h>
-#include <qwhatsthis.h>
-#include <qlistbox.h>
-#include <qcombobox.h>
-#include <qwidgetstack.h>
-#include <qtabbar.h>
-#include <qheader.h>
-#include <qlistview.h>
-#include <qiconview.h>
-#include <qlabel.h>
-#include <qwizard.h>
-#include <qtextcodec.h>
-#include <qregexp.h>
+#include <tqfeatures.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqobject.h>
+#include <tqwidget.h>
+#include <tqobjectlist.h>
+#include <tqmetaobject.h>
+#include <tqworkspace.h>
+#include <tqtabwidget.h>
+#include <tqapplication.h>
+#include <tqbuffer.h>
+#include <tqlayout.h>
+#include <tqtooltip.h>
+#include <tqwhatsthis.h>
+#include <tqlistbox.h>
+#include <tqcombobox.h>
+#include <tqwidgetstack.h>
+#include <tqtabbar.h>
+#include <tqheader.h>
+#include <tqlistview.h>
+#include <tqiconview.h>
+#include <tqlabel.h>
+#include <tqwizard.h>
+#include <tqtextcodec.h>
+#include <tqregexp.h>
#include <zlib.h>
-#include <qdatetime.h>
+#include <tqdatetime.h>
#ifndef QT_NO_TABLE
-#include <qtable.h>
+#include <tqtable.h>
#endif
#include <klocale.h>
-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( "&" ), "&amp;" );
- s2 = s2.replace( QRegExp( ">" ), "&gt;" );
- s2 = s2.replace( QRegExp( "<" ), "&lt;" );
+ TQString s2 = s;
+ s2 = s2.replace( TQRegExp( "&" ), "&amp;" );
+ s2 = s2.replace( TQRegExp( ">" ), "&gt;" );
+ s2 = s2.replace( TQRegExp( "<" ), "&lt;" );
if ( attribute ) {
- s2 = s2.replace( QRegExp( "\"" ), "&quot;" );
- s2 = s2.replace( QRegExp( "'" ), "&apos;" );
+ s2 = s2.replace( TQRegExp( "\"" ), "&quot;" );
+ s2 = s2.replace( TQRegExp( "'" ), "&apos;" );
}
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 << "<!DOCTYPE UI><UI version=\"3.0\" stdsetdef=\"1\">" << endl;
saveMetaInfoBefore( ts, 0 );
saveObject( formwindow->mainContainer(), 0, ts, 0 );
- if ( formwindow->mainContainer()->inherits( "QMainWindow" ) ) {
- saveMenuBar( (QMainWindow*)formwindow->mainContainer(), ts, 0 );
- saveToolBars( (QMainWindow*)formwindow->mainContainer(), ts, 0 );
+ if ( 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 << "<!DOCTYPE UI-SELECTION><UI-SELECTION>" << endl;
- QWidgetList widgets = formwindow->selectedWidgets();
- QWidgetList tmp( widgets );
- for ( QWidget *w = widgets.first(); w; w = widgets.next() ) {
- QWidget *p = w->parentWidget();
+ 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<QToolBox*>(obj) ) {
- QToolBox* tb = (QToolBox*)obj;
+ if ( ::qt_cast<TQToolBox*>(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 ) << "</property>" << endl;
ts << makeIndent( indent ) << "<property name=\"backgroundMode\">" << endl;
indent++;
- saveEnumProperty( w, "backgroundMode", QVariant::Invalid, ts, indent );
+ saveEnumProperty( w, "backgroundMode", TQVariant::Invalid, ts, indent );
indent--;
ts << makeIndent( indent ) << "</property>" << endl;
ts << makeIndent( indent ) << "<attribute name=\"label\">" << endl;
@@ -678,9 +678,9 @@ void Resource::saveObject( QObject *obj, QDesignerGridLayout* grid, QTextStream
ts << makeIndent( indent ) << "</widget>" << endl;
}
}
- else if ( obj->inherits( "QWizard" ) ) {
- QWizard* wiz = (QWizard*)obj; for ( int i = 0; i < wiz->pageCount(); ++i ) {
- QWidget *w = wiz->page( i );
+ 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 ) << "</widget>" << 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 ) << "<item>" << endl;
indent++;
- QStringList text;
+ TQStringList text;
text << i->text();
- QPtrList<QPixmap> pixmaps;
+ TQPtrList<TQPixmap> pixmaps;
if ( i->pixmap() )
pixmaps.append( i->pixmap() );
saveItem( text, pixmaps, ts, indent );
indent--;
ts << makeIndent( indent ) << "</item>" << endl;
}
- } else if ( obj->inherits( "QIconView" ) ) {
- QIconView *iv = (QIconView*)obj;
+ } 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 ) << "<item>" << endl;
indent++;
- QStringList text;
+ TQStringList text;
text << i->text();
- QPtrList<QPixmap> pixmaps;
+ TQPtrList<TQPixmap> pixmaps;
if ( i->pixmap() )
pixmaps.append( i->pixmap() );
saveItem( text, pixmaps, ts, indent );
indent--;
ts << makeIndent( indent ) << "</item>" << endl;
}
- } else if ( obj->inherits( "QListView" ) ) {
- QListView *lv = (QListView*)obj;
+ } else if ( obj->inherits( "TQListView" ) ) {
+ TQListView *lv = (TQListView*)obj;
int i;
for ( i = 0; i < lv->header()->count(); ++i ) {
ts << makeIndent( indent ) << "<column>" << endl;
indent++;
- QStringList l;
+ TQStringList l;
l << lv->header()->label( i );
- QPtrList<QPixmap> pix;
+ TQPtrList<TQPixmap> 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 ) << "<property name=\"clickable\">" << 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<QString, QString> columnFields = MetaDataBase::columnFields( table );
- bool isDataTable = table->inherits( "QDataTable" );
+ TQMap<TQString, TQString> 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 ) << "<column>" << endl;
indent++;
- QStringList l;
+ TQStringList l;
l << table->horizontalHeader()->label( i );
- QPtrList<QPixmap> pix;
+ TQPtrList<TQPixmap> 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 ) << "<property name=\"field\">" << endl;
indent++;
ts << makeIndent( indent ) << "<string>" << entitize( *columnFields.find( l[ 0 ] ) ) << "</string>" << endl;
@@ -815,12 +815,12 @@ void Resource::saveItems( QObject *obj, QTextStream &ts, int indent )
table->verticalHeader()->iconSet( i ) ) {
ts << makeIndent( indent ) << "<row>" << endl;
indent++;
- QStringList l;
+ TQStringList l;
l << table->verticalHeader()->label( i );
- QPtrList<QPixmap> pix;
+ TQPtrList<TQPixmap> 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 ) << "</row>" << 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 ) << "<item>" << endl;
indent++;
- QPtrList<QPixmap> pixmaps;
- QStringList textes;
+ TQPtrList<TQPixmap> 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 + "></" + tagname + ">" << endl;
@@ -873,39 +873,39 @@ void Resource::savePixmap( const QPixmap &p, QTextStream &ts, int indent, const
<< "</" + tagname + ">" << 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<QPixmap> &pixmaps, QTextStream &ts, int indent )
+void Resource::saveItem( const TQStringList &text, const TQPtrList<TQPixmap> &pixmaps, TQTextStream &ts, int indent )
{
- QStringList::ConstIterator it = text.begin();
+ TQStringList::ConstIterator it = text.begin();
for ( ; it != text.end(); ++it ) {
ts << makeIndent( indent ) << "<property name=\"text\">" << endl;
indent++;
@@ -915,33 +915,33 @@ void Resource::saveItem( const QStringList &text, const QPtrList<QPixmap> &pixma
}
for ( int i = 0; i < (int)pixmaps.count(); ++i ) {
- QPixmap *p = ( (QPtrList<QPixmap>)pixmaps ).at( i );
+ TQPixmap *p = ( (TQPtrList<TQPixmap>)pixmaps ).at( i );
ts << makeIndent( indent ) << "<property name=\"pixmap\">" << endl;
indent++;
if ( p )
savePixmap( *p, ts, indent );
else
- savePixmap( QPixmap(), ts, indent );
+ savePixmap( TQPixmap(), ts, indent );
indent--;
ts << makeIndent( indent ) << "</property>" << 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 ) + "</hbox>";
@@ -969,7 +969,7 @@ void Resource::saveChildrenOf( QObject* obj, QTextStream &ts, int indent )
}
- for ( QPtrListIterator<QObject> it ( *l ); it.current(); ++it )
+ for ( TQPtrListIterator<TQObject> 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<char> it( lst ); it.current(); ++it ) {
- if ( changed.find( QString::fromLatin1( it.current() ) ) == changed.end() )
+ TQStrList lst = w->metaObject()->propertyNames( !w->inherits( "Spacer" ) );
+ for ( TQPtrListIterator<char> 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 ) << "</property>" << endl;
}
if ( w->isWidgetType() && MetaDataBase::fakeProperties( w ) ) {
- QMap<QString, QVariant>* fakeProperties = MetaDataBase::fakeProperties( w );
- for ( QMap<QString, QVariant>::Iterator fake = fakeProperties->begin();
+ TQMap<TQString, TQVariant>* fakeProperties = MetaDataBase::fakeProperties( w );
+ for ( TQMap<TQString, TQVariant>::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 ) << "<set>" << v << "</set>" << 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 ) << "<enum>" << p->valueToKey( w->property( name ).toInt() ) << "</enum>" << endl;
}
-void Resource::saveProperty( QObject *w, const QString &name, const QVariant &value, QVariant::Type t, QTextStream &ts, int indent )
+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 ) << "<string>" << entitize( value.toString() ) << "</string>" << endl;
if ( !comment.isEmpty() )
ts << makeIndent( indent ) << "<comment>" << entitize( comment ) << "</comment>" << endl;
break;
- case QVariant::CString:
+ case TQVariant::CString:
ts << makeIndent( indent ) << "<cstring>" << entitize( value.toCString() ).latin1() << "</cstring>" << endl;
break;
- case QVariant::Bool:
+ case TQVariant::Bool:
ts << makeIndent( indent ) << "<bool>" << mkBool( value.toBool() ) << "</bool>" << 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 ) << "<number>" << QString::number( num ) << "</number>" << endl;
+ ts << makeIndent( indent ) << "<number>" << TQString::number( num ) << "</number>" << endl;
break;
- case QVariant::Double:
+ case TQVariant::Double:
dob = value.toDouble();
- ts << makeIndent( indent ) << "<number>" << QString::number( dob ) << "</number>" << endl;
+ ts << makeIndent( indent ) << "<number>" << TQString::number( dob ) << "</number>" << endl;
break;
- case QVariant::KeySequence:
+ case TQVariant::KeySequence:
num = value.toInt();
- ts << makeIndent( indent ) << "<number>" << QString::number( num ) << "</number>" << endl;
+ ts << makeIndent( indent ) << "<number>" << TQString::number( num ) << "</number>" << 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 ) << "<number>" << QString::number( unum ) << "</number>" << endl;
+ ts << makeIndent( indent ) << "<number>" << TQString::number( unum ) << "</number>" << endl;
break;
- case QVariant::Rect: {
- QVariant v( value );
+ case TQVariant::Rect: {
+ TQVariant v( value );
ts << makeIndent( indent ) << "<rect>" << endl;
indent++;
- ts << makeIndent( indent ) << "<x>" << QString::number( v.toRect().x() ) << "</x>" << endl;
- ts << makeIndent( indent ) << "<y>" << QString::number( v.toRect().y() ) << "</y>" << endl;
- ts << makeIndent( indent ) << "<width>" << QString::number( v.toRect().width() ) << "</width>" << endl;
- ts << makeIndent( indent ) << "<height>" << QString::number( v.toRect().height() ) << "</height>" << endl;
+ ts << makeIndent( indent ) << "<x>" << TQString::number( v.toRect().x() ) << "</x>" << endl;
+ ts << makeIndent( indent ) << "<y>" << TQString::number( v.toRect().y() ) << "</y>" << endl;
+ ts << makeIndent( indent ) << "<width>" << TQString::number( v.toRect().width() ) << "</width>" << endl;
+ ts << makeIndent( indent ) << "<height>" << TQString::number( v.toRect().height() ) << "</height>" << endl;
indent--;
ts << makeIndent( indent ) << "</rect>" << endl;
} break;
- case QVariant::Point: {
- QVariant v( value );
+ case TQVariant::Point: {
+ TQVariant v( value );
ts << makeIndent( indent ) << "<point>" << endl;
indent++;
- ts << makeIndent( indent ) << "<x>" << QString::number( v.toPoint().x() ) << "</x>" << endl;
- ts << makeIndent( indent ) << "<y>" << QString::number( v.toPoint().y() ) << "</y>" << endl;
+ ts << makeIndent( indent ) << "<x>" << TQString::number( v.toPoint().x() ) << "</x>" << endl;
+ ts << makeIndent( indent ) << "<y>" << TQString::number( v.toPoint().y() ) << "</y>" << endl;
indent--;
ts << makeIndent( indent ) << "</point>" << endl;
} break;
- case QVariant::Size: {
- QVariant v( value );
+ case TQVariant::Size: {
+ TQVariant v( value );
ts << makeIndent( indent ) << "<size>" << endl;
indent++;
- ts << makeIndent( indent ) << "<width>" << QString::number( v.toSize().width() ) << "</width>" << endl;
- ts << makeIndent( indent ) << "<height>" << QString::number( v.toSize().height() ) << "</height>" << endl;
+ ts << makeIndent( indent ) << "<width>" << TQString::number( v.toSize().width() ) << "</width>" << endl;
+ ts << makeIndent( indent ) << "<height>" << TQString::number( v.toSize().height() ) << "</height>" << endl;
indent--;
ts << makeIndent( indent ) << "</size>" << endl;
} break;
- case QVariant::Color: {
- QVariant v( value );
+ case TQVariant::Color: {
+ TQVariant v( value );
ts << makeIndent( indent ) << "<color>" << endl;
indent++;
saveColor( ts, indent, v.toColor() );
indent--;
ts << makeIndent( indent ) << "</color>" << endl;
} break;
- case QVariant::Font: {
- QVariant v( value );
+ case TQVariant::Font: {
+ TQVariant v( value );
ts << makeIndent( indent ) << "<font>" << endl;
- QFont f( qApp->font() );
- if ( w && w->isWidgetType() && ((QWidget*)w)->parentWidget() )
- f = ((QWidget*)w)->parentWidget()->font();
- QFont f2( v.toFont() );
+ 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 ) << "<family>" << f2.family() << "</family>" << endl;
if ( f.pointSize() != f2.pointSize() )
- ts << makeIndent( indent ) << "<pointsize>" << QString::number( f2.pointSize() ) << "</pointsize>" << endl;
+ ts << makeIndent( indent ) << "<pointsize>" << TQString::number( f2.pointSize() ) << "</pointsize>" << endl;
if ( f.bold() != f2.bold() )
- ts << makeIndent( indent ) << "<bold>" << QString::number( (int)f2.bold() ) << "</bold>" << endl;
+ ts << makeIndent( indent ) << "<bold>" << TQString::number( (int)f2.bold() ) << "</bold>" << endl;
if ( f.italic() != f2.italic() )
- ts << makeIndent( indent ) << "<italic>" << QString::number( (int)f2.italic() ) << "</italic>" << endl;
+ ts << makeIndent( indent ) << "<italic>" << TQString::number( (int)f2.italic() ) << "</italic>" << endl;
if ( f.underline() != f2.underline() )
- ts << makeIndent( indent ) << "<underline>" << QString::number( (int)f2.underline() ) << "</underline>" << endl;
+ ts << makeIndent( indent ) << "<underline>" << TQString::number( (int)f2.underline() ) << "</underline>" << endl;
if ( f.strikeOut() != f2.strikeOut() )
- ts << makeIndent( indent ) << "<strikeout>" << QString::number( (int)f2.strikeOut() ) << "</strikeout>" << endl;
+ ts << makeIndent( indent ) << "<strikeout>" << TQString::number( (int)f2.strikeOut() ) << "</strikeout>" << endl;
indent--;
ts << makeIndent( indent ) << "</font>" << endl;
} break;
- case QVariant::SizePolicy: {
- QSizePolicy sp( value.toSizePolicy() );
+ case TQVariant::SizePolicy: {
+ TQSizePolicy sp( value.toSizePolicy() );
ts << makeIndent( indent ) << "<sizepolicy>" << endl;
indent++;
ts << makeIndent( indent ) << "<hsizetype>" << (int)sp.horData() << "</hsizetype>" << endl;
@@ -1204,17 +1204,17 @@ void Resource::saveProperty( QObject *w, const QString &name, const QVariant &va
ts << makeIndent( indent ) << "</sizepolicy>" << 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 ) << "<image>" << saveInCollection( value.toImage() ) << "</image>" << endl;
break;
- case QVariant::Palette: {
- QPalette p( value.toPalette() );
+ case TQVariant::Palette: {
+ TQPalette p( value.toPalette() );
ts << makeIndent( indent ) << "<palette>" << endl;
indent++;
@@ -1239,11 +1239,11 @@ void Resource::saveProperty( QObject *w, const QString &name, const QVariant &va
indent--;
ts << makeIndent( indent ) << "</palette>" << endl;
} break;
- case QVariant::Cursor:
+ case TQVariant::Cursor:
ts << makeIndent( indent ) << "<cursor>" << value.toCursor().shape() << "</cursor>" << endl;
break;
- case QVariant::StringList: {
- QStringList lst = value.toStringList();
+ case TQVariant::StringList: {
+ TQStringList lst = value.toStringList();
uint i = 0;
ts << makeIndent( indent ) << "<stringlist>" << endl;
indent++;
@@ -1254,8 +1254,8 @@ void Resource::saveProperty( QObject *w, const QString &name, const QVariant &va
indent--;
ts << makeIndent( indent ) << "</stringlist>" << endl;
} break;
- case QVariant::Date: {
- QDate d = value.toDate();
+ case TQVariant::Date: {
+ TQDate d = value.toDate();
ts << makeIndent( indent ) << "<date>" << endl;
indent++;
ts << makeIndent( indent ) << "<year>" << d.year() << "</year>" << endl;
@@ -1265,8 +1265,8 @@ void Resource::saveProperty( QObject *w, const QString &name, const QVariant &va
ts << makeIndent( indent ) << "</date>" << endl;
break;
}
- case QVariant::Time: {
- QTime t = value.toTime();
+ case TQVariant::Time: {
+ TQTime t = value.toTime();
ts << makeIndent( indent ) << "<time>" << endl;
indent++;
ts << makeIndent( indent ) << "<hour>" << t.hour() << "</hour>" << endl;
@@ -1276,8 +1276,8 @@ void Resource::saveProperty( QObject *w, const QString &name, const QVariant &va
ts << makeIndent( indent ) << "</time>" << endl;
break;
}
- case QVariant::DateTime: {
- QDateTime dt = value.toDateTime();
+ case TQVariant::DateTime: {
+ TQDateTime dt = value.toDateTime();
ts << makeIndent( indent ) << "<datetime>" << endl;
indent++;
ts << makeIndent( indent ) << "<year>" << dt.date().year() << "</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 ) << "<color>" << endl;
indent++;
- saveColor( ts, indent, cg.color( (QColorGroup::ColorRole)r ) );
+ saveColor( ts, indent, cg.color( (TQColorGroup::ColorRole)r ) );
indent--;
ts << makeIndent( indent ) << "</color>" << 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 ) << "<red>" << QString::number( c.red() ) << "</red>" << endl;
- ts << makeIndent( indent ) << "<green>" << QString::number( c.green() ) << "</green>" << endl;
- ts << makeIndent( indent ) << "<blue>" << QString::number( c.blue() ) << "</blue>" << endl;
+ ts << makeIndent( indent ) << "<red>" << TQString::number( c.red() ) << "</red>" << endl;
+ ts << makeIndent( indent ) << "<green>" << TQString::number( c.green() ) << "</green>" << endl;
+ ts << makeIndent( indent ) << "<blue>" << TQString::number( c.blue() ) << "</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<Dialog*>(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<QString, QString> fieldMap = MetaDataBase::columnFields( table );
+ TQString txt;
+ TQString field;
+ TQMap<TQString, TQString> 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<QPixmap> 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<TQPixmap> 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<Image>::Iterator it = images.begin();
+ TQString imgName = "none";
+ TQValueList<Image>::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 ) << "<data format=\"XPM.GZ\" length=\"" << ba.size() << "\">";
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 << "</data>" << endl;
}
-void Resource::saveImageCollection( QTextStream &ts, int indent )
+void Resource::saveImageCollection( TQTextStream &ts, int indent )
{
ts << makeIndent( indent ) << "<images>" << endl;
indent++;
- QValueList<Image>::Iterator it = images.begin();
+ TQValueList<Image>::Iterator it = images.begin();
for ( ; it != images.end(); ++it ) {
ts << makeIndent( indent ) << "<image name=\"" << (*it).name << "\">" << endl;
indent++;
@@ -1847,10 +1847,10 @@ void Resource::saveImageCollection( QTextStream &ts, int indent )
ts << makeIndent( indent ) << "</images>" << 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<Image>::Iterator it = images.begin();
+ TQValueList<Image>::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 ) << "<connections>" << endl;
indent++;
- QValueList<MetaDataBase::Connection> connections = MetaDataBase::connections( formwindow );
- QValueList<MetaDataBase::Connection>::Iterator it = connections.begin();
+ TQValueList<MetaDataBase::Connection> connections = MetaDataBase::connections( formwindow );
+ TQValueList<MetaDataBase::Connection>::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<QAction> lst = formwindow->actionList();
- for ( QAction *a = lst.first(); a; a = lst.next() )
+ TQPtrList<TQAction> 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<QString, QStringList> eventFunctions = MetaDataBase::eventFunctions( o );
- QMap<QString, QStringList>::ConstIterator it = eventFunctions.begin();
+ TQMap<TQString, TQStringList> eventFunctions = MetaDataBase::eventFunctions( o );
+ TQMap<TQString, TQStringList>::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 ) << "</connections>" << 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 ) << "<customwidgets>" << endl;
indent++;
- QPtrList<MetaDataBase::CustomWidget> *lst = MetaDataBase::customWidgets();
+ TQPtrList<MetaDataBase::CustomWidget> *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 ) << "</sizepolicy>" << endl;
ts << makeIndent( indent ) << "<pixmap>" << saveInCollection( w->pixmap->convertToImage() ) << "</pixmap>" << endl;
if ( !w->lstSignals.isEmpty() ) {
- for ( QValueList<QCString>::Iterator it = w->lstSignals.begin(); it != w->lstSignals.end(); ++it )
+ for ( TQValueList<TQCString>::Iterator it = w->lstSignals.begin(); it != w->lstSignals.end(); ++it )
ts << makeIndent( indent ) << "<signal>" << entitize( *it ) << "</signal>" << endl;
}
if ( !w->lstSlots.isEmpty() ) {
- for ( QValueList<MetaDataBase::Slot>::Iterator it = w->lstSlots.begin(); it != w->lstSlots.end(); ++it )
+ for ( TQValueList<MetaDataBase::Slot>::Iterator it = w->lstSlots.begin(); it != w->lstSlots.end(); ++it )
ts << makeIndent( indent ) << "<slot access=\"" << (*it).access << "\" specifier=\""
<< (*it).specifier << "\">" << entitize( (*it).slot ) << "</slot>" << endl;
}
if ( !w->lstProperties.isEmpty() ) {
- for ( QValueList<MetaDataBase::Property>::Iterator it = w->lstProperties.begin(); it != w->lstProperties.end(); ++it )
+ for ( TQValueList<MetaDataBase::Property>::Iterator it = w->lstProperties.begin(); it != w->lstProperties.end(); ++it )
ts << makeIndent( indent ) << "<property type=\"" << (*it).type << "\">" << entitize( (*it).property ) << "</property>" << endl;
}
indent--;
@@ -2126,25 +2126,25 @@ void Resource::saveCustomWidgets( QTextStream &ts, int indent )
ts << makeIndent( indent ) << "</customwidgets>" << 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 ) << "<tabstops>" << 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 ) << "<tabstop>" << w->name() << "</tabstop>" << endl;
@@ -2223,20 +2223,20 @@ void Resource::saveTabOrder( QTextStream &ts, int indent )
ts << makeIndent( indent ) << "</tabstops>" << 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) << "<class>" << entitize(cn) << "</class>" << endl;
if (!info.comment.isEmpty())
ts << makeIndent(indent) << "<comment>" << entitize(info.comment) << "</comment>" << endl;
@@ -2267,17 +2267,17 @@ void Resource::saveMetaInfoBefore( QTextStream &ts, int indent )
ts << makeIndent(indent) << "<version>" << entitize(info.version) << "</version>" << endl;
}
-void Resource::saveMetaInfoAfter( QTextStream &ts, int indent )
+void Resource::saveMetaInfoAfter( TQTextStream &ts, int indent )
{
MetaDataBase::MetaInfo info = MetaDataBase::metaInfo( formwindow );
- QValueList<MetaDataBase::Include> includes = MetaDataBase::includes( formwindow );
- QString extensionInclude;
+ TQValueList<MetaDataBase::Include> includes = MetaDataBase::includes( formwindow );
+ TQString extensionInclude;
bool needExtensionInclude = false;
if ( !includes.isEmpty() || needExtensionInclude ) {
ts << makeIndent( indent ) << "<includes>" << endl;
indent++;
- for ( QValueList<MetaDataBase::Include>::Iterator it = includes.begin(); it != includes.end(); ++it ) {
+ for ( TQValueList<MetaDataBase::Include>::Iterator it = includes.begin(); it != includes.end(); ++it ) {
ts << makeIndent( indent ) << "<include location=\"" << (*it).location
<< "\" impldecl=\"" << (*it).implDecl << "\">" << (*it).header << "</include>" << endl;
if ( needExtensionInclude )
@@ -2291,32 +2291,32 @@ void Resource::saveMetaInfoAfter( QTextStream &ts, int indent )
ts << makeIndent( indent ) << "</includes>" << endl;
}
- QStringList forwards = MetaDataBase::forwards( formwindow );
+ TQStringList forwards = MetaDataBase::forwards( formwindow );
if ( !forwards.isEmpty() ) {
ts << makeIndent( indent ) << "<forwards>" << 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 ) << "<forward>" << entitize( *it2 ) << "</forward>" << endl;
indent--;
ts << makeIndent( indent ) << "</forwards>" << endl;
}
- QStringList sigs = MetaDataBase::signalList( formwindow );
+ TQStringList sigs = MetaDataBase::signalList( formwindow );
if ( !sigs.isEmpty() ) {
ts << makeIndent( indent ) << "<signals>" << 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 ) << "<signal>" << entitize( *it3 ) << "</signal>" << endl;
indent--;
ts << makeIndent( indent ) << "</signals>" << endl;
- QValueList<MetaDataBase::Slot> slotList = MetaDataBase::slotList( formwindow );
+ TQValueList<MetaDataBase::Slot> slotList = MetaDataBase::slotList( formwindow );
if ( !slotList.isEmpty() ) {
ts << makeIndent( indent ) << "<slots>" << endl;
indent++;
#ifndef KOMMANDER
- QString lang = formwindow->project()->language();
+ TQString lang = formwindow->project()->language();
#endif
- QValueList<MetaDataBase::Slot>::Iterator it = slotList.begin();
+ TQValueList<MetaDataBase::Slot>::Iterator it = slotList.begin();
for ( ; it != slotList.end(); ++it ) {
MetaDataBase::Slot slot = *it;
ts << makeIndent( indent ) << "<slot";
@@ -2346,37 +2346,37 @@ void Resource::saveMetaInfoAfter( QTextStream &ts, int indent )
<< "\" margin=\"" << formwindow->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 ) << "<actiongroup>" << endl;
else
@@ -2396,16 +2396,16 @@ void Resource::saveChildActions( QAction *a, QTextStream &ts, int indent )
}
}
-void Resource::saveActions( const QPtrList<QAction> &actions, QTextStream &ts, int indent )
+void Resource::saveActions( const TQPtrList<TQAction> &actions, TQTextStream &ts, int indent )
{
if ( actions.isEmpty() )
return;
ts << makeIndent( indent ) << "<actions>" << endl;
indent++;
- QPtrListIterator<QAction> it( actions );
+ TQPtrListIterator<TQAction> 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 ) << "<actiongroup>" << endl;
else
@@ -2428,14 +2428,14 @@ void Resource::saveActions( const QPtrList<QAction> &actions, QTextStream &ts, i
ts << makeIndent( indent ) << "</actions>" << 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 ) << "<toolbars>" << endl;
indent++;
- QPtrList<QToolBar> tbList;
+ TQPtrList<TQToolBar> 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 ) << "<toolbar dock=\"" << i << "\">" << endl;
indent++;
saveObjectProperties( tb, ts, indent );
- QPtrList<QAction> actionList = ( (QDesignerToolBar*)tb )->insertedActions();
- for ( QAction *a = actionList.first(); a; a = actionList.next() ) {
+ TQPtrList<TQAction> actionList = ( (QDesignerToolBar*)tb )->insertedActions();
+ for ( TQAction *a = actionList.first(); a; a = actionList.next() ) {
if ( a->inherits( "QSeparatorAction" ) ) {
ts << makeIndent( indent ) << "<separator/>" << endl;
} else {
if ( a->inherits( "QDesignerAction" ) && !( (QDesignerAction*)a )->supportsMenu() ) {
- QWidget *w = ( (QDesignerAction*)a )->widget();
+ TQWidget *w = ( (QDesignerAction*)a )->widget();
ts << makeIndent( indent ) << "<widget class=\""
<< WidgetFactory::classNameOf( w ) << "\">" << endl;
indent++;
saveObjectProperties( w, ts, indent );
const char *className = WidgetFactory::classNameOf( w );
if ( w->isA( "CustomWidget" ) )
- usedCustomWidgets << QString( className );
+ 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 ) << "</toolbars>" << 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 ) << "<menubar>" << endl;
indent++;
@@ -2548,11 +2548,11 @@ void Resource::saveMenuBar( QMainWindow *mw, QTextStream &ts, int indent )
ts << makeIndent( indent ) << "<item text=\"" << entitize( mw->menuBar()->text( mw->menuBar()->idAt( i ) ) )
<< "\" name=\"" << entitize( mw->menuBar()->findItem( mw->menuBar()->idAt( i ) )->popup()->name() ) << "\">" << endl;
indent++;
- QMenuItem *m = mw->menuBar()->findItem( mw->menuBar()->idAt( i ) );
+ TQMenuItem *m = mw->menuBar()->findItem( mw->menuBar()->idAt( i ) );
if ( !m )
continue;
- QPtrList<QAction> actionList = ( (QDesignerPopupMenu*)m->popup() )->insertedActions();
- for ( QAction *a = actionList.first(); a; a = actionList.next() ) {
+ TQPtrList<TQAction> actionList = ( (QDesignerPopupMenu*)m->popup() )->insertedActions();
+ for ( TQAction *a = actionList.first(); a; a = actionList.next() ) {
if ( a->inherits( "QSeparatorAction" ) )
ts << makeIndent( indent ) << "<separator/>" << endl;
else
@@ -2565,29 +2565,29 @@ void Resource::saveMenuBar( QMainWindow *mw, QTextStream &ts, int indent )
ts << makeIndent( indent ) << "</menubar>" << 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<QString, QString> functionBodies = MetaDataBase::functionBodies( formwindow );
+ TQMap<TQString, TQString> 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<LanguageInterface::Function> funcs;
- QValueList<MetaDataBase::Slot> slotList = MetaDataBase::slotList( formwindow );
- QValueList<MetaDataBase::Slot>::Iterator sit = slotList.begin();
+ TQValueList<LanguageInterface::Function> funcs;
+ TQValueList<MetaDataBase::Slot> slotList = MetaDataBase::slotList( formwindow );
+ TQValueList<MetaDataBase::Slot>::Iterator sit = slotList.begin();
for ( ; sit != slotList.end(); ++sit ) {
MetaDataBase::Slot slot = *sit;
- QMap<QString, QString>::Iterator it =
+ TQMap<TQString, TQString>::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<LanguageInterface::Connection> conns;
- QValueList<MetaDataBase::Connection> mconns = langConnections[ lang ];
- for ( QValueList<MetaDataBase::Connection>::Iterator it = mconns.begin();
+ TQValueList<LanguageInterface::Connection> conns;
+ TQValueList<MetaDataBase::Connection> mconns = langConnections[ lang ];
+ for ( TQValueList<MetaDataBase::Connection>::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<QString, QString> bodies;
+ TQDomElement n = e.firstChild().toElement();
+ TQMap<TQString, TQString> 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<MetaDataBase::Slot> slotList = MetaDataBase::slotList( formwindow );
- for ( QValueList<MetaDataBase::Slot>::Iterator it = slotList.begin(); it != slotList.end(); ++it ) {
+ TQString code;
+ TQValueList<MetaDataBase::Slot> slotList = MetaDataBase::slotList( formwindow );
+ for ( TQValueList<MetaDataBase::Slot>::Iterator it = slotList.begin(); it != slotList.end(); ++it ) {
#ifndef KOMMANDER
if ( (*it).language != formwindow->project()->language() )
#else
if ( (*it).language != "C++" )
#endif
continue;
- QString sl( (*it).slot );
- QString comments = MetaDataBase::functionComments( formwindow, sl );
+ 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<QString, QString>::Iterator bit = bodies.find( MetaDataBase::normalizeSlot( (*it).slot ) );
+ TQMap<TQString, TQString>::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<LanguageInterface::Function> functions;
- QStringList forwards;
- QStringList includesImpl;
- QStringList includesDecl;
- QStringList vars;
- QValueList<LanguageInterface::Connection> connections;
+ TQValueList<LanguageInterface::Function> functions;
+ TQStringList forwards;
+ TQStringList includesImpl;
+ TQStringList includesDecl;
+ TQStringList vars;
+ TQValueList<LanguageInterface::Connection> connections;
iface->loadFormCode( formwindow->name(), currFileName + iface->formCodeExtension(),
functions, forwards, includesImpl, includesDecl, vars, connections );
if ( iface->supports( LanguageInterface::StoreFormCodeSeperate ) ) {
#ifndef KOMMANDER
- QFile f( formwindow->project()->makeAbsolute( formwindow->formFile()->codeFile() ) );
+ 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<LanguageInterface::Connection>::Iterator cit = connections.begin();
+ for ( TQValueList<LanguageInterface::Connection>::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<QString, QString> bodies = MetaDataBase::functionBodies( formwindow );
+ TQMap<TQString, TQString> bodies = MetaDataBase::functionBodies( formwindow );
- for ( QValueList<LanguageInterface::Function>::Iterator fit = functions.begin();
+ for ( TQValueList<LanguageInterface::Function>::Iterator fit = functions.begin();
fit != functions.end(); ++fit ) {
if ( MetaDataBase::hasSlot( formwindow, (*fit).name.latin1() ) )
MetaDataBase::changeSlot( formwindow, (*fit).name.latin1(), (*fit).name.latin1() );
@@ -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<MetaDataBase::Include> incls = MetaDataBase::includes( formwindow );
+ TQValueList<MetaDataBase::Include> 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 <qstring.h>
-#include <qtextstream.h>
-#include <qvariant.h>
-#include <qvaluelist.h>
-#include <qimage.h>
+#include <tqstring.h>
+#include <tqtextstream.h>
+#include <tqvariant.h>
+#include <tqvaluelist.h>
+#include <tqimage.h>
#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<QPixmap> &pixmaps, QTextStream &ts, int indent );
- void saveItem( QListViewItem *i, QTextStream &ts, int indent );
- void saveConnections( QTextStream &ts, int indent );
- void saveCustomWidgets( QTextStream &ts, int indent );
- void saveTabOrder( QTextStream &ts, int indent );
- void saveColorGroup( QTextStream &ts, int indent, const QColorGroup &cg );
- void saveColor( QTextStream &ts, int indent, const QColor &c );
- void saveMetaInfoBefore( QTextStream &ts, int indent );
- void saveMetaInfoAfter( QTextStream &ts, int indent );
- void savePixmap( const QPixmap &p, QTextStream &ts, int indent, const QString &tagname = "pixmap" );
- void saveActions( const QPtrList<QAction> &actions, QTextStream &ts, int indent );
- void saveChildActions( QAction *a, QTextStream &ts, int indent );
- void saveToolBars( QMainWindow *mw, QTextStream &ts, int indent );
- void saveMenuBar( QMainWindow *mw, QTextStream &ts, int indent );
+ 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<TQPixmap> &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<TQAction> &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<Image> images;
+ TQWidget* toplevel;
+ TQValueList<Image> images;
bool copying, pasting;
bool mainContainerSet;
- QStringList knownNames;
- QStringList usedCustomWidgets;
- QListViewItem *lastItem;
-
- QValueList<MetaDataBase::Include> metaIncludes;
- QStringList metaForwards;
- QStringList metaVariables;
- QStringList metaSignals;
+ TQStringList knownNames;
+ TQStringList usedCustomWidgets;
+ TQListViewItem *lastItem;
+
+ TQValueList<MetaDataBase::Include> metaIncludes;
+ TQStringList metaForwards;
+ TQStringList metaVariables;
+ TQStringList metaSignals;
MetaDataBase::MetaInfo metaInfo;
- QMap<QString, QString> dbControls;
- QMap<QString, QStringList> dbTables;
- QString exportMacro;
+ TQMap<TQString, TQString> dbControls;
+ TQMap<TQString, TQStringList> dbTables;
+ TQString exportMacro;
bool hadGeometry;
- QMap<QString, QValueList<MetaDataBase::Connection> > langConnections;
- QString currFileName;
+ TQMap<TQString, TQValueList<MetaDataBase::Connection> > 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 <qvariant.h> // HP-UX compiler needs this here
+#include <tqvariant.h> // HP-UX compiler needs this here
#include "sizehandle.h"
#include "formwindow.h"
#include "widgetfactory.h"
-#include <qwidget.h>
-#include <qapplication.h>
-#include <qlabel.h>
+#include <tqwidget.h>
+#include <tqapplication.h>
+#include <tqlabel.h>
#include <klocale.h>
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<WidgetSelection> *selDict )
+WidgetSelection::WidgetSelection( FormWindow *parent, TQPtrDict<WidgetSelection> *selDict )
: selectionDict( selDict )
{
formWindow = parent;
@@ -271,7 +271,7 @@ WidgetSelection::WidgetSelection( FormWindow *parent, QPtrDict<WidgetSelection>
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 <qwidget.h>
-#include <qintdict.h>
-#include <qptrdict.h>
+#include <tqwidget.h>
+#include <tqintdict.h>
+#include <tqptrdict.h>
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<WidgetSelection> *selDict );
+ WidgetSelection( FormWindow *parent, TQPtrDict<WidgetSelection> *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<SizeHandle> handles;
- QWidget *wid;
+ TQIntDict<SizeHandle> handles;
+ TQWidget *wid;
FormWindow *formWindow;
- QPtrDict<WidgetSelection> *selectionDict;
+ TQPtrDict<WidgetSelection> *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 <qvariant.h> // HP-UX compiler needs this here
+#include <tqvariant.h> // HP-UX compiler needs this here
#include "styledbutton.h"
#include "formwindow.h"
#include "pixmapchooser.h"
#include <kcolordialog.h>
-#include <qpalette.h>
-#include <qlabel.h>
-#include <qpainter.h>
-#include <qimage.h>
-#include <qpixmap.h>
-#include <qapplication.h>
-#include <qdragobject.h>
-#include <qstyle.h>
-
-StyledButton::StyledButton(QWidget* parent, const char* name)
- : QButton( parent, name ), pix( 0 ), spix( 0 ), s( 0 ), formWindow( 0 ), mousePressed( false )
+#include <tqpalette.h>
+#include <tqlabel.h>
+#include <tqpainter.h>
+#include <tqimage.h>
+#include <tqpixmap.h>
+#include <tqapplication.h>
+#include <tqdragobject.h>
+#include <tqstyle.h>
+
+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 <qbutton.h>
-#include <qpixmap.h>
+#include <tqbutton.h>
+#include <tqpixmap.h>
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 <qtable.h>
+#include <tqtable.h>
#endif
#include "formwindow.h"
-#include <qlabel.h>
-#include <qcombobox.h>
-#include <qheader.h>
-#include <qlistbox.h>
-#include <qlineedit.h>
-#include <qpushbutton.h>
+#include <tqlabel.h>
+#include <tqcombobox.h>
+#include <tqheader.h>
+#include <tqlistbox.h>
+#include <tqlineedit.h>
+#include <tqpushbutton.h>
#include "pixmapchooser.h"
#include "command.h"
-#include <qvaluelist.h>
-#include <qtabwidget.h>
+#include <tqvaluelist.h>
+#include <tqtabwidget.h>
#ifndef KOMMANDER
#include "project.h"
#endif
@@ -21,26 +21,26 @@
#include <klocale.h>
-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( "<no field>" );
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<QString, bool> m;
+ TQMap<TQString, bool> m;
for ( int i = 0; i < table->numCols() - 1; ++i )
m.insert( table->horizontalHeader()->label( i ), true );
int n = table->numCols() - 1;
- QString t = QString::number( n );
+ 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<QString, bool> m;
+ TQMap<TQString, bool> m;
for ( int i = 0; i < table->numRows() - 1; ++i )
m.insert( table->verticalHeader()->label( i ), true );
int n = table->numRows() - 1;
- QString t = QString::number( n );
+ 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<PopulateTableCommand::Row> rows;
- QValueList<PopulateTableCommand::Column> cols;
+ TQValueList<PopulateTableCommand::Row> rows;
+ TQValueList<PopulateTableCommand::Column> 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<QString, QString> columnFields = MetaDataBase::columnFields( editTable );
+ TQMap<TQString, TQString> 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<int, QString>::Iterator it = fieldMap.begin(); it != fieldMap.end(); ++it )
+ for ( TQMap<int, TQString>::Iterator it = fieldMap.begin(); it != fieldMap.end(); ++it )
tmpFieldMap.insert( listColumns->item( it.key() ), *it );
}
void TableEditor::restoreFieldMap()
{
fieldMap.clear();
- for ( QMap<QListBoxItem*, QString>::Iterator it = tmpFieldMap.begin(); it != tmpFieldMap.end(); ++it )
+ for ( TQMap<TQListBoxItem*, TQString>::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 <qmap.h>
+#include <tqmap.h>
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<int, QString> fieldMap;
- QMap<QListBoxItem*, QString> tmpFieldMap;
+ TQMap<int, TQString> fieldMap;
+ TQMap<TQListBoxItem*, TQString> 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 <qfile.h>
-#include <qfileinfo.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
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 <qobject.h>
-#include <qdatetime.h>
-#include <qtimer.h>
+#include <tqobject.h>
+#include <tqdatetime.h>
+#include <tqtimer.h>
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 <qapplication.h>
+#include <tqapplication.h>
//#define NO_STATIC_COLORS
#include "globaldefs.h"
-#include <qstrlist.h>
-#include <qdict.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qcleanuphandler.h>
+#include <tqstrlist.h>
+#include <tqdict.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqcleanuphandler.h>
-#include <qfeatures.h>
+#include <tqfeatures.h>
#include <stdlib.h>
@@ -46,11 +46,11 @@ const int dbsize = 300;
const int dbcustom = 200;
const int dbdictsize = 211;
static WidgetDatabaseRecord* widget_db[ dbsize ];
-static QDict<int> *className2Id = 0;
+static TQDict<int> *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<WidgetInterface> *widgetPluginManager = 0;
@@ -59,7 +59,7 @@ static bool plugins_set_up = false;
static bool was_in_setup = false;
#ifndef KOMMANDER
-QCleanupHandler<QPluginManager<WidgetInterface> > cleanup_manager;
+TQCleanupHandler<QPluginManager<WidgetInterface> > 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<WidgetInterface> *widgetManager()
{
if ( !widgetPluginManager ) {
#ifndef KOMMANDER
- widgetPluginManager = new QPluginManager<WidgetInterface>( IID_Widget, QApplication::libraryPaths(), "/designer" );
+ widgetPluginManager = new QPluginManager<WidgetInterface>( IID_Widget, TQApplication::libraryPaths(), "/designer" );
#else
- widgetPluginManager = new QPluginManager<WidgetInterface>( IID_Widget, QApplication::libraryPaths(), "" );
+ widgetPluginManager = new QPluginManager<WidgetInterface>( IID_Widget, TQApplication::libraryPaths(), "" );
#endif
cleanup_manager.add( &widgetPluginManager );
@@ -1018,7 +1018,7 @@ QPluginManager<WidgetInterface> *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 <qiconset.h>
-#include <qstring.h>
+#include <tqiconset.h>
+#include <tqstring.h>
#ifndef KOMMANDER
#include "widgetinterface.h" // up here for GCC 2.7.* compatibility
#include <private/qpluginmanager_p.h>
@@ -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 <kommanderfactory.h>
#include "kmdrmainwindow.h"
-#include <qvariant.h> // HP-UX compiler need this here
+#include <tqvariant.h> // HP-UX compiler need this here
#include "widgetfactory.h"
#include "widgetdatabase.h"
#include "metadatabase.h"
@@ -41,46 +41,46 @@
#include "tableeditorimpl.h"
#endif
-#include <qfeatures.h>
+#include <tqfeatures.h>
-#include <qpixmap.h>
-#include <qgroupbox.h>
-#include <qiconview.h>
+#include <tqpixmap.h>
+#include <tqgroupbox.h>
+#include <tqiconview.h>
#ifndef QT_NO_TABLE
-#include <qtable.h>
+#include <tqtable.h>
#endif
#ifndef QT_NO_SQL
-#include <qdatatable.h>
+#include <tqdatatable.h>
#endif
-#include <qdatetimeedit.h>
-#include <qlineedit.h>
-#include <qspinbox.h>
-#include <qmultilineedit.h>
-#include <qtextedit.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qwidgetstack.h>
-#include <qcombobox.h>
-#include <qtabbar.h>
-#include <qlistbox.h>
-#include <qlistview.h>
-#include <qobjectlist.h>
-#include <qlcdnumber.h>
-#include <qslider.h>
-#include <qdial.h>
-#include <qprogressbar.h>
-#include <qtextview.h>
-#include <qtextbrowser.h>
-#include <qframe.h>
-#include <qmetaobject.h>
-#include <qwizard.h>
-#include <qvaluelist.h>
-#include <qtimer.h>
-#include <qscrollbar.h>
-#include <qmainwindow.h>
-#include <qmenubar.h>
-#include <qapplication.h>
-#include <qsplitter.h>
+#include <tqdatetimeedit.h>
+#include <tqlineedit.h>
+#include <tqspinbox.h>
+#include <tqmultilineedit.h>
+#include <tqtextedit.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqwidgetstack.h>
+#include <tqcombobox.h>
+#include <tqtabbar.h>
+#include <tqlistbox.h>
+#include <tqlistview.h>
+#include <tqobjectlist.h>
+#include <tqlcdnumber.h>
+#include <tqslider.h>
+#include <tqdial.h>
+#include <tqprogressbar.h>
+#include <tqtextview.h>
+#include <tqtextbrowser.h>
+#include <tqframe.h>
+#include <tqmetaobject.h>
+#include <tqwizard.h>
+#include <tqvaluelist.h>
+#include <tqtimer.h>
+#include <tqscrollbar.h>
+#include <tqmainwindow.h>
+#include <tqmenubar.h>
+#include <tqapplication.h>
+#include <tqsplitter.h>
#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<QToolBox*>(o->parent()) )
+ if ( o->inherits( "TQTabBar" ) || ::qt_cast<TQToolBox*>(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<QToolButton*>(o) && ::qt_cast<QToolBox*>(widgetOfContainer((QWidget*)o->parent()))) {
+ else if (::qt_cast<TQToolButton*>(o) && ::qt_cast<TQToolBox*>(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<QToolBox*>(o) ) {
+ } else if ( ::qt_cast<TQToolBox*>(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 <qvariant.h>
-#include <qiconset.h>
-#include <qstring.h>
-#include <qintdict.h>
-#include <qtabwidget.h>
-#include <qpixmap.h>
-#include <qsize.h>
-#include <qpainter.h>
-#include <qevent.h>
-#include <qobjectlist.h>
-#include <qlabel.h>
-#include <qwizard.h>
-#include <qptrdict.h>
-#include <qpushbutton.h>
-#include <qtoolbutton.h>
-#include <qcheckbox.h>
-#include <qradiobutton.h>
-#include <qbuttongroup.h>
+#include <tqvariant.h>
+#include <tqiconset.h>
+#include <tqstring.h>
+#include <tqintdict.h>
+#include <tqtabwidget.h>
+#include <tqpixmap.h>
+#include <tqsize.h>
+#include <tqpainter.h>
+#include <tqevent.h>
+#include <tqobjectlist.h>
+#include <tqlabel.h>
+#include <tqwizard.h>
+#include <tqptrdict.h>
+#include <tqpushbutton.h>
+#include <tqtoolbutton.h>
+#include <tqcheckbox.h>
+#include <tqradiobutton.h>
+#include <tqbuttongroup.h>
#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<QWidget> removedPages;
+ TQPtrDict<TQWidget> 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 <qwizard.h>
-#include <qlistbox.h>
-#include <qpushbutton.h>
+#include <tqwizard.h>
+#include <tqlistbox.h>
+#include <tqpushbutton.h>
#include <kinputdialog.h>
#include <klocale.h>
-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 <qptrlist.h>
+#include <tqptrlist.h>
#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<Command> commands;
+ TQWizard *wizard;
+ TQPtrList<Command> 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 <qvariant.h> // HP-UX compiler needs this here
-#include <qlistview.h>
+#include <tqvariant.h> // HP-UX compiler needs this here
+#include <tqlistview.h>
#include "workspace.h"
#include "formwindow.h"
#include "mainwindow.h"
@@ -34,15 +34,15 @@
#endif
#include "formfile.h"
-#include <qheader.h>
-#include <qfileinfo.h>
-#include <qapplication.h>
-#include <qpainter.h>
-#include <qpen.h>
-#include <qobjectlist.h>
-#include <qworkspace.h>
-#include <qpopupmenu.h>
-#include <qtextstream.h>
+#include <tqheader.h>
+#include <tqfileinfo.h>
+#include <tqapplication.h>
+#include <tqpainter.h>
+#include <tqpen.h>
+#include <tqobjectlist.h>
+#include <tqworkspace.h>
+#include <tqpopupmenu.h>
+#include <tqtextstream.h>
#include "qcompletionedit.h"
#include <kurldrag.h>
@@ -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<SourceFile> sources = project->sourceFiles();
+ for ( TQPtrListIterator<SourceFile> sources = project->sourceFiles();
sources.current(); ++sources ) {
SourceFile* f = sources.current();
(void) new WorkspaceItem( projectItem, f );
}
- for ( QPtrListIterator<FormFile> forms = project->formFiles();
+ for ( TQPtrListIterator<FormFile> 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 <qlistview.h>
+#include <tqlistview.h>
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 <dcopobject.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
/* 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 <kstandarddirs.h>
/* QT INCLUDES */
-#include <qdialog.h>
-#include <qfile.h>
-#include <qfileinfo.h>
-#include <qiodevice.h>
-#include <qlabel.h>
-#include <qmainwindow.h>
-#include <qobjectlist.h>
-#include <qstring.h>
-#include <qtabwidget.h>
-#include <qwidget.h>
-#include <qcursor.h>
+#include <tqdialog.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
+#include <tqiodevice.h>
+#include <tqlabel.h>
+#include <tqmainwindow.h>
+#include <tqobjectlist.h>
+#include <tqstring.h>
+#include <tqtabwidget.h>
+#include <tqwidget.h>
+#include <tqcursor.h>
/* 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<QWidget*>(parent()));
+ m_instance = KommanderFactory::create(fname.path(), 0L, dynamic_cast<TQWidget*>(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<KommanderWindow*>((QWidget*)m_instance);
+ KommanderWindow* window = dynamic_cast<KommanderWindow*>((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<QDialog*>((QWidget*)m_instance)->exec();
- else if (m_instance->inherits("QMainWindow"))
+ if (m_instance->inherits("TQDialog"))
+ dynamic_cast<TQDialog*>((TQWidget*)m_instance)->exec();
+ else if (m_instance->inherits("TQMainWindow"))
{
kapp->setMainWidget(m_instance);
- dynamic_cast<QMainWindow*>((QWidget*)m_instance)->show();
+ dynamic_cast<TQMainWindow*>((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("<qt>Kommander file<br><b>%1</b><br>does not "
"exist.</qt>").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. "
"<p>Any script contained in this dialog will have write access to all of your home directory; "
"<b>running such dialogs may be dangerous: </b>"
- "<p>are you sure you want to continue?</qt>"), QString(), i18n("Run Nevertheless")) == KMessageBox::Cancel)
+ "<p>are you sure you want to continue?</qt>"), TQString(), i18n("Run Nevertheless")) == KMessageBox::Cancel)
return false;
}
- if (!QFileInfo(fname.path()).isExecutable())
+ if (!TQFileInfo(fname.path()).isExecutable())
{
- if (KMessageBox::warningContinueCancel(0, i18n("<qt>The Kommander file <i>%1</i> does not have the <b>executable attribute</b> set and could possibly contain dangerous exploits.<p>If you trust the scripting (viewable in kmdr-editor) in this program, make it executable to get rid of this warning.<p>Are you sure you want to continue?</qt>").arg(fname.pathOrURL()), QString(), i18n("Run Nevertheless")) == KMessageBox::Cancel)
+ if (KMessageBox::warningContinueCancel(0, i18n("<qt>The Kommander file <i>%1</i> does not have the <b>executable attribute</b> set and could possibly contain dangerous exploits.<p>If you trust the scripting (viewable in kmdr-editor) in this program, make it executable to get rid of this warning.<p>Are you sure you want to continue?</qt>").arg(fname.pathOrURL()), 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<KommanderWidget*>(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 <qstring.h>
-#include <qstringlist.h>
-#include <qobject.h>
-#include <qmap.h>
-#include <qguardedptr.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqobject.h>
+#include <tqmap.h>
+#include <tqguardedptr.h>
/* KDE INCLUDES */
#include <kurl.h>
@@ -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<QWidget> m_instance;
+ TQGuardedPtr<TQWidget> 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 <kmessagebox.h>
/* QT INCLUDES */
-#include <qapplication.h>
-#include <qobject.h>
-#include <qstring.h>
+#include <tqapplication.h>
+#include <tqobject.h>
+#include <tqstring.h>
/* OTHER INCLUDES */
#include <cstdio>
@@ -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"); i<args->count(); 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 <qsizepolicy.h>
-#include <qcolor.h>
-#include <qcursor.h>
-#include <qdatetime.h>
-#include <qrect.h>
-#include <qsize.h>
-#include <qfont.h>
-#include <qdom.h>
+#include <tqsizepolicy.h>
+#include <tqcolor.h>
+#include <tqcursor.h>
+#include <tqdatetime.h>
+#include <tqrect.h>
+#include <tqsize.h>
+#include <tqfont.h>
+#include <tqdom.h>
/*!
\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 <qvariant.h>
-#include <qnamespace.h>
+#include <tqvariant.h>
+#include <tqnamespace.h>
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 <kommanderplugin.h>
-#include <qfeatures.h>
+#include <tqfeatures.h>
#include "config.h"
#ifndef QT_NO_SQL
#include "database2.h"
#endif
-#include <qdom.h>
-#include <qdir.h>
-#include <qlayout.h>
-#include <qmetaobject.h>
+#include <tqdom.h>
+#include <tqdir.h>
+#include <tqlayout.h>
+#include <tqmetaobject.h>
#include "domtool.h"
-#include <qapplication.h>
-#include <qtooltip.h>
-#include <qwhatsthis.h>
-#include <qobjectlist.h>
+#include <tqapplication.h>
+#include <tqtooltip.h>
+#include <tqwhatsthis.h>
+#include <tqobjectlist.h>
#include <private/qpluginmanager_p.h>
-#include <qmime.h>
-#include <qdragobject.h>
+#include <tqmime.h>
+#include <tqdragobject.h>
#include <zlib.h>
#ifndef QT_NO_SQL
-#include <qsqlrecord.h>
-#include <qsqldatabase.h>
-#include <qdatatable.h>
+#include <tqsqlrecord.h>
+#include <tqsqldatabase.h>
+#include <tqdatatable.h>
#endif
// include all Qt widgets we support
-#include <qpushbutton.h>
-#include <qtoolbutton.h>
-#include <qcheckbox.h>
-#include <qradiobutton.h>
-#include <qgroupbox.h>
-#include <qbuttongroup.h>
-#include <qiconview.h>
-#include <qheader.h>
+#include <tqpushbutton.h>
+#include <tqtoolbutton.h>
+#include <tqcheckbox.h>
+#include <tqradiobutton.h>
+#include <tqgroupbox.h>
+#include <tqbuttongroup.h>
+#include <tqiconview.h>
+#include <tqheader.h>
#ifndef QT_NO_TABLE
-#include <qtable.h>
+#include <tqtable.h>
#endif
-#include <qlistbox.h>
-#include <qlistview.h>
-#include <qlineedit.h>
-#include <qspinbox.h>
-#include <qmultilineedit.h>
-#include <qlabel.h>
-#include <qwidget.h>
-#include <qtabwidget.h>
-#include <qcombobox.h>
-#include <qdialog.h>
-#include <qwizard.h>
-#include <qlcdnumber.h>
-#include <qprogressbar.h>
-#include <qtextview.h>
-#include <qtextbrowser.h>
-#include <qdial.h>
-#include <qslider.h>
-#include <qframe.h>
-#include <qwidgetstack.h>
-#include <qtextedit.h>
-#include <qscrollbar.h>
-#include <qmainwindow.h>
-#include <qsplitter.h>
-#include <qaction.h>
-#include <qpopupmenu.h>
-#include <qmenubar.h>
-#include <qdatetimeedit.h>
-#include <qtoolbox.h>
+#include <tqlistbox.h>
+#include <tqlistview.h>
+#include <tqlineedit.h>
+#include <tqspinbox.h>
+#include <tqmultilineedit.h>
+#include <tqlabel.h>
+#include <tqwidget.h>
+#include <tqtabwidget.h>
+#include <tqcombobox.h>
+#include <tqdialog.h>
+#include <tqwizard.h>
+#include <tqlcdnumber.h>
+#include <tqprogressbar.h>
+#include <tqtextview.h>
+#include <tqtextbrowser.h>
+#include <tqdial.h>
+#include <tqslider.h>
+#include <tqframe.h>
+#include <tqwidgetstack.h>
+#include <tqtextedit.h>
+#include <tqscrollbar.h>
+#include <tqmainwindow.h>
+#include <tqsplitter.h>
+#include <tqaction.h>
+#include <tqpopupmenu.h>
+#include <tqmenubar.h>
+#include <tqdatetimeedit.h>
+#include <tqtoolbox.h>
#include <stdlib.h>
#include <kglobal.h>
@@ -98,14 +98,14 @@
#include "kmdrmainwindow.h"
-QPtrList<KommanderPlugin> widgetPlugins;
+TQPtrList<KommanderPlugin> widgetPlugins;
-QMap<QWidget*, QString> *qwf_functions = 0;
-QMap<QWidget*, QString> *qwf_forms = 0;
-QString *qwf_language = 0;
+TQMap<TQWidget*, TQString> *qwf_functions = 0;
+TQMap<TQWidget*, TQString> *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<QWidget*, QString>;
+ qwf_forms = new TQMap<TQWidget*, TQString>;
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<QWidget*, SqlWidgetConnection>::Iterator cit = widgetFactory->sqlWidgetConnections.begin();
+ TQMap<TQWidget*, SqlWidgetConnection>::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<QString, QStringList>::Iterator it = widgetFactory->dbTables.begin(); it != widgetFactory->dbTables.end(); ++it ) {
- QDataTable *table = (QDataTable*)widgetFactory->toplevel->child( it.key(), "QDataTable" );
+ for ( TQMap<TQString, TQStringList>::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<Field> fieldMap = *widgetFactory->fieldMaps.find( table );
- QString conn = (*it)[ 0 ];
- QSqlCursor* c = 0;
- QSqlDatabase *db = 0;
+ TQValueList<Field> 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<QString, QString>::Iterator it = widgetFactory->buddies.begin(); it != widgetFactory->buddies.end(); ++it ) {
- QLabel *label = (QLabel*)widgetFactory->toplevel->child( it.key(), "QLabel" );
- QWidget *buddy = (QWidget*)widgetFactory->toplevel->child( *it, "QWidget" );
+ for ( TQMap<TQString, TQString>::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<Image>::Iterator it = images.begin();
+ TQValueList<Image>::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<Field> fieldMap;
+ TQString txt;
+ TQString field;
+ TQValueList<Field> fieldMap;
if ( fieldMaps.find( table ) != fieldMaps.end() ) {
fieldMap = *fieldMaps.find( table );
fieldMaps.remove( table );
}
while ( !n.isNull() ) {
if ( n.tagName() == "property" ) {
- QString attrib = n.attribute( "name" );
- QVariant v = DomTool::elementToVariant( n.firstChild().toElement(), QVariant() );
+ 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<QPixmap> pixmaps;
- QStringList textes;
- QListViewItem *item = 0;
- QListView *lv = (QListView*)widget;
+ } else if ( widget->inherits( "TQListView" ) ) {
+ TQDomElement n = e.firstChild().toElement();
+ TQPixmap pix;
+ TQValueList<TQPixmap> 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 <qstring.h>
-#include <qptrlist.h>
-#include <qimage.h>
-#include <qpixmap.h>
-#include <qvaluelist.h>
-#include <qmap.h>
-#include <qaction.h>
+#include <tqstring.h>
+#include <tqptrlist.h>
+#include <tqimage.h>
+#include <tqpixmap.h>
+#include <tqvaluelist.h>
+#include <tqmap.h>
+#include <tqaction.h>
#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<QString, KommanderWidgetInfo> FeatureList;
+typedef TQMap<TQString, KommanderWidgetInfo> 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<QStringList> functions;
+ TQStringList events;
+ TQValueList<TQStringList> functions;
};
struct SqlWidgetConnection
{
SqlWidgetConnection() {}
- SqlWidgetConnection( const QString &c, const QString &t )
- : conn( c ), table( t ), dbControls( new QMap<QString, QString>() ) {}
- QString conn;
- QString table;
- QMap<QString, QString> *dbControls;
+ SqlWidgetConnection( const TQString &c, const TQString &t )
+ : conn( c ), table( t ), dbControls( new TQMap<TQString, TQString>() ) {}
+ TQString conn;
+ TQString table;
+ TQMap<TQString, TQString> *dbControls;
};
struct Functions
{
- QString functions;
+ TQString functions;
};
- QValueList<Image> images;
- QWidget *toplevel;
- QListViewItem *lastItem;
- QMap<QString, QString> *dbControls;
- QMap<QString, QStringList> dbTables;
- QMap<QWidget*, SqlWidgetConnection> sqlWidgetConnections;
- QMap<QString, QString> buddies;
- QMap<QTable*, QValueList<Field> > fieldMaps;
- QPtrList<QAction> actionList;
- QMap<QObject *, EventFunction> eventMap;
- QMap<QString, QString> languageSlots;
- QMap<QString, Functions*> languageFunctions;
- QStringList variables;
- QStringList noDatabaseWidgets;
+ TQValueList<Image> images;
+ TQWidget *toplevel;
+ TQListViewItem *lastItem;
+ TQMap<TQString, TQString> *dbControls;
+ TQMap<TQString, TQStringList> dbTables;
+ TQMap<TQWidget*, SqlWidgetConnection> sqlWidgetConnections;
+ TQMap<TQString, TQString> buddies;
+ TQMap<TQTable*, TQValueList<Field> > fieldMaps;
+ TQPtrList<TQAction> actionList;
+ TQMap<TQObject *, EventFunction> eventMap;
+ TQMap<TQString, TQString> languageSlots;
+ TQMap<TQString, Functions*> 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 <kinstance.h>
#include <kparts/genericfactory.h>
-#include <qpoint.h>
-#include <qlayout.h>
-#include <qtimer.h>
+#include <tqpoint.h>
+#include <tqlayout.h>
+#include <tqtimer.h>
#include "instance.h"
#include "kommanderversion.h"
@@ -33,15 +33,15 @@ typedef KParts::GenericFactory<KommanderPart> KommanderPartFactory;
K_EXPORT_COMPONENT_FACTORY( libkommander_part, KommanderPartFactory )
-KommanderPart::KommanderPart( QWidget *parentWidget, const char * /*widgetName*/,
- QObject *parent, const char *name, const QStringList & /*args*/ )
+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 <qobject.h>
-#include <qmap.h>
-#include <qstringlist.h>
+#include <tqobject.h>
+#include <tqmap.h>
+#include <tqstringlist.h>
#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<QString, WidgetInfo> WidgetInfos;
+ typedef TQMap<TQString, WidgetInfo> 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 <klocale.h>
-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<args.count(); i++)
{
m_types.append(args[i].stripWhiteSpace().section(' ', 0, 0));
@@ -40,7 +40,7 @@ SpecialFunction::SpecialFunction(const QString& name, const QString& description
m_maxArgs = (maxArgs == -1) ? m_types.count() : maxArgs;
}
-SpecialFunction::SpecialFunction(ParserType p, const QString& name, const QString& description,
+SpecialFunction::SpecialFunction(ParserType p, const TQString& name, const TQString& description,
int minArgs, int maxArgs)
{
m_parserTypes = p;
@@ -50,8 +50,8 @@ SpecialFunction::SpecialFunction(ParserType p, const QString& name, const QStrin
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<args.count(); i++)
{
m_types.append(args[i].stripWhiteSpace().section(' ', 0, 0));
@@ -63,37 +63,37 @@ SpecialFunction::SpecialFunction(ParserType p, const QString& name, const QStrin
}
-QString SpecialFunction::prototype(uint prototypeFlags) const
+TQString SpecialFunction::prototype(uint prototypeFlags) const
{
if (!m_types.count())
return m_function;
int start = (prototypeFlags & SkipFirstArgument) ? 1 : 0;
- QStringList params;
+ TQStringList params;
for (uint i=start; i<m_types.count(); i++)
if (prototypeFlags & ShowArgumentNames)
- params.append(QString("%1 %2").arg(m_types[i]).arg(m_args[i]));
+ params.append(TQString("%1 %2").arg(m_types[i]).arg(m_args[i]));
else
params.append(m_types[i]);
if (!params.count())
return m_function;
else if (prototypeFlags & NoSpaces)
- return QString("%1(%2)").arg(m_function).arg(params.join(","));
+ return TQString("%1(%2)").arg(m_function).arg(params.join(","));
else
- return QString("%1(%2)").arg(m_function).arg(params.join(", "));
+ return TQString("%1(%2)").arg(m_function).arg(params.join(", "));
}
-QString SpecialFunction::argumentName(uint i) const
+TQString SpecialFunction::argumentName(uint i) const
{
if (i < m_args.count())
return m_args[i];
- return QString();
+ return TQString();
}
-QString SpecialFunction::argumentType(uint i) const
+TQString SpecialFunction::argumentType(uint i) const
{
if (i < m_types.count())
return m_types[i];
- return QString();
+ return TQString();
}
int SpecialFunction::argumentCount() const
@@ -104,9 +104,9 @@ int SpecialFunction::argumentCount() const
-int SpecialInformation::function(int group, const QString& fname)
+int SpecialInformation::function(int group, const TQString& fname)
{
- QString f = fname.lower();
+ TQString f = fname.lower();
if (m_functions.contains(group) && m_functions[group].contains(f))
return m_functions[group][f];
else if (m_aliases.contains(group) && m_aliases[group].contains(f))
@@ -114,13 +114,13 @@ int SpecialInformation::function(int group, const QString& fname)
return -1;
}
-SpecialFunction SpecialInformation::functionObject(const QString& gname, const QString& fname)
+SpecialFunction SpecialInformation::functionObject(const TQString& gname, const TQString& fname)
{
int gid = group(gname);
return m_specials[gid][function(gid, fname)];
}
-int SpecialInformation::group(const QString& gname)
+int SpecialInformation::group(const TQString& gname)
{
if (m_groups.contains(gname))
return m_groups[gname];
@@ -132,7 +132,7 @@ bool SpecialInformation::isValid(int gname, int fname)
return m_specials.contains(gname) && m_specials[gname].contains(fname);
}
-bool SpecialInformation::isValid(const QString& gname, const QString& fname)
+bool SpecialInformation::isValid(const TQString& gname, const TQString& fname)
{
return function(group(gname), fname) != -1;
}
@@ -143,7 +143,7 @@ bool SpecialInformation::isValid(int gname, int fname, SpecialFunction::ParserTy
&& m_specials[gname][fname].isSupported(p);
}
-bool SpecialInformation::isValid(const QString& gname, const QString& fname,
+bool SpecialInformation::isValid(const TQString& gname, const TQString& fname,
SpecialFunction::ParserType p)
{
int g = group(gname);
@@ -179,21 +179,21 @@ bool SpecialInformation::isValidArg(int gname, int fname, int args)
return -1;
}
-QString SpecialInformation::description(int gname, int fname)
+TQString SpecialInformation::description(int gname, int fname)
{
if (isValid(gname, fname))
return m_specials[gname][fname].description();
- return QString();
+ return TQString();
}
-QString SpecialInformation::prototype(int gname, int fname, uint flags)
+TQString SpecialInformation::prototype(int gname, int fname, uint flags)
{
if (isValid(gname, fname))
return m_specials[gname][fname].prototype(flags);
- return QString();
+ return TQString();
}
-bool SpecialInformation::insert(int id, const QString& function, const QString description,
+bool SpecialInformation::insert(int id, const TQString& function, const TQString description,
int minArgs, int maxArgs, SpecialFunction::ParserType pType)
{
if (isValid(m_defaultGroup, id)) /* function already defined */
@@ -208,19 +208,19 @@ bool SpecialInformation::insert(int id, const QString& function, const QString d
return true;
}
-bool SpecialInformation::insertMacro(int id, const QString& function, const QString description,
+bool SpecialInformation::insertMacro(int id, const TQString& function, const TQString description,
int minArgs, int maxArgs)
{
return insert(id, function, description, minArgs, maxArgs, SpecialFunction::MacroParser);
}
-bool SpecialInformation::insertInternal(int id, const QString& function, const QString description,
+bool SpecialInformation::insertInternal(int id, const TQString& function, const TQString description,
int minArgs, int maxArgs)
{
return insert(id, function, description, minArgs, maxArgs, SpecialFunction::InternalParser);
}
-bool SpecialInformation::insertAlias(int id, const QString& alias)
+bool SpecialInformation::insertAlias(int id, const TQString& alias)
{
if (!isValid(m_defaultGroup, id)) /* function doesn't exists */
return false;
@@ -237,7 +237,7 @@ void SpecialInformation::setDefaultGroup(int gname)
m_defaultGroup = gname;
}
-void SpecialInformation::insertGroup(int id, const QString& name, const QString& parserName)
+void SpecialInformation::insertGroup(int id, const TQString& name, const TQString& parserName)
{
if (group(name) == -1) {
m_groups[name] = id;
@@ -246,7 +246,7 @@ void SpecialInformation::insertGroup(int id, const QString& name, const QString&
}
}
-QString SpecialInformation::parserGroupName(const QString& name)
+TQString SpecialInformation::parserGroupName(const TQString& name)
{
if (m_parserGroups.contains(name))
return m_parserGroups[name];
@@ -254,21 +254,21 @@ QString SpecialInformation::parserGroupName(const QString& name)
return name;
}
-QStringList SpecialInformation::groups()
+TQStringList SpecialInformation::groups()
{
return m_groups.keys();
}
-QStringList SpecialInformation::functions(const QString& g)
+TQStringList SpecialInformation::functions(const TQString& g)
{
int gid = group(g);
if (gid == -1)
- return QStringList();
+ return TQStringList();
else
{
- QStringList list;
- const QMap<int, SpecialFunction> fgroup = m_specials[gid];
- for(QMap<int, SpecialFunction>::ConstIterator it = fgroup.begin(); it != fgroup.end(); ++it)
+ TQStringList list;
+ const TQMap<int, SpecialFunction> fgroup = m_specials[gid];
+ for(TQMap<int, SpecialFunction>::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 <i>recursive</i> parameter to <i>true</i> 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 <i>count</i> columns) at <i>column</i> 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 <i>index</i> 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 <i>index</i> 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 <i>count</i> rows) at <i>row</i> 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 <i>count</i> 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 <i>count</i> 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 <i>column</i>."), 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 <i>index = -1</i> 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 <i>row</i>."), 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 <i>x y w h</i>. 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 <i>text</i> on stderr."), 1);
- insert(Kommander::echo, "echo(QString text)",
+ insert(Kommander::echo, "echo(TQString text)",
i18n("Writes <i>text</i> 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. <p><i>If this is used inside a button it allows alternate script languages to be used and will return a value to the main script, which may be unexpected.</i>"), 0);
- insert(Kommander::env, "env(QString variable)",
+ insert(Kommander::env, "env(TQString variable)",
i18n("Returns value of an environment (shell) variable. Do not use <i>$</i> in the name. For example, <i>@env(PATH)</i>."), 1);
- insert(Kommander::exec, "exec(QString command)",
+ 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 <i>items</i> list (passed as EOL-separated string) are assigned to the variable. <br><b>Old</b><br> <i>@forEach(i,A\\nB\\nC\\n)<br> @# @i=A<br>@end</i><br><b>New</b><br><i>foreach i in MyArray do<br> //i = key, MyArray[i] = val<br>end "), 2);
- insert(Kommander::forBlock, "for(QString variable, int start, int end, int step)",
+ insert(Kommander::forBlock, "for(TQString variable, int start, int end, int step)",
i18n("Executes loop: variable is set to <i>start</i> and is increased by <i>step</i> each time loop is executed. Execution stops when variable becomes larger then <i>end</i>. <br><b>Old</b><br><i>@for(i,1,10,1)<br> @# @i=1<br>@endif</i><br><b>New</b><br><i>for i=0 to 20 step 5 do<br> debug(i)<br>end</i>."), 3);
- insertMacro(Kommander::global, "global(QString variable)",
+ 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.) <p><b>Old</b>Close with <b>@endif</b></p><p><b>New</b><br>if val == true then<br>// do op<br>elseif cond<br>// second chance<br>else<br>// cond failed<br>endif</p>"), 1);
- insert(Kommander::dialog, "dialog(QString file, QString args)",
+ 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: <i>var=val</i>"), 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 <b>switch</b> block. Following <b>case</b> values are compared to <i>expression</i>.<p>@switch()<br>@case()<br>@end"), 1);
- insert(Kommander::dcop, "dcop(QString id, QString interface, QString function, QString args)",
+ 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 <br>switch var<br>case 1<br> //code<br>else<br> //code<br>end<p>also can use the form of <br>switch var {<br>case 1; //code<br>else; code<br>}<p> semicolons are optional in place of returns. Currently switch does not parse value from arrays.") );
*/
insertInternal(Kommander::exit, "exit",
@@ -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 <i>key\\tvalue\\n</i> format."), 2);
- insert(Array::toString, "toString(QString array)",
+ insert(Array::toString, "toString(TQString array)",
i18n("Returns all elements in the array in <pre>key\\tvalue\\n</pre> format."), 1);
- insertInternal(Array::indexedFromString, "indexedFromString(QString array, QString string, QString separator)",
+ 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]\".<br><b>NOTE: Watch keys!</b> The row and column keys when set to true will read respectively the first row and first column as headings. If for instance you set one where there is no column or row heading to read it will read data, and if the data is not unique you will have missing columns or rows as well as addressing not working."), 2, 4);
- insertInternal(Matrix::toString, "toString(QString matrix, bool RowHeadings, bool ColHeadings)",
+ 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 <i>n</i> 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 <i>n</i> 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 <i>n</i> chars of the string, starting from <i>start</i>."), 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 <i>arg1</i>, <i>arg2</i>, <i>arg3</i> 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<int, QMap<int, SpecialFunction> > SpecialInformation::m_specials;
-QMap<QString, int> SpecialInformation::m_groups;
-QMap<QString, QString> SpecialInformation::m_parserGroups;
-QMap<int, QMap<QString, int> > SpecialInformation::m_functions;
-QMap<int, QMap<QString, int> > SpecialInformation::m_aliases;
+TQMap<int, TQMap<int, SpecialFunction> > SpecialInformation::m_specials;
+TQMap<TQString, int> SpecialInformation::m_groups;
+TQMap<TQString, TQString> SpecialInformation::m_parserGroups;
+TQMap<int, TQMap<TQString, int> > SpecialInformation::m_functions;
+TQMap<int, TQMap<TQString, int> > 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 <qstring.h>
-#include <qstringlist.h>
-#include <qmap.h>
-#include <qpair.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqmap.h>
+#include <tqpair.h>
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<int, QMap<int, SpecialFunction> > m_specials;
- static QMap<QString, int> m_groups;
- static QMap<QString, QString> m_parserGroups;
- static QMap<int, QMap<QString, int> > m_functions;
- static QMap<int, QMap<QString, int> > m_aliases;
+ static TQMap<int, TQMap<int, SpecialFunction> > m_specials;
+ static TQMap<TQString, int> m_groups;
+ static TQMap<TQString, TQString> m_parserGroups;
+ static TQMap<int, TQMap<TQString, int> > m_functions;
+ static TQMap<int, TQMap<TQString, int> > 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 <kaboutdata.h>
#include <klocale.h>
#include <kurl.h>
-#include <qapplication.h>
-#include <qobject.h>
+#include <tqapplication.h>
+#include <tqobject.h>
#include <kapplication.h>
/* QT INCLUDES */
-#include <qstringlist.h>
+#include <tqstringlist.h>
/* 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 <kglobal.h>
#include <kstandarddirs.h>
-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("<qt>Unable to load Kommander plugin<br><b>%1</b></qt>").arg(plugin);
+ TQString errMsg = i18n("<qt>Unable to load Kommander plugin<br><b>%1</b></qt>").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 <qstringlist.h>
+#include <tqstringlist.h>
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 <qstring.h>
-#include <qvaluelist.h>
-#include <qvariant.h>
+#include <tqstring.h>
+#include <tqvaluelist.h>
+#include <tqvariant.h>
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, x<y and x>y 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<QVariant> m_parts;
+ TQValueList<TQVariant> 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 <qvaluevector.h>
+#include <tqvaluevector.h>
class Parser;
-typedef QValueVector<ParseNode> ParameterList;
-typedef QValueVector<Parse::ValueType> TypeList;
+typedef TQValueVector<ParseNode> ParameterList;
+typedef TQValueVector<Parse::ValueType> 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 <iostream>
#include <stdlib.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qstringlist.h>
-#include <qmetaobject.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqstringlist.h>
+#include <tqmetaobject.h>
#include <kdebug.h>
#include <kmessagebox.h>
@@ -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; i<params.count(); i++)
text << params[i].toString();
return 1;
@@ -214,13 +214,13 @@ static ParseNode f_fileWrite(Parser*, const ParameterList& params)
static ParseNode f_fileAppend(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 | IO_Append))
return 0;
- QTextStream text(&file);
+ TQTextStream text(&file);
for (uint i=1; i<params.count(); i++)
text << params[i].toString();
return 1;
@@ -228,7 +228,7 @@ static ParseNode f_fileAppend(Parser*, const ParameterList& params)
static ParseNode f_fileExists(Parser*, const ParameterList& params)
{
- QFile file(params[0].toString());
+ TQFile file(params[0].toString());
if (!file.exists())
return 0;
else
@@ -238,20 +238,20 @@ static ParseNode f_fileExists(Parser*, const ParameterList& params)
static ParseNode f_executeSlot(Parser* parser, const ParameterList& params)
{
ParameterList::ConstIterator it = params.begin();
- QString slotName = (*it).toString()+"(";
+ TQString slotName = (*it).toString()+"(";
++it;
- QString widgetName = (*it).toString();
+ TQString widgetName = (*it).toString();
KommanderWidget* widget = parser->currentWidget();
if (!widget)
return ParseNode::error("unknown widget");
widget = widget->widgetByName(widgetName);
if (!widget)
return ParseNode::error("unknown widget");
- QObject *object = widget->object();
+ 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<QWidget*>(widget->object());
- QWidget *w = KommanderFactory::createWidget(widgetType, parent, widgetName.latin1());
+ TQWidget *parent = dynamic_cast<TQWidget*>(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<QObject*>(senderW)->connect(dynamic_cast<QObject*>(senderW), signal.ascii(), dynamic_cast<QObject*>(receiverW), slot.ascii());
+ dynamic_cast<TQObject*>(senderW)->connect(dynamic_cast<TQObject*>(senderW), signal.ascii(), dynamic_cast<TQObject*>(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<QObject*>(senderW)->disconnect(dynamic_cast<QObject*>(senderW), signal.ascii(), dynamic_cast<QObject*>(receiverW), slot.ascii());
+ dynamic_cast<TQObject*>(senderW)->disconnect(dynamic_cast<TQObject*>(senderW), signal.ascii(), dynamic_cast<TQObject*>(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<ParseNode> values = P->array(params[0].toString()).values();
- QString array;
- for (QValueList<ParseNode>::ConstIterator it = values.begin(); it != values.end(); ++it )
+ TQValueList<ParseNode> values = P->array(params[0].toString()).values();
+ TQString array;
+ for (TQValueList<ParseNode>::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<ParseNode> values = P->array(name).values();
+ TQString array;
+ TQStringList keys = P->array(name).keys();
+ TQValueList<ParseNode> values = P->array(name).values();
- QStringList::Iterator it = keys.begin();
- QValueList<ParseNode>::Iterator itval = values.begin();
+ TQStringList::Iterator it = keys.begin();
+ TQValueList<ParseNode>::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<ParseNode> values = P->array(name).values();
+ TQValueList<ParseNode> values = P->array(name).values();
for (int i = 0; i < count; i++)
{
if (i != 0)
array.append(separator);
- array.append(P->arrayValue(name, QString::number(i)).toString());
+ 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 <qcolor.h>
-#include <qregexp.h>
+#include <tqcolor.h>
+#include <tqregexp.h>
-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 <qobject.h>
-#include <qstringlist.h>
+#include <tqobject.h>
+#include <tqstringlist.h>
-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 <qtimer.h>
+#include <tqtimer.h>
-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 <iostream>
#include <stdlib.h>
-#include <qfile.h>
-#include <qregexp.h>
-#include <qtextstream.h>
+#include <tqfile.h>
+#include <tqregexp.h>
+#include <tqtextstream.h>
#include <dcopclient.h>
#include <kapplication.h>
@@ -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<args.count(); i++)
std::cout << args[i].latin1();
fflush(stdout);
- return QString::null;
+ return TQString::null;
case Kommander::readSetting:
{
- QString fname = fileName();
+ TQString fname = fileName();
if (!fname.isEmpty())
{
KConfig cfg("kommanderrc", true);
cfg.setGroup(fname);
return cfg.readEntry(args[0], args[1]);
}
- return QString::null;
+ return TQString::null;
}
case Kommander::writeSetting:
{
- QString fname = fileName();
+ TQString fname = fileName();
if (!fname.isEmpty())
{
KConfig cfg("kommanderrc", false);
cfg.setGroup(fname);
cfg.writeEntry(args[0], args[1]);
}
- return QString::null;
+ return TQString::null;
}
case Kommander::dialog:
if (args.count() > 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<loop.count(); i++)
- output += evalAssociatedText(substituteVariable(substituteVariable(block, varidx, QString::number(i+1)),
+ output += evalAssociatedText(substituteVariable(substituteVariable(block, varidx, TQString::number(i+1)),
var, loop[i]));
return output;
}
}
-QString KommanderWidget::evalForBlock(const QStringList& args, const QString& s, int& pos)
+TQString KommanderWidget::evalForBlock(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 block = s.mid(start, f - start);
- QString variable = args[0];
+ pos = f + TQString("@end").length()+1;
+ TQString block = s.mid(start, f - start);
+ TQString variable = args[0];
Expression expr;
int loopstart = expr.value(args[1]).toInt();
@@ -182,16 +182,16 @@ QString KommanderWidget::evalForBlock(const QStringList& args, const QString& s,
loopstep = 1;
}
- QString output;
+ TQString output;
for (int i=loopstart; i<=loopend; i+=loopstep)
{
- output += evalAssociatedText(substituteVariable(block, variable, QString::number(i)));
+ output += evalAssociatedText(substituteVariable(block, variable, TQString::number(i)));
}
return output;
}
}
-QString KommanderWidget::evalIfBlock(const QStringList& args, const QString& s, int& pos)
+TQString KommanderWidget::evalIfBlock(const TQStringList& args, const TQString& s, int& pos)
{
int f = s.find("@endif", pos);
//FIXME: better detection of block boundaries; add error message
@@ -199,32 +199,32 @@ QString KommanderWidget::evalIfBlock(const QStringList& args, const QString& s,
{
pos = s.length()+1;
printError(i18n("Unterminated @if ... @endif block."));
- return QString();
+ return TQString();
}
else
{
- QString block = s.mid(pos, f - pos);
- pos = f + QString("@endif").length()+1;
+ TQString block = s.mid(pos, f - pos);
+ pos = f + TQString("@endif").length()+1;
Expression expr;
if (expr.isTrue(args[0]))
return evalAssociatedText(block);
- return QString();
+ return TQString();
}
}
-QString KommanderWidget::evalSwitchBlock(const QStringList& args, const QString& s, int& pos)
+TQString KommanderWidget::evalSwitchBlock(const TQStringList& args, const TQString& s, int& pos)
{
int f = s.find("@end", pos);
//FIXME: better detection of block boundaries; add error message
if (f == -1)
{
printError(i18n("Unterminated @switch ... @end block."));
- return QString();
+ return TQString();
}
else
{
- QString block = s.mid(pos, f - pos);
- pos = f + QString("@end").length()+1;
+ TQString block = s.mid(pos, f - pos);
+ pos = f + TQString("@end").length()+1;
f = parseBlockBoundary(block, 0, "@case");
bool finished = f == -1;
while (!finished)
@@ -237,99 +237,99 @@ QString KommanderWidget::evalSwitchBlock(const QStringList& args, const QString&
finished = true;
}
bool ok;
- QString value = parseBrackets(block, f, ok);
+ TQString value = parseBrackets(block, f, ok);
if (!ok)
break;
if (value == args[0] || value == "*")
return evalAssociatedText(block.mid(f, end-f));
f = end;
}
- return QString();
+ return TQString();
}
}
-QString KommanderWidget::evalArrayFunction(const QString& function, const QStringList& args)
+TQString KommanderWidget::evalArrayFunction(const TQString& function, const TQStringList& args)
{
Parser parser(internalParserData());
int fname = SpecialInformation::function(Group::Array, function);
- QString array = args[0].startsWith("_") ? args[0] : QString("_")+ args[0];
+ TQString array = args[0].startsWith("_") ? args[0] : TQString("_")+ args[0];
if (fname == Array::setValue)
parser.setArray(array, args[1], args[2]);
else if (fname == Array::fromString)
{
- QStringList lines = QStringList::split("\n", args[1]);
- for (QStringList::Iterator it = lines.begin(); it != lines.end(); ++it)
+ TQStringList lines = TQStringList::split("\n", args[1]);
+ 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())
parser.setArray(array, key, (*it).section('\t', 1));
}
}
else if (!parser.isArray(array))
- return QString();
+ return TQString();
else switch (fname) {
case Array::value:
return parser.arrayValue(array, args[1]).toString();
case Array::keys:
{
- const QMap<QString, ParseNode> map = parser.array(array);
- QStringList keys;
- for (QMap<QString, ParseNode>::ConstIterator it = map.begin(); it != map.end(); ++it)
+ const TQMap<TQString, ParseNode> map = parser.array(array);
+ TQStringList keys;
+ for (TQMap<TQString, ParseNode>::ConstIterator it = map.begin(); it != map.end(); ++it)
keys.append(it.key());
return keys.join("\n");
}
case Array::values:
{
- const QMap<QString, ParseNode> map = parser.array(array);
- QStringList values;
- for (QMap<QString, ParseNode>::ConstIterator it = map.begin(); it != map.end(); ++it)
+ const TQMap<TQString, ParseNode> map = parser.array(array);
+ TQStringList values;
+ for (TQMap<TQString, ParseNode>::ConstIterator it = map.begin(); it != map.end(); ++it)
values.append(it.data().toString());
return values.join("\n");
}
case Array::clear:
parser.unsetArray(array);
- return QString();
+ 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<QString, ParseNode> map = parser.array(array);
- QString arraystring;
- for (QMap<QString, ParseNode>::ConstIterator it = map.begin(); it != map.end(); ++it)
- arraystring += QString("%1\t%2\n").arg(it.key()).arg(it.data().toString());
+ const TQMap<TQString, ParseNode> map = parser.array(array);
+ TQString arraystring;
+ for (TQMap<TQString, ParseNode>::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 <kprocess.h>
/* QT INCLUDES */
-#include <qcstring.h>
-#include <qdatastream.h>
-#include <qfileinfo.h>
-#include <qobject.h>
-#include <qobjectlist.h>
-#include <qregexp.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qvaluelist.h>
-#include <qvariant.h>
+#include <tqcstring.h>
+#include <tqdatastream.h>
+#include <tqfileinfo.h>
+#include <tqobject.h>
+#include <tqobjectlist.h>
+#include <tqregexp.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqvaluelist.h>
+#include <tqvariant.h>
/* 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 ; i<argTypes.count(); i++) {
if (argTypes[i] == "int")
byteDataStream << a_query[i+3].toInt();
@@ -295,11 +295,11 @@ QString KommanderWidget::DCOPQuery(const QStringList& a_query)
byteDataStream << a_query[i+3].toDouble();
else if (argTypes[i] == "bool")
byteDataStream << (bool)(a_query[i+3] != "false" && a_query[i+3] != "false" && a_query[i+3] != "0");
- else if (argTypes[i] == "QStringList")
+ else if (argTypes[i] == "TQStringList")
if (a_query[i+3].find('\n') != -1)
- byteDataStream << QStringList::split("\n", a_query[i+3], true);
+ byteDataStream << TQStringList::split("\n", a_query[i+3], true);
else
- byteDataStream << QStringList::split("\\n", a_query[i+3], true);
+ byteDataStream << TQStringList::split("\\n", a_query[i+3], true);
else
byteDataStream << a_query[i+3];
}
@@ -308,13 +308,13 @@ QString KommanderWidget::DCOPQuery(const QStringList& a_query)
if (!cl || !cl->call(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("<qt>Error in widget <b>%1</b>:<p><i>%2</i></qt>").arg(QString(m_thisObject->name()))
- .arg(a_error), QStringList(), QString(), 0, 0))
+ switch (KMessageBox::createKMessageBox(dialog, TQMessageBox::Warning,
+ i18n("<qt>Error in widget <b>%1</b>:<p><i>%2</i></qt>").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<QChar> buf(s.length());
+ TQMemArray<TQChar> buf(s.length());
int start = 0;
int end = s.length() - 1;
for (int i=1; i<end; i++)
@@ -538,51 +538,51 @@ QString KommanderWidget::parseQuotes(const QString& s) const
}
else
buf[start++] = s[i];
- return QString(buf, start);
+ return TQString(buf, start);
//return s.mid(1, s.length()-2);
}
else return s;
}
-bool KommanderWidget::isWidget(const QString& a_name) const
+bool KommanderWidget::isWidget(const TQString& a_name) const
{
return parseWidget(a_name);
}
-KommanderWidget* KommanderWidget::widgetByName(const QString& a_name) const
+KommanderWidget* KommanderWidget::widgetByName(const TQString& a_name) const
{
return parseWidget(a_name);
}
-KommanderWidget* KommanderWidget::parseWidget(const QString& widgetName) const
+KommanderWidget* KommanderWidget::parseWidget(const TQString& widgetName) const
{
- if (QString(parentDialog()->name()) == widgetName)
+ if (TQString(parentDialog()->name()) == widgetName)
return dynamic_cast <KommanderWidget*>(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 <KommanderWidget*>(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; i<args.count(); i++)
@@ -625,10 +625,10 @@ int KommanderWidget::parseBlockBoundary(const QString& s, int from, const QStrin
-QString KommanderWidget::substituteVariable(QString text, QString variable, QString value) const
+TQString KommanderWidget::substituteVariable(TQString text, TQString variable, TQString value) const
{
- QString var = QString("@%1").arg(variable);
- QString newtext;
+ TQString var = TQString("@%1").arg(variable);
+ TQString newtext;
int newpos, pos = 0;
while (true)
{
@@ -649,40 +649,40 @@ QString KommanderWidget::substituteVariable(QString text, QString variable, QStr
-QWidget* KommanderWidget::parentDialog() const
+TQWidget* KommanderWidget::parentDialog() const
{
- QObject *superParent = m_thisObject;
+ TQObject *superParent = m_thisObject;
while (superParent->parent())
{
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<QWidget*>(m_thisObject);
+ TQWidget* current = dynamic_cast<TQWidget*>(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<KommanderWidget*>(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<KommanderWindow*>(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 <qmap.h>
-#include <qobject.h>
-#include <qpair.h>
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqmap.h>
+#include <tqobject.h>
+#include <tqpair.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
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 <klocale.h>
/* QT INCLUDES */
-#include <qapplication.h>
-#include <qobject.h>
-#include <qstring.h>
+#include <tqapplication.h>
+#include <tqobject.h>
+#include <tqstring.h>
/* 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("<qt>Failed to start shell process<br><b>%1</b></qt>").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 <kprocess.h>
/* QT INCLUDES */
-#include <qstring.h>
-#include <qobject.h>
+#include <tqstring.h>
+#include <tqobject.h>
#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 <qstring.h>
+#include <tqstring.h>
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<QString, ParseNode> A = array(arr);
- for (QMapConstIterator<QString, ParseNode> It = A.begin(); It != A.end(); ++It)
+ const TQMap<TQString, ParseNode> A = array(arr);
+ for (TQMapConstIterator<TQString, ParseNode> 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<QString, ParseNode>& Parser::array(const QString& name) const
+const TQMap<TQString, ParseNode>& Parser::array(const TQString& name) const
{
if (isGlobal(name))
return m_globalArrays[name];
@@ -845,12 +845,12 @@ const QMap<QString, ParseNode>& 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<QString, ParseNode> Parser::m_globalVariables;
-QMap<QString, QMap<QString, ParseNode> > Parser::m_globalArrays;
+TQMap<TQString, ParseNode> Parser::m_globalVariables;
+TQMap<TQString, TQMap<TQString, ParseNode> > 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 <qvaluevector.h>
-#include <qstringlist.h>
-#include <qmap.h>
+#include <tqvaluevector.h>
+#include <tqstringlist.h>
+#include <tqmap.h>
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<QString, ParseNode>& array(const QString& name) const;
+ const TQMap<TQString, ParseNode>& 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<ParseNode> m_parts;
+ TQValueVector<ParseNode> m_parts;
// variables
- QMap<QString, ParseNode> m_variables;
+ TQMap<TQString, ParseNode> m_variables;
// arrays
- QMap<QString, QMap<QString, ParseNode> > m_arrays;
+ TQMap<TQString, TQMap<TQString, ParseNode> > m_arrays;
// Kommander
KommanderWidget* m_widget;
// global variables
- static QMap<QString, ParseNode> m_globalVariables;
+ static TQMap<TQString, ParseNode> m_globalVariables;
// global arrays
- static QMap<QString, QMap<QString, ParseNode> > m_globalArrays;
+ static TQMap<TQString, TQMap<TQString, ParseNode> > 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<QString, Keyword> it = m_keywords.begin(); it != m_keywords.end(); ++it)
+ for (TQMapConstIterator<TQString, Keyword> 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 <qmap.h>
+#include <tqmap.h>
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<QString, Parse::Keyword> m_keywords;
- QMap<Parse::Keyword, Parse::KeywordGroup> m_groups;
- QMap<QString, Function> m_functions;
+ TQMap<TQString, Parse::Keyword> m_keywords;
+ TQMap<Parse::Keyword, Parse::KeywordGroup> m_groups;
+ TQMap<TQString, Function> 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 <qfile.h>
+#include <tqfile.h>
#include "aboutdialog.h"
#include "kommanderplugin.h"
@@ -21,7 +21,7 @@
#include <klocale.h>
#include <kstandarddirs.h>
-#include <qtextstream.h>
+#include <tqtextstream.h>
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 <qlabel.h>
+#include <tqlabel.h>
#include <kommanderwidget.h>
class KAboutApplication;
@@ -21,52 +21,52 @@ class KAboutData;
/**
@author Andras Mantia <amantia@kdewebdev.org>
*/
-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 <klocale.h>
/* QT INCLUDES */
-#include <qobject.h>
-#include <qstring.h>
-#include <qwidget.h>
-#include <qstringlist.h>
-#include <qbuttongroup.h>
-#include <qevent.h>
+#include <tqobject.h>
+#include <tqstring.h>
+#include <tqwidget.h>
+#include <tqstringlist.h>
+#include <tqbuttongroup.h>
+#include <tqevent.h>
/* OTHER INCLUDES */
#include <kommanderwidget.h>
@@ -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<KommanderWidget*>(find(i)))
text += (dynamic_cast<KommanderWidget*>(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 <qbuttongroup.h>
-#include <qobject.h>
-#include <qstringlist.h>
-#include <qstring.h>
+#include <tqbuttongroup.h>
+#include <tqobject.h>
+#include <tqstringlist.h>
+#include <tqstring.h>
/* OTHER INCLUDES */
#include <kommanderwidget.h>
@@ -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 <qobject.h>
-#include <qstring.h>
-#include <qwidget.h>
-#include <qstringlist.h>
-#include <qevent.h>
-#include <qcheckbox.h>
-#include <qbutton.h>
+#include <tqobject.h>
+#include <tqstring.h>
+#include <tqwidget.h>
+#include <tqstringlist.h>
+#include <tqevent.h>
+#include <tqcheckbox.h>
+#include <tqbutton.h>
/* OTHER INCLUDES */
#include <specials.h>
#include "checkbox.h"
-CheckBox::CheckBox(QWidget *a_parent, const char *a_name)
- : QCheckBox(a_parent, a_name), KommanderWidget(this)
+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 <qobject.h>
-#include <qstringlist.h>
-#include <qstring.h>
-#include <qcheckbox.h>
+#include <tqobject.h>
+#include <tqstringlist.h>
+#include <tqstring.h>
+#include <tqcheckbox.h>
/* OTHER INCLUDES */
#include <kommanderwidget.h>
@@ -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 <klocale.h>
/* QT INCLUDES */
-#include <qdialog.h>
-#include <qevent.h>
-#include <qobject.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qwidget.h>
+#include <tqdialog.h>
+#include <tqevent.h>
+#include <tqobject.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqwidget.h>
/* OTHER INCLUDES */
#include <specials.h>
#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 <kpushbutton.h>
/* QT INCLUDES */
-#include <qobject.h>
+#include <tqobject.h>
/* OTHER INCLUDES */
#include <kommanderwidget.h>
@@ -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 <klocale.h>
/* QT INCLUDES */
-#include <qobject.h>
-#include <qstring.h>
-#include <qwidget.h>
-#include <qstringlist.h>
+#include <tqobject.h>
+#include <tqstring.h>
+#include <tqwidget.h>
+#include <tqstringlist.h>
/* OTHER INCLUDES */
#include <kommanderplugin.h>
@@ -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; i<count(); i++)
if (text(i) == args[0])
- return QString();
+ return TQString();
insertItem(args[0]);
break;
case DCOP::clear:
clear();
break;
case DCOP::count:
- return QString::number(count());
+ return TQString::number(count());
case DCOP::setSelection:
{
for (int i = 0; i < count(); i++)
@@ -184,27 +184,27 @@ QString ComboBox::handleDCOP(int function, const QStringList& args)
break;
case DCOP::setBackgroundColor:
{
- QColor color;
+ TQColor color;
color.setNamedColor(args[0]);
this->setPaletteBackgroundColor(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 <qstringlist.h>
-#include <qobject.h>
-#include <qstring.h>
+#include <tqstringlist.h>
+#include <tqobject.h>
+#include <tqstring.h>
/* OTHER INCLUDES */
#include <kcombobox.h>
@@ -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 <qdatetime.h>
-#include <qstring.h>
-#include <qwidget.h>
-#include <qstringlist.h>
+#include <tqdatetime.h>
+#include <tqstring.h>
+#include <tqwidget.h>
+#include <tqstringlist.h>
/* OTHER INCLUDES */
#include <specials.h>
#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 <qstringlist.h>
-#include <qobject.h>
-#include <qstring.h>
+#include <tqstringlist.h>
+#include <tqobject.h>
+#include <tqstring.h>
/* OTHER INCLUDES */
#include <kdatepicker.h>
@@ -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 <klocale.h>
/* QT INCLUDES */
-#include <qstring.h>
-#include <qwidget.h>
-#include <qstringlist.h>
-#include <qevent.h>
-#include <qdialog.h>
-#include <qpoint.h>
-#include <qcursor.h>
-#include <qapplication.h>
+#include <tqstring.h>
+#include <tqwidget.h>
+#include <tqstringlist.h>
+#include <tqevent.h>
+#include <tqdialog.h>
+#include <tqpoint.h>
+#include <tqcursor.h>
+#include <tqapplication.h>
/* OTHER INCLUDES */
#include <specials.h>
@@ -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 <qdialog.h>
+#include <tqdialog.h>
/* OTHER INCLUDES */
#include <kommanderwindow.h>
#include <kommander_export.h>
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 <kmessagebox.h>
/* QT INCLUDES */
-#include <qcursor.h>
-#include <qevent.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qwidget.h>
-#include <qpopupmenu.h>
-#include <qapplication.h>
-#include <qwidgetlist.h>
+#include <tqcursor.h>
+#include <tqevent.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqwidget.h>
+#include <tqpopupmenu.h>
+#include <tqapplication.h>
+#include <tqwidgetlist.h>
/* OTHER INCLUDES */
#include <kommanderwidget.h>
@@ -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<QPopupMenu*>(w->child("unnamed", "KPopupMenu"));
+ TQPopupMenu *popup = dynamic_cast<TQPopupMenu*>(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 <kpushbutton.h>
/* QT INCLUDES */
-#include <qobject.h>
+#include <tqobject.h>
/* OTHER INCLUDES */
#include <kommanderwidget.h>
@@ -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 <kiconloader.h>
/* QT INCLUDES */
-#include <qstring.h>
-#include <qwidget.h>
-#include <qstringlist.h>
-#include <qevent.h>
-#include <qlayout.h>
-#include <qsizepolicy.h>
+#include <tqstring.h>
+#include <tqwidget.h>
+#include <tqstringlist.h>
+#include <tqevent.h>
+#include <tqlayout.h>
+#include <tqsizepolicy.h>
/* OTHER INCLUDES */
#include <specials.h>
#include "fileselector.h"
-FileSelector::FileSelector(QWidget * a_parent, const char *a_name)
- : QWidget(a_parent, a_name), KommanderWidget(this)
+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 <qobject.h>
-#include <qstringlist.h>
-#include <qstring.h>
-#include <qwidget.h>
+#include <tqobject.h>
+#include <tqstringlist.h>
+#include <tqstring.h>
+#include <tqwidget.h>
/* OTHER INCLUDES */
#include <kommanderwidget.h>
@@ -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 <qlabel.h>
+#include <tqlabel.h>
#include <kommanderwidget.h>
-#include <qfont.h>
+#include <tqfont.h>
/**
@author Andras Mantia <amantia@kdewebdev.org>
*/
-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 <qobject.h>
-#include <qstring.h>
-#include <qwidget.h>
-#include <qstringlist.h>
-#include <qevent.h>
-#include <qgroupbox.h>
-#include <qobjectlist.h>
+#include <tqobject.h>
+#include <tqstring.h>
+#include <tqwidget.h>
+#include <tqstringlist.h>
+#include <tqevent.h>
+#include <tqgroupbox.h>
+#include <tqobjectlist.h>
#include <klocale.h>
/* 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<KommanderWidget*>(it.current()))
text += (dynamic_cast<KommanderWidget*>(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 <qgroupbox.h>
-#include <qobject.h>
-#include <qstringlist.h>
-#include <qstring.h>
-#include <qobjectlist.h>
+#include <tqgroupbox.h>
+#include <tqobject.h>
+#include <tqstringlist.h>
+#include <tqstring.h>
+#include <tqobjectlist.h>
/* OTHER INCLUDES */
#include <kommanderwidget.h>
@@ -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 <qcursor.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qwidget.h>
+#include <tqcursor.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqwidget.h>
/* OTHER INCLUDES */
#include <kommanderwidget.h>
@@ -25,10 +25,10 @@
#include "konsole.h"
#include <myprocess.h>
-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 <ktextedit.h>
/* QT INCLUDES */
-#include <qobject.h>
+#include <tqobject.h>
/* OTHER INCLUDES */
#include <kommanderwidget.h>
@@ -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 <qobject.h>
-#include <qstring.h>
-#include <qwidget.h>
-#include <qstringlist.h>
-#include <qevent.h>
+#include <tqobject.h>
+#include <tqstring.h>
+#include <tqwidget.h>
+#include <tqstringlist.h>
+#include <tqevent.h>
/* OTHER INCLUDES */
#include <kommanderwidget.h>
#include <specials.h>
#include "label.h"
-Label::Label(QWidget *a_parent, const char *a_name)
- : QLabel(a_parent, a_name), KommanderWidget(this)
+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 <qstringlist.h>
-#include <qobject.h>
-#include <qstring.h>
+#include <tqstringlist.h>
+#include <tqobject.h>
+#include <tqstring.h>
/* OTHER INCLUDES */
#include <kommanderwidget.h>
-#include <qlabel.h>
+#include <tqlabel.h>
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 <qlayout.h>
-#include <qevent.h>
+#include <tqlayout.h>
+#include <tqevent.h>
/* OTHER INCLUDES */
#include <specials.h>
@@ -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 <klineedit.h>
/* QT INCLUDES */
-#include <qtextedit.h>
-#include <qstringlist.h>
-#include <qstring.h>
+#include <tqtextedit.h>
+#include <tqstringlist.h>
+#include <tqstring.h>
/* OTHER INCLUDES */
#include <kommanderwidget.h>
@@ -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 <kiconloader.h>
/* QT INCLUDES */
-#include <qobject.h>
-#include <qstring.h>
-#include <qwidget.h>
-#include <qstringlist.h>
-#include <qevent.h>
+#include <tqobject.h>
+#include <tqstring.h>
+#include <tqwidget.h>
+#include <tqstringlist.h>
+#include <tqevent.h>
/* OTHER INCLUDES */
#include <kommanderwidget.h>
#include <specials.h>
#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; i<count(); i++)
if (isSelected(i))
value += (value.length() ? "\n" : "") + item(i)->text();
@@ -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 <qstringlist.h>
-#include <qobject.h>
-#include <qstring.h>
+#include <tqstringlist.h>
+#include <tqobject.h>
+#include <tqstring.h>
/* OTHER INCLUDES */
#include <kommanderwidget.h>
@@ -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 <qobject.h>
-#include <qstring.h>
-#include <qwidget.h>
-#include <qstringlist.h>
-#include <qevent.h>
-#include <qpixmap.h>
+#include <tqobject.h>
+#include <tqstring.h>
+#include <tqwidget.h>
+#include <tqstringlist.h>
+#include <tqevent.h>
+#include <tqpixmap.h>
/* KDE INCLUDES */
#include <kglobal.h>
@@ -30,10 +30,10 @@
#include <specials.h>
#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 <qstringlist.h>
-#include <qobject.h>
-#include <qstring.h>
+#include <tqstringlist.h>
+#include <tqobject.h>
+#include <tqstring.h>
/* OTHER INCLUDES */
#include <kommanderwidget.h>
-#include <qlabel.h>
+#include <tqlabel.h>
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 <qcursor.h>
+#include <tqcursor.h>
#include <kglobal.h>
#include <kiconloader.h>
@@ -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<PopupMenu*>(w))
{
if (icon.isEmpty())
- return QString::number(m_menu->insertItem(title, dynamic_cast<PopupMenu*>(w)->menu(), index));
+ return TQString::number(m_menu->insertItem(title, dynamic_cast<PopupMenu*>(w)->menu(), index));
else
- return QString::number( m_menu->insertItem(KGlobal::iconLoader()->loadIcon(icon, KIcon::NoGroup, KIcon::SizeMedium), title, dynamic_cast<PopupMenu*>(w)->menu(), index));
+ return TQString::number( m_menu->insertItem(KGlobal::iconLoader()->loadIcon(icon, KIcon::NoGroup, KIcon::SizeMedium), title, dynamic_cast<PopupMenu*>(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 <qlabel.h>
-#include <qmap.h>
+#include <tqlabel.h>
+#include <tqmap.h>
#include <kommanderwidget.h>
@@ -22,28 +22,28 @@ class KPopupMenu;
/**
@author Andras Mantia <amantia@kdewebdev.org>
*/
-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<int, QString> m_associations;
- QStringList m_params;
+ TQMap<int, TQString> 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 <klocale.h>
/* QT INCLUDES */
-#include <qobject.h>
-#include <qstring.h>
-#include <qwidget.h>
-#include <qstringlist.h>
-#include <qevent.h>
+#include <tqobject.h>
+#include <tqstring.h>
+#include <tqwidget.h>
+#include <tqstringlist.h>
+#include <tqevent.h>
/* OTHER INCLUDES */
#include <specials.h>
@@ -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 <qstringlist.h>
-#include <qobject.h>
-#include <qstring.h>
+#include <tqstringlist.h>
+#include <tqobject.h>
+#include <tqstring.h>
/* OTHER INCLUDES */
#include <kprogress.h>
@@ -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 <qobject.h>
-#include <qstring.h>
-#include <qwidget.h>
-#include <qstringlist.h>
-#include <qevent.h>
-#include <qradiobutton.h>
+#include <tqobject.h>
+#include <tqstring.h>
+#include <tqwidget.h>
+#include <tqstringlist.h>
+#include <tqevent.h>
+#include <tqradiobutton.h>
/* OTHER INCLUDES */
#include <specials.h>
#include "radiobutton.h"
-RadioButton::RadioButton(QWidget *a_parent, const char *a_name)
- : QRadioButton(a_parent, a_name), KommanderWidget(this)
+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 <qradiobutton.h>
-#include <qobject.h>
-#include <qstringlist.h>
-#include <qstring.h>
+#include <tqradiobutton.h>
+#include <tqobject.h>
+#include <tqstringlist.h>
+#include <tqstring.h>
/* OTHER INCLUDES */
#include <kommanderwidget.h>
@@ -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 <klocale.h>
/* QT INCLUDES */
-#include <qlayout.h>
-#include <qevent.h>
-#include <qtextedit.h>
-#include <qframe.h>
-#include <qwidget.h>
-#include <qlayout.h>
-#include <qtoolbutton.h>
-#include <qpixmap.h>
-#include <qhbuttongroup.h>
-#include <qfont.h>
-#include <qstringlist.h>
-#include <qevent.h>
+#include <tqlayout.h>
+#include <tqevent.h>
+#include <tqtextedit.h>
+#include <tqframe.h>
+#include <tqwidget.h>
+#include <tqlayout.h>
+#include <tqtoolbutton.h>
+#include <tqpixmap.h>
+#include <tqhbuttongroup.h>
+#include <tqfont.h>
+#include <tqstringlist.h>
+#include <tqevent.h>
/* OTHER INCLUDES */
#include <specials.h>
@@ -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 <qstringlist.h>
-#include <qstring.h>
-#include <qwidget.h>
+#include <tqstringlist.h>
+#include <tqstring.h>
+#include <tqwidget.h>
/* OTHER INCLUDES */
#include <kommanderwidget.h>
@@ -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 <qstringlist.h>
-#include <qwidget.h>
+#include <tqstringlist.h>
+#include <tqwidget.h>
/* KDE INCLUDES */
#include <kglobal.h>
@@ -29,17 +29,17 @@
#include <myprocess.h>
#include <specials.h>
-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 <qlabel.h>
+#include <tqlabel.h>
/* OTHER INCLUDES */
#include <kommanderwidget.h>
#include <kommander_export.h>
-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 <qstringlist.h>
-#include <qevent.h>
+#include <tqstringlist.h>
+#include <tqevent.h>
/* OTHER INCLUDES */
#include <specials.h>
#include "slider.h"
-Slider::Slider(QWidget * a_parent, const char *a_name)
- : QSlider(a_parent, a_name), KommanderWidget((QObject *) this)
+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 <qslider.h>
+#include <tqslider.h>
/* QT INCLUDES */
-#include <qstringlist.h>
-#include <qstring.h>
+#include <tqstringlist.h>
+#include <tqstring.h>
/* OTHER INCLUDES */
#include <kommanderwidget.h>
#include <kommander_export.h>
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 <qobject.h>
-#include <qstring.h>
-#include <qwidget.h>
-#include <qstringlist.h>
-#include <qevent.h>
-#include <qspinbox.h>
+#include <tqobject.h>
+#include <tqstring.h>
+#include <tqwidget.h>
+#include <tqstringlist.h>
+#include <tqevent.h>
+#include <tqspinbox.h>
/* OTHER INCLUDES */
#include <specials.h>
#include "spinboxint.h"
-SpinBoxInt::SpinBoxInt(QWidget *a_parent, const char *a_name)
- : QSpinBox(a_parent, a_name), KommanderWidget(this)
+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 <qobject.h>
-#include <qstringlist.h>
-#include <qstring.h>
-#include <qspinbox.h>
+#include <tqobject.h>
+#include <tqstringlist.h>
+#include <tqstring.h>
+#include <tqspinbox.h>
/* OTHER INCLUDES */
#include <kommanderwidget.h>
@@ -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 <qobject.h>
-#include <qstring.h>
-#include <qwidget.h>
-#include <qstringlist.h>
-#include <qevent.h>
+#include <tqobject.h>
+#include <tqstring.h>
+#include <tqwidget.h>
+#include <tqstringlist.h>
+#include <tqevent.h>
/* OTHER INCLUDES */
#include <specials.h>
#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 <qstringlist.h>
-#include <qobject.h>
-#include <qstring.h>
+#include <tqstringlist.h>
+#include <tqobject.h>
+#include <tqstring.h>
/* OTHER INCLUDES */
#include <kstatusbar.h>
@@ -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 <qobject.h>
-#include <qstring.h>
-#include <qwidget.h>
-#include <qstringlist.h>
-#include <qevent.h>
-#include <qpushbutton.h>
-#include <qdialog.h>
+#include <tqobject.h>
+#include <tqstring.h>
+#include <tqwidget.h>
+#include <tqstringlist.h>
+#include <tqevent.h>
+#include <tqpushbutton.h>
+#include <tqdialog.h>
/* OTHER INCLUDES */
#include <kdebug.h>
@@ -31,15 +31,15 @@
#include <specials.h>
#include "subdialog.h"
-SubDialog::SubDialog(QWidget *a_parent, const char *a_name)
- : QPushButton(a_parent, a_name), KommanderWidget(this), m_dialog(0)
+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<KommanderWidget *>(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 <qpushbutton.h>
-#include <qobject.h>
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqpushbutton.h>
+#include <tqobject.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
/* OTHER INCLUDES */
#include <kommanderwidget.h>
@@ -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 <kmessagebox.h>
/* QT INCLUDES */
-#include <qmetaobject.h>
-#include <qstring.h>
-#include <qwidget.h>
-#include <qstringlist.h>
-#include <qpoint.h>
+#include <tqmetaobject.h>
+#include <tqstring.h>
+#include <tqwidget.h>
+#include <tqstringlist.h>
+#include <tqpoint.h>
/* 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<br /><b>Not guaranteed to have KDE4 compatiblility</b>"), 5);
- KommanderPlugin::registerFunction(TBL_selectRow, "selectRow(QString widget, int row)", i18n("Select the row with the zero based index."), 2);
- KommanderPlugin::registerFunction(TBL_selectColumn, "selectColumn(QString widget, int col)", i18n("Select the column with the zero based index.<br /><b>Not guaranteed to have KDE4 compatiblility</b>"), 2);
- KommanderPlugin::registerFunction(TBL_setColumnReadOnly, "setColumnReadOnly(QString widget, int col, bool Readonly)", i18n("Set the column read only using zero based index.<br /><b>Not guaranteed to have KDE4 compatiblility</b>"), 3);
- KommanderPlugin::registerFunction(TBL_setRowReadOnly, "setRowReadOnly(QString widget, int row, bool Readonly)", i18n("Set the row read only using zero based index.<br /><b>Not guaranteed to have KDE4 compatiblility</b>"), 3);
- KommanderPlugin::registerFunction(TBL_rowCount, "rowCount(QString widget)", i18n("Returns the number of rows of the table"), 1);
- KommanderPlugin::registerFunction(TBL_colHeader, "columnHeader(QString widget, int Column)", i18n("Returns the text of the header for the column index"), 2);
- KommanderPlugin::registerFunction(TBL_rowHeader, "rowHeader(QString widget, int Row)", i18n("Returns the text of the header for the row index"), 2);
+ 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<br /><b>Not guaranteed to have KDE4 compatiblility</b>"), 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.<br /><b>Not guaranteed to have KDE4 compatiblility</b>"), 2);
+ KommanderPlugin::registerFunction(TBL_setColumnReadOnly, "setColumnReadOnly(TQString widget, int col, bool Readonly)", i18n("Set the column read only using zero based index.<br /><b>Not guaranteed to have KDE4 compatiblility</b>"), 3);
+ KommanderPlugin::registerFunction(TBL_setRowReadOnly, "setRowReadOnly(TQString widget, int row, bool Readonly)", i18n("Set the row read only using zero based index.<br /><b>Not guaranteed to have KDE4 compatiblility</b>"), 3);
+ KommanderPlugin::registerFunction(TBL_rowCount, "rowCount(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<QWidget*>(w->object());
- if (QTable::cellWidget(row, col) != widget)
+ TQWidget *widget = static_cast<TQWidget*>(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 <qtable.h>
-#include <qobject.h>
+#include <tqtable.h>
+#include <tqobject.h>
/* OTHER INCLUDES */
#include <kommanderwidget.h>
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 <kiconloader.h>
/* QT INCLUDES */
-#include <qstring.h>
-#include <qwidget.h>
-#include <qstringlist.h>
-#include <qevent.h>
-#include <qtabwidget.h>
-#include <qtabbar.h>
+#include <tqstring.h>
+#include <tqwidget.h>
+#include <tqstringlist.h>
+#include <tqevent.h>
+#include <tqtabwidget.h>
+#include <tqtabbar.h>
/* OTHER INCLUDES */
#include <kommanderwidget.h>
@@ -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 <qtabwidget.h>
+#include <tqtabwidget.h>
/* OTHER INCLUDES */
#include <kommanderwidget.h>
#include <kommander_export.h>
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 <klocale.h>
/* QT INCLUDES */
-#include <qstringlist.h>
-#include <qevent.h>
-#include <qstring.h>
+#include <tqstringlist.h>
+#include <tqevent.h>
+#include <tqstring.h>
/* 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 <ktextbrowser.h>
/* QT INCLUDES */
-#include <qstringlist.h>
-#include <qstring.h>
+#include <tqstringlist.h>
+#include <tqstring.h>
/* OTHER INCLUDES */
#include <kommanderwidget.h>
@@ -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 <qlayout.h>
-#include <qlineedit.h>
-#include <qstringlist.h>
-#include <qevent.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
+#include <tqstringlist.h>
+#include <tqevent.h>
/* OTHER INCLUDES */
#include <specials.h>
@@ -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 <ktextedit.h>
/* QT INCLUDES */
-#include <qstringlist.h>
-#include <qstring.h>
+#include <tqstringlist.h>
+#include <tqstring.h>
/* OTHER INCLUDES */
#include <kommanderwidget.h>
@@ -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 <qstringlist.h>
-#include <qtimer.h>
-#include <qwidget.h>
+#include <tqstringlist.h>
+#include <tqtimer.h>
+#include <tqwidget.h>
/* KDE INCLUDES */
#include <kglobal.h>
@@ -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 <qlabel.h>
+#include <tqlabel.h>
/* OTHER INCLUDES */
#include <kommanderwidget.h>
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<QWidget*>(w), label);
+ int idx = addItem(dynamic_cast<TQWidget*>(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<QWidget*>(w));
- return QString();
+ setCurrentItem(dynamic_cast<TQWidget*>(w));
+ return TQString();
}
case REMOVEWIDGET:
{
KommanderWidget *w = widgetByName(args[0]);
- return QString::number(removeItem(dynamic_cast<QWidget*>(w)));
+ return TQString::number(removeItem(dynamic_cast<TQWidget*>(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<QWidget*>(w)));
+ return TQString::number(indexOf(dynamic_cast<TQWidget*>(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 <qtoolbox.h>
+#include <tqtoolbox.h>
#include <kommanderwidget.h>
/**
@author Andras Mantia <amantia@kdewebdev.org>
*/
-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 <klistview.h>
/* QT INCLUDES */
-#include <qstring.h>
-#include <qwidget.h>
-#include <qstringlist.h>
-#include <qevent.h>
-#include <qlistview.h>
+#include <tqstring.h>
+#include <tqwidget.h>
+#include <tqstringlist.h>
+#include <tqevent.h>
+#include <tqlistview.h>
/* OTHER INCLUDES */
#include <specials.h>
@@ -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 <i>left</i>, <i>right</i> or <i>center</i>, case insensitive "), 3);
- KommanderPlugin::registerFunction(TW_childCount, "childCount(QString widget)", i18n("Get the count of top level items."), 1);
- KommanderPlugin::registerFunction(TW_setOpen, "setOpen(QString widget, int Index, bool Open)", i18n("Expand or collapse a node."), 3);
- KommanderPlugin::registerFunction(TW_isOpen, "isOpen(QString widget, int Index)", i18n("See if node is open or closed."), 2);
+ 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 <i>left</i>, <i>right</i> or <i>center</i>, 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; i<columns(); i++)
items.append(item->text(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 <klistview.h>
/* QT INCLUDES */
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qptrvector.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqptrvector.h>
/* OTHER INCLUDES */
#include <kommanderwidget.h>
@@ -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<QListViewItem> 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<TQListViewItem> 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 <kprocess.h>
/* QT INCLUDES */
-#include <qstring.h>
-#include <qwidget.h>
-#include <qstringlist.h>
-#include <qevent.h>
-#include <qwizard.h>
-#include <qdialog.h>
+#include <tqstring.h>
+#include <tqwidget.h>
+#include <tqstringlist.h>
+#include <tqevent.h>
+#include <tqwizard.h>
+#include <tqdialog.h>
/* OTHER INCLUDES */
#include <myprocess.h>
@@ -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 <qwizard.h>
+#include <tqwizard.h>
/* OTHER INCLUDES */
#include <kommanderwidget.h>
@@ -27,37 +27,37 @@
#include <myprocess.h>
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 <qwidget.h>
-#include <qstring.h>
+#include <tqwidget.h>
+#include <tqstring.h>
#include <kparts/part.h>
@@ -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 <ktexteditor/configinterface.h>
#include <kate/view.h>
-#include <qfile.h>
-#include <qtextstream.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
#include "../kxsldbg.h"
#include <kaction.h>
#include <kcmdlineargs.h>
#include <kinstance.h>
#include <kiconloader.h>
-#include <qmessagebox.h>
+#include <tqmessagebox.h>
#include <klocale.h>
#include <kdeversion.h>
#if KDE_IS_VERSION(3,1,90)
@@ -32,33 +32,33 @@
// Qxsldbg specific includes
#include "qxsldbgdoc.h"
-#include <qvariant.h>
-#include <qfile.h>
-#include <qstatusbar.h>
-#include <qsplitter.h>
-#include <qvbox.h>
-
-
-#include <qmime.h>
-#include <qdragobject.h>
-#include <qlayout.h>
-#include <qtooltip.h>
-#include <qwhatsthis.h>
-#include <qaction.h>
-#include <qmenubar.h>
-#include <qpopupmenu.h>
-#include <qtoolbar.h>
-#include <qimage.h>
-#include <qpixmap.h>
-#include <qtextstream.h>
-#include <qtextbrowser.h>
-#include <qmessagebox.h>
-#include <qlineedit.h>
-#include <qdockwindow.h>
-#include <qpushbutton.h>
-#include <qinputdialog.h>
-#include <qobjectlist.h>
-#include <qwidgetstack.h>
+#include <tqvariant.h>
+#include <tqfile.h>
+#include <tqstatusbar.h>
+#include <tqsplitter.h>
+#include <tqvbox.h>
+
+
+#include <tqmime.h>
+#include <tqdragobject.h>
+#include <tqlayout.h>
+#include <tqtooltip.h>
+#include <tqwhatsthis.h>
+#include <tqaction.h>
+#include <tqmenubar.h>
+#include <tqpopupmenu.h>
+#include <tqtoolbar.h>
+#include <tqimage.h>
+#include <tqpixmap.h>
+#include <tqtextstream.h>
+#include <tqtextbrowser.h>
+#include <tqmessagebox.h>
+#include <tqlineedit.h>
+#include <tqdockwindow.h>
+#include <tqpushbutton.h>
+#include <tqinputdialog.h>
+#include <tqobjectlist.h>
+#include <tqwidgetstack.h>
#include "xsldbgoutputview.h"
#include "xsldbgconfigimpl.h"
#include <kdebug.h>
@@ -67,9 +67,9 @@
typedef KParts::GenericFactory<KXsldbgPart> KXsldbgPartFactory;
K_EXPORT_COMPONENT_FACTORY( libkxsldbgpart, KXsldbgPartFactory )
-KXsldbgPart::KXsldbgPart( QWidget *parentWidget, const char * /*widgetName*/,
- QObject *parent, const char *name,
- const QStringList & /*args*/ )
+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<QXsldbgDoc> it(docDictionary);
+ TQDictIterator<QXsldbgDoc> 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<QXsldbgDoc> it(docDictionary);
+ TQDictIterator<QXsldbgDoc> 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(&currentLineNo, &currentColumnNo);
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<QXsldbgDoc> it(docDictionary);
+ TQDictIterator<QXsldbgDoc> 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 <kparts/part.h>
-#include <qvariant.h>
-#include <qdict.h>
-#include <qmainwindow.h>
+#include <tqvariant.h>
+#include <tqdict.h>
+#include <tqmainwindow.h>
#include "xsldbgdebugger.h"
#include "xsldbginspector.h"
#include <dcopclient.h>
@@ -35,7 +35,7 @@ class KURL;
class QMultiLineEdit;
class KAboutData;
-typedef QDict<QXsldbgDoc> XsldbgDocDict;
+typedef TQDict<QXsldbgDoc> 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 <qapplication.h>
+#include <tqapplication.h>
#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 <qapplication.h>
-#include <qglobal.h>
-#include <qstringlist.h>
+#include <tqapplication.h>
+#include <tqglobal.h>
+#include <tqstringlist.h>
#include <kurl.h>
#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 <qobject.h>
-#include <qstringlist.h>
+#include <tqobject.h>
+#include <tqstringlist.h>
#include <libxml/tree.h>
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 <qapplication.h>
-#include <qtimer.h>
-#include <qfile.h>
+#include <tqapplication.h>
+#include <tqtimer.h>
+#include <tqfile.h>
#include <kurl.h>
-#include <qtextstream.h>
+#include <tqtextstream.h>
#include <libxslt/xsltInternals.h>
@@ -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 <kglobal.h>
#include <kstandarddirs.h>
-#include <qfileinfo.h>
-#include <qstringlist.h>
+#include <tqfileinfo.h>
+#include <tqstringlist.h>
/* 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 <kcmdlineargs.h>
#include <kglobal.h>
-#include <qfile.h>
+#include <tqfile.h>
#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 <name>:<value>.\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 <libexslt/exslt.h>
#include <libxslt/xsltutils.h>
-#include <qstring.h>
+#include <tqstring.h>
#include <klocale.h>
#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 <libxsldbg/xsldbgwin32config.h>
#endif
-#include <qevent.h>
-#include <qptrlist.h>
+#include <tqevent.h>
+#include <tqptrlist.h>
#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 <k_isdale@tpg.com.au>
*/
-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 <ktexteditor/markinterface.h>
#include <ktexteditor/editorchooser.h>
-#include <qfile.h>
-#include <qdir.h>
-#include <qtextstream.h>
-#include <qptrlist.h>
+#include <tqfile.h>
+#include <tqdir.h>
+#include <tqtextstream.h>
+#include <tqptrlist.h>
-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<KTextEditor::Mark> marks = markIf->marks();
+ TQPtrList<KTextEditor::Mark> 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 <kio/job.h>
-#include <qptrlist.h>
-#include <qstring.h>
-#include <qguardedptr.h>
+#include <tqptrlist.h>
+#include <tqstring.h>
+#include <tqguardedptr.h>
#include <ktexteditor/document.h>
#include <ktexteditor/view.h>
-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<KTextEditor::Document> kDoc;
- QGuardedPtr<KTextEditor::View> kView;
+ TQGuardedPtr<KTextEditor::Document> kDoc;
+ TQGuardedPtr<KTextEditor::View> 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 <klocale.h>
#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 <klocale.h>
-#include <qlistview.h>
-#include <qlineedit.h>
-#include <qmessagebox.h>
+#include <tqlistview.h>
+#include <tqlineedit.h>
+#include <tqmessagebox.h>
#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<XsldbgBreakpointListItem*>(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 <qlistview.h>
-#include <qlineedit.h>
+#include <tqlistview.h>
+#include <tqlineedit.h>
#include "xsldbgdebugger.h"
#include "xsldbgcallstackimpl.h"
#include "xsldbggloballistitem.h" /* reuse global list item variable as a template list item */
XsldbgCallStackImpl::XsldbgCallStackImpl(XsldbgDebugger *debugger,
- QWidget *parent /*=0*/, const char *name /*=0*/)
+ 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<XsldbgGlobalListItem*>(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 <klocale.h>
#include <kfiledialog.h>
-#include <qdialog.h>
-#include <qlineedit.h>
-#include <qcheckbox.h>
-#include <qmessagebox.h>
+#include <tqdialog.h>
+#include <tqlineedit.h>
+#include <tqcheckbox.h>
+#include <tqmessagebox.h>
#include "xsldbgconfigimpl.h"
#include "xsldbgdebugger.h"
#include <kdebug.h>
-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 <qptrlist.h>
+#include <tqptrlist.h>
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<LibxsltParam> paramList;
+ TQPtrList<LibxsltParam> 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 <qmessagebox.h>
+#include <tqmessagebox.h>
#include <kdebug.h>
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 <qevent.h>
+#include <tqevent.h>
#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 <qfiledialog.h>
+#include <tqfiledialog.h>
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 <qstring.h>
+#include <tqstring.h>
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 <qmap.h>
+#include <tqmap.h>
#include "qxsldbgdoc.h"
-typedef QMap<QString, QXsldbgDoc> XsldbgDocMap;
+typedef TQMap<TQString, QXsldbgDoc> 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 <qlistview.h>
-#include <qlineedit.h>
+#include <tqlistview.h>
+#include <tqlineedit.h>
#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<XsldbgGlobalListItem*>(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 <qlistview.h>
-#include <qlineedit.h>
+#include <tqlistview.h>
+#include <tqlineedit.h>
#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<XsldbgGlobalListItem*>(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 <klocale.h>
-#include <qvariant.h>
-#include <qlistbox.h>
-#include <qpushbutton.h>
-#include <qtabwidget.h>
-#include <qwidget.h>
-#include <qmime.h>
-#include <qdragobject.h>
-#include <qlayout.h>
-#include <qtooltip.h>
-#include <qwhatsthis.h>
-#include <qimage.h>
-#include <qpixmap.h>
-#include <qiconset.h>
+#include <tqvariant.h>
+#include <tqlistbox.h>
+#include <tqpushbutton.h>
+#include <tqtabwidget.h>
+#include <tqwidget.h>
+#include <tqmime.h>
+#include <tqdragobject.h>
+#include <tqlayout.h>
+#include <tqtooltip.h>
+#include <tqwhatsthis.h>
+#include <tqimage.h>
+#include <tqpixmap.h>
+#include <tqiconset.h>
#include <kpushbutton.h>
#include <kstdguiitem.h>
@@ -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 <qvariant.h>
-#include <qdialog.h>
+#include <tqvariant.h>
+#include <tqdialog.h>
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 <qlistview.h>
+#include <tqlistview.h>
-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 <klocale.h>
-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 <qlistview.h>
-#include <qlineedit.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
+#include <tqlistview.h>
+#include <tqlineedit.h>
+#include <tqlabel.h>
+#include <tqpushbutton.h>
#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<XsldbgLocalListItem*>(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 <qtextedit.h>
+#include <tqtextedit.h>
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 <klocale.h>
-#include <qlayout.h>
-#include <qmessagebox.h>
-#include <qdialog.h>
-#include <qpushbutton.h>
-#include <qlabel.h>
+#include <tqlayout.h>
+#include <tqmessagebox.h>
+#include <tqdialog.h>
+#include <tqpushbutton.h>
+#include <tqlabel.h>
#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 <qtextedit.h>
-#include <qmessagebox.h>
+#include <tqtextedit.h>
+#include <tqmessagebox.h>
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 <qlistview.h>
-#include <qlineedit.h>
+#include <tqlistview.h>
+#include <tqlineedit.h>
#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<XsldbgGlobalListItem*>(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 <qlistview.h>
-#include <qlineedit.h>
+#include <tqlistview.h>
+#include <tqlineedit.h>
#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<XsldbgTemplateListItem*>(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 <qslider.h>
+#include <tqslider.h>
#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 <kdemacros.h>
/* needed, because e.g. Q_OS_UNIX is so frequently used */
-#include <qglobal.h>
+#include <tqglobal.h>
#ifdef Q_WS_WIN
#include <kdelibs_export_win.h>
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 <qapplication.h>
-#include <qlayout.h>
-#include <qpainter.h>
-#include <qobjectlist.h>
-#include <qstrlist.h>
-#include <qcursor.h>
-#include <qwidgetlist.h>
-#include <qtabwidget.h>
-#include <qtooltip.h>
-#include <qstyle.h>
+#include <tqapplication.h>
+#include <tqlayout.h>
+#include <tqpainter.h>
+#include <tqobjectlist.h>
+#include <tqstrlist.h>
+#include <tqcursor.h>
+#include <tqwidgetlist.h>
+#include <tqtabwidget.h>
+#include <tqtooltip.h>
+#include <tqstyle.h>
#ifndef NO_KDE2
#include <kconfig.h>
@@ -49,8 +49,8 @@
#endif
#else
-#include <qtoolbar.h>
-#include <qpopupmenu.h>
+#include <tqtoolbar.h>
+#include <tqpopupmenu.h>
#endif
#include <stdlib.h>
@@ -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<KDockButton_Private> it( d->btns );it.current();++it) {
+ for (TQPtrListIterator<KDockButton_Private> 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<KDockButton_Private> it( d->btns );it.current();++it) {
+ for (TQPtrListIterator<KDockButton_Private> 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<KDockButton_Private> it( d->btns );it.current();++it) {
+ for (TQPtrListIterator<KDockButton_Private> 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<KDockWidget> mainDockWidget;
+ TQGuardedPtr<KDockWidget> mainDockWidget;
- QObjectList containerDocks;
+ TQObjectList containerDocks;
- QGuardedPtr<KDockWidget> leftContainer;
- QGuardedPtr<KDockWidget> topContainer;
- QGuardedPtr<KDockWidget> rightContainer;
- QGuardedPtr<KDockWidget> bottomContainer;
+ TQGuardedPtr<KDockWidget> leftContainer;
+ TQGuardedPtr<KDockWidget> topContainer;
+ TQGuardedPtr<KDockWidget> rightContainer;
+ TQGuardedPtr<KDockWidget> bottomContainer;
int m_readDockConfigMode;
};
/*************************************************************************/
-KDockWidget::KDockWidget( KDockManager* dockManager, const char* name, const QPixmap &pixmap, QWidget* parent, const QString& strCaption, const QString& strTabPageLabel, WFlags f)
+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<KDockContainer*>(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"<<endl;
if (bright)
{
- if (btop) setCursor(QCursor(SizeBDiagCursor));
+ if (btop) setCursor(TQCursor(SizeBDiagCursor));
else
- if (bbottom) setCursor(QCursor(SizeFDiagCursor));
- else setCursor(QCursor(SizeHorCursor));
+ if (bbottom) setCursor(TQCursor(SizeFDiagCursor));
+ else setCursor(TQCursor(SizeHorCursor));
}
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 || btop) setCursor(QCursor(SizeVerCursor));
- else setCursor(QCursor(ArrowCursor));
+ if (bbottom || btop) setCursor(TQCursor(SizeVerCursor));
+ else setCursor(TQCursor(ArrowCursor));
#endif
}
-void KDockWidget::setLatestKDockContainer(QWidget* container)
+void KDockWidget::setLatestKDockContainer(TQWidget* container)
{
if (container)
{
@@ -729,7 +729,7 @@ void KDockWidget::setLatestKDockContainer(QWidget* container)
}
}
-QWidget* KDockWidget::latestKDockContainer()
+TQWidget* KDockWidget::latestKDockContainer()
{
if (!(d->container)) return 0;
if (dynamic_cast<KDockContainer*>(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"<<endl;
- QWidget *contWid=target->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"<<endl;
applyToWidget( contWid );
- cont->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<KDockContainer*>(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()"<<endl;
- manager->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<KDockContainer*>(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<KDockContainer*>(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<MenuDockData>;
+ menuData = new TQPtrList<MenuDockData>;
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<KDockContainer*>(((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<KDockContainer*>(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)<<QString("list size: %1").arg(nList.count())<<endl;
- for (QObjectListIt it(d->containerDocks);it.current();++it)
+// kdDebug(282)<<TQString("list size: %1").arg(nList.count())<<endl;
+ for (TQObjectListIt it(d->containerDocks);it.current();++it)
{
KDockContainer* dc = dynamic_cast<KDockContainer*>(((KDockWidget*)it.current())->widget);
if (dc) {
dc->prepareSave(nList);
}
}
-// kdDebug(282)<<QString("new list size: %1").arg(nList.count())<<endl;
+// kdDebug(282)<<TQString("new list size: %1").arg(nList.count())<<endl;
- QStringList::Iterator nListIt=nList.begin();
+ TQStringList::Iterator nListIt=nList.begin();
while ( nListIt!=nList.end() ){
//debug(" -Try to save %s", nList.current());
obj = getDockWidgetFromName( *nListIt );
- QString cname = obj->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 <qmessagebox.h>
-void KDockManager::readConfig( KConfig* c, QString group )
+#include <tqmessagebox.h>
+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: "<<dockName<<endl;
- autoCreate = new KDockWidget( this, dockName.latin1(), QPixmap("") );
+ autoCreate = new KDockWidget( this, dockName.latin1(), TQPixmap("") );
autoCreateDock->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"<<endl;
#endif
- QObjectList *list=queryList("QWidget",0,false);
+ TQObjectList *list=queryList("TQWidget",0,false);
- QObjectListIt it( *list ); // iterate over the buttons
- QObject *obj;
+ TQObjectListIt it( *list ); // iterate over the buttons
+ TQObject *obj;
while ( (obj = it.current()) != 0 ) {
// for each found object...
- ((QWidget*)obj)->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;i<children()->count();i++)
{
-// QPtrList<QObject> list(children());
-// QObject *obj=((QPtrList<QObject*>)children())->at(i);
- QObject *obj=children()->getFirst();
+// TQPtrList<TQObject> list(children());
+// TQObject *obj=((TQPtrList<TQObject*>)children())->at(i);
+ TQObject *obj=children()->getFirst();
if (split = dynamic_cast<KDockSplitter*>(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<<QString(it->data);
+ tmp<<TQString(it->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<count();i++) {
KDockWidget *dw=static_cast<KDockWidget*>(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 <qpoint.h>
-#include <qptrlist.h>
-#include <qframe.h>
-#include <qdom.h>
-#include <qtabwidget.h>
+#include <tqpoint.h>
+#include <tqptrlist.h>
+#include <tqframe.h>
+#include <tqdom.h>
+#include <tqtabwidget.h>
#ifndef NO_KDE2
#include <kmainwindow.h>
#include <netwm_def.h>
#else
-#include <qmainwindow.h>
+#include <tqmainwindow.h>
#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<MenuDockData> *menuData;
+ TQPtrList<MenuDockData> *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 <kdockwidget.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
// 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 <qpainter.h>
-#include <qcursor.h>
+#include <tqpainter.h>
+#include <tqcursor.h>
#include <kdebug.h>
-#include <qtimer.h>
-#include <qapplication.h>
+#include <tqtimer.h>
+#include <tqapplication.h>
-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":"")<<endl;
@@ -347,7 +347,7 @@ void KDockSplitter::resizeEvent(QResizeEvent *ev)
}
}
-int KDockSplitter::checkValueOverlapped(int position, QWidget *overlappingWidget) const {
+int KDockSplitter::checkValueOverlapped(int position, TQWidget *overlappingWidget) const {
if (initialised) {
if (m_orientation == Vertical) {
if (child0==overlappingWidget) {
@@ -400,15 +400,15 @@ int KDockSplitter::checkValue( int position ) const
return position;
}
-bool KDockSplitter::eventFilter(QObject *o, QEvent *e)
+bool KDockSplitter::eventFilter(TQObject *o, TQEvent *e)
{
- QMouseEvent *mev;
+ TQMouseEvent *mev;
bool handled = false;
int factor = (mHighResolution)? 10000:100;
switch (e->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 <qwidget.h>
-#include <qpushbutton.h>
+#include <tqwidget.h>
+#include <tqpushbutton.h>
#ifndef NO_KDE2
#include <netwm_def.h>
@@ -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<QWidget> container;
+ TQGuardedPtr<TQWidget> 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<KDockButton_Private> btns;
+ TQPtrList<KDockButton_Private> 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 <kglobalsettings.h>
#include <math.h>
-#include <qpopupmenu.h>
+#include <tqpopupmenu.h>
///////////////////////////////////////////////////////////////////////////////
@@ -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<KMdiChildFrm>;
+ m_pZ = new TQPtrList<KMdiChildFrm>;
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<KMdiChildFrm> it( *m_pZ );
+ TQPtrListIterator<KMdiChildFrm> 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<KMdiChildFrm> it ( *m_pZ );
+ TQPtrListIterator<KMdiChildFrm> 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<KMdiChildFrm> list( *m_pZ );
+ TQPtrList<KMdiChildFrm> 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<KMdiChildFrm> list( *m_pZ );
+ TQPtrList<KMdiChildFrm> 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<KMdiChildFrm> list( *m_pZ );
+ TQPtrList<KMdiChildFrm> 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<KMdiChildFrm> list( *m_pZ );
+ TQPtrList<KMdiChildFrm> list( *m_pZ );
list.setAutoDelete( false );
while ( !list.isEmpty() )
{
@@ -482,7 +482,7 @@ void KMdiChildArea::expandHorizontal()
int KMdiChildArea::getVisibleChildCount() const
{
int visibleChildCount = 0;
- QPtrListIterator<KMdiChildFrm> it( *m_pZ );
+ TQPtrListIterator<KMdiChildFrm> 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<KMdiChildFrm> it( *m_pZ );
+ TQPtrListIterator<KMdiChildFrm> 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<KMdiChildFrm> it( *m_pZ );
+ TQPtrListIterator<KMdiChildFrm> it( *m_pZ );
for ( ; ( *it ); ++it )
{
KMdiChildFrm* child = ( *it );
@@ -692,7 +692,7 @@ void KMdiChildArea::tileVertically()
int posX = 0;
int countVisible = 0;
- QPtrListIterator<KMdiChildFrm> it( *m_pZ );
+ TQPtrListIterator<KMdiChildFrm> it( *m_pZ );
for ( ; ( *it ); ++it )
{
KMdiChildFrm* child = ( *it );
@@ -724,7 +724,7 @@ void KMdiChildArea::layoutMinimizedChildren()
{
int posX = 0;
int posY = height();
- QPtrListIterator<KMdiChildFrm> it( *m_pZ );
+ TQPtrListIterator<KMdiChildFrm> 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<KMdiChildFrm> it( *m_pZ );
+ TQPtrListIterator<KMdiChildFrm> 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 <qframe.h>
-#include <qptrlist.h>
+#include <tqframe.h>
+#include <tqptrlist.h>
#include "kmdichildfrm.h"
#include "kmdichildview.h"
@@ -61,37 +61,37 @@ public:
/**
* Z Order stack of KMdiChildFrm childframe windows (top=last)
*/
- QPtrList<KMdiChildFrm> *m_pZ; //Auto delete enabled
+ TQPtrList<KMdiChildFrm> *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 <qpainter.h>
-#include <qapplication.h>
-#include <qcursor.h>
-#include <qobjectlist.h>
-#include <qframe.h>
-#include <qpopupmenu.h>
-#include <qtoolbutton.h>
-#include <qnamespace.h>
-#include <qimage.h>
+#include <tqpainter.h>
+#include <tqapplication.h>
+#include <tqcursor.h>
+#include <tqobjectlist.h>
+#include <tqframe.h>
+#include <tqpopupmenu.h>
+#include <tqtoolbutton.h>
+#include <tqnamespace.h>
+#include <tqimage.h>
#include <klocale.h>
#include <kiconloader.h>
@@ -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<FocusPolicy>* pFocPolDict = new QDict<FocusPolicy>;
+ TQDict<FocusPolicy>* pFocPolDict = new TQDict<FocusPolicy>;
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<FocusPolicy>* pFocPolDict;
+ TQDict<FocusPolicy>* 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<FocusPolicy>* pFocPolDict )
+void KMdiChildFrm::linkChildren( TQDict<FocusPolicy>* pFocPolDict )
{
// reset the focus policies for all widgets in the view (take them from the dictionary)
- QObjectList* list = m_pClient->queryList( "QWidget" );
- QObjectListIt it( *list ); // iterate over all child widgets of child frame
- QObject* obj;
+ 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<FocusPolicy>* 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<FocusPolicy>* pFocPolDict )
//============== unlinkChildren =============//
-QDict<QWidget::FocusPolicy>* KMdiChildFrm::unlinkChildren()
+TQDict<TQWidget::FocusPolicy>* KMdiChildFrm::unlinkChildren()
{
// memorize the focuses in a dictionary because they will get lost during reparenting
- QDict<FocusPolicy>* pFocPolDict = new QDict<FocusPolicy>;
+ TQDict<FocusPolicy>* pFocPolDict = new TQDict<FocusPolicy>;
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<QWidget::FocusPolicy>* 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<QWidget::FocusPolicy>* 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<QWidget*>( pNewChild ) )
+ TQObject* pNewChild = ( ( TQChildEvent* ) e ) ->child();
+ if ( ( pNewChild != 0L ) && ::qt_cast<TQWidget*>( pNewChild ) )
{
- QWidget * pNewWidget = static_cast<QWidget*>( pNewChild );
- QObjectList *list = pNewWidget->queryList( "QWidget" );
+ TQWidget * pNewWidget = static_cast<TQWidget*>( 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<QPopupMenu*>( widg ) )
+ if ( !::qt_cast<TQPopupMenu*>( 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 <qptrlist.h>
-#include <qpixmap.h>
-#include <qpushbutton.h>
-#include <qlabel.h>
-#include <qdatetime.h>
-#include <qlayout.h>
+#include <tqptrlist.h>
+#include <tqpixmap.h>
+#include <tqpushbutton.h>
+#include <tqlabel.h>
+#include <tqdatetime.h>
+#include <tqlayout.h>
-#include <qdict.h>
+#include <tqdict.h>
#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<FocusPolicy>* pFocPolDict );
+ void linkChildren( TQDict<FocusPolicy>* pFocPolDict );
/**
* Backups all focus policies of _all_ child widgets in the MDI childview since they get lost during a reparent.
* Remove all event filters for all direct child widgets of this. (See KMdiChildFrm::eventFilter)
*/
- QDict<QWidget::FocusPolicy>* unlinkChildren();
+ TQDict<TQWidget::FocusPolicy>* 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 <qpainter.h>
-#include <qapplication.h>
-#include <qcursor.h>
-#include <qtoolbutton.h>
-#include <qpopupmenu.h>
+#include <tqpainter.h>
+#include <tqapplication.h>
+#include <tqcursor.h>
+#include <tqtoolbutton.h>
+#include <tqpopupmenu.h>
#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 <qwidget.h>
+#include <tqwidget.h>
#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 <qdatetime.h>
-#include <qobjectlist.h>
+#include <tqdatetime.h>
+#include <tqobjectlist.h>
#include "kmdimainfrm.h"
#include "kmdichildfrm.h"
#include "kmdidefines.h"
#include <kdebug.h>
#include <klocale.h>
-#include <qiconset.h>
+#include <tqiconset.h>
//============ 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 <qwidget.h>
-#include <qpixmap.h>
-#include <qrect.h>
-#include <qapplication.h>
-#include <qdatetime.h>
+#include <tqwidget.h>
+#include <tqpixmap.h>
+#include <tqrect.h>
+#include <tqapplication.h>
+#include <tqdatetime.h>
#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 <qwidgetstack.h>
-#include <qlayout.h>
-#include <qtimer.h>
-#include <qtooltip.h>
+#include <tqwidgetstack.h>
+#include <tqlayout.h>
+#include <tqtimer.h>
+#include <tqtooltip.h>
#include <kmultitabbar.h>
#include <kglobalsettings.h>
@@ -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<KDockWidget*, int>::iterator it;
+ TQMap<KDockWidget*, int>::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<KDockWidgetHeader*>( w->getHeader()->qt_cast( "KDockWidgetHeader" ) );
KDockButton_Private *btn = new KDockButton_Private( hdr, "OverlapButton" );
- QToolTip::add( btn, i18n( "Switch between overlap and side by side mode", "Overlap" ) );
+ 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<KMultiTabBarTab*>( 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<KDockWidget*, KDockButton_Private*>::iterator it;
+ TQMap<KDockWidget*, KDockButton_Private*>::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<KMultiTabBarTab>* tl = m_tb->tabs();
- QPtrListIterator<KMultiTabBarTab> it( *tl );
- QStringList::Iterator it2 = itemNames.begin();
+ TQPtrList<KMultiTabBarTab>* tl = m_tb->tabs();
+ TQPtrListIterator<KMultiTabBarTab> 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<KMultiTabBarTab>* tl = m_tb->tabs();
- QPtrListIterator<KMultiTabBarTab> it1( *tl );
+ TQPtrList<KMultiTabBarTab>* tl = m_tb->tabs();
+ TQPtrListIterator<KMultiTabBarTab> 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<KDockWidget*, KDockButton_Private*>::iterator it = m_overlapButtons.begin();
+ for ( TQMap<KDockWidget*, KDockButton_Private*>::iterator it = m_overlapButtons.begin();
it != m_overlapButtons.end();++it )
it.data() ->setOn( !isOverlapMode() );
if ( !raise.isEmpty() )
{
- for ( QMap<KDockWidget*, int>::iterator it = m_map.begin();it != m_map.end();++it )
+ for ( TQMap<KDockWidget*, int>::iterator it = m_map.begin();it != m_map.end();++it )
{
if ( it.key() ->name() == raise )
{
m_delayedRaise = it.data();
- QTimer::singleShot( 0, this, SLOT( delayedRaise() ) );
+ 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<KMultiTabBarTab>* tl = m_tb->tabs();
- QPtrListIterator<KMultiTabBarTab> it( *tl );
- QStringList::Iterator it2 = itemNames.begin();
+ TQPtrList<KMultiTabBarTab>* tl = m_tb->tabs();
+ TQPtrListIterator<KMultiTabBarTab> 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: "<<m_ws->widget(it.current()->id())->name()<<endl;
if ( m_tb->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<KMultiTabBarTab>* tl = m_tb->tabs();
- QPtrListIterator<KMultiTabBarTab> it1( *tl );
+ TQPtrList<KMultiTabBarTab>* tl = m_tb->tabs();
+ TQPtrListIterator<KMultiTabBarTab> 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<KDockWidget*, KDockButton_Private*>::iterator it = m_overlapButtons.begin();
+ for ( TQMap<KDockWidget*, KDockButton_Private*>::iterator it = m_overlapButtons.begin();
it != m_overlapButtons.end();++it )
it.data() ->setOn( !isOverlapMode() );
if ( !raise.isEmpty() )
{
- for ( QMap<KDockWidget*, int>::iterator it = m_map.begin();it != m_map.end();++it )
+ for ( TQMap<KDockWidget*, int>::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<KMultiTabBarTab>* tl = m_tb->tabs();
- QPtrListIterator<KMultiTabBarTab> it( *tl );
+ TQPtrList<KMultiTabBarTab>* tl = m_tb->tabs();
+ TQPtrListIterator<KMultiTabBarTab> 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<KMultiTabBarTab>* tabs = m_tb->tabs();
+ TQPtrList<KMultiTabBarTab>* 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<KMultiTabBarTab>* tabs = m_tb->tabs();
+ TQPtrList<KMultiTabBarTab>* 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 <qwidget.h>
-#include <qstringlist.h>
+#include <tqwidget.h>
+#include <tqstringlist.h>
#include <kdockwidget.h>
-#include <qmap.h>
-#include <qdom.h>
+#include <tqmap.h>
+#include <tqdom.h>
# include <kdockwidget_p.h>
-#include <qpushbutton.h>
+#include <tqpushbutton.h>
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<KDockWidget*, int> m_map;
- QMap<int, KDockWidget*> m_revMap;
- QMap<KDockWidget*, KDockButton_Private*> m_overlapButtons;
- QStringList itemNames;
- QMap<QString, QString> tabCaptions;
- QMap<QString, QString> tabTooltips;
+ TQMap<KDockWidget*, int> m_map;
+ TQMap<int, KDockWidget*> m_revMap;
+ TQMap<KDockWidget*, KDockButton_Private*> m_overlapButtons;
+ TQStringList itemNames;
+ TQMap<TQString, TQString> tabCaptions;
+ TQMap<TQString, TQString> 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 <kpopupmenu.h>
#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 <qobjectlist.h>
+#include <tqobjectlist.h>
#include <kdebug.h>
-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<QWidget*, QWidget::FocusPolicy>::const_iterator it = m_list.constBegin();it != m_list.constEnd();++it )
+ for ( TQMap<TQWidget*, TQWidget::FocusPolicy>::const_iterator it = m_list.constBegin();it != m_list.constEnd();++it )
{
#else
- for ( QMap<QWidget*, QWidget::FocusPolicy>::iterator it = m_list.begin();it != m_list.end();++it )
+ for ( TQMap<TQWidget*, TQWidget::FocusPolicy>::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 <qobject.h>
-#include <qmap.h>
-#include <qwidget.h>
+#include <tqobject.h>
+#include <tqmap.h>
+#include <tqwidget.h>
#include <kdelibs_export.h>
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<QWidget*, QWidget::FocusPolicy> m_list;
+ TQMap<TQWidget*, TQWidget::FocusPolicy> 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 <qpopupmenu.h>
+#include <tqpopupmenu.h>
#include <kapplication.h>
#include <kconfig.h>
#include <ktoolbar.h>
#include <kmainwindow.h>
#include <klocale.h>
#include <kaction.h>
-#include <qstring.h>
+#include <tqstring.h>
#include <assert.h>
#include <kdebug.h>
#include <kdockwidget.h>
@@ -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<KAction> addList;
+ TQPtrList<KAction> 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: "<<mtva->wrappedWidget()->name()<<endl;
- QString aname = QString( "kmdi_toolview_" ) + mtva->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<KDockWidget*>( mtva->wrapperWidget() ),
+ /*TQString::null*/sc, dynamic_cast<KDockWidget*>( mtva->wrapperWidget() ),
m_mdiMainFrm, actionCollection(), aname.latin1() );
#if KDE_IS_VERSION(3,2,90)
( ( ToggleToolViewAction* ) a ) ->setCheckedState( i18n( "Hide %1" ).arg( mtva->wrappedWidget() ->caption() ) );
#endif
- connect( a, SIGNAL( destroyed( QObject* ) ), this, SLOT( actionDeleted( QObject* ) ) );
+ 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<KAction*>( a ) );
/* if (!m_toolMenu.isNull()) m_toolMenu->remove(static_cast<KAction*>(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 <qobject.h>
-#include <qguardedptr.h>
+#include <tqobject.h>
+#include <tqguardedptr.h>
#include <kxmlguiclient.h>
#include <kaction.h>
#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<KMdiMainFrm> m_mdiMainFrm;
- QPtrList<KAction> m_toolViewActions;
- QPtrList<KAction> m_documentViewActions;
+ TQGuardedPtr<KMdiMainFrm> m_mdiMainFrm;
+ TQPtrList<KAction> m_toolViewActions;
+ TQPtrList<KAction> 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 Item>
class KMdiListIterator : public KMdiIterator<Item*>
{
public:
- KMdiListIterator( QPtrList<Item>& list )
+ KMdiListIterator( TQPtrList<Item>& list )
{
- m_iterator = new QPtrListIterator<Item>( list );
+ m_iterator = new TQPtrListIterator<Item>( list );
}
virtual void first() { m_iterator->toFirst(); }
@@ -53,7 +53,7 @@ public:
virtual ~KMdiListIterator() { delete m_iterator; }
private:
- QPtrListIterator<Item> *m_iterator;
+ TQPtrListIterator<Item> *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 <assert.h>
-#include <qcursor.h>
-#include <qclipboard.h>
-#include <qobjectlist.h>
-#include <qpopupmenu.h>
-#include <qmenubar.h>
+#include <tqcursor.h>
+#include <tqclipboard.h>
+#include <tqobjectlist.h>
+#include <tqpopupmenu.h>
+#include <tqmenubar.h>
#include <kmenubar.h>
#include <kapplication.h>
#include <kdebug.h>
#include <kdeversion.h>
-#include <qtabwidget.h>
+#include <tqtabwidget.h>
#include <klocale.h>
#include <kiconloader.h>
#include <kmdidockcontainer.h>
-#include <qtoolbutton.h>
-#include <qdockarea.h>
-#include <qlayout.h>
-#include <qtimer.h>
-#include <qtextstream.h>
-#include <qstring.h>
-#include <qmap.h>
-#include <qvaluelist.h>
+#include <tqtoolbutton.h>
+#include <tqdockarea.h>
+#include <tqlayout.h>
+#include <tqtimer.h>
+#include <tqtextstream.h>
+#include <tqstring.h>
+#include <tqmap.h>
+#include <tqvaluelist.h>
#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<KMdiChildView>;
+ m_pDocumentViews = new TQPtrList<KMdiChildView>;
m_pDocumentViews->setAutoDelete( false );
- m_pToolViews = new QMap<QWidget*, KMdiToolViewAccessor*>;
+ m_pToolViews = new TQMap<TQWidget*, KMdiToolViewAccessor*>;
// 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<KMdiChildView*> children;
+ TQValueList<KMdiChildView*> children;
for ( KMdiChildView * w = m_pDocumentViews->first();w;w = m_pDocumentViews->next() )
children.append( w );
// safely close the windows so properties are saved...
- QValueListIterator<KMdiChildView*> childIt;
+ TQValueListIterator<KMdiChildView*> 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<KMdiChildView> it( *m_pDocumentViews );
+ TQPtrListIterator<KMdiChildView> 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<KMdiChildView> it( *m_pDocumentViews );
+ TQPtrListIterator<KMdiChildView> 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<KMdiChildView*>( 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<KMdiChildView> it( *m_pDocumentViews );
+ TQPtrListIterator<KMdiChildView> 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<KMdiChildView*> children;
+ TQValueList<KMdiChildView*> children;
for ( KMdiChildView * w = m_pDocumentViews->first();w;w = m_pDocumentViews->next() )
{
children.append( w );
}
- QValueListIterator<KMdiChildView *> childIt;
+ TQValueListIterator<KMdiChildView *> 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<KMdiChildView> it( *m_pDocumentViews );
+ TQPtrListIterator<KMdiChildView> 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<KDockWidget>* rootDockWidgetList, QValueList<QRect>* positionList )
+void KMdiMainFrm::findRootDockWidgets( TQPtrList<KDockWidget>* rootDockWidgetList, TQValueList<TQRect>* positionList )
{
//nothing is valid
if ( !rootDockWidgetList && !positionList )
@@ -1284,18 +1284,18 @@ void KMdiMainFrm::findRootDockWidgets( QPtrList<KDockWidget>* 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<QWidget*>( ( *it ) );
+ TQWidget* pW = static_cast<TQWidget*>( ( *it ) );
// find the oldest ancestor of the current dockwidget that can be undocked
while ( !pW->isTopLevel() )
@@ -1315,7 +1315,7 @@ void KMdiMainFrm::findRootDockWidgets( QPtrList<KDockWidget>* rootDockWidgetList
bool found = false;
if ( !rootDockWidgetList->isEmpty() )
{
- QPtrListIterator<KDockWidget> it2( *rootDockWidgetList );
+ TQPtrListIterator<KDockWidget> it2( *rootDockWidgetList );
for ( ; it2.current() && !found; ++it2 )
{
dockWindow = it2.current();
@@ -1329,8 +1329,8 @@ void KMdiMainFrm::findRootDockWidgets( QPtrList<KDockWidget>* 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<KDockWidget> rootDockWidgetList;
- QValueList<QRect> positionList;
+ TQPtrList<KDockWidget> rootDockWidgetList;
+ TQValueList<TQRect> 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<KDockWidget> kdwit( rootDockWidgetList );
+ TQPtrListIterator<KDockWidget> 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<KMdiChildView> kmdicvit( *m_pDocumentViews );
+ TQPtrListIterator<KMdiChildView> 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<QRect>::Iterator qvlqrit;
- QValueList<QRect>::Iterator qvlEnd = positionList.end();
+ TQValueList<TQRect>::Iterator qvlqrit;
+ TQValueList<TQRect>::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<KDockWidget> rootDockWidgetList;
- QValueList<QRect> positionList;
+ TQPtrList<KDockWidget> rootDockWidgetList;
+ TQValueList<TQRect> 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<KDockWidget> it( rootDockWidgetList );
+ TQPtrListIterator<KDockWidget> 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<KDockWidget> it( rootDockWidgetList );
+ TQPtrListIterator<KDockWidget> 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<KDockWidget> it( rootDockWidgetList );
+ TQPtrListIterator<KDockWidget> 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<KMdiChildView> it( *m_pDocumentViews );
+ TQPtrListIterator<KMdiChildView> 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<KMdiChildView> it( *m_pDocumentViews );
+ TQPtrListIterator<KMdiChildView> 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<KMdiChildView> it( *m_pDocumentViews );
+ TQPtrListIterator<KMdiChildView> it( *m_pDocumentViews );
for ( ; it.current(); ++it )
{
KMdiChildView* pView = it.current();
if ( pView->isToolView() )
continue;
kdDebug(760) << "KMdiMainFrm::finishTabPageMode: in loop" << endl;
- QSize mins = pView->minimumSize();
- QSize maxs = pView->maximumSize();
- QSize sz = pView->size();
- QWidget* pParent = pView->parentWidget();
- QPoint p( pParent->mapToGlobal( pParent->pos() ) - pParent->pos() + m_undockPositioningOffset );
+ 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<KMdiChildView> it4( *m_pDocumentViews );
+ TQPtrListIterator<KMdiChildView> 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<QWidget*, KMdiToolViewAccessor*>::Iterator it;
+ TQMap<TQWidget*, KMdiToolViewAccessor*>::Iterator it;
for ( it = m_pToolViews->begin(); it != m_pToolViews->end(); ++it )
{
KDockWidget *dockWidget = dynamic_cast<KDockWidget*>( 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<KDockWidget>& widgetsToReparent, KDockWidget *container )
+void KMdiMainFrm::dockToolViewsIntoContainers( TQPtrList<KDockWidget>& widgetsToReparent, KDockWidget *container )
{
- QPtrListIterator<KDockWidget> it( widgetsToReparent );
+ TQPtrListIterator<KDockWidget> it( widgetsToReparent );
for ( ; ( *it ); ++it )
{
( *it )->manualDock( container, KDockWidget::DockCenter, 20 );
@@ -1885,7 +1885,7 @@ void KMdiMainFrm::dockToolViewsIntoContainers( QPtrList<KDockWidget>& widgetsToR
}
}
-void KMdiMainFrm::findToolViewsDockedToMain( QPtrList<KDockWidget>* list, KDockWidget::DockPosition dprtmw )
+void KMdiMainFrm::findToolViewsDockedToMain( TQPtrList<KDockWidget>* list, KDockWidget::DockPosition dprtmw )
{
KDockWidget* mainDock = getMainDockWidget();
if ( mainDock->parentDockTabGroup() )
@@ -1937,10 +1937,10 @@ void KMdiMainFrm::setupToolViewsForIDEALMode()
if ( mainDock->parentDockTabGroup() )
w = static_cast<KDockWidget*>( mainDock->parentDockTabGroup()->parent() );
- QPtrList<KDockWidget> leftReparentWidgets;
- QPtrList<KDockWidget> rightReparentWidgets;
- QPtrList<KDockWidget> bottomReparentWidgets;
- QPtrList<KDockWidget> topReparentWidgets;
+ TQPtrList<KDockWidget> leftReparentWidgets;
+ TQPtrList<KDockWidget> rightReparentWidgets;
+ TQPtrList<KDockWidget> bottomReparentWidgets;
+ TQPtrList<KDockWidget> topReparentWidgets;
if ( mainDock->parentDockTabGroup() )
mainDock = static_cast<KDockWidget*>( 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<KMdiChildView> it( *m_pDocumentViews );
+ TQPtrListIterator<KMdiChildView> it( *m_pDocumentViews );
for ( ; it.current(); ++it )
{
KMdiChildView* pView = it.current();
if ( pView->isToolView() )
continue;
- QSize mins = pView->minimumSize();
- QSize maxs = pView->maximumSize();
- QSize sz = pView->size();
- QWidget* pParent = pView->parentWidget();
- QPoint p( pParent->mapToGlobal( pParent->pos() ) - pParent->pos() + m_undockPositioningOffset );
+ 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<KDockContainer*>( 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<KMdiChildView*>* it = createIterator();
- QMap<QDateTime, KMdiChildView*> m;
+ TQMap<TQDateTime, KMdiChildView*> 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<QDateTime, KMdiChildView*>::iterator pos( m.find( current ) );
- QMap<QDateTime, KMdiChildView*>::iterator newPos = pos;
+ TQDateTime current = activeWindow() ->getTimeStamp();
+ TQMap<TQDateTime, KMdiChildView*>::iterator pos( m.find( current ) );
+ TQMap<TQDateTime, KMdiChildView*>::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<KMdiChildView*>* it = createIterator();
- QMap<QDateTime, KMdiChildView*> m;
+ TQMap<TQDateTime, KMdiChildView*> 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<QDateTime, KMdiChildView*>::iterator pos( m.find( current ) );
+ TQDateTime current = activeWindow() ->getTimeStamp();
+ TQMap<TQDateTime, KMdiChildView*>::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<KMdiChildView> it( *m_pDocumentViews );
- QValueList<QDateTime> timeStamps;
+ TQPtrListIterator<KMdiChildView> it( *m_pDocumentViews );
+ TQValueList<TQDateTime> 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<QDateTime>::iterator timeStampIterator = timeStamps.begin();
+ TQString tmpString;
+ TQValueList<TQDateTime>::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<KMdiChildView> it( *m_pDocumentViews );
+ TQPtrListIterator<KMdiChildView> 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 <kmenubar.h>
#include <kpopupmenu.h>
-#include <qptrlist.h>
-#include <qrect.h>
-#include <qapplication.h>
-#include <qdom.h>
-#include <qguardedptr.h>
+#include <tqptrlist.h>
+#include <tqrect.h>
+#include <tqapplication.h>
+#include <tqdom.h>
+#include <tqguardedptr.h>
#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<KMdiChildView> *m_pDocumentViews;
- QMap<QWidget*, KMdiToolViewAccessor*> *m_pToolViews;
+ TQPtrList<KMdiChildView> *m_pDocumentViews;
+ TQMap<TQWidget*, KMdiToolViewAccessor*> *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<KDockWidget>* pRootDockWidgetList, QValueList<QRect>* pPositionList );
+ virtual bool eventFilter( TQObject *obj, TQEvent *e );
+ void findRootDockWidgets( TQPtrList<KDockWidget>* pRootDockWidgetList, TQValueList<TQRect>* 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<KDockWidget>* list, KDockWidget::DockPosition dprtmw );
- void dockToolViewsIntoContainers( QPtrList<KDockWidget>& widgetsToReparent, KDockWidget *container );
- QStringList prepareIdealToTabs( KDockWidget* container );
- void idealToolViewsToStandardTabs( QStringList widgetNames, KDockWidget::DockPosition pos, int sizee );
+ void findToolViewsDockedToMain( TQPtrList<KDockWidget>* list, KDockWidget::DockPosition dprtmw );
+ void dockToolViewsIntoContainers( TQPtrList<KDockWidget>& 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 <qtooltip.h>
-#include <qlabel.h>
-#include <qwidget.h>
-#include <qstyle.h>
+#include <tqtooltip.h>
+#include <tqlabel.h>
+#include <tqwidget.h>
+#include <tqstyle.h>
-#include <qnamespace.h>
+#include <tqnamespace.h>
/*
@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<KMdiTaskBarButton>;
+ m_pButtonList = new TQPtrList<KMdiTaskBarButton>;
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 <ktoolbar.h>
-#include <qptrlist.h>
-#include <qpixmap.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
+#include <tqptrlist.h>
+#include <tqpixmap.h>
+#include <tqlabel.h>
+#include <tqpushbutton.h>
#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.<br>
* 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<KMdiTaskBarButton>* m_pButtonList;
+ TQPtrList<KMdiTaskBarButton>* 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 <qwidget.h>
-#include <qpixmap.h>
-#include <qrect.h>
-#include <qapplication.h>
-#include <qdatetime.h>
+#include <tqwidget.h>
+#include <tqpixmap.h>
+#include <tqrect.h>
+#include <tqapplication.h>
+#include <tqdatetime.h>
#include <kdockwidget.h>
@@ -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 <qwidget.h>
+#include <tqwidget.h>
#include <kdockwidget.h>
-#include <qguardedptr.h>
+#include <tqguardedptr.h>
#include <kaction.h>
class KMDI_EXPORT KMdiToolViewAccessorPrivate {
@@ -40,9 +40,9 @@ public:
if (!widgetContainer.isNull()) widgetContainer->undock();
delete (KDockWidget*)widgetContainer;
}
- QGuardedPtr<KDockWidget> widgetContainer;
- QWidget* widget;
- QGuardedPtr<KAction> action;
+ TQGuardedPtr<KDockWidget> widgetContainer;
+ TQWidget* widget;
+ TQGuardedPtr<KAction> 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 <qbutton.h>
-#include <qpopupmenu.h>
-#include <qlayout.h>
-#include <qpainter.h>
-#include <qtooltip.h>
-#include <qfontmetrics.h>
-#include <qstyle.h>
+#include <tqbutton.h>
+#include <tqpopupmenu.h>
+#include <tqlayout.h>
+#include <tqpainter.h>
+#include <tqtooltip.h>
+#include <tqfontmetrics.h>
+#include <tqstyle.h>
#include <kiconloader.h>
#include <kdebug.h>
-#include <qapplication.h>
+#include <tqapplication.h>
#include <math.h>
#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"<<endl;
kdDebug()<<"KMultiTabBarInternal::resizeEvent - box geometry"<<box->geometry()<<endl;
kdDebug()<<"KMultiTabBarInternal::resizeEvent - geometry"<<geometry()<<endl;*/
- if (ev) QScrollView::resizeEvent(ev);
+ if (ev) TQScrollView::resizeEvent(ev);
if ( (m_style==KMultiTabBar::KDEV3) ||
(m_style==KMultiTabBar::KDEV3ICON) ){
@@ -328,18 +328,18 @@ void KMultiTabBarInternal::showActiveTabTexts(bool show)
KMultiTabBarTab* KMultiTabBarInternal::tab(int id) const
{
- for (QPtrListIterator<KMultiTabBarTab> it(m_tabs);it.current();++it){
+ for (TQPtrListIterator<KMultiTabBarTab> it(m_tabs);it.current();++it){
if (it.current()->id()==id) return it.current();
}
return 0;
}
-bool KMultiTabBarInternal::eventFilter(QObject *, QEvent *e) {
- if (e->type()==QEvent::Resize) resizeEvent(0);
+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<KMultiTabBar*>(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<KMultiTabBar*>(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***************"<<endl;
- QPushButton::setText(QString::null);
+ kdDebug()<<"KMultiTabBarTab::updateState(): setting text to an empty TQString***************"<<endl;
+ TQPushButton::setText(TQString::null);
}
if ((m_position==KMultiTabBar::Right || m_position==KMultiTabBar::Left)) {
@@ -598,13 +598,13 @@ void KMultiTabBarTab::updateState()
else
setFixedWidth(m_expandedSize);
}
- QApplication::sendPostedEvents(0,QEvent::Paint | QEvent::Move | QEvent::Resize | QEvent::LayoutHint);
- QApplication::flush();
+ TQApplication::sendPostedEvents(0,TQEvent::Paint | TQEvent::Move | TQEvent::Resize | TQEvent::LayoutHint);
+ TQApplication::flush();
}
int KMultiTabBarTab::neededSize()
{
- return (((m_style!=KMultiTabBar::KDEV3)?24:0)+QFontMetrics(QFont()).width(m_text)+6);
+ return (((m_style!=KMultiTabBar::KDEV3)?24:0)+TQFontMetrics(TQFont()).width(m_text)+6);
}
void KMultiTabBarTab::setSize(int size)
@@ -618,41 +618,41 @@ void KMultiTabBarTab::showActiveTabText(bool show)
m_showActiveTabText=show;
}
-void KMultiTabBarTab::drawButtonLabel(QPainter *p) {
+void KMultiTabBarTab::drawButtonLabel(TQPainter *p) {
drawButton(p);
}
-void KMultiTabBarTab::drawButton(QPainter *paint)
+void KMultiTabBarTab::drawButton(TQPainter *paint)
{
if (m_style!=KMultiTabBar::KONQSBC) drawButtonStyled(paint);
else drawButtonClassic(paint);
}
-void KMultiTabBarTab::drawButtonStyled(QPainter *paint) {
+void KMultiTabBarTab::drawButtonStyled(TQPainter *paint) {
- QSize sh;
+ TQSize sh;
const int width = 36; // rotated
const int height = 24;
if ((m_style==KMultiTabBar::KDEV3) || (m_style==KMultiTabBar::KDEV3ICON) || (isOn())) {
if ((m_position==KMultiTabBar::Left) || (m_position==KMultiTabBar::Right))
- sh=QSize(this->height(),this->width());//KMultiTabBarButton::sizeHint();
- else sh=QSize(this->width(),this->height());
+ 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:"<<tpixmap.width()<<endl;
@@ -770,12 +770,12 @@ void KMultiTabBarTab::drawButtonClassic(QPainter *paint)
else
if (m_position==KMultiTabBar::Top)
{
- paint->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:"<<tpixmap.width()<<endl;
@@ -833,19 +833,19 @@ void KMultiTabBarTab::drawButtonClassic(QPainter *paint)
-KMultiTabBar::KMultiTabBar(KMultiTabBarMode bm, QWidget *parent,const char *name):QWidget(parent,name)
+KMultiTabBar::KMultiTabBar(KMultiTabBarMode bm, TQWidget *parent,const char *name):TQWidget(parent,name)
{
m_buttons.setAutoDelete(false);
if (bm==Vertical)
{
- m_l=new QVBoxLayout(this);
- setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Expanding, true);
+ m_l=new TQVBoxLayout(this);
+ setSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Expanding, true);
// setFixedWidth(24);
}
else
{
- m_l=new QHBoxLayout(this);
- setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed, true);
+ m_l=new TQHBoxLayout(this);
+ setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Fixed, true);
// setFixedHeight(24);
}
m_l->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<KMultiTabBarButton> it(m_buttons);it.current();++it){
+ for (TQPtrListIterator<KMultiTabBarButton> 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<KMultiTabBarButton> it(m_buttons);it.current();++it){
+ for (TQPtrListIterator<KMultiTabBarButton> 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;i<m_buttons.count();i++)
m_buttons.at(i)->setPosition(pos);
}
-void KMultiTabBar::fontChange(const QFont& /* oldFont */)
+void KMultiTabBar::fontChange(const TQFont& /* oldFont */)
{
for (uint i=0;i<tabs()->count();i++)
tabs()->at(i)->resize();
repaint();
}
-QPtrList<KMultiTabBarTab>* KMultiTabBar::tabs() {return m_internal->tabs();}
-QPtrList<KMultiTabBarButton>* KMultiTabBar::buttons() {return &m_buttons;}
+TQPtrList<KMultiTabBarTab>* KMultiTabBar::tabs() {return m_internal->tabs();}
+TQPtrList<KMultiTabBarButton>* 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 <qscrollview.h>
-#include <qvbox.h>
-#include <qhbox.h>
-#include <qlayout.h>
-#include <qstring.h>
-#include <qptrlist.h>
-#include <qpushbutton.h>
+#include <tqscrollview.h>
+#include <tqvbox.h>
+#include <tqhbox.h>
+#include <tqlayout.h>
+#include <tqstring.h>
+#include <tqptrlist.h>
+#include <tqpushbutton.h>
#include <kdelibs_export.h>
@@ -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<KMultiTabBarTab>* tabs();
+ TQPtrList<KMultiTabBarTab>* tabs();
/**
* be carefull, don't delete buttons yourself and don't delete the list itself
*/
- QPtrList<KMultiTabBarButton>* buttons();
+ TQPtrList<KMultiTabBarButton>* 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<KMultiTabBarButton> m_buttons;
+ TQBoxLayout *m_l;
+ TQFrame *m_btnTabSep;
+ TQPtrList<KMultiTabBarButton> 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 <qscrollview.h>
+#include <tqscrollview.h>
#include <kmultitabbar.h>
class KMultiTabBarInternal: public QScrollView
{
Q_OBJECT
public:
- KMultiTabBarInternal(QWidget *parent,KMultiTabBar::KMultiTabBarMode bm);
- int appendTab(const QPixmap &,int=-1,const QString& =QString::null);
+ 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<KMultiTabBarTab>* tabs(){return &m_tabs;}
+ TQPtrList<KMultiTabBarTab>* tabs(){return &m_tabs;}
private:
friend class KMultiTabBar;
- QWidget *box;
- QBoxLayout *mainLayout;
- QPtrList<KMultiTabBarTab> m_tabs;
+ TQWidget *box;
+ TQBoxLayout *mainLayout;
+ TQPtrList<KMultiTabBarTab> 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 <qapplication.h>
-#include <qcursor.h>
-#include <qpainter.h>
-#include <qstyle.h>
-#include <qtimer.h>
-#include <qpushbutton.h>
-#include <qtooltip.h>
+#include <tqapplication.h>
+#include <tqcursor.h>
+#include <tqpainter.h>
+#include <tqstyle.h>
+#include <tqtimer.h>
+#include <tqpushbutton.h>
+#include <tqtooltip.h>
#include <kglobalsettings.h>
#include <kiconloader.h>
@@ -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<QTab> *tablist = tabList();
+ TQPtrList<TQTab> *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<QTab> *tablist = tabList();
+ TQPtrList<TQTab> *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 <qtabbar.h>
+#include <tqtabbar.h>
#include <kdelibs_export.h>
@@ -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<int, QColor> mTabColors;
- QTab *mHoverCloseButtonTab, *mDragSwitchTab;
- QPushButton *mHoverCloseButton;
- QTimer *mEnableCloseButtonTimer, *mActivateDragSwitchTabTimer;
+ TQMap<int, TQColor> 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 <qapplication.h>
-#include <qstyle.h>
+#include <tqapplication.h>
+#include <tqstyle.h>
#include <kconfig.h>
#include <kiconloader.h>
@@ -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<KTabBar*>(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<KTabBar*>(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 <qtabwidget.h>
-#include <qstringlist.h>
+#include <tqtabwidget.h>
+#include <tqstringlist.h>
#include <kdelibs_export.h>
@@ -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 <knewstuff/knewstuffgeneric.h>
#include <knewstuff/engine.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
-#include <qdom.h>
-#include <qlabel.h>
-#include <qtextbrowser.h>
-#include <qtimer.h> // hack
+#include <tqlayout.h>
+#include <tqpushbutton.h>
+#include <tqdom.h>
+#include <tqlabel.h>
+#include <tqtextbrowser.h>
+#include <tqtimer.h> // hack
using namespace KNS;
class NumSortListViewItem : public KListViewItem
{
public:
- NumSortListViewItem( QListView * parent, QString label1, QString label2 = QString::null, QString label3 = QString::null, QString label4 = QString::null, QString label5 = QString::null, QString label6 = QString::null, QString label7 = QString::null, QString label8 = QString::null ) :
+ 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<QWidget*, QValueList<KListView*>* >::Iterator it;
+ TQMap<TQWidget*, TQValueList<KListView*>* >::Iterator it;
for(it = m_map.begin(); it != m_map.end(); ++it)
{
- QValueList<KListView*> *v = it.data();
+ TQValueList<KListView*> *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<KListView*> *v = new QValueList<KListView*>;
+ TQValueList<KListView*> *v = new TQValueList<KListView*>;
*v << lvtmp_r << lvtmp_d << lvtmp_l;
m_map[frame] = v;
m_rts[frame] = rt;
- QValueList<QPushButton*> *vb = new QValueList<QPushButton*>;
+ TQValueList<TQPushButton*> *vb = new TQValueList<TQPushButton*>;
*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("<b>%1</b><br>%2<br>%3<br><br><i>%4</i><br>(%5)").arg(
+ m_rt->setText(TQString("<b>%1</b><br>%2<br>%3<br><br><i>%4</i><br>(%5)").arg(
e->name()).arg(e->author()).arg(KGlobal::locale()->formatDate(e->releaseDate())).arg(e->summary(lang)).arg(e->license()));
}
else
{
KIO::NetAccess::download(e->preview(lang), tmp, this);
- m_rt->setText(QString("<b>%1</b><br>%2<br>%3<br><br><img src='%4'><br><i>%5</i><br>(%6)").arg(
+ m_rt->setText(TQString("<b>%1</b><br>%2<br>%3<br><br><img src='%4'><br><i>%5</i><br>(%6)").arg(
e->name()).arg(e->author()).arg(KGlobal::locale()->formatDate(e->releaseDate())).arg(tmp).arg(e->summary(lang)).arg(e->license()));
}
if(installStatus(e) == 1) enabled = false;
else enabled = true;
- QPushButton *de, *in;
+ 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<Entry> m_entries;
+ TQTextBrowser *m_rt;
+ TQFrame *m_frame;
+ TQListViewItem *m_entryitem;
+ TQPtrList<Entry> m_entries;
Entry *m_entry;
KNewStuffGeneric *m_s;
int m_curtab;
- QMap<QWidget*, QValueList<KListView*>* > m_map;
- QMap<QWidget*, Provider*> m_providers;
- QMap<QWidget*, QTextBrowser*> m_rts;
- QMap<QWidget*, QValueList<QPushButton*>* > m_buttons;
- QMap<KIO::Job*, Provider*> m_jobs;
- QMap<KIO::Job*, QString> m_data;
- QString m_filter;
- QString m_providerlist;
+ TQMap<TQWidget*, TQValueList<KListView*>* > m_map;
+ TQMap<TQWidget*, Provider*> m_providers;
+ TQMap<TQWidget*, TQTextBrowser*> m_rts;
+ TQMap<TQWidget*, TQValueList<TQPushButton*>* > m_buttons;
+ TQMap<KIO::Job*, Provider*> m_jobs;
+ TQMap<KIO::Job*, TQString> 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 <qcstring.h>
-#include <qdom.h>
-#include <qfileinfo.h>
+#include <tqcstring.h>
+#include <tqdom.h>
+#include <tqfileinfo.h>
#include <kapplication.h>
#include <kdebug.h>
@@ -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 <qmap.h>
-#include <qobject.h>
-#include <qstring.h>
+#include <tqmap.h>
+#include <tqobject.h>
+#include <tqstring.h>
#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<KIO::Job *,QString> mNewStuffJobData;
- QMap<KIO::Job *,Provider *> mProviderJobs;
+ TQMap<KIO::Job *,TQString> mNewStuffJobData;
+ TQMap<KIO::Job *,Provider *> mProviderJobs;
- QPtrList<Entry> mNewStuffList;
+ TQPtrList<Entry> 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 <qdatetime.h>
-#include <qdom.h>
-#include <qmap.h>
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqdatetime.h>
+#include <tqdom.h>
+#include <tqmap.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#include <kurl.h>
@@ -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<QString,QString> mSummaryMap;
- QString mVersion;
+ TQString mName;
+ TQString mType;
+ TQString mAuthor;
+ TQString mLicence;
+ TQMap<TQString,TQString> mSummaryMap;
+ TQString mVersion;
int mRelease;
- QDate mReleaseDate;
- QMap<QString,KURL> mPayloadMap;
- QMap<QString,KURL> mPreviewMap;
+ TQDate mReleaseDate;
+ TQMap<TQString,KURL> mPayloadMap;
+ TQMap<TQString,KURL> 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 <qstring.h>
+#include <tqstring.h>
#include <kdemacros.h>
@@ -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 <qfile.h>
-#include <qtextstream.h>
-#include <qdir.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqdir.h>
#include <kdebug.h>
#include <klocale.h>
@@ -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 <qfileinfo.h>
+#include <tqfileinfo.h>
//kde includes
#include <kconfig.h>
@@ -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<QString, QString>::ConstIterator it = m_installedResources.constBegin(); it != m_installedResources.constEnd(); ++it)
+ for (TQMap<TQString, TQString>::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 <qobject.h>
+#include <tqobject.h>
//kde includes
#include "knewstuff.h"
@@ -37,7 +37,7 @@ to the standard KNewStuff class.
@author Andras Mantia <amantia@kde.org>
*/
-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<QString, QString> m_installedResources;
+ TQString m_tarName;
+ TQString m_signedFileName;
+ TQMap<TQString, TQString> 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 <qcstring.h>
-#include <qdom.h>
-#include <qobject.h>
-#include <qptrlist.h>
-#include <qstring.h>
+#include <tqcstring.h>
+#include <tqdom.h>
+#include <tqobject.h>
+#include <tqptrlist.h>
+#include <tqstring.h>
#include <kurl.h>
@@ -46,7 +46,7 @@ namespace KNS {
class Provider
{
public:
- typedef QPtrList<Provider> List;
+ typedef TQPtrList<Provider> 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 <qlayout.h>
-#include <qstring.h>
-#include <qlabel.h>
+#include <tqlayout.h>
+#include <tqstring.h>
+#include <tqlabel.h>
#include <klistview.h>
#include <klocale.h>
@@ -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 <qfile.h>
-#include <qfileinfo.h>
-#include <qstringlist.h>
-#include <qtimer.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
+#include <tqstringlist.h>
+#include <tqtimer.h>
//kde includes
#include <kdebug.h>
@@ -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("<qt>Cannot start <i>gpg</i> and retrieve the available keys. Make sure that <i>gpg</i> is installed, otherwise verification of downloaded resources will not be possible.</qt>"));
else
@@ -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("<qt>Enter passphrase for key <b>0x%1</b>, belonging to<br><i>%2&lt;%3&gt;</i>:</qt>").arg(m_secretKey).arg(key.name).arg(key.mail));
if (result == KPasswordDialog::Accepted)
@@ -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<QString, KeyStruct>::Iterator it = m_keys.begin(); it != m_keys.end(); ++it)
+ TQStringList secretKeys;
+ for (TQMap<TQString, KeyStruct>::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 <qmap.h>
-#include <qobject.h>
+#include <tqmap.h>
+#include <tqobject.h>
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<QString, KeyStruct> m_keys; /// holds information about the available key
- QString m_fileName; /// the file to sign/verify
- QString m_secretKey; /// the key used for signing
+ TQMap<TQString, KeyStruct> 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 <qcombobox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlineedit.h>
-#include <qspinbox.h>
-#include <qstring.h>
+#include <tqcombobox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
+#include <tqspinbox.h>
+#include <tqstring.h>
#include <ktextedit.h>
#include <klistview.h>
@@ -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<Entry> mEntryList;
+ TQPtrList<Entry> 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 <qvbox.h>
-#include <qlabel.h>
-#include <qheader.h>
+#include <tqvbox.h>
+#include <tqlabel.h>
+#include <tqheader.h>
#include <klocale.h>
#include <kpushbutton.h>
@@ -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<CheckURL*>( 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 <qstringlist.h>
+#include <tqstringlist.h>
#include <kdialogbase.h>
#include <kurl.h>
@@ -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 <qdir.h>
-#include <qapplication.h>
-#include <qptrlist.h>
-#include <qstringlist.h>
-#include <qregexp.h>
-#include <qtimer.h>
+#include <tqdir.h>
+#include <tqapplication.h>
+#include <tqptrlist.h>
+#include <tqstringlist.h>
+#include <tqregexp.h>
+#include <tqtimer.h>
//kde includes
#include <kurl.h>
@@ -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<KFileItem> QExtFileInfo::allFilesDetailed(const KURL& path, const QString& mask, QWidget *window)
+TQDict<KFileItem> 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<KFileItem> QExtFileInfo::allFilesDetailedInternal(const KURL& startURL, const QString& mask, QWidget *window)
+TQDict<KFileItem> QExtFileInfo::allFilesDetailedInternal(const KURL& startURL, const TQString& mask, TQWidget *window)
{
detailedDirListItems.setAutoDelete(true);
detailedDirListItems.clear();
@@ -330,18 +330,18 @@ QDict<KFileItem> 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<KFileItem> 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"<<endl;
enter_loop();
//kdDebug(24000)<<"QExtFileInfo::internalExists:after enter_loop"<<endl;
@@ -409,7 +409,7 @@ bool QExtFileInfo::internalExists(const KURL& url, bool readingOnly, QWidget *wi
}
bool QExtFileInfo::internalCopy(const KURL& src, const KURL& target, int permissions,
- bool overwrite, bool resume, QWidget* window)
+ bool overwrite, bool resume, TQWidget* window)
{
bJobOK = true; // success unless further error occurs
@@ -417,8 +417,8 @@ bool QExtFileInfo::internalCopy(const KURL& src, const KURL& target, int permiss
KIO::Job * job = KIO::file_copy( src, target, permissions, overwrite, resume, false );
// KIO::Job * job2 = KIO::del(target, false );
//job2->setWindow (window);
- //connect( job2, SIGNAL( result (KIO::Job *) ),
-// this, SLOT( slotResult (KIO::Job *) ) );
+ //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<KIO::ListJob *>(job)->url();
url.adjustPath(-1);
// avoid creating these QStrings again and again
- static const QString& dot = KGlobal::staticQString(".");
- static const QString& dotdot = KGlobal::staticQString("..");
+ 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<KFileItem> linkItems;
+ TQPtrList<KFileItem> 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<QRegExp> filterIt(lstFilters); filterIt.current(); ++filterIt )
+ for (TQPtrListIterator<TQRegExp> 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<KFileItem>::ConstIterator it = linkItems.constBegin(); it != linkItems.constEnd(); ++it)
+ for (TQPtrList<KFileItem>::ConstIterator it = linkItems.constBegin(); it != linkItems.constEnd(); ++it)
{
KIO::ListJob *ljob = KIO::listRecursive((*it)->url(), false, true);
m_listJobCount++;
//kdDebug(24000) << "Now listing: " << (*it)->url() << endl;
- connect( ljob, SIGNAL(entries(KIO::Job *,const KIO::UDSEntryList &)),
- this,SLOT (slotNewEntries(KIO::Job *,const KIO::UDSEntryList &)));
- connect( ljob, SIGNAL(result(KIO::Job *)),
- this,SLOT (slotListResult(KIO::Job *)));
+ 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<KIO::ListJob *>(job)->url();
url.adjustPath(-1);
// avoid creating these QStrings again and again
- static const QString& dot = KGlobal::staticQString(".");
- static const QString& dotdot = KGlobal::staticQString("..");
+ 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<KFileItem> linkItems;
+ TQPtrList<KFileItem> 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<QRegExp> filterIt( lstFilters ); filterIt.current(); ++filterIt)
+ for (TQPtrListIterator<TQRegExp> 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<KFileItem>::ConstIterator it = linkItems.constBegin(); it != linkItems.constEnd(); ++it)
+ for (TQPtrList<KFileItem>::ConstIterator it = linkItems.constBegin(); it != linkItems.constEnd(); ++it)
{
KIO::ListJob *ljob = KIO::listRecursive((*it)->url(), false, true);
m_listJobCount++;
// kdDebug(24000) << "Now listing: " << (*it)->url() << endl;
- connect( ljob, SIGNAL(entries(KIO::Job *,const KIO::UDSEntryList &)),
- this,SLOT (slotNewDetailedEntries(KIO::Job *,const KIO::UDSEntryList &)));
- connect( ljob, SIGNAL(result(KIO::Job *)),
- this,SLOT (slotListResult(KIO::Job *)));
+ 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 <kurl.h>
#include <kfileitem.h>
-#include <qobject.h>
-#include <qptrlist.h>
-#include <qdict.h>
-#include <qregexp.h>
+#include <tqobject.h>
+#include <tqptrlist.h>
+#include <tqdict.h>
+#include <tqregexp.h>
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<KFileItem> allFilesDetailed(const KURL& path, const QString &mask, QWidget *window);
+ static TQDict<KFileItem> 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<KFileItem> 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<KFileItem> 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<KFileItem> detailedDirListItems;
- QPtrList<QRegExp> lstFilters;
+ TQDict<KFileItem> detailedDirListItems;
+ TQPtrList<TQRegExp> 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 <klineedit.h>
#include <kcombobox.h>
#include <kcolordialog.h>
-#include <qtooltip.h>
-#include <qiconset.h>
+#include <tqtooltip.h>
+#include <tqiconset.h>
#include <kiconloader.h>
#include <klocale.h>
#include <kaccel.h>
@@ -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 <kdebug.h>
-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 <kpushbutton.h>
-#include <qcolor.h>
+#include <tqcolor.h>
#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 <qvbox.h>
-#include <qlabel.h>
+#include <tqvbox.h>
+#include <tqlabel.h>
#include <klocale.h>
@@ -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("<b>" + l +"</b>",leftBox);
- QLabel *centerLabel = new QLabel(("<b>" + c +"</b>"),centerBox);
- QLabel *rightLabel = new QLabel(("<b>" + r +"</b>"),rightBox);
+ TQVBox *leftBox = new TQVBox(this);
+ TQVBox *centerBox = new TQVBox(this);
+ TQVBox *rightBox = new TQVBox(this);
+ TQLabel *leftLabel = new TQLabel("<b>" + l +"</b>",leftBox);
+ TQLabel *centerLabel = new TQLabel(("<b>" + c +"</b>"),centerBox);
+ TQLabel *rightLabel = new TQLabel(("<b>" + r +"</b>"),rightBox);
leftLabel->setAlignment(Qt::AlignHCenter);
centerLabel->setAlignment(Qt::AlignHCenter);
rightLabel->setAlignment(Qt::AlignHCenter);
leftLabel->setTextFormat (Qt::RichText ) ;
centerLabel->setTextFormat ( Qt::RichText ) ;
rightLabel->setTextFormat (Qt::RichText ) ;
- m_leftValue = new QSlider ( 0, 255, 1, 0, Qt::Horizontal , leftBox);
- m_centerValue = new QSlider ( 0, 255, 1, 0, Qt::Horizontal , centerBox);
- m_rightValue = new QSlider ( 0, 255, 1, 0, Qt::Horizontal , rightBox);
+ 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 <qslider.h>
+#include <tqslider.h>
#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 <qlayout.h>
-#include <qtabwidget.h>
-#include <qpushbutton.h>
-#include <qcheckbox.h>
-#include <qtextedit.h>
-#include <qtextstream.h>
-#include <qfileinfo.h>
+#include <tqlayout.h>
+#include <tqtabwidget.h>
+#include <tqpushbutton.h>
+#include <tqcheckbox.h>
+#include <tqtextedit.h>
+#include <tqtextstream.h>
+#include <tqfileinfo.h>
#include <kapplication.h>
#include <klocale.h>
@@ -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<myCheckListItem*>(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;i<l.length();i++) {
myCheckListItem *item = new myCheckListItem(cli,l.item(i).toElement().tagName());
- item->connect(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;i<l.length();i++) {
myCheckListItem *item = new myCheckListItem(lv,l.item(i).toElement().tagName());
- item->connect(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<myCheckListItem*>(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<myCheckListItem*>(lvVisual->findItem( "border-top",0 ))->setOn(true);
static_cast<myCheckListItem*>(lvVisual->findItem( "border-right",0 ))->setOn(true);
static_cast<myCheckListItem*>(lvVisual->findItem( "border-bottom",0 ))->setOn(true);
@@ -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<QString,QString> expandedProperties = decompressor.expand(propertyName, propertyValue );
- QMap<QString,QString>::Iterator it;
+ TQMap<TQString,TQString> expandedProperties = decompressor.expand(propertyName, propertyValue );
+ TQMap<TQString,TQString>::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<myCheckListItem*>(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; i<valueTypes.length(); i++) {
- QDomElement curr =valueTypes.item(i).toElement();
- QString valueTypeName(curr.tagName());
+ TQDomElement curr =valueTypes.item(i).toElement();
+ TQString valueTypeName(curr.tagName());
if(valueTypeName =="list") {
m_ps->setComboBox();
- 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<QString,QString>::Iterator it;
+TQString CSSEditor::generateProperties(){
+ TQString props;
+ TQMap<TQString,TQString>::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<QString,QString>::Iterator it;
+ TQMap<TQString,TQString>::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<QString,QString>::Iterator it;
+ TQMap<TQString,TQString>::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<QString,QString>::Iterator it;
+ TQString toDisplay;
+ TQMap<TQString,TQString>::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 <qwidget.h>
+#include <tqwidget.h>
#include "csseditors.h"
-#include <qdom.h>
-#include <qmap.h>
-#include <qlistview.h>
-#include <qsignal.h>
+#include <tqdom.h>
+#include <tqmap.h>
+#include <tqlistview.h>
+#include <tqsignal.h>
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<QString,QString> m_properties;
- QString m_selectorName,
+ TQDomDocument m_doc;
+ TQMap<TQString,TQString> 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 <qlineedit.h>
+#include <tqlineedit.h>
#include "csseditor_globals.h"
-mySpinBox::mySpinBox(QWidget * parent , const char * name ) : QSpinBox (parent, name){
- connect( editor(), SIGNAL(textChanged(const QString&)), this, SLOT(checkSuffix( const QString & )));
- connect( editor(), SIGNAL(textChanged(const QString&)), this, SIGNAL(valueChanged( const QString & )));
+mySpinBox::mySpinBox(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 <qspinbox.h>
-#include <qregexp.h>
-#include <qstringlist.h>
+#include <tqspinbox.h>
+#include <tqregexp.h>
+#include <tqstringlist.h>
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 <qlineedit.h>
-#include <qcombobox.h>
-#include <qpushbutton.h>
-#include <qtextstream.h>
-#include <qtabwidget.h>
-#include <qobjectlist.h>
-#include <qfileinfo.h>
-#include <qlabel.h>
-#include <qregexp.h>
-#include <qwhatsthis.h>
+#include <tqlineedit.h>
+#include <tqcombobox.h>
+#include <tqpushbutton.h>
+#include <tqtextstream.h>
+#include <tqtabwidget.h>
+#include <tqobjectlist.h>
+#include <tqfileinfo.h>
+#include <tqlabel.h>
+#include <tqregexp.h>
+#include <tqwhatsthis.h>
#include <kstandarddirs.h>
#include <klocale.h>
@@ -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<QString, unsigned int> tmp(QString::null,++m_orderNumber);
+ QPair<TQString, unsigned int> 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<QString, unsigned int> tmp(QString::null,++m_orderNumber);
+ QPair<TQString, unsigned int> 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<QString, unsigned int> tmp(QString::null,++m_orderNumber);
+ QPair<TQString, unsigned int> 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<QString, unsigned int> tmp(QString::null,++m_orderNumber);
+ QPair<TQString, unsigned int> 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<QString, unsigned int> tmp(m_currentStylesheetStructure[i->text(0)]);
+ QPair<TQString, unsigned int> tmp(m_currentStylesheetStructure[i->text(0)]);
tmp.first = dlg.generateProperties();
m_currentStylesheetStructure[i->text(0)] = tmp;
}
}
}
-void CSSSelector::setCurrentListView(QWidget* w){
- QObjectList *l = w->queryList( "QListView" );
- m_currentListView = static_cast<QListView*>(l->first());
+void CSSSelector::setCurrentListView(TQWidget* w){
+ TQObjectList *l = w->queryList( "TQListView" );
+ m_currentListView = static_cast<TQListView*>(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<QString, QPair<QString,unsigned int> >::Iterator it;
+ TQMap<TQString, QPair<TQString,unsigned int> >::Iterator it;
m_currentStylesheetStructure = p.stylesheetStructure();
for ( it = m_currentStylesheetStructure.begin(); it != m_currentStylesheetStructure.end(); ++it ) {
if(!it.key().startsWith("@rule") && !it.key().startsWith("/*")){
- QListViewItem *item;
+ 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<QString,unsigned int> >::Iterator it;
- QString styleSection,tmpStr;
+TQString CSSSelector::generateFormattedStyleSection(){
+ TQMap< TQString,QPair<TQString,unsigned int> >::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 <qmap.h>
-#include <qpair.h>
+#include <tqmap.h>
+#include <tqpair.h>
#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<QString, QPair<QString,unsigned int> > m_currentStylesheetStructure;
+ TQMap<TQString, QPair<TQString,unsigned int> > 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 <qregexp.h>
+#include <tqregexp.h>
//#include <kdebug.h>
-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<m_propertyToParse.length() ){
@@ -70,39 +70,39 @@ QString CSSSHPropertyParser::extractQuotedStringList(){
return temp;
}
-QString CSSSHPropertyParser::extractURIList(){//extract things like url('...') or url("..") or url("..."), url(.....
+TQString CSSSHPropertyParser::extractURIList(){//extract things like url('...') or url("..") or url("..."), url(.....
//kdDebug(24000) << "\n\n\nextractURIList()\n\n\n";
- QRegExp URIListPattern("\\s*(url\\([\\W\\w]*\\))\\s*");
+ TQRegExp URIListPattern("\\s*(url\\([\\W\\w]*\\))\\s*");
URIListPattern.search(m_propertyToParse);
return URIListPattern.cap(1);
}
-QStringList CSSSHPropertyParser::parse(){
- QStringList tokenList;
+TQStringList CSSSHPropertyParser::parse(){
+ TQStringList tokenList;
bool stop = false;
m_propertyToParse = removeBeginningWhiteSpaces(m_propertyToParse);
while(!stop){
- QString temp;
+ TQString temp;
for(unsigned int i=0;i<m_propertyToParse.length() ;i++){
if(m_propertyToParse[i] == ' ') break;// tokens are delimited by a blank
temp+=m_propertyToParse[i];
}
if(temp.contains("url(") !=0 ){
- QString foundURIList = extractURIList();
+ TQString foundURIList = extractURIList();
m_propertyToParse = removeBeginningWhiteSpaces(m_propertyToParse.remove(foundURIList));
tokenList.append(foundURIList);
}
else
if(temp.contains("(")!=0){
- QString foundFunctionList = extractFunctionList();
+ TQString foundFunctionList = extractFunctionList();
m_propertyToParse = removeBeginningWhiteSpaces(m_propertyToParse.remove(foundFunctionList));
tokenList.append(foundFunctionList);
}
else
if(temp.contains("'")!=0 || temp.contains("\"")!=0 || temp.contains(",")!=0){
- QString foundQuotedStringList = extractQuotedStringList();
+ TQString foundQuotedStringList = extractQuotedStringList();
m_propertyToParse = removeBeginningWhiteSpaces(m_propertyToParse.remove(foundQuotedStringList));
tokenList.append(foundQuotedStringList);
}
diff --git a/quanta/components/csseditor/cssshpropertyparser.h b/quanta/components/csseditor/cssshpropertyparser.h
index dd95eb39..fe7f8031 100644
--- a/quanta/components/csseditor/cssshpropertyparser.h
+++ b/quanta/components/csseditor/cssshpropertyparser.h
@@ -23,24 +23,24 @@
/**
@author Gulmini Luciano
*/
-#include <qstringlist.h>
+#include <tqstringlist.h>
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 <qcombobox.h>
+ #include <tqcombobox.h>
#include "csseditor_globals.h"
#include "propertysetter.h"
- #include <qregexp.h>
+ #include <tqregexp.h>
-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 <kglobal.h>
#include <kcharsets.h>
-#include <qtextcodec.h>
+#include <tqtextcodec.h>
/**
*@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 <qcombobox.h>
+#include <tqcombobox.h>
/**
*@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 <qfontdatabase.h>
-#include <qstringlist.h>
-#include <qlistbox.h>
-#include <qfont.h>
+#include <tqfontdatabase.h>
+#include <tqstringlist.h>
+#include <tqlistbox.h>
+#include <tqfont.h>
#include <klocale.h>
-#include <qiconset.h>
-#include <qpixmap.h>
+#include <tqiconset.h>
+#include <tqpixmap.h>
#include <kiconloader.h>
#include <kpushbutton.h>
#include <kglobalsettings.h>
-#include <qregexp.h>
-#include <qlineedit.h>
-#include <qwhatsthis.h>
+#include <tqregexp.h>
+#include <tqlineedit.h>
+#include <tqwhatsthis.h>
#include<kdebug.h>
-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 <qmap.h>
+#include <tqmap.h>
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<QString,FontOrigin> m_selectedFontMap;
+ TQMap<TQString,FontOrigin> 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 <qhbox.h>
+#include <tqhbox.h>
/**
*@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 <qhbox.h>
-#include <qptrlist.h>
+#include <tqhbox.h>
+#include <tqptrlist.h>
#include "doubleeditors.h"
-#include <qcombobox.h>
-#include <qslider.h>
+#include <tqcombobox.h>
+#include <tqslider.h>
#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 <qlineedit.h>
-#include <qcombobox.h>
-#include <qspinbox.h>
-#include <qlabel.h>
-#include <qtooltip.h>
-#include <qregexp.h>
-#include <qvbox.h>
+#include <tqlineedit.h>
+#include <tqcombobox.h>
+#include <tqspinbox.h>
+#include <tqlabel.h>
+#include <tqtooltip.h>
+#include <tqregexp.h>
+#include <tqvbox.h>
#include <kpushbutton.h>
#include <kdebug.h>
@@ -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 <qhbox.h>
-#include <qptrlist.h>
-#include <qcombobox.h>
+#include <tqhbox.h>
+#include <tqptrlist.h>
+#include <tqcombobox.h>
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<QWidget> m_list;
- QComboBox *m_cb;
+ TQPtrList<TQWidget> 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 <qregexp.h>
-QMyHighlighter::QMyHighlighter(QTextEdit* Qtxt):QSyntaxHighlighter(Qtxt){
+#include <tqregexp.h>
+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 <qsyntaxhighlighter.h>
+#include <tqsyntaxhighlighter.h>
/**
*@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 <qstringlist.h>
+#include <tqstringlist.h>
#include "cssshpropertyparser.h"
#include <kdebug.h>
#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<QString,QString> m){
+ShorthandFormer::ShorthandFormer( TQMap<TQString,TQString> m){
m_properties = m;
if(m_properties.contains("cue-after")){
@@ -218,8 +218,8 @@ ShorthandFormer::ShorthandFormer( QMap<QString,QString> 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<QString,QString>::Iterator it;
+ TQMap<TQString,TQString>::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<QString,QString> ShorthandFormer::expand( const QString& propertyName, const QString& propertyValue ){
+TQMap<TQString,TQString> 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<QString,QString> 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<QString,QString>();//dummy instruction avoiding a pedantic warning; can never be reached
+ return TQMap<TQString,TQString>();//dummy instruction avoiding a pedantic warning; can never be reached
}
-QMap<QString,QString> ShorthandFormer::expandCueProp(const QStringList& l){
+TQMap<TQString,TQString> ShorthandFormer::expandCueProp(const TQStringList& l){
return expandImplementation("cue",l);
}
-QMap<QString,QString> ShorthandFormer::expandPauseProp(const QStringList& l){
+TQMap<TQString,TQString> ShorthandFormer::expandPauseProp(const TQStringList& l){
return expandImplementation("pause",l);
}
-QMap<QString,QString> ShorthandFormer::expandImplementation(const QString& propertyName, const QStringList& l){
- QMap<QString,QString> expandedProps;
+TQMap<TQString,TQString> ShorthandFormer::expandImplementation(const TQString& propertyName, const TQStringList& l){
+ TQMap<TQString,TQString> expandedProps;
if( l.count()==1) {
expandedProps[propertyName + "-before"] = l[0] ;
expandedProps[propertyName + "-after"] = l[0] ;
@@ -502,8 +502,8 @@ QMap<QString,QString> ShorthandFormer::expandImplementation(const QString& prop
}
}
-QMap<QString,QString> ShorthandFormer::expandBackgroundProp(const QStringList& l){
- QMap<QString,QString> expandedProps;
+TQMap<TQString,TQString> ShorthandFormer::expandBackgroundProp(const TQStringList& l){
+ TQMap<TQString,TQString> 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<QString,QString> 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<QString,QString> ShorthandFormer::expandBackgroundProp(const QStringList&
return expandedProps;
}
-QMap<QString,QString> ShorthandFormer::expandBox(const QString& subPropName, const QStringList& l){
+TQMap<TQString,TQString> ShorthandFormer::expandBox(const TQString& subPropName, const TQStringList& l){
- QMap<QString,QString> expandedProps;
+ TQMap<TQString,TQString> expandedProps;
expandedProps["border-top-" + subPropName] = l[0];
switch(l.count()){
case 1 :
@@ -576,14 +576,14 @@ QMap<QString,QString> ShorthandFormer::expandBox(const QString& subPropName, co
return expandedProps;
}
-QMap<QString,QString> ShorthandFormer::expandFontProp(const QStringList& l){
- QMap<QString,QString> expandedProps;
+TQMap<TQString,TQString> ShorthandFormer::expandFontProp(const TQStringList& l){
+ TQMap<TQString,TQString> 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<QString,QString> 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<QString,QString> ShorthandFormer::expandFontProp(const QStringList& l){
}
}
-QMap<QString,QString> ShorthandFormer::expandListstyleProp( const QStringList& l){
- QMap<QString,QString> expandedProps;
+TQMap<TQString,TQString> ShorthandFormer::expandListstyleProp( const TQStringList& l){
+ TQMap<TQString,TQString> expandedProps;
if( (l.count() == 1) && (l[0] == "inherit")){
expandedProps["list-style-image"] ="inherit";
expandedProps["list-style-type"] ="inherit";
@@ -637,9 +637,9 @@ QMap<QString,QString> 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<QString,QString> ShorthandFormer::expandListstyleProp( const QStringList& l
return expandedProps;
}
-QMap<QString,QString> ShorthandFormer::expandOutlineProp( const QStringList& l){
- QMap<QString,QString> expandedProps;
- QStringList::ConstIterator it = l.begin();
+TQMap<TQString,TQString> ShorthandFormer::expandOutlineProp( const TQStringList& l){
+ TQMap<TQString,TQString> 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<QString,QString> ShorthandFormer::expandOutlineProp( const QStringList& l)
return expandedProps;
}
-QMap<QString,QString> ShorthandFormer::expandBoxSide(const QString& subPropName, const QStringList& l){
- QMap<QString,QString> expandedProps;
+TQMap<TQString,TQString> ShorthandFormer::expandBoxSide(const TQString& subPropName, const TQStringList& l){
+ TQMap<TQString,TQString> 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<QString,QString> ShorthandFormer::expandBoxSide(const QString& subPropName
return expandedProps;
}
-QMap<QString,QString> ShorthandFormer::expandBorderProp(const QStringList& l){
- QMap<QString,QString> expandedProps;
- QStringList::ConstIterator it = l.begin();
+TQMap<TQString,TQString> ShorthandFormer::expandBorderProp(const TQStringList& l){
+ TQMap<TQString,TQString> 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<QString,QString> ShorthandFormer::expandBorderProp(const QStringList& l){
return expandedProps;
}
-QMap<QString,QString> ShorthandFormer::expandImplementation2(const QString& propertyName, const QStringList& l){
- QMap<QString,QString> expandedProps;
+TQMap<TQString,TQString> ShorthandFormer::expandImplementation2(const TQString& propertyName, const TQStringList& l){
+ TQMap<TQString,TQString> expandedProps;
expandedProps[ propertyName + "-top" ] = l[0];
switch(l.count()){
case 1 :
@@ -750,16 +750,16 @@ QMap<QString,QString> ShorthandFormer::expandImplementation2(const QString& prop
return expandedProps;
}
- QMap<QString,QString> ShorthandFormer::expandPaddingProp(const QStringList& l){
+ TQMap<TQString,TQString> ShorthandFormer::expandPaddingProp(const TQStringList& l){
return expandImplementation2("padding", l);
}
- QMap<QString,QString> ShorthandFormer::expandMarginProp(const QStringList& l){
+ TQMap<TQString,TQString> 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 <qmap.h>
+#include <tqmap.h>
class QString;
class QStringList;
class ShorthandFormer{
public:
ShorthandFormer(){}
- ShorthandFormer( QMap<QString,QString> m );
+ ShorthandFormer( TQMap<TQString,TQString> m );
~ShorthandFormer(){}
- QString compress();
- QMap<QString,QString> expand(const QString& propertyName, const QString& propertyValue);
- static QStringList SHFormList();
+ TQString compress();
+ TQMap<TQString,TQString> expand(const TQString& propertyName, const TQString& propertyValue);
+ static TQStringList SHFormList();
private:
- QMap<QString,QString> m_properties;
- QString cue_after,
+ TQMap<TQString,TQString> 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<QString,QString> expandCueProp(const QStringList& l);
- QMap<QString,QString> expandPauseProp(const QStringList& l);
- QMap<QString,QString> expandBackgroundProp(const QStringList& l);
- QMap<QString,QString> expandFontProp(const QStringList& l);
- QMap<QString,QString> expandOutlineProp(const QStringList& l);
- QMap<QString,QString> expandListstyleProp(const QStringList& l);
- QMap<QString,QString> expandBoxSide(const QString& subPropName, const QStringList& l);
- QMap<QString,QString> expandBorderProp(const QStringList& l);
- QMap<QString,QString> expandBox(const QString& subPropName, const QStringList& l);
- QMap<QString,QString> expandPaddingProp(const QStringList& l);
- QMap<QString,QString> expandMarginProp(const QStringList& l);
+ TQMap<TQString,TQString> expandCueProp(const TQStringList& l);
+ TQMap<TQString,TQString> expandPauseProp(const TQStringList& l);
+ TQMap<TQString,TQString> expandBackgroundProp(const TQStringList& l);
+ TQMap<TQString,TQString> expandFontProp(const TQStringList& l);
+ TQMap<TQString,TQString> expandOutlineProp(const TQStringList& l);
+ TQMap<TQString,TQString> expandListstyleProp(const TQStringList& l);
+ TQMap<TQString,TQString> expandBoxSide(const TQString& subPropName, const TQStringList& l);
+ TQMap<TQString,TQString> expandBorderProp(const TQStringList& l);
+ TQMap<TQString,TQString> expandBox(const TQString& subPropName, const TQStringList& l);
+ TQMap<TQString,TQString> expandPaddingProp(const TQStringList& l);
+ TQMap<TQString,TQString> expandMarginProp(const TQStringList& l);
- QMap<QString,QString> expandImplementation(const QString& propertyName, const QStringList& l);
- QMap<QString,QString> expandImplementation2(const QString& propertyName, const QStringList& l);
+ TQMap<TQString,TQString> expandImplementation(const TQString& propertyName, const TQStringList& l);
+ TQMap<TQString,TQString> 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 <klineedit.h>
-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; i<m_cb->count();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 <qcombobox.h>
+#include <tqcombobox.h>
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 <qlineedit.h>
-#include <qtooltip.h>
-#include <qiconset.h>
-#include <qlabel.h>
-#include <qfileinfo.h>
+#include <tqlineedit.h>
+#include <tqtooltip.h>
+#include <tqiconset.h>
+#include <tqlabel.h>
+#include <tqfileinfo.h>
//kde includes
#include <kdialog.h>
@@ -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 <klocale.h>
#include <kdebug.h>
-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<m_styleSheet.length();i++){
- QString temp;
+ TQString temp;
if(m_styleSheet[i] == ' ' || m_styleSheet[i] == '\n' || m_styleSheet[i] == '\t' )
ws++;
else break;
@@ -63,7 +63,7 @@ void stylesheetParser::parseComment(){
bool stopProcessingComment=false;
unsigned int k;
for(k=2;k<m_styleSheet.length()-1;k++){
- QString temp;
+ TQString temp;
temp.append(m_styleSheet[k]).append(m_styleSheet[k+1]);
if(temp=="*/") {
k+=2;
@@ -74,8 +74,8 @@ void stylesheetParser::parseComment(){
if(stopProcessingComment){
int ws=whiteSpaces(k);
- QPair<QString,unsigned int> tmp(m_styleSheet.left(k+ws),++m_orderNumber);
- m_stylesheetStructure["/*"+QString::number(m_orderNumber,10)]=tmp;
+ QPair<TQString,unsigned int> 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<QString,unsigned int> tmp(selectorValue,++m_orderNumber);
+ QPair<TQString,unsigned int> 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<QString,unsigned int> tmp(m_styleSheet.left(closingParenthesisPos+1+ws),++m_orderNumber);
- m_stylesheetStructure["@rule"+QString::number(m_orderNumber,10)]=tmp;
+ QPair<TQString,unsigned int> 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<QString,unsigned int> tmp(m_styleSheet.left(semicolonPos+1+ws),++m_orderNumber);
- m_stylesheetStructure["@rule"+QString::number(m_orderNumber,10)]=tmp;
+ QPair<TQString,unsigned int> 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 <qmap.h>
-#include <qpair.h>
-#include <qobject.h>
+#include <tqmap.h>
+#include <tqpair.h>
+#include <tqobject.h>
/**
*@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<QString, QPair<QString,unsigned int> > m_stylesheetStructure;
+ TQMap<TQString, QPair<TQString,unsigned int> > 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<QString, QPair<QString,unsigned int> > stylesheetStructure() { return m_stylesheetStructure; }
+ TQMap<TQString, QPair<TQString,unsigned int> > 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 <qlineedit.h>
-#include <qcombobox.h>
-#include <qlabel.h>
-#include <qtooltip.h>
-#include <qwhatsthis.h>
+#include <tqlineedit.h>
+#include <tqcombobox.h>
+#include <tqlabel.h>
+#include <tqtooltip.h>
+#include <tqwhatsthis.h>
#include <kpushbutton.h>
#include <kurl.h>
@@ -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 <qfile.h>
-#include <qfileinfo.h>
-#include <qradiobutton.h>
-#include <qtextedit.h>
-#include <qtextstream.h>
-#include <qtimer.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
+#include <tqradiobutton.h>
+#include <tqtextedit.h>
+#include <tqtextstream.h>
+#include <tqtimer.h>
//kde includes
#include <kaction.h>
@@ -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("<qt>Remove the following files from the repository?<br>This will remove your <b>working copy</b> as well.</qt>"), files, i18n("CVS Remove")) == KMessageBox::Continue))
@@ -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 <qobject.h>
+#include <tqobject.h>
//kde includes
#include <dcopref.h>
@@ -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 <qstring.h>
+#include <tqstring.h>
#include <dcopobject.h>
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<BacktraceListviewItem*>(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 <klistview.h>
#include <kpopupmenu.h>
-#include <qptrlist.h>
+#include <tqptrlist.h>
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 <qlistview.h>
-#include <qlineedit.h>
+#include <tqlistview.h>
+#include <tqlineedit.h>
#include <qextfileinfo.h>
-#include <qcolor.h>
+#include <tqcolor.h>
#include <kcombobox.h>
#include <kled.h>
#include <kiconloader.h>
-#include <qpushbutton.h>
-#include <qradiobutton.h>
+#include <tqpushbutton.h>
+#include <tqradiobutton.h>
#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 <klocale.h>
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 <ktextbrowser.h>
-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 <qcstring.h>
+#include <tqcstring.h>
#include <kmdcodec.h>
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 <qstring.h>
-#include <qcstring.h>
+#include <tqstring.h>
+#include <tqcstring.h>
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 <kmdcodec.h>
#include <kmessagebox.h>
#include <krun.h>
-#include <qcheckbox.h>
-#include <qcombobox.h>
-#include <qfile.h>
-#include <qlineedit.h>
-#include <qmap.h>
-#include <qregexp.h>
-#include <qslider.h>
-#include <qstring.h>
+#include <tqcheckbox.h>
+#include <tqcombobox.h>
+#include <tqfile.h>
+#include <tqlineedit.h>
+#include <tqmap.h>
+#include <tqregexp.h>
+#include <tqslider.h>
+#include <tqstring.h>
#include <stdarg.h>
@@ -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<QString>::iterator it = m_watchlist.begin(); it != m_watchlist.end(); ++it)
+ for(TQValueList<TQString>::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<QString>::iterator it = m_watchlist.begin(); it != m_watchlist.end(); ++it)
+ for(TQValueList<TQString>::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 )
{
/*
<map name="bool" type="bool" xsi:type="xsd:boolean"></map>
@@ -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
</property>
</property>
*/
- 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<DebuggerVariable> vars ;
+ TQDomNode child = variablenode.firstChild();
+ TQPtrList<DebuggerVariable> 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 <kserversocket.h>
#include <kstreamsocket.h>
-#include <qptrlist.h>
+#include <tqptrlist.h>
#include <kurl.h>
-#include <qdom.h>
+#include <tqdom.h>
#include "debuggerclient.h"
#include "dbgpnetwork.h"
-typedef QValueList<QString> WatchList;
-typedef QMap<QString, QString> StringMap;
+typedef TQValueList<TQString> WatchList;
+typedef TQMap<TQString, TQString> 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 <qstring.h>
+#include <tqstring.h>
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 <qobject.h>
+#include <tqobject.h>
#include <ktexteditor/markinterfaceextension.h>
#include <kdebug.h>
@@ -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 <qobject.h>
-#include <qstring.h>
-#include <qvaluelist.h>
+#include <tqobject.h>
+#include <tqstring.h>
+#include <tqvaluelist.h>
class DebuggerBreakpoint;
- typedef QValueList<DebuggerBreakpoint*> BreakpointList_t;
+ typedef TQValueList<DebuggerBreakpoint*> 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<DebuggerBreakpointViewItem*>(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 <klistview.h>
#include <kpopupmenu.h>
-#include <qptrlist.h>
+#include <tqptrlist.h>
#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 <kmessagebox.h>
#include <qextfileinfo.h>
#include <kinputdialog.h>
-#include <qlineedit.h>
+#include <tqlineedit.h>
#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<DebuggerClient>(service, this, 0, QStringList(), &errCode);
- QObject* obj = KParts::ComponentFactory::createInstanceFromService<QObject>(service, this, 0, QStringList(), &errCode);
+// m_client = KParts::ComponentFactory::createInstanceFromService<DebuggerClient>(service, this, 0, TQStringList(), &errCode);
+ TQObject* obj = KParts::ComponentFactory::createInstanceFromService<TQObject>(service, this, 0, TQStringList(), &errCode);
if (obj && obj->inherits("DebuggerClient"))
m_client = static_cast<DebuggerClient *>(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 <qobject.h>
-#include <qstring.h>
+#include <tqobject.h>
+#include <tqstring.h>
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 <kdockwidget.h>
#include <klocale.h>
#include <kdebug.h>
-#include <qstring.h>
+#include <tqstring.h>
#include <khtmlview.h>
#include <kmditoolviewaccessor.h>
#include <kstatusbar.h>
@@ -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 <qobject.h>
-#include <qptrlist.h>
+#include <tqobject.h>
+#include <tqptrlist.h>
#include <kmditoolviewaccessor.h>
#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 <qstring.h>
-#include <qptrlist.h>
+#include <tqstring.h>
+#include <tqptrlist.h>
#include <klistview.h>
namespace DebuggerVariableTypes
@@ -41,38 +41,38 @@ namespace DebuggerVariableTypes
}
class DebuggerVariable;
-typedef QPtrList<DebuggerVariable> ValueList_t;
+typedef TQPtrList<DebuggerVariable> ValueList_t;
class DebuggerVariable
{
public:
DebuggerVariable();
DebuggerVariable(DebuggerVariable* var, bool copyitem = false);
- DebuggerVariable(const QString& name);
- DebuggerVariable(const QString& name, const QString& value, int type);
- DebuggerVariable(const QString& name, const QString& value, int type, int size);
- DebuggerVariable(const QString& name, const ValueList_t& values, int type);
+ 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 <ktextbrowser.h>
-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 <kstreamsocket.h>
#include <klocale.h>
#include <kgenericfactory.h>
-#include <qlineedit.h>
-#include <qslider.h>
-#include <qcheckbox.h>
-#include <qcombobox.h>
+#include <tqlineedit.h>
+#include <tqslider.h>
+#include <tqcheckbox.h>
+#include <tqcombobox.h>
#include <kdeversion.h>
#include <errno.h>
-#include <qstring.h>
-#include <qmap.h>
+#include <tqstring.h>
+#include <tqmap.h>
#include <stdarg.h>
@@ -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<QString>::iterator it = m_watchlist.begin(); it != m_watchlist.end(); ++it)
+ for(TQValueList<TQString>::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<DebuggerVariable> vars ;
+ TQPtrList<DebuggerVariable> 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<DebuggerVariable> vars ;
+ TQPtrList<DebuggerVariable> 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 <kserversocket.h>
#include <kstreamsocket.h>
-#include <qptrlist.h>
+#include <tqptrlist.h>
#include <kurl.h>
-#include <qdom.h>
+#include <tqdom.h>
#include "debuggerclient.h"
-typedef QValueList<QString> WatchList;
-typedef QMap<QString, QString> StringMap;
+typedef TQValueList<TQString> WatchList;
+typedef TQMap<TQString, TQString> 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 <qserversocket.h>
-#include <qobject.h>
+#include <tqserversocket.h>
+#include <tqobject.h>
#include <kurl.h>
-#include <qdom.h>
+#include <tqdom.h>
#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 <qobject.h>
-#include <qstring.h>
+#include <tqobject.h>
+#include <tqstring.h>
#include <kurl.h>
#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 <kdebug.h>
#include <klocale.h>
-#include <qstring.h>
+#include <tqstring.h>
#include <qextfileinfo.h>
-#include <qdom.h>
+#include <tqdom.h>
-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 <qobject.h>
-#include <qdom.h>
-#include <qstringlist.h>
+#include <tqobject.h>
+#include <tqdom.h>
+#include <tqstringlist.h>
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 <qlistview.h>
-#include <qlineedit.h>
+#include <tqlistview.h>
+#include <tqlineedit.h>
#include <qextfileinfo.h>
-#include <qcolor.h>
+#include <tqcolor.h>
#include <kled.h>
-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<DebuggerManager*>(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 <qobject.h>
-#include <qstring.h>
+#include <tqobject.h>
+#include <tqstring.h>
#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 <kiconloader.h>
#include <kdeversion.h>
#include <kinputdialog.h>
-#include <qclipboard.h>
+#include <tqclipboard.h>
// 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<DebuggerVariable> oldlist = oldvar->values();
+ TQPtrList<DebuggerVariable> oldlist = oldvar->values();
for(DebuggerVariable* oldchild = oldlist.last(); oldchild; oldchild = oldlist.prev())
{
bool found = false;
- QPtrList<DebuggerVariable> newlist = newvar->values();
+ TQPtrList<DebuggerVariable> 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<DebuggerVariable> newlist = newvar->values();
+ TQPtrList<DebuggerVariable> newlist = newvar->values();
for(DebuggerVariable* newchild = newlist.last(); newchild; newchild = newlist.prev())
{
bool found = false;
- QPtrList<DebuggerVariable> oldlist = oldvar->values();
+ TQPtrList<DebuggerVariable> 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 <klistview.h>
#include <kpopupmenu.h>
-#include <qptrlist.h>
+#include <tqptrlist.h>
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<DebuggerVariable> m_variablesList;
+ TQPtrList<DebuggerVariable> 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 <qrect.h>
-#include <qmap.h>
-#include <qobject.h>
+#include <tqrect.h>
+#include <tqmap.h>
+#include <tqobject.h>
/**this is
*@author gulmini luciano
*/
@@ -28,22 +28,22 @@ class areaAttribute : public QObject{
Q_OBJECT
private:
- QRect m_geometry;
- QMap<QString,QString> m_attributeMap; //tag specific attributes
+ TQRect m_geometry;
+ TQMap<TQString,TQString> m_attributeMap; //tag specific attributes
public:
areaAttribute();
~areaAttribute(){};
- void setAttribute(const QString& name, const QString& value){ m_attributeMap[name] = value; }
- void setAllAttributes(QMap<QString,QString> map){ m_attributeMap = map; }
+ void setAttribute(const TQString& name, const TQString& value){ m_attributeMap[name] = value; }
+ void setAllAttributes(TQMap<TQString,TQString> map){ m_attributeMap = map; }
void resetAttributes();
- QRect geometry() const { return m_geometry; }
- QString src() const{ return m_attributeMap["src"]; }
- QString attributeValue(QString l) const { return attributeMap()[l];}
- QMap<QString,QString> attributeMap() const { return m_attributeMap; }
+ TQRect geometry() const { return m_geometry; }
+ TQString src() const{ return m_attributeMap["src"]; }
+ TQString attributeValue(TQString l) const { return attributeMap()[l];}
+ TQMap<TQString,TQString> 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 <qspinbox.h>
-#include <qlineedit.h>
-#include <qbuttongroup.h>
-#include <qregexp.h>
+#include <tqspinbox.h>
+#include <tqlineedit.h>
+#include <tqbuttongroup.h>
+#include <tqregexp.h>
#include <kurlrequester.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <kfiledialog.h>
#include <klocale.h>
//#include <kpreviewwidgetbase.h>
@@ -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<QString,QString> m){
+void fmFPeditor::setup(TQMap<TQString,TQString> m){
leId->setText(m["id"]);
fc->setURL(m["src"]);
leClass->setText(m["class"]);
@@ -89,8 +89,8 @@ void fmFPeditor::setup(QMap<QString,QString> m){
sbTop->setValue(m["marginheight"].toInt());
}
-QMap<QString,QString> fmFPeditor::attributeMap(){
- QMap<QString,QString> map;
+TQMap<TQString,TQString> fmFPeditor::attributeMap(){
+ TQMap<TQString,TQString> map;
map["name"] = leName->text();
map["longdesc"] = leLongdesc->text();
@@ -102,8 +102,8 @@ QMap<QString,QString> 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<QString,QString>);
- QMap<QString,QString> attributeMap();
+ void setup(TQMap<TQString,TQString>);
+ TQMap<TQString,TQString> 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 <qspinbox.h>
-#include <qlabel.h>
+#include <tqspinbox.h>
+#include <tqlabel.h>
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 <kmessagebox.h>
//#include <kdebug.h>
#include <klocale.h>
-#include <qpushbutton.h>
+#include <tqpushbutton.h>
#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 <qframe.h>
+#include <tqframe.h>
//#include <kdebug.h>
#include "fwglobal.h"
-SelectableArea::SelectableArea(QWidget *parent, const char *name ) : KHTMLPart(parent,name) {
- view()->setFrameShape(QFrame::NoFrame);
- view()->setMinimumSize(QSize(1,1));
+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 <qwidget.h>
+//#include <tqwidget.h>
#include <khtml_part.h>
#include <khtmlview.h>
-/**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<treeNode> it( m_childrenList );
+treeNode* treeNode::findChild(const TQString &l){
+ TQPtrListIterator<treeNode> 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<treeNode> list = n->childrenList();
- QPtrListIterator<treeNode> it( list );
+ TQPtrList<treeNode> list = n->childrenList();
+ TQPtrListIterator<treeNode> 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 <qptrlist.h>
-#include <qdict.h>
-#include <qstringlist.h>
+#include <tqptrlist.h>
+#include <tqdict.h>
+#include <tqstringlist.h>
#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<treeNode> m_childrenList;
+ TQPtrList<treeNode> 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<treeNode> childrenList() { return m_childrenList; }
+ TQPtrList<treeNode> childrenList() { return m_childrenList; }
treeNode* firstChild() { return m_childrenList.first(); }
treeNode* nextChild() { return m_childrenList.next(); }
treeNode* lastChild() { return m_childrenList.last(); }
treeNode* currentChild() { return m_childrenList.current(); }
- treeNode* findChild(const QString &L);
+ treeNode* findChild(const TQString &L);
areaAttribute* atts() { return m_atts; }
@@ -68,18 +68,18 @@ class treeNode {
class tree{
private:
treeNode *m_root;
- QDict<treeNode> m_nodeList;
+ TQDict<treeNode> m_nodeList;
static int nodeId;
public:
tree();
~tree();
treeNode* root() const { return m_root; }
- QString addChildNode(const QString &l);
- bool insertChildNode(const QString &L);
- void removeChildNode(const QString &pl,const QString &l,bool autoDelete);//parent node,child node
- treeNode* findNode(const QString &L);
- areaAttribute* findAreaAttribute(const QString &l){ return findNode(l)->atts(); };
+ 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 <qobjectlist.h>
-#include <qsplitter.h>
+#include <tqobjectlist.h>
+#include <tqsplitter.h>
//#include <kdebug.h>
#include "qextfileinfo.h"
@@ -28,13 +28,13 @@ static int cancelledPixels(int n){
return (n-1)*6;
}
-QMap<QString, QValueList< int > > SIZES;
+TQMap<TQString, TQValueList< int > > 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<treeNode> list=m_internalTree->findNode(l)->childrenList();
- QPtrListIterator<treeNode> it( list );
+ TQRect newGeometry(m_internalTree->findNode(l)->atts()->geometry());
+ TQPtrList<treeNode> list=m_internalTree->findNode(l)->childrenList();
+ TQPtrListIterator<treeNode> 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("</frameset>");//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("<frameset")) {
if(line.contains("rows")) {
split(parent,(line.contains(",")+1),HORIZONTAL);
- QRegExp pattern("rows\\s*=\"([\\s\\d%,\\*]*)\"");
+ TQRegExp pattern("rows\\s*=\"([\\s\\d%,\\*]*)\"");
pattern.search(line);
- QRect dummy=m_internalTree->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<treeNode> list=m_internalTree->findNode(parent)->childrenList();
- QPtrListIterator<treeNode> it( list );
+ TQPtrList<treeNode> list=m_internalTree->findNode(parent)->childrenList();
+ TQPtrListIterator<treeNode> 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<treeNode> list=m_internalTree->findNode(parent)->childrenList();
- QPtrListIterator<treeNode> it( list );
+ TQPtrList<treeNode> list=m_internalTree->findNode(parent)->childrenList();
+ TQPtrListIterator<treeNode> 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<QString,QString> attributeMap;
- if( line.contains( QRegExp("\\s+noresize") ) ) attributeMap["noresize"] = "noresize";
- else attributeMap["noresize"] = QString::null;
+ TQMap<TQString,TQString> 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<QString,QString> map = m_internalTree->findNode(parentLabel)->firstChild()->atts()->attributeMap();
+ TQMap<TQString,TQString> map = m_internalTree->findNode(parentLabel)->firstChild()->atts()->attributeMap();
m_internalTree->findNode(parentLabel)->removeChildren();
m_internalTree->findNode(parentLabel)->atts()->setAllAttributes( map ) ;
m_internalTree->findNode(parentLabel)->setSplitType(NONE);
}
else {
- QPtrList<treeNode> list = m_internalTree->findNode(parentLabel)->firstChild()->childrenList();
+ TQPtrList<treeNode> 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<QSplitter *>(parent)->setResizeMode(sa->view(),QSplitter::KeepSize );
+ if(parent->isA("TQSplitter")) dynamic_cast<TQSplitter *>(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="<frame",
+ TQString tagBegin="<frame",
tagEnd,
tagMiddle;
@@ -362,9 +362,9 @@ QString VisualFrameEditor::createFrameTag(areaAttribute *a){
return tagBegin+tagMiddle+tagEnd;
}
-QString VisualFrameEditor::RCvalue(treeNode *n) {
- QString s;
- QMap<int,int> dimMap;
+TQString VisualFrameEditor::RCvalue(treeNode *n) {
+ TQString s;
+ TQMap<int,int> 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("<frameset")) tabNum++;
else
if((*it).contains("</frameset>")) {
@@ -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 <qhbox.h>
+#include <tqhbox.h>
/**
*@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 <ktexteditor/editinterface.h>
//qt includes
-#include <qcheckbox.h>
-#include <qiconset.h>
-#include <qlineedit.h>
-#include <qobject.h>
-#include <qpoint.h>
-#include <qrect.h>
-#include <qspinbox.h>
-#include <qstring.h>
-#include <qtabwidget.h>
-#include <qvaluevector.h>
+#include <tqcheckbox.h>
+#include <tqiconset.h>
+#include <tqlineedit.h>
+#include <tqobject.h>
+#include <tqpoint.h>
+#include <tqrect.h>
+#include <tqspinbox.h>
+#include <tqstring.h>
+#include <tqtabwidget.h>
+#include <tqvaluevector.h>
//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<QValueList<TableNode> >;
- m_tableHeaderTags = new QValueList<QValueList<TableNode> >;
- m_tableFooterTags = new QValueList<QValueList<TableNode> >;
+ m_tableDataTags = new TQValueList<TQValueList<TableNode> >;
+ m_tableHeaderTags = new TQValueList<TQValueList<TableNode> >;
+ m_tableFooterTags = new TQValueList<TQValueList<TableNode> >;
m_tableTags = 0L;
- m_tableDataRows = new QValueList<TableNode>;
- m_tableHeaderRows = new QValueList<TableNode>;
- m_tableFooterRows = new QValueList<TableNode>;
+ m_tableDataRows = new TQValueList<TableNode>;
+ m_tableHeaderRows = new TQValueList<TableNode>;
+ m_tableFooterRows = new TQValueList<TableNode>;
m_tableRows = 0L;
m_createNodes = true;
newNum += 7;
- connect(headerColSpinBox, SIGNAL(valueChanged(int)), SLOT(slotAddRemoveCol(int)));
- connect(headerRowSpinBox, SIGNAL(valueChanged(int)), SLOT(slotAddRemoveRow(int)));
- connect(rowSpinBox, SIGNAL(valueChanged(int)), SLOT(slotAddRemoveRow(int)));
- connect(colSpinBox, SIGNAL(valueChanged(int)), SLOT(slotAddRemoveCol(int)));
- connect(footerRowSpinBox, SIGNAL(valueChanged(int)), SLOT(slotAddRemoveRow(int)));
- connect(footerColSpinBox, SIGNAL(valueChanged(int)), SLOT(slotAddRemoveCol(int)));
- connect(tableData, SIGNAL(contextMenuRequested(int,int,const QPoint&)),
- SLOT(slotContextMenuRequested(int,int,const QPoint&)));
- connect(pushButton7, SIGNAL(clicked()), SLOT(slotEditTable()));
- connect(pushButton7_2, SIGNAL(clicked()), SLOT(slotEditTableBody()));
- connect(pushButton7_3, SIGNAL(clicked()), SLOT(slotEditTableHeader()));
- connect(pushButton7_4, SIGNAL(clicked()), SLOT(slotEditTableFooter()));
- connect(headerTableData, SIGNAL(contextMenuRequested(int,int,const QPoint&)),
- SLOT(slotContextMenuRequested(int,int,const QPoint&)));
- connect(footerTableData, SIGNAL(contextMenuRequested(int,int,const QPoint&)),
- SLOT(slotContextMenuRequested(int,int,const QPoint&)));
- connect(tabWidget, SIGNAL(currentChanged(QWidget*)), SLOT(slotTabChanged(QWidget*)));
- connect(buttonHelp, SIGNAL(clicked()), SLOT(slotHelpInvoked()));
- connect(tableData, SIGNAL(valueChanged(int,int)), SLOT(slotEditCellText(int,int)));
- connect(headerTableData, SIGNAL(valueChanged(int,int)), SLOT(slotEditCellText(int,int)));
- connect(footerTableData, SIGNAL(valueChanged(int,int)), SLOT(slotEditCellText(int,int)));
+ 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<TableNode> tableRowTags;
- QValueVector< QValueVector<TableNode> > mergeMatrix;
+ TQValueList<TableNode> tableRowTags;
+ TQValueVector< TQValueVector<TableNode> > 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 += "</" + QuantaCommon::tagCase("caption") + ">";
}
- for (QValueList<Tag*>::Iterator it = m_colTags.begin(); it != m_colTags.end(); ++it) {
+ for (TQValueList<Tag*>::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 += "</" + QuantaCommon::tagCase(node->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("<tr>", m_write);
- QValueList<TableNode>::Iterator rowIt = m_tableRows->at(num);
+ TQValueList<TableNode>::Iterator rowIt = m_tableRows->at(num);
if (rowIt != m_tableRows->end())
m_tableRows->insert(rowIt, tableNode);
else
m_tableRows->append(tableNode);
- QValueList<TableNode> tableRowTags;
+ TQValueList<TableNode> 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<QValueList<TableNode> >::Iterator it = m_tableTags->at(num);
+ TQValueList<TQValueList<TableNode> >::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<QValueList<TableNode> >::Iterator it = m_tableTags->begin(); it != m_tableTags->end(); ++it) {
+ for (TQValueList<TQValueList<TableNode> >::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<QValueList<TableNode> >::Iterator it = m_tableTags->begin(); it != m_tableTags->end(); ++it) {
+ for (TQValueList<TQValueList<TableNode> >::Iterator it = m_tableTags->begin(); it != m_tableTags->end(); ++it) {
j = 0;
- for (QValueList<TableNode>::Iterator it2 = (*it).begin(); it2 != (*it).end(); ++it2) {
+ for (TQValueList<TableNode>::Iterator it2 = (*it).begin(); it2 != (*it).end(); ++it2) {
if ((*it2).merged && (*it2).mergedRow == m_row) {
(*it2).merged = false;
setCellText(m_dataTable, i, j, tagContent((*it2).node));
@@ -913,9 +913,9 @@ void TableEditor::slotRemoveRow()
}
i++;
}
- QValueList<TableNode*> updatedMainNodes;
- QValueList<QValueList<TableNode> >::Iterator it2 = m_tableTags->at(m_row);
- for (QValueList<TableNode>::Iterator it3 = (*it2).begin(); it3 != (*it2).end(); ++it3) {
+ TQValueList<TableNode*> updatedMainNodes;
+ TQValueList<TQValueList<TableNode> >::Iterator it2 = m_tableTags->at(m_row);
+ for (TQValueList<TableNode>::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<TableNode>::Iterator it = m_tableRows->at(m_row);
+ TQValueList<TableNode>::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<QValueList<TableNode> >::Iterator it = m_tableTags->begin(); it != m_tableTags->end(); ++it) {
+ for (TQValueList<TQValueList<TableNode> >::Iterator it = m_tableTags->begin(); it != m_tableTags->end(); ++it) {
j = 0;
- for (QValueList<TableNode>::Iterator it2 = (*it).begin(); it2 != (*it).end(); ++it2) {
+ for (TQValueList<TableNode>::Iterator it2 = (*it).begin(); it2 != (*it).end(); ++it2) {
if ((*it2).merged && (*it2).mergedCol == m_col) {
(*it2).merged = false;
setCellText(m_dataTable, i, j, tagContent((*it2).node));
@@ -964,9 +964,9 @@ void TableEditor::slotRemoveCol()
}
if (m_col == -1)
m_col = m_dataTable->numCols() - 1;
- QValueList<TableNode*> updatedMainNodes;
- for (QValueList<QValueList<TableNode> >::Iterator it = m_tableTags->begin(); it != m_tableTags->end(); ++it) {
- QValueList<TableNode>::Iterator it2 = (*it).at(m_col);
+ TQValueList<TableNode*> updatedMainNodes;
+ for (TQValueList<TQValueList<TableNode> >::Iterator it = m_tableTags->begin(); it != m_tableTags->end(); ++it) {
+ TQValueList<TableNode>::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<TableNode> *table )
+void TableEditor::deleteList( TQValueList<TableNode> *table )
{
- for (QValueList<TableNode>::Iterator it = table->begin(); it != table->end(); ++it) {
+ for (TQValueList<TableNode>::Iterator it = table->begin(); it != table->end(); ++it) {
Node::deleteNode((*it).node);
newNum--;
}
@@ -1029,10 +1029,10 @@ void TableEditor::deleteList( QValueList<TableNode> *table )
}
-void TableEditor::deleteMatrix( QValueList<QValueList<TableNode> > *matrix )
+void TableEditor::deleteMatrix( TQValueList<TQValueList<TableNode> > *matrix )
{
- for (QValueList<QValueList<TableNode> >::Iterator it = matrix->begin(); it != matrix->end(); ++it) {
- for (QValueList<TableNode>::Iterator it2 = (*it).begin(); it2 != (*it).end(); ++it2) {
+ for (TQValueList<TQValueList<TableNode> >::Iterator it = matrix->begin(); it != matrix->end(); ++it) {
+ for (TQValueList<TableNode>::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<QValueList<TableNode> >::Iterator it = m_tableTags->begin(); it != m_tableTags->end(); ++it) {
+ for (TQValueList<TQValueList<TableNode> >::Iterator it = m_tableTags->begin(); it != m_tableTags->end(); ++it) {
j = 0;
- QValueList<TableNode>::Iterator it2 = (*it).begin();
+ TQValueList<TableNode>::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<QValueList<TableNode> >::Iterator iter1 = m_tableTags->at(tableNode.mergedRow);
- QValueList<TableNode>::Iterator iter2 = (*iter1).at(tableNode.mergedCol);
+ TQValueList<TQValueList<TableNode> >::Iterator iter1 = m_tableTags->at(tableNode.mergedRow);
+ TQValueList<TableNode>::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<NestedTable>::Iterator errorIt;
+ TQValueList<NestedTable>::Iterator errorIt;
Parser *localParser = 0L;
Document *w = 0L;
Node *savedBaseNode = 0L;
NestedTable table;
- for (QValueList<NestedTable>::Iterator it = m_nestedTables.begin(); it != m_nestedTables.end(); ++it) {
+ for (TQValueList<NestedTable>::Iterator it = m_nestedTables.begin(); it != m_nestedTables.end(); ++it) {
table = *it;
if (table.row == m_row && table.col == m_col) {
- QString cellData = m_dataTable->text(table.row, table.col);
+ 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 <kurl.h>
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
#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<Tag*> m_colTags;
+ TQValueList<Tag*> m_colTags;
int m_unmergeCellsId;
int m_mergeSeparatorId;
int m_mergeCellsId;
bool m_createNodes;
- QValueList<QValueList<TableNode> > *m_tableTags;
- QValueList<QValueList<TableNode> > *m_tableFooterTags;
- QValueList<QValueList<TableNode> > *m_tableHeaderTags;
- QValueList<TableNode> *m_tableFooterRows;
- QValueList<TableNode> *m_tableHeaderRows;
- QValueList<TableNode> *m_tableRows;
+ TQValueList<TQValueList<TableNode> > *m_tableTags;
+ TQValueList<TQValueList<TableNode> > *m_tableFooterTags;
+ TQValueList<TQValueList<TableNode> > *m_tableHeaderTags;
+ TQValueList<TableNode> *m_tableFooterRows;
+ TQValueList<TableNode> *m_tableHeaderRows;
+ TQValueList<TableNode> *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<QValueList<TableNode> > *m_tableDataTags;
- QValueList<TableNode> *m_tableDataRows;
- QTable *m_dataTable;
- QSpinBox *m_rowSpin;
- QSpinBox *m_colSpin;
+ TQValueList<TQValueList<TableNode> > *m_tableDataTags;
+ TQValueList<TableNode> *m_tableDataRows;
+ TQTable *m_dataTable;
+ TQSpinBox *m_rowSpin;
+ TQSpinBox *m_colSpin;
int m_bLine, m_bCol, m_eLine, m_eCol;
- QValueList<NestedTable> m_nestedTables;
+ TQValueList<NestedTable> m_nestedTables;
int m_editChildId;
- virtual QString indent( int n );
- virtual QString cellValue( int row, int col );
- virtual QString tableToString();
- virtual QString tagContent( Node * node );
- virtual void deleteList( QValueList<TableNode> * table );
- virtual void deleteMatrix( QValueList<QValueList<TableNode> > * matrix );
+ virtual TQString indent( int n );
+ virtual TQString cellValue( int row, int col );
+ virtual TQString tableToString();
+ virtual TQString tagContent( Node * node );
+ virtual void deleteList( TQValueList<TableNode> * table );
+ virtual void deleteMatrix( TQValueList<TQValueList<TableNode> > * 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 <qtextedit.h>
-#include <qpainter.h>
+#include <tqtextedit.h>
+#include <tqpainter.h>
#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 <qtable.h>
+#include <tqtable.h>
#include <kdeversion.h>
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 <qbuttongroup.h>
-#include <qcheckbox.h>
-#include <qdom.h>
-#include <qfileinfo.h>
-#include <qlineedit.h>
-#include <qlistbox.h>
-#include <qmultilineedit.h>
-#include <qradiobutton.h>
-#include <qtabwidget.h>
-#include <qregexp.h>
+#include <tqbuttongroup.h>
+#include <tqcheckbox.h>
+#include <tqdom.h>
+#include <tqfileinfo.h>
+#include <tqlineedit.h>
+#include <tqlistbox.h>
+#include <tqmultilineedit.h>
+#include <tqradiobutton.h>
+#include <tqtabwidget.h>
+#include <tqregexp.h>
//kde includes
#include <kapplication.h>
@@ -50,7 +50,7 @@
#include "tagaction.h"
#include "toolbartabwidget.h"
-ActionConfigDialog::ActionConfigDialog(const QDict<ToolbarEntry> &toolbarList, KMainWindow* parent, const char* name, bool modal, WFlags fl, const QString& defaultAction )
+ActionConfigDialog::ActionConfigDialog(const TQDict<ToolbarEntry> &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<ToolbarEntry> &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<ToolbarEntry> &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<ToolbarEntry> &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<ToolbarEntry> &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<TagAction*>(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<TagAction *>(currentAction)->setModified(true);
- QString s;
- QDomElement el = static_cast<TagAction *>(currentAction)->data();
+ TQString s;
+ TQDomElement el = static_cast<TagAction *>(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<QString, QString>::Iterator it;
+ TQMap<TQString, TQString>::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<KXMLGUIClient> clients = m_mainWindow->guiFactory()->clients();
- for( QPtrListIterator<KXMLGUIClient> it( clients ); it.current(); ++it )
+ TQPtrList<KXMLGUIClient> clients = m_mainWindow->guiFactory()->clients();
+ for( TQPtrListIterator<KXMLGUIClient> 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<ToolbarEntry> it(m_toolbarList);
+ TQDictIterator<ToolbarEntry> it(m_toolbarList);
while (it.current())
{
it.current()->guiClient->actionCollection()->insert(currentAction);
@@ -803,9 +803,9 @@ void ActionConfigDialog::slotNewAction()
selectedShortcut = KShortcut();
static_cast<TagAction*>(currentAction)->setModified(true);
- QListViewItem *currentItem = actionTreeView->currentItem();
- QListViewItem *item = new KListViewItem(allActionsItem);
- QString actionText = QString("Action_%1").arg(m_mainWindow->actionCollection()->count());
+ 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("<qt>Removing the action removes all the references to it.\nAre you sure you want to remove the <b>%1</b> action?</qt>").arg(currentAction->text()),QString::null,KStdGuiItem::del()) == KMessageBox::Continue )
+ if ( KMessageBox::warningContinueCancel(this, i18n("<qt>Removing the action removes all the references to it.\nAre you sure you want to remove the <b>%1</b> action?</qt>").arg(currentAction->text()),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 <qmap.h>
+#include <tqmap.h>
#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<ToolbarEntry> &toolbarList, KMainWindow* parent = 0, const char* name = 0, bool modal = true, WFlags fl = 0 , const QString& defaultAction = QString::null);
+ ActionConfigDialog(const TQDict<ToolbarEntry> &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<QString, QString> globalShortcuts;
+ TQListViewItem *allActionsItem;
+ TQMap<TQString, TQString> globalShortcuts;
KShortcut selectedShortcut;
KMainWindow *m_mainWindow;
- QDict<ToolbarEntry> m_toolbarList;
- QListViewItem *m_toolbarItem;
+ TQDict<ToolbarEntry> 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 <qevent.h>
-#include <qlabel.h>
-#include <qradiobutton.h>
-#include <qpushbutton.h>
+#include <tqevent.h>
+#include <tqlabel.h>
+#include <tqradiobutton.h>
+#include <tqpushbutton.h>
//kde includes
#include <kdialogbase.h>
@@ -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 <qcheckbox.h>
-#include <qfile.h>
-#include <qfileinfo.h>
-#include <qgroupbox.h>
-#include <qradiobutton.h>
-#include <qtabwidget.h>
-#include <qwidgetstack.h>
+#include <tqcheckbox.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
+#include <tqgroupbox.h>
+#include <tqradiobutton.h>
+#include <tqtabwidget.h>
+#include <tqwidgetstack.h>
//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<StructGroup>::ConstIterator it = m_structGroups.constBegin(); it != m_structGroups.constEnd(); ++it)
+ for (TQValueList<StructGroup>::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<StructGroup>::ConstIterator it = m_structGroups.constBegin(); it != m_structGroups.constEnd(); ++it)
+ for (TQValueList<StructGroup>::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<StructGroup>::ConstIterator it = m_structGroups.constBegin(); it != m_structGroups.constEnd(); ++it)
+ for (TQValueList<StructGroup>::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 <qvaluelist.h>
+#include <tqvaluelist.h>
//own includes
#include "dtepeditdlgs.h"
@@ -30,22 +30,22 @@ class KConfig;
class DTEPStructureEditDlgS;
struct StructGroup {
- QString name; ///<the name of the group
- QString noName; ///<the text when there are no elements in the group
- QString icon; ///<the icon of the group
- QString tag;
+ TQString name; ///<the name of the group
+ TQString noName; ///<the text when there are no elements in the group
+ TQString icon; ///<the icon of the group
+ TQString tag;
bool hasFileName;
- QString fileNameRx;
+ TQString fileNameRx;
bool appendToTags;
- QString parentGroup;
- QString definitionRx;
+ TQString parentGroup;
+ TQString definitionRx;
bool definitionRxMinimal;
- QString usageRx;
- QString typeRx;
- QString tagType;
+ TQString usageRx;
+ TQString typeRx;
+ TQString tagType;
bool parseFile;
- QString completeAfterRx;
- QString removeRx;
+ TQString completeAfterRx;
+ TQString removeRx;
bool simpleGroup;
bool variableGroup;
bool functionGroup;
@@ -57,7 +57,7 @@ class DTEPEditDlg : public DTEPEditDlgS
{
Q_OBJECT
public:
- DTEPEditDlg(const QString& descriptionFile, QWidget *parent = 0, const char *name = 0);
+ DTEPEditDlg(const TQString& descriptionFile, TQWidget *parent = 0, const char *name = 0);
~DTEPEditDlg();
void saveResult();
void slotFamilyChanged(int family);
@@ -77,13 +77,13 @@ class DTEPEditDlg : public DTEPEditDlgS
void writePages(KConfig *config);
void writeParserRules(KConfig *config);
void writeStructures(KConfig *config);
- void writeEntry(KConfig *config, const QString &key, const QString &value);
+ void writeEntry(KConfig *config, const TQString &key, const TQString &value);
- QString m_descriptionFile;
+ TQString m_descriptionFile;
KConfig *m_config;
int m_family;
- QWidget *m_pagesWidget;
- QValueList<StructGroup> m_structGroups;
+ TQWidget *m_pagesWidget;
+ TQValueList<StructGroup> 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 <qlayout.h>
-#include <qcombobox.h>
-#include <qpushbutton.h>
+#include <tqlayout.h>
+#include <tqcombobox.h>
+#include <tqpushbutton.h>
// KDE includes
#include <klocale.h>
@@ -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 <qwidget.h>
+#include <tqwidget.h>
#include <kurl.h>
/**
@@ -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 <qdom.h>
-#include <qfile.h>
-#include <qfileinfo.h>
-#include <qlineedit.h>
-#include <qtextedit.h>
-#include <qtextstream.h>
-#include <qtimer.h>
+#include <tqdom.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
+#include <tqlineedit.h>
+#include <tqtextedit.h>
+#include <tqtextstream.h>
+#include <tqtimer.h>
//kde includes
#include <kcombobox.h>
@@ -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<QString, Abbreviation> it;
+ TQMapConstIterator<TQString, Abbreviation> 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<QString, QString>::ConstIterator it;
+ TQString templateStr;
+ TQString templateName;
+ TQMap<TQString, TQString>::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("<qt>There is already an abbreviation group called <b>%1</b>. Choose an unique name for the new group.</qt>").arg(groupName), i18n("Group already exists"));
- QTimer::singleShot(0, this, SLOT(slotNewGroup()));
+ 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("<qt>Do you really want to remove the <b>%1</b> template?</qt>").arg(item->text(1)),QString::null,KStdGuiItem::del()) == KMessageBox::Continue)
+ KMessageBox::warningContinueCancel(this, i18n("<qt>Do you really want to remove the <b>%1</b> template?</qt>").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 = "<!DOCTYPE Templates>\n<Templates>\n</Templates>\n";
- QString s2;
- QDomDocument doc;
+ TQString abbrevFile = KGlobal::dirs()->saveLocation("data") + resourceDir + "abbreviations.xml";
+ TQString s = "<!DOCTYPE Templates>\n<Templates>\n</Templates>\n";
+ TQString s2;
+ TQDomDocument doc;
doc.setContent(s);
- QDomNode firstNode = doc.firstChild();
+ TQDomNode firstNode = doc.firstChild();
Abbreviation abbrev;
- QMap<QString, Abbreviation>::ConstIterator abbrevIt;
+ TQMap<TQString, Abbreviation>::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<QString,QString>::ConstIterator it;
+ TQMap<TQString,TQString>::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 <qmap.h>
-#include <qstringlist.h>
+#include <tqmap.h>
+#include <tqstringlist.h>
#include <abbreviations.h>
@@ -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 <qlineedit.h>
-#include <qpushbutton.h>
+#include <tqlineedit.h>
+#include <tqpushbutton.h>
//kde includes
#include <kmimetype.h>
-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 <qcombobox.h>
-#include <qspinbox.h>
+#include <tqcombobox.h>
+#include <tqspinbox.h>
#include <klocale.h>
#include <kconfig.h>
@@ -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 <qradiobutton.h>
-#include <qcheckbox.h>
+#include <tqradiobutton.h>
+#include <tqcheckbox.h>
// kde includes
#include <klocale.h>
#include <kmessagebox.h>
-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 <qfile.h>
-#include <qpushbutton.h>
-#include <qtextstream.h>
-#include <qregexp.h>
+#include <tqfile.h>
+#include <tqpushbutton.h>
+#include <tqtextstream.h>
+#include <tqregexp.h>
#include <klocale.h>
#include <kstandarddirs.h>
@@ -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 <qstringlist.h>
+#include <tqstringlist.h>
#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 <stdio.h>
#include <stdlib.h>
-#include <qdrawutil.h>
-#include <qevent.h>
-#include <qfile.h>
-#include <qimage.h>
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqdrawutil.h>
+#include <tqevent.h>
+#include <tqfile.h>
+#include <tqimage.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
#include <klineedit.h>
-#include <qvalidator.h>
-#include <qpainter.h>
-#include <qpushbutton.h>
-#include <qtimer.h>
+#include <tqvalidator.h>
+#include <tqpainter.h>
+#include <tqpushbutton.h>
+#include <tqtimer.h>
#include <kcolordialog.h>
#include <kconfig.h>
@@ -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 <qcombobox.h>
+#include <tqcombobox.h>
#include <kdialogbase.h>
-#include <qframe.h>
-#include <qpixmap.h>
+#include <tqframe.h>
+#include <tqpixmap.h>
#include <kcolordialog.h>
#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 <qdict.h>
-#include <qlineedit.h>
+#include <tqdict.h>
+#include <tqlineedit.h>
-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<QString> *d )
+void CoreWidgetDlg::readAttributes( TQDict<TQString> *d )
{
dict = d;
@@ -43,10 +43,10 @@ void CoreWidgetDlg::readAttributes( QDict<QString> *d )
}
-void CoreWidgetDlg::writeAttributes( QDict<QString> *d )
+void CoreWidgetDlg::writeAttributes( TQDict<TQString> *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 <klocale.h>
//qt includes
-#include <qpushbutton.h>
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqpushbutton.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
-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 <qimage.h>
+#include "tqpainter.h"
+#include <tqimage.h>
-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 <qwidget.h>
-#include <qframe.h>
+#include <tqwidget.h>
+#include <tqframe.h>
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 <klineedit.h>
//qt includes
-#include <qdom.h>
-#include <qtextstream.h>
+#include <tqdom.h>
+#include <tqtextstream.h>
//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; i<combo->count(); 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 <qstring.h>
-#include <qcheckbox.h>
-#include <qcombobox.h>
-#include <qdom.h>
+#include <tqstring.h>
+#include <tqcheckbox.h>
+#include <tqcombobox.h>
+#include <tqdom.h>
//kde includes
#include <klineedit.h>
@@ -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 <qdir.h>
-#include <qfileinfo.h>
-#include <qevent.h>
+#include <tqdir.h>
+#include <tqfileinfo.h>
+#include <tqevent.h>
// include kde headers
#include <klocale.h>
@@ -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<QString>(1,false);
+ dict = new TQDict<TQString>(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 = "<!DOCTYPE TAGS>\n<TAGS>\n";
- docString += QString("<tag name=\"%1\">\n").arg(dtdTag->name());
+ TQString docString = "<!DOCTYPE TAGS>\n<TAGS>\n";
+ docString += TQString("<tag name=\"%1\">\n").arg(dtdTag->name());
docString += QuantaCommon::xmlFromAttributes(dtdTag->attributes());
docString += "</tag>\n</TAGS>\n";
doc.setContent(docString);
- QDomNode domNode2 = doc.firstChild().firstChild();
+ 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<Tagxml>();
+ extraPageList = new TQPtrList<Tagxml>();
extraPageList->setAutoDelete(true);
for (int i = 1; i <= numOfPages; i++)
{
Tagxml *extraPage = 0L;
- dtdConfig->setGroup(QString("Page%1").arg(i));
- QString title = dtdConfig->readEntry("Title");
- QStringList groupList;
+ 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 = "<!DOCTYPE TAGS>\n<TAGS>\n";
- docString += QString("<tag name=\"Page%1\">\n").arg(i);
+ TQString docString = "<!DOCTYPE TAGS>\n<TAGS>\n";
+ docString += TQString("<tag name=\"Page%1\">\n").arg(i);
for (uint j = 0; j < groupList.count(); j++)
{
groupList[j] = groupList[j].stripWhiteSpace();
}
- QDomDocument commonDoc;
- QString commonFileName = QFileInfo(dtdTag->fileName()).dirPath() + "/common.tag";
- if (QFile(commonFileName).exists())
+ 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 << "<attr name=\"" << el.attribute("name") << "\" type=\"" << el.attribute("type", "input");
str << "\" source=\"" << el.attribute("source");
@@ -247,10 +247,10 @@ void TagDialog::parseTag()
str << " <text>" << el.attribute("name") << "</text>" << endl;
str << " <textlocation col=\"0\" row=\"" << row << "\" />" << endl;
str << " <location col=\"1\" row=\"" << row << "\" />" << endl;
- QDomNodeList childNodes = n.childNodes();
+ 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<QString> format*/
-QDict<QString> * TagDialog::getAttributes()
+/** Return the attributes in TQDict<TQString> format*/
+TQDict<TQString> * TagDialog::getAttributes()
{
return dict;
}
/** Return all the attributes in one string*/
-QString TagDialog::getAttributeString()
+TQString TagDialog::getAttributeString()
{
- QDictIterator<QString> it( *dict );
+ TQDictIterator<TQString> 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("</")+QuantaCommon::tagCase(dtdTag->name())+">";
+ TQString secondPartOfTag = TQString("</")+QuantaCommon::tagCase(dtdTag->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<QString> it( *dict );
+ TQString attrStr("");
+ TQDictIterator<TQString> 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<Tagxml*>(mainDlg))
static_cast<Tagxml*>(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 <qwidget.h>
-#include <qtabdialog.h>
-#include <qdict.h>
-#include <qstrlist.h>
+#include <tqwidget.h>
+#include <tqtabdialog.h>
+#include <tqdict.h>
+#include <tqstrlist.h>
#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<QString> format*/
- QDict<QString> * getAttributes();
+ /** Return the attributes in TQDict<TQString> format*/
+ TQDict<TQString> * 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<QString> *dict;
+ TQDict<TQString> *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<Tagxml> *extraPageList;
+ TQPtrList<Tagxml> *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 <qspinbox.h>
-#include <qimage.h>
+#include <tqspinbox.h>
+#include <tqimage.h>
//kde includes
#include <kapplication.h>
#include <klocale.h>
@@ -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<QString> *d )
+void TagImgDlg::readAttributes( TQDict<TQString> *d )
{
dict = d;
@@ -140,10 +140,10 @@ void TagImgDlg::readAttributes( QDict<QString> *d )
updateDict("border",spinBorder );
}
-void TagImgDlg::writeAttributes( QDict<QString> *d )
+void TagImgDlg::writeAttributes( TQDict<TQString> *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 <qwidget.h>
-#include <qlabel.h>
+#include <tqwidget.h>
+#include <tqlabel.h>
#include <klineedit.h>
-#include <qpushbutton.h>
-#include <qcombobox.h>
+#include <tqpushbutton.h>
+#include <tqcombobox.h>
//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<QString> *d );
- void writeAttributes( QDict<QString> *d );
+ void readAttributes( TQDict<TQString> *d );
+ void writeAttributes( TQDict<TQString> *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 <knumvalidator.h>
#include <kiconloader.h>
-#include <qlayout.h>
-#include <qspinbox.h>
+#include <tqlayout.h>
+#include <tqspinbox.h>
#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 <kabc/stdaddressbook.h>
//qt includes
-#include <qlineedit.h>
+#include <tqlineedit.h>
#include <kpushbutton.h>
-#include <qstringlist.h>
-#include <qregexp.h>
+#include <tqstringlist.h>
+#include <tqregexp.h>
-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 <klocale.h>
-#include <qlineedit.h>
-#include <qcheckbox.h>
+#include <tqlineedit.h>
+#include <tqcheckbox.h>
-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 <qbuttongroup.h>
-#include <qlabel.h>
-#include <qspinbox.h>
-#include <qpushbutton.h>
-#include <qradiobutton.h>
-#include <qgroupbox.h>
+#include <tqbuttongroup.h>
+#include <tqlabel.h>
+#include <tqspinbox.h>
+#include <tqpushbutton.h>
+#include <tqradiobutton.h>
+#include <tqgroupbox.h>
-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 <qwidget.h>
+#include <tqwidget.h>
-#include <qdialog.h>
+#include <tqdialog.h>
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 <kapplication.h>
#include <klocale.h>
-#include <qbuttongroup.h>
+#include <tqbuttongroup.h>
#include "tagquicklistdlg.h"
-#include <qspinbox.h>
-#include <qlabel.h>
+#include <tqspinbox.h>
+#include <tqlabel.h>
#include <kpushbutton.h>
-#include <qradiobutton.h>
+#include <tqradiobutton.h>
#include <kstdguiitem.h>
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 <qcombobox.h>
+#include <tqcombobox.h>
#include <klineedit.h>
-#include <qstring.h>
-#include <qspinbox.h>
-#include <qcheckbox.h>
+#include <tqstring.h>
+#include <tqspinbox.h>
+#include <tqcheckbox.h>
// KDE files
#include <kcolorbutton.h>
@@ -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 <qwidget.h>
-#include <qdict.h>
+#include <tqwidget.h>
+#include <tqdict.h>
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<QString> *) {};
- virtual void writeAttributes(QDict<QString> *) {};
- void updateDict(const QString &attr, QComboBox *combo);
- void updateDict(const QString &attr, QLineEdit *line);
- void updateDict(const QString &attr, QSpinBox *spin);
- void updateDict(const QString &attr, QCheckBox *check);
+ virtual void readAttributes(TQDict<TQString> *) {};
+ virtual void writeAttributes(TQDict<TQString> *) {};
+ 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<QString> *dict; // dictionary of attributes and values
+ TQDict<TQString> *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 <kdebug.h>
#include <klocale.h>
-#include <qcheckbox.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qtooltip.h>
-#include <qwhatsthis.h>
+#include <tqcheckbox.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqtooltip.h>
+#include <tqwhatsthis.h>
#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<QString> *d )
+void Tagxml::readAttributes( TQDict<TQString> *d )
{
- QString name,value;
+ TQString name,value;
Attr * attr = attributes.first();
while ( attr ) {
@@ -270,10 +270,10 @@ void Tagxml::readAttributes( QDict<QString> *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 <input disabled="false">, 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 <input disabled="false">, so if a checkbox is false, don't put in the tag at all
}
}
else
@@ -283,16 +283,16 @@ void Tagxml::readAttributes( QDict<QString> *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_file *>(attr))
{
// value = KURL::encode_string(value);
- d->replace(name, new QString(value));
+ d->replace(name, new TQString(value));
} else {
- value.replace(QRegExp("&(?!amp;)"), "&amp;");
- d->replace(name, new QString(value) );
+ value.replace(TQRegExp("&(?!amp;)"), "&amp;");
+ d->replace(name, new TQString(value) );
}
}
@@ -302,9 +302,9 @@ void Tagxml::readAttributes( QDict<QString> *d )
}
-void Tagxml::writeAttributes( QDict<QString> *d )
+void Tagxml::writeAttributes( TQDict<TQString> *d )
{
- QString name,value;
+ TQString name,value;
Attr * attr = attributes.first();
@@ -313,7 +313,7 @@ void Tagxml::writeAttributes( QDict<QString> *d )
name = attr->attrName();
- QString *v = d->find(name);
+ TQString *v = d->find(name);
if ( v ) {
v->replace("&amp;","&");
if ( dynamic_cast<Attr_check *>(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 <qwidget.h>
-#include <qdom.h>
-#include <qptrlist.h>
+#include <tqwidget.h>
+#include <tqdom.h>
+#include <tqptrlist.h>
#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<Attr> attributes;
+ TQPtrList<Attr> attributes;
- void readAttributes( QDict<QString> *d);
- void writeAttributes( QDict<QString> *d );
+ void readAttributes( TQDict<TQString> *d);
+ void writeAttributes( TQDict<TQString> *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 <qdict.h>
-#include <qdom.h>
-#include <qfile.h>
-#include <qheader.h>
-#include <qmap.h>
-#include <qregexp.h>
-#include <qstringlist.h>
-#include <qtextstream.h>
-#include <qtimer.h>
+#include <tqdict.h>
+#include <tqdom.h>
+#include <tqfile.h>
+#include <tqheader.h>
+#include <tqmap.h>
+#include <tqregexp.h>
+#include <tqstringlist.h>
+#include <tqtextstream.h>
+#include <tqtimer.h>
#include <kdebug.h>
#include <kio/netaccess.h>
@@ -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<QString, QString>& annotation)
+void AnnotationOutput::insertAnnotation(uint line, const TQString& fileName, const QPair<TQString, TQString>& 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<uint, QPair<QString, QString> > &a_annotations)
+void AnnotationOutput::writeAnnotations(const TQString &fileName, const TQMap<uint, QPair<TQString, TQString> > &a_annotations)
{
m_annotatedFileItems.clear();
m_fileNames.clear();
@@ -215,23 +215,23 @@ void AnnotationOutput::writeAnnotations(const QString &fileName, const QMap<uint
m_yourLines.clear();
bool modified = false;
- QMap<uint, QPair<QString, QString> > annotations = a_annotations;
- QDomDocument *dom = Project::ref()->dom();
- QDomElement annotationElement = dom->firstChild().firstChild().namedItem("annotations").toElement();
+ TQMap<uint, QPair<TQString, TQString> > 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<uint
}
n = n2;
}
- for (QMap<uint, QPair<QString, QString> >::ConstIterator it = annotations.constBegin(); it != annotations.constEnd(); ++it)
+ for (TQMap<uint, QPair<TQString, TQString> >::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<uint
readAnnotations();
}
-void AnnotationOutput::allAnnotationsItemExecuted(QListViewItem *item)
+void AnnotationOutput::allAnnotationsItemExecuted(TQListViewItem *item)
{
if (dynamic_cast<KListView*> (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<KListView*> (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<uint, QPair<QString, QString> > annotations;
+ TQMap<uint, QPair<TQString, TQString> > 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<uint, QPair<QString, QString> > &annotations);
+ void writeAnnotations(const TQString &fileName, const TQMap<uint, QPair<TQString, TQString> > &annotations);
public slots:
/**
@@ -52,16 +52,16 @@ public slots:
void updateAnnotations();
void readAnnotations();
void clearAnnotations();
- void insertAnnotation(uint line, const QString& fileName, const QPair<QString, QString>& annotation);
+ void insertAnnotation(uint line, const TQString& fileName, const QPair<TQString, TQString>& 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<KListViewItem> m_annotatedFileItems;
- QMap<QListViewItem*, QString> m_fileNames;
- QMap<QListViewItem*, uint> m_lines;
+ TQDict<KListViewItem> m_annotatedFileItems;
+ TQMap<TQListViewItem*, TQString> m_fileNames;
+ TQMap<TQListViewItem*, uint> m_lines;
uint m_yourAnnotationsNum;
KListView *m_yourAnnotations;
- QDict<KListViewItem> m_yourFileItems;
- QMap<QListViewItem*, QString> m_yourFileNames;
- QMap<QListViewItem*, uint> m_yourLines;
+ TQDict<KListViewItem> m_yourFileItems;
+ TQMap<TQListViewItem*, TQString> m_yourFileNames;
+ TQMap<TQListViewItem*, uint> 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 <qregexp.h>
+#include <tqregexp.h>
#include <klocale.h>
-MessageItem::MessageItem( QListBox * listbox, const QString &text, int line, int column, const QString &fname )
- :QListBoxText(listbox,text),lineNumber(line),columnNumber(column),filename(fname)
+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 <qlistbox.h>
+#include <tqlistbox.h>
/**
- 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 <kiconloader.h>
// Qt includes
-#include <qclipboard.h>
-#include <qfile.h>
-#include <qtextstream.h>
+#include <tqclipboard.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
#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<MessageItem*>(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; i<count(); i++)
p_content.append(text(i) + "\n");
return p_content;
@@ -151,25 +151,25 @@ void MessageOutput::copyContent()
void MessageOutput::saveContent()
{
- 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("<qt>File<br><b>%1</b><br>already exists. Overwrite it?</qt>")
- .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("<qt>Cannot save log file<br><b>%1</b></qt>")
.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 <qlistbox.h>
+#include <tqlistbox.h>
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 <qfile.h>
-#include <qfileinfo.h>
-#include <qregexp.h>
-#include <qstringlist.h>
-#include <qdom.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
+#include <tqregexp.h>
+#include <tqstringlist.h>
+#include <tqdom.h>
#include <klocale.h>
#include <kurl.h>
@@ -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 << "<!DOCTYPE TAGS>" << endl
<< "<TAGS>" << endl
<< "<tag name=\"" << tag << "\">" << 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("<qt>Cannot download the DTD from <b>%1</b>.</qt>").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("<!--");
end = 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 <qdict.h>
+#include <tqdict.h>
//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<QString> entities;
- QDict<QString> elements;
- QStringList tags;
- QDict<AttributeList> tagAttributes;
+ TQDict<TQString> entities;
+ TQDict<TQString> elements;
+ TQStringList tags;
+ TQDict<AttributeList> 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 <qcheckbox.h>
-#include <qfile.h>
-#include <qfileinfo.h>
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qregexp.h>
-#include <qstring.h>
+#include <tqcheckbox.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
+#include <tqregexp.h>
+#include <tqstring.h>
//kde includes
#include <kconfig.h>
@@ -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("<qt>Cannot download the DTD from <b>%1</b>.</qt>").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 += "<br>" + s;
- s = QString::fromLatin1(errorPtr->str2);
+ s = TQString::fromLatin1(errorPtr->str2);
if (!s.isEmpty())
errorStr += "<br>" + s;
- s = QString::fromLatin1(errorPtr->str2);
+ s = TQString::fromLatin1(errorPtr->str2);
if (!s.isEmpty())
errorStr += "<br>" + 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("<!doctype", false), "");
+ m_doctype.replace(TQRegExp("<!doctype", false), "");
m_doctype = m_doctype.left(m_doctype.findRev(">"));
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 << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" << endl;
DTD::entityStream << "<!DOCTYPE TAGS>" << endl
<< "<TAGS>" << 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 << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" << endl;
stream << "<!DOCTYPE TAGS>" << endl
<< "<TAGS>" << 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 << "<children>" << endl;
for( int i = 0; i < childNum; i++ )
{
- stream << " <child name=\"" << QString((const char*)list_ptr[i]) << "\"";
+ stream << " <child name=\"" << TQString((const char*)list_ptr[i]) << "\"";
xmlElementPtr child_ptr = xmlGetDtdElementDesc(DTD::dtd_ptr, list_ptr[i]);
if (child_ptr && child_ptr->content && child_ptr->content->ocur)
{
@@ -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 << "<children>" << endl;
while (content_ptr)
{
- if (!QString((const char*)content_ptr->name).isEmpty())
+ if (!TQString((const char*)content_ptr->name).isEmpty())
{
- stream << " <child name=\"" << QString((const char*)content_ptr->name) << "\"";
- QString ocur;
+ stream << " <child name=\"" << TQString((const char*)content_ptr->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 << "<tag name=\"" << name << "\" type=\"entity\" />" << 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 <qdict.h>
+#include <tqdict.h>
//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<Attribute> m_tags;
+ TQString m_defaultExtension;
+ TQDict<Attribute> 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 <qlistview.h>
-#include <qdom.h>
+#include <tqlistview.h>
+#include <tqdom.h>
#include <kdebug.h>
@@ -27,7 +27,7 @@
#include "structtreetag.h"
#include "kafkacommon.h"
-QMap<Node*, int> nodes; //list of all created nodes. Used to do some own memory management and avoid double deletes, for whatever reason they happen...
+TQMap<Node*, int> nodes; //list of all created nodes. Used to do some own memory management and avoid double deletes, for whatever reason they happen...
int NN = 0; //for debugging purposes: count the Node objects
@@ -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<GroupElement*> it = m_groupElements.begin(); it != m_groupElements.end(); ++it)
+ for (TQValueListIterator<GroupElement*> 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<QListViewItem*> listItem;
+ TQValueListIterator<TQListViewItem*> listItem;
for ( listItem = listItems.begin(); listItem != listItems.end(); ++listItem)
{
static_cast<StructTreeTag*>(*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 <qptrlist.h>
-#include <qvaluelist.h>
-#include <qmap.h>
+#include <tqptrlist.h>
+#include <tqvaluelist.h>
+#include <tqmap.h>
#include <dom/dom_node.h>
class QDomElement;
@@ -40,12 +40,12 @@ struct GroupElement{
Node *parentNode;
bool global;
bool deleted;
- QString type;
+ TQString type;
XMLStructGroup *group; ///<is part of this group
};
-typedef QValueList<GroupElement*> GroupElementList;
-typedef QMap<QString, GroupElementList> GroupElementMapList;
+typedef TQValueList<GroupElement*> GroupElementList;
+typedef TQMap<TQString, GroupElementList> 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<QListViewItem *> listItems; ///<points to the listview items which represents this node in the structure tree
- QListViewItem *mainListItem; ///< the main listview item (from under the root node) associated with this node
+ TQValueList<TQListViewItem *> listItems; ///<points to the listview items which represents this node in the structure tree
+ TQListViewItem *mainListItem; ///< the main listview item (from under the root node) associated with this node
bool closesPrevious; //this node "closes" the tag from previous node
bool opened;
bool removeAll; //set to false if you don't want to remove the "next" and "child" when deleting the node.
bool insideSpecial; //true if the node is part of a special area
bool specialInsideXml; //< true if the node is a special area defined inside a tag, like the PHP in <a href="<? echo $a ?>">
- QString fileName; //the node is in this file. If empty, it's in the current document
- QValueList<GroupElement*> m_groupElements; ///< all the group elements pointing to this node
+ TQString fileName; //the node is in this file. If empty, it's in the current document
+ TQValueList<GroupElement*> 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 <qeventloop.h>
-#include <qstring.h>
-#include <qpoint.h>
-#include <qregexp.h>
-#include <qcstring.h>
-#include <qstringlist.h>
-#include <qstrlist.h>
-#include <qdatetime.h>
-#include <qfile.h>
-#include <qtextcodec.h>
-#include <qvaluelist.h>
-#include <qvaluestack.h>
+#include <tqeventloop.h>
+#include <tqstring.h>
+#include <tqpoint.h>
+#include <tqregexp.h>
+#include <tqcstring.h>
+#include <tqstringlist.h>
+#include <tqstrlist.h>
+#include <tqdatetime.h>
+#include <tqfile.h>
+#include <tqtextcodec.h>
+#include <tqvaluelist.h>
+#include <tqvaluestack.h>
//standard library includes
#include <stdio.h>
@@ -65,10 +65,10 @@
#include <ktexteditor/viewcursorinterface.h>
extern GroupElementMapList globalGroupMap;
-static const QChar space(' ');
+static const TQChar space(' ');
extern int NN;
-extern QMap<Node*, int> nodes;
+extern TQMap<Node*, int> 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<Node*, int> nList = nodes;
- for (QValueList<Node*>::ConstIterator it = nList.constBegin(); it != nList.constEnd(); ++it)
+/* TQMap<Node*, int> nList = nodes;
+ for (TQValueList<Node*>::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<KTextEditor::EncodingInterface*>(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<uint> structPositions;
+ TQValueList<uint> structPositions;
int structPos = 0;
while (structPos !=-1)
{
@@ -1464,10 +1464,10 @@ void Parser::parseIncludedFile(const QString& fileName, const DTDStruct *dtd)
}
}
- QValueList<GroupElementPosition> gPositions;
+ TQValueList<GroupElementPosition> gPositions;
//go through the list of found structures and search for groups
int structStartPosition = 0; //from where to start the group search. This is before the structure begin position
- QString savedStr = foundStr;
+ 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<StructTreeGroup>::ConstIterator it;
+ TQValueList<StructTreeGroup>::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<GroupElementPosition>::Iterator gPosIt = gPositions.begin(); gPosIt != gPositions.end(); ++gPosIt)
+ for (TQValueList<GroupElementPosition>::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 <qobject.h>
-#include <qdict.h>
-#include <qstringlist.h>
-#include <qmap.h>
-#include <qguardedptr.h>
+#include <tqobject.h>
+#include <tqdict.h>
+#include <tqstringlist.h>
+#include <tqmap.h>
+#include <tqguardedptr.h>
-#include <qvaluestack.h>
+#include <tqvaluestack.h>
#include "node.h"
#include "tag.h"
@@ -38,11 +38,11 @@ class QRegExp;
class NodeModifsSet;
class SAParser;
-typedef QMap<QString, GroupElementMapList> IncludedGroupElements;
-typedef QMap<QString, IncludedGroupElements> IncludedGroupElementsMap;
+typedef TQMap<TQString, GroupElementMapList> IncludedGroupElements;
+typedef TQMap<TQString, IncludedGroupElements> 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<Document> write; //pointer to the parsed document
+ TQGuardedPtr<Document> write; //pointer to the parsed document
int maxLines; // how many lines are in the current document
int oldMaxLines;
int treeSize;
- QMap<QString, XMLStructGroup>::ConstIterator xmlGroupIt;
+ TQMap<TQString, XMLStructGroup>::ConstIterator xmlGroupIt;
bool m_parsingEnabled;
bool m_parsingNeeded;
/** Clears the group elements found in the included files */
void clearIncludedGroupElements();
- void parseIncludedFile(const QString &fileName, const DTDStruct *dtd);
+ 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 <script> or other special tags.
Useful when parsing for script inside the xml tags.
diff --git a/quanta/parsers/parsercommon.cpp b/quanta/parsers/parsercommon.cpp
index 3283ed52..be660255 100644
--- a/quanta/parsers/parsercommon.cpp
+++ b/quanta/parsers/parsercommon.cpp
@@ -15,7 +15,7 @@
***************************************************************************/
//qt includes
-#include <qstring.h>
+#include <tqstring.h>
//kde includes
#include <kdebug.h>
@@ -36,14 +36,14 @@ class KDirWatch;
int nodeNum; //for memory debugging - remove if not needed
namespace ParserCommon {
- QStringList includedFiles;
- QPtrList<const DTDStruct> includedFilesDTD;
+ TQStringList includedFiles;
+ TQPtrList<const DTDStruct> includedFilesDTD;
KDirWatch *includeWatch;
//common methods.
-QString getLine(Document *write, int line, int endLine, int endCol)
+TQString getLine(Document *write, int line, int endLine, int endCol)
{
- QString textLine = write->editIf->textLine(line);
+ TQString textLine = write->editIf->textLine(line);
if (line == endLine)
{
if (endCol >0)
@@ -56,12 +56,12 @@ QString getLine(Document *write, int line, int endLine, int endCol)
void appendAreaToTextNode(Document *write, const AreaStruct &area, Node *node)
{
- QString tagStr = write->text(area);
- QString cleanStr = node->tag->cleanStr;
+ TQString tagStr = write->text(area);
+ TQString cleanStr = node->tag->cleanStr;
node->tag->setStr(node->tag->tagStr() + tagStr);
if (node->tag->type == Tag::Empty)
{
- QString s = tagStr;
+ TQString s = tagStr;
if (s.simplifyWhiteSpace().isEmpty())
{
node->tag->type = Tag::Empty;
@@ -70,7 +70,7 @@ void appendAreaToTextNode(Document *write, const AreaStruct &area, Node *node)
node->tag->type = Tag::Text;
}
}
- QString cleanedTagStr = tagStr;
+ TQString cleanedTagStr = tagStr;
QuantaCommon::removeCommentsAndQuotes(cleanedTagStr, node->tag->dtd());
node->tag->cleanStr = cleanStr + cleanedTagStr;
int bLine, bCol;
@@ -100,7 +100,7 @@ Node* createTextNode(Document *write, Node *node, int eLine, int eCol, Node *par
{
AreaStruct area(bLine, bCol + 1, eLine, eCol);
textTag = new Tag(area, write, dtd);
- QString s = textTag->tagStr();
+ TQString s = textTag->tagStr();
textTag->single = true;
if (s.simplifyWhiteSpace().isEmpty())
{
@@ -162,7 +162,7 @@ Node* createTextNode(Document *write, Node *node, int eLine, int eCol, Node *par
return node;
}
-Node* createScriptTagNode(Document *write, const AreaStruct &area, const QString &areaName,
+Node* createScriptTagNode(Document *write, const AreaStruct &area, const TQString &areaName,
const DTDStruct *dtd, Node *parentNode, Node *currentNode)
{
Tag *tag = new Tag();
@@ -205,7 +205,7 @@ Node* createScriptTagNode(Document *write, const AreaStruct &area, const QString
void coutTree(Node *node, int indent)
{
- QString output;
+ TQString output;
int bLine, bCol, eLine, eCol;
if (!node)
kdDebug(24000)<< "undoRedo::coutTree() - bad node!" << endl;
@@ -238,7 +238,7 @@ void coutTree(Node *node, int indent)
void verifyTree(Node *node)
{
- QString output;
+ TQString output;
int bLine, bCol, eLine, eCol;
while (node)
{
diff --git a/quanta/parsers/parsercommon.h b/quanta/parsers/parsercommon.h
index 7a7677ec..9b0c01f4 100644
--- a/quanta/parsers/parsercommon.h
+++ b/quanta/parsers/parsercommon.h
@@ -18,8 +18,8 @@
#define PARSERCOMMON_H
//qt includes
-#include <qptrlist.h>
-#include <qstringlist.h>
+#include <tqptrlist.h>
+#include <tqstringlist.h>
//own includes
#include "tag.h"
@@ -30,12 +30,12 @@ class Node;
class KDirWatch;
namespace ParserCommon{
- extern QStringList includedFiles;
- extern QPtrList<const DTDStruct> includedFilesDTD;
+ extern TQStringList includedFiles;
+ extern TQPtrList<const DTDStruct> includedFilesDTD;
extern KDirWatch *includeWatch;
//this methods may go in a common class as well
- QString getLine(Document *write, int line, int endLine, int endCol);
+ TQString getLine(Document *write, int line, int endLine, int endCol);
/** Appends a text area to a text node. */
void appendAreaToTextNode(Document *write, const AreaStruct &area, Node *node);
/** Creates a text/empty node between node and the provided position */
@@ -47,7 +47,7 @@ namespace ParserCommon{
parentNode: the parent of the node
currentNode: the last child of the parent, if it exists
*/
- Node* createScriptTagNode(Document *write, const AreaStruct &area, const QString &areaName,
+ Node* createScriptTagNode(Document *write, const AreaStruct &area, const TQString &areaName,
const DTDStruct *dtd, Node *parentNode, Node *currentNode);
/** Print the doc structure tree to the standard output.
diff --git a/quanta/parsers/qtag.cpp b/quanta/parsers/qtag.cpp
index 77031eee..46b5b411 100644
--- a/quanta/parsers/qtag.cpp
+++ b/quanta/parsers/qtag.cpp
@@ -63,8 +63,8 @@ void QTag::addAttribute(Attribute* attr)
a = new Attribute;
a->name = attr->name;
a->type = attr->type;
- QStringList::ConstIterator end = attr->values.constEnd();
- for ( QStringList::ConstIterator it = attr->values.constBegin(); it != end; ++it )
+ TQStringList::ConstIterator end = attr->values.constEnd();
+ for ( TQStringList::ConstIterator it = attr->values.constBegin(); it != end; ++it )
{
a->values.append(*it);
}
@@ -90,7 +90,7 @@ Attribute* QTag::attributeAt(int index)
}
/** Returns true if the attribute exists */
-bool QTag::isAttribute(const QString &attrName)
+bool QTag::isAttribute(const TQString &attrName)
{
Attribute *a;
int i;
@@ -129,12 +129,12 @@ void QTag::setOptional(bool isOptional)
optional = isOptional;
}
/** No descriptions */
-void QTag::setName(const QString& theName)
+void QTag::setName(const TQString& theName)
{
tagName = theName;
}
/** No descriptions */
-QString QTag::name(bool doNotConvert)
+TQString QTag::name(bool doNotConvert)
{
if (doNotConvert || !parentDTD || parentDTD->caseSensitive)
return tagName;
@@ -152,13 +152,13 @@ bool QTag::isOptional()
return optional;
}
/** No descriptions */
-void QTag::setFileName(const QString& fileName)
+void QTag::setFileName(const TQString& fileName)
{
m_fileName = fileName;
}
/** No descriptions */
-QString QTag::fileName()
+TQString QTag::fileName()
{
return m_fileName;
}
@@ -186,7 +186,7 @@ QTag QTag::operator = (QTag &t)
}
/** Returns the attribute with name, or 0 if the tag does not have any attribute with name. */
-Attribute* QTag::attribute(const QString& name)
+Attribute* QTag::attribute(const TQString& name)
{
Attribute *attr = 0L;
for (uint i = 0; i < attrs.count(); i++)
@@ -201,9 +201,9 @@ Attribute* QTag::attribute(const QString& name)
return attr;
}
-bool QTag::isChild(const QString& tag, bool trueIfNoChildsDefined)
+bool QTag::isChild(const TQString& tag, bool trueIfNoChildsDefined)
{
- QString tagName = tag;
+ TQString tagName = tag;
tagName = parentDTD->caseSensitive ? tagName : tagName.upper();
if(trueIfNoChildsDefined)
return (childTags.isEmpty() || childTags.contains(tagName));
@@ -213,7 +213,7 @@ bool QTag::isChild(const QString& tag, bool trueIfNoChildsDefined)
bool QTag::isChild(Node *node, bool trueIfNoChildsDefined, bool treatEmptyNodesAsText)
{
- QString nodeName;
+ TQString nodeName;
if(!node)
return false;
@@ -247,10 +247,10 @@ bool QTag::isChild(Node *node, bool trueIfNoChildsDefined, bool treatEmptyNodesA
return isChild(node->tag->name, trueIfNoChildsDefined);
}
-QPtrList<QTag> QTag::parents()
+TQPtrList<QTag> QTag::parents()
{
- QPtrList<QTag> qTagList;
- QDictIterator<QTag> it((*parentDTD->tagsList));
+ TQPtrList<QTag> qTagList;
+ TQDictIterator<QTag> it((*parentDTD->tagsList));
for(; it.current(); ++it)
{
if(it.current()->isChild(name()))
diff --git a/quanta/parsers/qtag.h b/quanta/parsers/qtag.h
index 6c38c334..89aa1e46 100644
--- a/quanta/parsers/qtag.h
+++ b/quanta/parsers/qtag.h
@@ -25,11 +25,11 @@
*@author Andras Mantia
*/
//qt includes
-#include <qdict.h>
-#include <qmap.h>
-#include <qptrlist.h>
-#include <qstringlist.h>
-#include <qregexp.h>
+#include <tqdict.h>
+#include <tqmap.h>
+#include <tqptrlist.h>
+#include <tqstringlist.h>
+#include <tqregexp.h>
//app includes
@@ -38,49 +38,49 @@ class Node;
//an attribute of a tag looks like:
typedef struct Attribute{
- QString name;
- QString type; //"input", "check", "list"
- QStringList values; //the possible values it can have
- QString defaultValue; //the default value
- QString status; // "optional", "required","implied"
- QString source;
- QString interface;
- QString method;
- QString arguments;
+ TQString name;
+ TQString type; //"input", "check", "list"
+ TQStringList values; //the possible values it can have
+ TQString defaultValue; //the default value
+ TQString status; // "optional", "required","implied"
+ TQString source;
+ TQString interface;
+ TQString method;
+ TQString arguments;
};
class XMLStructGroup {
public:
- QString name; ///<the name of the group
- QString noName; ///<the text when there are no elements in the group
- QString icon; ///<the icon of the group
- QStringList attributes; ///<the attributes of the above tag to be displayed
+ TQString name; ///<the name of the group
+ TQString noName; ///<the text when there are no elements in the group
+ TQString icon; ///<the icon of the group
+ TQStringList attributes; ///<the attributes of the above tag to be displayed
bool hasFileName; ///<the group contains filename(s)
- QRegExp fileNameRx; ///<delete the matches of this regexp to obtain a filename (eg. linked, included file name)
+ TQRegExp fileNameRx; ///<delete the matches of this regexp to obtain a filename (eg. linked, included file name)
bool appendToTags; ///<true if the group elements must be used as normal tags in autocompletion
- QString parentGroup; ///<if the group element can be a child of another group (eg. member function of a class), holds the parent name. Makes sense only if appentToTags is true
+ TQString parentGroup; ///<if the group element can be a child of another group (eg. member function of a class), holds the parent name. Makes sense only if appentToTags is true
};
//the groups in structure tree are defined with the help of:
class StructTreeGroup:public XMLStructGroup {
public:
- QRegExp definitionRx; //regular expression to help us find the group element definition - for pseudo DTDs
- QRegExp usageRx; //regexp to find the usage of a group element in the document
+ TQRegExp definitionRx; //regular expression to help us find the group element definition - for pseudo DTDs
+ TQRegExp usageRx; //regexp to find the usage of a group element in the document
bool hasDefinitionRx; //true if searchRx should be used
bool isMinimalDefinitionRx; // true if the searchRx should be non-greedy
- QRegExp typeRx; //regular expression to help us find the group element type from the definition string - for pseudo DTDs
+ TQRegExp typeRx; //regular expression to help us find the group element type from the definition string - for pseudo DTDs
int tagType; //the tag type for which this is valid
- QRegExp autoCompleteAfterRx; //holds the char after the autocompletion box should be shown for this group elements. Null, if autocompletion shouldn't be used
- QRegExp removeFromAutoCompleteWordRx;
+ TQRegExp autoCompleteAfterRx; //holds the char after the autocompletion box should be shown for this group elements. Null, if autocompletion shouldn't be used
+ TQRegExp removeFromAutoCompleteWordRx;
bool parseFile; //parse the files belonging to this group
};
-typedef QPtrList<Attribute> AttributeList;
-typedef QDict<AttributeList> AttributeListDict;
+typedef TQPtrList<Attribute> AttributeList;
+typedef TQDict<AttributeList> AttributeListDict;
-typedef QDict<QTag> QTagList;
+typedef TQDict<QTag> QTagList;
enum DTDFamily{Unknown = 0, Xml, Script};
@@ -89,27 +89,27 @@ enum DTDFamily{Unknown = 0, Xml, Script};
//an internal representation of a DTD
typedef struct DTDStruct
{
- QString name; ///< DTD name
- QString nickName; ///< DTD nickname
+ TQString name; ///< DTD name
+ TQString nickName; ///< DTD nickname
bool loaded; ///< true = DTD is complet in memory
- QString url; ///< the url of the DTD definition file
- QString doctypeStr; ///< the string that appears right after !doctype
- QString inheritsTagsFrom; ///< Inherited DTD name
- QString defaultExtension; ///< default extension when creating new files
- QStringList mimeTypes;
+ TQString url; ///< the url of the DTD definition file
+ TQString doctypeStr; ///< the string that appears right after !doctype
+ TQString inheritsTagsFrom; ///< Inherited DTD name
+ TQString defaultExtension; ///< default extension when creating new files
+ TQStringList mimeTypes;
bool caseSensitive; ///< the tags&attributes in DTD are case sensitive or not
int family; ///< xml, script type
bool toplevel; ///< true if the DTD can be the main DTD of a document. Always true for XML like DTD's
- QString documentation; ///< the name of the documentation package
+ TQString documentation; ///< the name of the documentation package
QTagList* tagsList; ///< the list of all defined tags in the DTD
- QString fileName; ///< the DTD decription.rc with path
+ TQString fileName; ///< the DTD decription.rc with path
AttributeListDict* commonAttrs; ///< the attributes of the common groups
- QString booleanAttributes; ///< simple or extended <tag booleanAttr> or <tag booleanAttr="1">
- QString booleanTrue; ///< "true" or "1" or whatever
- QString booleanFalse; ///< "false" or "0" or whatever
- QString singleTagStyle; ///< "xml" or "html" (<tag/> or <tag>)
- QString defaultAttrType; ///< "input", "string" or whatever
+ TQString booleanAttributes; ///< simple or extended <tag booleanAttr> or <tag booleanAttr="1">
+ TQString booleanTrue; ///< "true" or "1" or whatever
+ TQString booleanFalse; ///< "false" or "0" or whatever
+ TQString singleTagStyle; ///< "xml" or "html" (<tag/> or <tag>)
+ TQString defaultAttrType; ///< "input", "string" or whatever
/****************** FOR THE NEW PARSER **********************/
@@ -122,18 +122,18 @@ typedef struct DTDStruct
/* The starting and closing strings of a special area. For PHP the special areas
are <? ?> and <* *>, so the entries are (<?,?>),(<*,*>).
*/
- QMap<QString, QString> specialAreas;
+ TQMap<TQString, TQString> specialAreas;
/* To which DTD this special area belongs. It may be a non-dtd name, like
"comment", which is treated as a special case.
Entries are in for of (<?,php) or (<!--,comment).
*/
- QMap<QString, QString> specialAreaNames;
+ TQMap<TQString, TQString> specialAreaNames;
/* A regular expression which matches the starting strings of all the
possible special areas.
*/
- mutable QRegExp specialAreaStartRx;
+ mutable TQRegExp specialAreaStartRx;
/* For each special tag name, holds an attribute name. This attribute is used to
figure out the DTD which is valid in the special tag area.
@@ -141,7 +141,7 @@ typedef struct DTDStruct
Special tags are skipped during parsing and parsed later according to
their DTD definition.
*/
- QMap<QString, QString> specialTags;
+ TQMap<TQString, TQString> specialTags;
/* A list of DTDs that can be present inside the DTD.
For each DTD specified here the definitionAreaBegin/definitionAreaEnd is
@@ -150,58 +150,58 @@ typedef struct DTDStruct
Basically this means that we use the DTD definitions when building
the special area and tag definitions.
*/
- QStringList insideDTDs;
+ TQStringList insideDTDs;
/* The definition tags for this DTD in the same for as the above. */
- QMap<QString, QString> definitionTags;
+ TQMap<TQString, TQString> definitionTags;
/* The beginning and end string of the definition areas for this DTD.
It is stored in (area_begin_str,area_end_str) pairs. E.g (<?,?>)
*/
- QMap<QString, QString> definitionAreas;
+ TQMap<TQString, TQString> definitionAreas;
/* Start/end pairs for comments. Eg. (//,\n); (<!--,-->) */
- QMap<QString, QString> comments;
+ TQMap<TQString, TQString> comments;
/* Regular expression to match the start of the comments (//, <!--)*/
- mutable QRegExp commentsStartRx;
+ mutable TQRegExp commentsStartRx;
/* How does a structure starts in this DTD. Eg. "{" or "begin".*/
- QString structBeginStr;
+ TQString structBeginStr;
/* How does a structure ends in this DTD. Eg. "}" or "end".*/
- QString structEndStr;
+ TQString structEndStr;
/* A regular expression to match the structe begin or end. */
- mutable QRegExp structRx;
+ mutable TQRegExp structRx;
/* Regular expression to match the possible keywords that can appear before
a structure, like "function", "for", etc. */
- mutable QRegExp structKeywordsRx;
+ mutable TQRegExp structKeywordsRx;
/* Regular expression containing the keywords that indicate that the groups
defined in the structure after the keyword have local scope */
- mutable QRegExp localScopeKeywordsRx;
+ mutable TQRegExp localScopeKeywordsRx;
/* A list of structure tree groups definition */
- mutable QValueList<StructTreeGroup> structTreeGroups;
- QMap<QString, XMLStructGroup> xmlStructTreeGroups;
+ mutable TQValueList<StructTreeGroup> structTreeGroups;
+ TQMap<TQString, XMLStructGroup> xmlStructTreeGroups;
/****************** END FOR THE NEW PARSER **********************/
- QStringList toolbars;
+ TQStringList toolbars;
/* True if foo-foo2 should be considered as one word. False (default) otherwise. */
bool minusAllowedInWord;
- mutable QChar tagAutoCompleteAfter;
+ mutable TQChar tagAutoCompleteAfter;
bool requestSpaceBeforeTagAutoCompletion;
- QChar attrAutoCompleteAfter;
- QChar attributeSeparator;
- QChar tagSeparator;
+ TQChar attrAutoCompleteAfter;
+ TQChar attributeSeparator;
+ TQChar tagSeparator;
/* Script language related items */
int variableGroupIndex; ///< the index of the structure tree group holding the variables. -1 if there is no such group.
int functionGroupIndex; ///< the index of the structure tree group holding the functions. -1 if there is no such group.
int classGroupIndex; ///< the index of the structure tree group holding the classes. -1 if there is no such group.
int objectGroupIndex; ///< the index of the structure tree group holding the classes. -1 if there is no such group.
- mutable QRegExp memberAutoCompleteAfter; ///< the regular expression after which a list with the existing member methods and variables for a class should be shown. Makes sense only if the language supports classes.
- QMap<QString, QString> classInheritance; ///<stores the inheritance tree
+ mutable TQRegExp memberAutoCompleteAfter; ///< the regular expression after which a list with the existing member methods and variables for a class should be shown. Makes sense only if the language supports classes.
+ TQMap<TQString, TQString> classInheritance; ///<stores the inheritance tree
};
@@ -219,15 +219,15 @@ public:
Attribute* attributeAt(int index);
AttributeList *attributes() { return &attrs;}
/** Returns true if the attribute exists */
- bool isAttribute(const QString &attrName);
+ bool isAttribute(const TQString &attrName);
/** No descriptions */
void setSingle(bool isSingle);
/** No descriptions */
void setOptional(bool isOptional);
/** No descriptions */
- void setName(const QString& theName);
+ void setName(const TQString& theName);
/** No descriptions */
- QString name(bool doNotConvert = false);
+ TQString name(bool doNotConvert = false);
/** No descriptions */
bool isSingle();
/** No descriptions */
@@ -239,44 +239,44 @@ public:
* the scope is a "word", i.e., the whole word will be affected by the action.
* Instead, if center is pressed, all surrounding inline nodes will be affected by the new tag.
*/
- QString const& scope() const {return m_scope;}
- void setScope(QString const& scope) {m_scope = scope;}
+ TQString const& scope() const {return m_scope;}
+ void setScope(TQString const& scope) {m_scope = scope;}
/** Returns true if tag is a possible child of this tag, or if
there are no children defined and if trueIfNoChildsDefined is set to true. */
- bool isChild(const QString& tag, bool trueIfNoChildsDefined = true);
+ bool isChild(const TQString& tag, bool trueIfNoChildsDefined = true);
//prefer using this variant, it handle Text, Empty, XmlTagEnd nodes!
bool isChild(Node *node, bool trueIfNoChildsDefined = true, bool treatEmptyNodesAsText = false);
/*** Returns the list of parent of this tag. */
- QPtrList<QTag> parents();
+ TQPtrList<QTag> parents();
/** No descriptions */
- QString fileName();
+ TQString fileName();
/** No descriptions */
- void setFileName(const QString& fileName);
+ void setFileName(const TQString& fileName);
/** Returns the attribute with name, or 0 if the tag does not have any attribute with name. */
- Attribute* attribute(const QString& name);
+ Attribute* attribute(const TQString& name);
/** The tag belongs to this DTD */
const DTDStruct *parentDTD;
/** The tag has the attributes of the above common groups */
- QStringList commonGroups;
- QStringList stoppingTags;
- QMap<QString, bool> childTags; ///<list of the possible child tags. If the value is true, the child is mandatory
- QString type; ///<function, class, xmltag, etc.
- QString returnType; ///<useful is type="function"; may be int, string or whatever
- QString className; ///< the name of the class where the tag belongs to. Used only for script DTEP tags
- QString comment; ///< comment associated to the tag. Will appear as a tooltip in the autocompletion box. Useful for specifying version information (eg. since PHP5)
+ TQStringList commonGroups;
+ TQStringList stoppingTags;
+ TQMap<TQString, bool> childTags; ///<list of the possible child tags. If the value is true, the child is mandatory
+ TQString type; ///<function, class, xmltag, etc.
+ TQString returnType; ///<useful is type="function"; may be int, string or whatever
+ TQString className; ///< the name of the class where the tag belongs to. Used only for script DTEP tags
+ TQString comment; ///< comment associated to the tag. Will appear as a tooltip in the autocompletion box. Useful for specifying version information (eg. since PHP5)
protected: // Protected attributes
/** List of the possible attributes */
AttributeList attrs;
bool single;
bool optional;
- QString tagName;
- QString m_scope;
+ TQString tagName;
+ TQString m_scope;
/** The path to the tag file. Null if there is no tag file for the tag. */
- QString m_fileName;
+ TQString m_fileName;
};
diff --git a/quanta/parsers/sagroupparser.cpp b/quanta/parsers/sagroupparser.cpp
index 77698a45..6e409509 100644
--- a/quanta/parsers/sagroupparser.cpp
+++ b/quanta/parsers/sagroupparser.cpp
@@ -14,8 +14,8 @@
* *
***************************************************************************/
//qt includes
-#include <qtimer.h>
-#include <qvaluelist.h>
+#include <tqtimer.h>
+#include <tqvaluelist.h>
//kde includes
#include <kdebug.h>
@@ -45,8 +45,8 @@ SAGroupParser::SAGroupParser(SAParser *parent, Document *write, Node *startNode,
m_parent = parent;
m_write = write;
m_count = 0;
- m_parseForGroupTimer = new QTimer(this);
- connect(m_parseForGroupTimer, SIGNAL(timeout()), this, SLOT(slotParseForScriptGroup()));
+ m_parseForGroupTimer = new TQTimer(this);
+ connect(m_parseForGroupTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotParseForScriptGroup()));
}
void SAGroupParser::slotParseForScriptGroup()
@@ -106,23 +106,23 @@ void SAGroupParser::slotParseForScriptGroup()
void SAGroupParser::parseForScriptGroup(Node *node)
{
#ifdef DEBUG_PARSER
- QTime t;
+ TQTime t;
t.start();
#endif
int bl, bc, el, ec;
int pos;
- QString title;
- QString tmpStr;
+ TQString title;
+ TQString tmpStr;
StructTreeGroup group;
GroupElement *groupElement;
GroupElementList* groupElementList;
KURL baseURL = QExtFileInfo::path(m_write->url());
- QString str = node->tag->cleanStr;
- QString tagStr = node->tag->tagStr();
+ TQString str = node->tag->cleanStr;
+ TQString tagStr = node->tag->tagStr();
const DTDStruct* dtd = node->tag->dtd();
node->tag->beginPos(bl, bc);
- QValueList<StructTreeGroup>::ConstIterator it;
+ TQValueList<StructTreeGroup>::ConstIterator it;
for (it = dtd->structTreeGroups.begin(); it != dtd->structTreeGroups.end(); ++it)
{
group = *it;
@@ -158,7 +158,7 @@ void SAGroupParser::parseForScriptGroup(Node *node)
//have the same title. For example get the list of all group
//element which are variable and the matched string was "$i"
int cap1Pos = str.find(group.definitionRx.cap(1));
- QString s = tagStr.mid(cap1Pos, group.definitionRx.cap(1).length());
+ TQString s = tagStr.mid(cap1Pos, group.definitionRx.cap(1).length());
groupElementList = & (globalGroupMap[group.name + "|" + s]);
//Create a new tag which point to the exact location of the matched string.
//For example when the group defined PHP variables it
@@ -228,14 +228,14 @@ void SAGroupParser::parseForScriptGroup(Node *node)
if(qTag->className.length() != 0 && tagStr.contains('(') && tagStr.contains(')'))
{
// First we want to determine the whole line the tag is on
- QString tagWholeLineStr = tagStr;
+ TQString tagWholeLineStr = tagStr;
// Remove lines before target line
while(tagWholeLineStr.length() > 0) // this stops infinit looping in case something goes wrong!
{
int firstNewline = tagWholeLineStr.find('\n');
if(firstNewline == -1) //no new lines so we must be on the last
break;
- QString checkLineStr = tagWholeLineStr.mid(firstNewline+1,tagWholeLineStr.length());
+ TQString checkLineStr = tagWholeLineStr.mid(firstNewline+1,tagWholeLineStr.length());
if(checkLineStr.contains(s))
tagWholeLineStr = checkLineStr;
else
@@ -247,7 +247,7 @@ void SAGroupParser::parseForScriptGroup(Node *node)
int lastNewLine = tagWholeLineStr.findRev('\n');
if(lastNewLine == -1)
break;
- QString checkLineStr = tagWholeLineStr.mid(0,lastNewLine);
+ TQString checkLineStr = tagWholeLineStr.mid(0,lastNewLine);
if(checkLineStr.contains(s))
tagWholeLineStr = checkLineStr;
else
diff --git a/quanta/parsers/sagroupparser.h b/quanta/parsers/sagroupparser.h
index 1f2f184c..6cc15311 100644
--- a/quanta/parsers/sagroupparser.h
+++ b/quanta/parsers/sagroupparser.h
@@ -18,7 +18,7 @@
#define SAGROUPPARSER_H
//qt includes
-#include <qobject.h>
+#include <tqobject.h>
//forward definitions
class QTimer;
@@ -37,7 +37,7 @@ public:
SAGroupParser(SAParser *parent, Document *write, Node *startNode, Node *endNode, bool synchronous, bool parsingLastNode, bool paringLastGroup);
~SAGroupParser() {};
- QTimer *m_parseForGroupTimer;
+ TQTimer *m_parseForGroupTimer;
public slots:
void slotParseForScriptGroup();
diff --git a/quanta/parsers/saparser.cpp b/quanta/parsers/saparser.cpp
index 230ddbe0..f402e0c8 100644
--- a/quanta/parsers/saparser.cpp
+++ b/quanta/parsers/saparser.cpp
@@ -15,7 +15,7 @@
***************************************************************************/
//qt includes
-#include <qtimer.h>
+#include <tqtimer.h>
//kde includes
#include <kdebug.h>
@@ -39,14 +39,14 @@ SAParser::SAParser()
m_write = 0L;
m_baseNode = 0L;
m_currentNode = 0L;
- m_quotesRx = QRegExp("\"|'");
+ m_quotesRx = TQRegExp("\"|'");
m_specialInsideXml = false;
m_parsingEnabled = true;
m_synchronous = true;
- m_parseOneLineTimer = new QTimer(this);
- connect(m_parseOneLineTimer, SIGNAL(timeout()), this, SLOT(slotParseOneLine()));
- m_parseInDetailTimer = new QTimer(this);
- connect(m_parseInDetailTimer, SIGNAL(timeout()), this, SLOT(slotParseNodeInDetail()));
+ m_parseOneLineTimer = new TQTimer(this);
+ connect(m_parseOneLineTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotParseOneLine()));
+ m_parseInDetailTimer = new TQTimer(this);
+ connect(m_parseInDetailTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotParseNodeInDetail()));
}
SAParser::~SAParser()
@@ -143,7 +143,7 @@ bool SAParser::slotParseOneLine()
if ( (groupKeywordPos < specialAreaPos || specialAreaPos == -1) &&
(groupKeywordPos < areaEndPos || areaEndPos == -1) )
{
- QString foundText = s_dtd->structRx.cap();
+ TQString foundText = s_dtd->structRx.cap();
if (foundText == s_dtd->structBeginStr)
{
s_context.type = Group;
@@ -201,7 +201,7 @@ bool SAParser::slotParseOneLine()
}
s_currentContext.area.eLine = s_line;
s_currentContext.area.eCol = groupKeywordPos - 1;
- //kdDebug(24000) << QString("Group Struct s_context: %1, %2, %3, %4").arg( s_currentContext.bLine).arg(s_currentContext.bCol).arg(s_currentContext.eLine).arg(s_currentContext.eCol) << endl;
+ //kdDebug(24000) << TQString("Group Struct s_context: %1, %2, %3, %4").arg( s_currentContext.bLine).arg(s_currentContext.bCol).arg(s_currentContext.eLine).arg(s_currentContext.eCol) << endl;
if (s_currentNode &&
(s_currentNode->tag->type == Tag::Text ||
@@ -265,7 +265,7 @@ bool SAParser::slotParseOneLine()
{
if (specialAreaPos < areaEndPos || areaEndPos == -1)
{
- QString foundText = s_dtd->specialAreaStartRx.cap();
+ TQString foundText = s_dtd->specialAreaStartRx.cap();
s_currentContext.area.eLine = s_line;
s_currentContext.area.eCol = specialAreaPos - 1;
if (s_fullParse)
@@ -351,7 +351,7 @@ bool SAParser::slotParseOneLine()
s_currentNode->specialInsideXml = m_specialInsideXml;
}
}
- //kdDebug(24000) << QString("Special area %1 ends at %2, %3").arg(s_dtd->name).arg(s_line).arg(lastCol) << endl;
+ //kdDebug(24000) << TQString("Special area %1 ends at %2, %3").arg(s_dtd->name).arg(s_line).arg(lastCol) << endl;
//create a closing node for the special area
Tag *tag = new Tag();
@@ -396,9 +396,9 @@ bool SAParser::slotParseOneLine()
}
}
SAGroupParser *groupParser = new SAGroupParser(this, write(), g_node, g_endNode, m_synchronous, parsingLastNode, true);
- connect(groupParser, SIGNAL(rebuildStructureTree(bool)), SIGNAL(rebuildStructureTree(bool)));
- connect(groupParser, SIGNAL(cleanGroups()), SIGNAL(cleanGroups()));
- connect(groupParser, SIGNAL(parsingDone(SAGroupParser*)), SLOT(slotGroupParsingDone(SAGroupParser*)));
+ connect(groupParser, TQT_SIGNAL(rebuildStructureTree(bool)), TQT_SIGNAL(rebuildStructureTree(bool)));
+ connect(groupParser, TQT_SIGNAL(cleanGroups()), TQT_SIGNAL(cleanGroups()));
+ connect(groupParser, TQT_SIGNAL(parsingDone(SAGroupParser*)), TQT_SLOT(slotGroupParsingDone(SAGroupParser*)));
groupParser->slotParseForScriptGroup();
m_groupParsers.append(groupParser);
}
@@ -439,7 +439,7 @@ bool SAParser::slotParseOneLine()
{
//create a tag from the s_currentContext
Tag *tag = new Tag(s_currentContext.area, m_write, s_dtd);
- QString tagStr = tag->tagStr();
+ TQString tagStr = tag->tagStr();
tag->cleanStr = tagStr;
QuantaCommon::removeCommentsAndQuotes(tag->cleanStr, s_dtd);
if (tagStr.simplifyWhiteSpace().isEmpty())
@@ -468,7 +468,7 @@ bool SAParser::slotParseOneLine()
s_currentNode = node;
}
}
- //kdDebug(24000) << QString("%1 s_context: %2, %3, %4, %5").arg(s_currentContext.type).arg( s_currentContext.bLine).arg(s_currentContext.bCol).arg(s_currentContext.eLine).arg(s_currentContext.eCol) << endl;
+ //kdDebug(24000) << TQString("%1 s_context: %2, %3, %4, %5").arg(s_currentContext.type).arg( s_currentContext.bLine).arg(s_currentContext.bCol).arg(s_currentContext.eLine).arg(s_currentContext.eCol) << endl;
s_currentContext = s_context;
s_col = s_context.area.bCol + s_context.startString.length();
@@ -514,7 +514,7 @@ bool SAParser::slotParseOneLine()
// if (pos != 0) pos++;
s_currentContext.area.eLine = s_line;
s_currentContext.area.eCol = pos;
- //kdDebug(24000) << QString("Quoted String s_context: %1, %2, %3, %4").arg( s_currentContext.bLine).arg(s_currentContext.bCol).arg(s_currentContext.eLine).arg(s_currentContext.eCol) << endl;
+ //kdDebug(24000) << TQString("Quoted String s_context: %1, %2, %3, %4").arg( s_currentContext.bLine).arg(s_currentContext.bCol).arg(s_currentContext.eLine).arg(s_currentContext.eCol) << endl;
if (s_fullParse)
{
if ( s_currentNode &&
@@ -561,7 +561,7 @@ bool SAParser::slotParseOneLine()
s_currentContext.area.eLine = s_line;
s_currentContext.area.eCol = pos + s_dtd->comments[s_currentContext.startString].length() - 1;
s_currentContext.type = s_previousContext.type;
- //kdDebug(24000) << QString("Comment s_context: %1, %2, %3, %4").arg( s_currentContext.bLine).arg(s_currentContext.bCol).arg(s_currentContext.eLine).arg(s_currentContext.eCol) << endl;
+ //kdDebug(24000) << TQString("Comment s_context: %1, %2, %3, %4").arg( s_currentContext.bLine).arg(s_currentContext.bCol).arg(s_currentContext.eLine).arg(s_currentContext.eCol) << endl;
if (s_fullParse)
{
@@ -633,8 +633,8 @@ bool SAParser::slotParseOneLine()
}
Node* SAParser::parseArea(const AreaStruct &specialArea,
- const QString &areaStartString,
- const QString &forcedAreaEndString,
+ const TQString &areaStartString,
+ const TQString &forcedAreaEndString,
Node *parentNode,
bool fullParse, bool synchronous)
{
@@ -649,7 +649,7 @@ Node* SAParser::parseArea(const AreaStruct &specialArea,
int s_startCol = specialArea.bCol;
s_endLine = specialArea.eLine;
s_endCol = specialArea.eCol;
- //kdDebug(24000) << QString("Starting to parse at %1, %2 for %3").arg(s_startLine).arg(s_startCol).arg(areaStartString) << endl;
+ //kdDebug(24000) << TQString("Starting to parse at %1, %2 for %3").arg(s_startLine).arg(s_startCol).arg(areaStartString) << endl;
s_searchForAreaEnd = false;
s_searchForForcedAreaEnd = false;
@@ -818,9 +818,9 @@ Node *SAParser::parsingDone()
if (!m_synchronous)
{
SAGroupParser *groupParser = new SAGroupParser(this, write(), g_node, 0L, m_synchronous, true /*last node*/, true);
- connect(groupParser, SIGNAL(rebuildStructureTree(bool)), SIGNAL(rebuildStructureTree(bool)));
- connect(groupParser, SIGNAL(cleanGroups()), SIGNAL(cleanGroups()));
- connect(groupParser, SIGNAL(parsingDone(SAGroupParser*)), SLOT(slotGroupParsingDone(SAGroupParser*)));
+ connect(groupParser, TQT_SIGNAL(rebuildStructureTree(bool)), TQT_SIGNAL(rebuildStructureTree(bool)));
+ connect(groupParser, TQT_SIGNAL(cleanGroups()), TQT_SIGNAL(cleanGroups()));
+ connect(groupParser, TQT_SIGNAL(parsingDone(SAGroupParser*)), TQT_SLOT(slotGroupParsingDone(SAGroupParser*)));
groupParser->slotParseForScriptGroup();
m_groupParsers.append(groupParser);
}
@@ -925,7 +925,7 @@ void SAParser::slotParseNodeInDetail()
#ifdef DEBUG_PARSER
kdDebug(24001) << "Calling parseArea from slotParseNodeInDetail." << endl;
#endif
- QString areaStartString = m_currentNode->tag->tagStr();
+ TQString areaStartString = m_currentNode->tag->tagStr();
if (m_currentNode->tag->dtd()->specialAreaNames[areaStartString].isEmpty())
{
AreaStruct area2(m_currentNode->tag->area());
@@ -967,7 +967,7 @@ void SAParser::setParsingEnabled(bool enabled)
{
m_parseOneLineTimer->stop();
m_parseInDetailTimer->stop();
- for (QValueList<SAGroupParser*>::Iterator it = m_groupParsers.begin(); it != m_groupParsers.end(); ++it)
+ for (TQValueList<SAGroupParser*>::Iterator it = m_groupParsers.begin(); it != m_groupParsers.end(); ++it)
{
(*it)->m_parseForGroupTimer->stop();
delete (*it);
diff --git a/quanta/parsers/saparser.h b/quanta/parsers/saparser.h
index 50c3dd41..c59a01bc 100644
--- a/quanta/parsers/saparser.h
+++ b/quanta/parsers/saparser.h
@@ -18,9 +18,9 @@
#define SAPARSER_H
//qt includes
-#include <qobject.h>
-#include <qregexp.h>
-#include <qvaluestack.h>
+#include <tqobject.h>
+#include <tqregexp.h>
+#include <tqvaluestack.h>
//own includes
#include "tag.h" //for AreaStruct
@@ -63,8 +63,8 @@ public:
return value: in synchronous case returns the last inserted node, otherwise return 0L.
*/
Node* parseArea(const AreaStruct &specialArea,
- const QString &areaStartString,
- const QString &forcedAreaEndString,
+ const TQString &areaStartString,
+ const TQString &forcedAreaEndString,
Node *parentNode,
bool fullParse, bool synchronous);
/** Returns the line where the last parsing run ended. */
@@ -95,7 +95,7 @@ private:
struct ContextStruct{
int type;
AreaStruct area;
- QString startString;
+ TQString startString;
Node *parentNode;
Node *lastNode;
};
@@ -117,34 +117,34 @@ private:
Node* m_currentNode; ///< the currently parsed script node for details. Changes only after the whole area between m_currentNode and m_currentNode->next is parsed.
int m_lastParsedLine, m_lastParsedCol;
const DTDStruct *m_dtd;
- QRegExp m_quotesRx;
+ TQRegExp m_quotesRx;
bool m_specialInsideXml; //< true if the special area is defined inside a tag, like the PHP in <a href="<? echo $a ?>">
bool s_contextFound;
ContextStruct s_currentContext;
Node *s_parentNode;
bool s_searchContent;
- QString s_searchedString;
- QString s_textLine;
+ TQString s_searchedString;
+ TQString s_textLine;
int s_line, s_col;
int s_endLine, s_endCol;
bool s_fullParse;
- QString s_areaEndString;
+ TQString s_areaEndString;
bool s_searchForAreaEnd;
bool s_searchForForcedAreaEnd;
- QRegExp s_forcedAreaRx;
+ TQRegExp s_forcedAreaRx;
const DTDStruct *s_dtd;
bool s_searchForSpecialAreas;
ContextStruct s_context;
- QValueStack<ContextStruct> s_contextStack;
+ TQValueStack<ContextStruct> s_contextStack;
ContextStruct s_previousContext;
Node *s_currentNode; ///< the current detailed node while parsing for details
Node *s_returnNode;
bool s_useReturnVars;
Node *s_next;
- QValueList<SAGroupParser*> m_groupParsers;
- QTimer *m_parseOneLineTimer;
- QTimer *m_parseInDetailTimer;
+ TQValueList<SAGroupParser*> m_groupParsers;
+ TQTimer *m_parseOneLineTimer;
+ TQTimer *m_parseInDetailTimer;
};
#endif
diff --git a/quanta/parsers/tag.cpp b/quanta/parsers/tag.cpp
index 8a1921db..54779d57 100644
--- a/quanta/parsers/tag.cpp
+++ b/quanta/parsers/tag.cpp
@@ -15,10 +15,10 @@
#include <ctype.h>
-#include <qdict.h>
-#include <qstring.h>
-#include <qcstring.h>
-#include <qdom.h>
+#include <tqdict.h>
+#include <tqstring.h>
+#include <tqcstring.h>
+#include <tqdom.h>
#include <kdebug.h>
@@ -31,7 +31,7 @@
#include "node.h"
-void TagAttr::save(QDomElement& element) const
+void TagAttr::save(TQDomElement& element) const
{
element.setAttribute("name", name); // QString
element.setAttribute("value", value); // QString
@@ -43,16 +43,16 @@ void TagAttr::save(QDomElement& element) const
element.setAttribute("special", special); // bool
}
-bool TagAttr::load(QDomElement const& element)
+bool TagAttr::load(TQDomElement const& element)
{
name = element.attribute("name");
value = element.attribute("value");
- nameLine = QString(element.attribute("nameLine")).toInt();
- nameCol = QString(element.attribute("nameCol")).toInt();
- valueLine = QString(element.attribute("valueLine")).toInt();
- valueCol = QString(element.attribute("valueCol")).toInt();
- quoted = QString(element.attribute("quoted")).toInt();
- special = QString(element.attribute("special")).toInt();
+ nameLine = TQString(element.attribute("nameLine")).toInt();
+ nameCol = TQString(element.attribute("nameCol")).toInt();
+ valueLine = TQString(element.attribute("valueLine")).toInt();
+ valueCol = TQString(element.attribute("valueCol")).toInt();
+ quoted = TQString(element.attribute("quoted")).toInt();
+ special = TQString(element.attribute("special")).toInt();
return true;
}
@@ -66,7 +66,7 @@ Tag::Tag()
Tag::Tag(const AreaStruct &area, Document *write, const DTDStruct *dtd, bool doParse)
{
init();
- QString s = write->text(area);
+ TQString s = write->text(area);
m_area = area;
m_dtd = dtd;
if (doParse)
@@ -125,7 +125,7 @@ void Tag::init()
m_notInTree = false;
}
-void Tag::save(QDomElement& element) const
+void Tag::save(TQDomElement& element) const
{
element.setAttribute("name", name); // QString
element.setAttribute("nameSpace", nameSpace); // QString
@@ -141,10 +141,10 @@ void Tag::save(QDomElement& element) const
element.setAttribute("nameLine", m_nameLine); // int
element.setAttribute("nameCol", m_nameCol); // int
- QValueList<TagAttr>::const_iterator it;
+ TQValueList<TagAttr>::const_iterator it;
for (it = attrs.begin(); it != attrs.end(); ++it)
{
- QDomElement child_element = element.ownerDocument().createElement("tagAttr");
+ TQDomElement child_element = element.ownerDocument().createElement("tagAttr");
element.appendChild(child_element);
(*it).save(child_element);
}
@@ -152,28 +152,28 @@ void Tag::save(QDomElement& element) const
element.setAttribute("tagStr", m_tagStr); // QString
}
-bool Tag::load(QDomElement const& element)
+bool Tag::load(TQDomElement const& element)
{
name = element.attribute("name"); // QString
nameSpace = element.attribute("nameSpace"); // QString
cleanStr = element.attribute("cleanStr"); // QString
- type = QString(element.attribute("type")).toInt(); // int
- single = QString(element.attribute("single")).toInt(); // bool
- closingMissing = QString(element.attribute("closingMissing")).toInt(); // bool
+ type = TQString(element.attribute("type")).toInt(); // int
+ single = TQString(element.attribute("single")).toInt(); // bool
+ closingMissing = TQString(element.attribute("closingMissing")).toInt(); // bool
structBeginStr = element.attribute("structBeginStr"); // QString
- validXMLTag = QString(element.attribute("validXMLTag")).toInt(); // bool
- m_cleanStrBuilt = QString(element.attribute("cleanStrBuilt")).toInt(); // bool
- m_indentationDone = QString(element.attribute("indentationDone")).toInt(); // bool
- m_notInTree = QString(element.attribute("notInTree")).toInt(); // bool
- m_nameLine = QString(element.attribute("nameLine")).toInt(); // int
- m_nameCol = QString(element.attribute("nameCol")).toInt(); // int
-
- QDomNodeList list = element.childNodes();
+ validXMLTag = TQString(element.attribute("validXMLTag")).toInt(); // bool
+ m_cleanStrBuilt = TQString(element.attribute("cleanStrBuilt")).toInt(); // bool
+ m_indentationDone = TQString(element.attribute("indentationDone")).toInt(); // bool
+ m_notInTree = TQString(element.attribute("notInTree")).toInt(); // bool
+ m_nameLine = TQString(element.attribute("nameLine")).toInt(); // int
+ m_nameCol = TQString(element.attribute("nameCol")).toInt(); // int
+
+ 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() == "tagAttr")
{
TagAttr tag_attr;
@@ -188,7 +188,7 @@ bool Tag::load(QDomElement const& element)
return true;
}
-void Tag::parse(const QString &p_tagStr, Document *p_write)
+void Tag::parse(const TQString &p_tagStr, Document *p_write)
{
attrs.clear();
m_tagStr = p_tagStr;
@@ -216,7 +216,7 @@ void Tag::parse(const QString &p_tagStr, Document *p_write)
name = name.mid(++nameSpacePos);
m_nameCol += nameSpacePos;
}
- QString attrStr;
+ TQString attrStr;
TagAttr attr;
attr.special = false; //by default non of the attributes are special
while (pos < strLength && m_tagStr[pos].isSpace())
@@ -242,7 +242,7 @@ void Tag::parse(const QString &p_tagStr, Document *p_write)
attr.nameCol = sPos + m_area.bCol;
else
attr.nameCol = m_tagStr.left(sPos).section('\n',-1).length();
- attr.value = (m_dtd != 0) ? m_dtd->booleanTrue : QString("checked");
+ attr.value = (m_dtd != 0) ? m_dtd->booleanTrue : TQString("checked");
attr.valueCol = attr.nameCol;
attr.valueLine = attr.nameLine;
attr.quoted = false;
@@ -264,7 +264,7 @@ void Tag::parse(const QString &p_tagStr, Document *p_write)
//treate it as a "true" boolean
if (m_tagStr[pos] != '=' || pos == strLength)
{
- attr.value = (m_dtd != 0) ? m_dtd->booleanTrue : QString("checked");
+ attr.value = (m_dtd != 0) ? m_dtd->booleanTrue : TQString("checked");
attr.valueCol = attr.nameCol;
attr.valueLine = attr.nameLine;
attr.quoted = false;
@@ -278,7 +278,7 @@ void Tag::parse(const QString &p_tagStr, Document *p_write)
{
attr.quoted = true;
valueStartPos = pos + 1;
- QChar quotation = m_tagStr[pos];
+ TQChar quotation = m_tagStr[pos];
pos += 1;
while (pos < strLength &&
(m_tagStr[pos] != quotation ||
@@ -316,8 +316,8 @@ void Tag::parse(const QString &p_tagStr, Document *p_write)
//add the tag to the document usertag list if it's not present in the dtd
if (m_tagStr.startsWith("<") && m_tagStr.endsWith(">") && m_dtd)
{
- //QString tagName = (m_parsingDTD->caseSensitive) ? name : name.upper();
- QString tagName = name.lower();
+ //TQString tagName = (m_parsingDTD->caseSensitive) ? name : name.upper();
+ TQString tagName = name.lower();
//add the new xml tags to the userTagList
if ( !QuantaCommon::isKnownTag(m_dtd->name, tagName) &&
name[0] != '/' )
@@ -347,9 +347,9 @@ void Tag::parse(const QString &p_tagStr, Document *p_write)
}
-QString Tag::attribute(int index)
+TQString Tag::attribute(int index)
{
- QString attr="";
+ TQString attr="";
if ( index != -1 && index < (int)attrs.count() )
{
attr = attrs[index].name;
@@ -357,9 +357,9 @@ QString Tag::attribute(int index)
return attr;
}
-QString Tag::attributeValue(int index)
+TQString Tag::attributeValue(int index)
{
- QString val = "";
+ TQString val = "";
if ( index != -1 && index < (int)attrs.count() )
{
val = attrs[index].value;
@@ -367,9 +367,9 @@ QString Tag::attributeValue(int index)
return val;
}
-QString Tag::attributeValue(const QString &attr, bool ignoreCase)
+TQString Tag::attributeValue(const TQString &attr, bool ignoreCase)
{
- QString val = "";
+ TQString val = "";
for (uint i = 0 ; i < attrs.count(); i++)
{
@@ -384,7 +384,7 @@ QString Tag::attributeValue(const QString &attr, bool ignoreCase)
}
/** Check if this tag has the attr attribute defined */
-bool Tag::hasAttribute(const QString &attr, bool ignoreCase)
+bool Tag::hasAttribute(const TQString &attr, bool ignoreCase)
{
for (uint i = 0; i < attrs.count(); i++)
{
@@ -424,7 +424,7 @@ void Tag::setTagPosition(const AreaStruct &area)
}
/** Return the index of attr. */
-int Tag::attributeIndex(const QString &attr)
+int Tag::attributeIndex(const TQString &attr)
{
int index = -1;
uint i = 0;
@@ -483,7 +483,7 @@ void Tag::namePos(int &line, int &col)
col = m_nameCol;
}
-void Tag::setStr(const QString &p_tagStr)
+void Tag::setStr(const TQString &p_tagStr)
{
m_tagStr = p_tagStr; cleanStr = m_tagStr;
}
@@ -520,7 +520,7 @@ void Tag::attributeValuePos(int index, int &line, int &col)
}
}
-bool Tag::editAttribute(const QString& attrName, const QString& attrValue)
+bool Tag::editAttribute(const TQString& attrName, const TQString& attrValue)
{
TagAttr attr;
@@ -552,7 +552,7 @@ bool Tag::editAttribute(const QString& attrName, const QString& attrValue)
return false;
}
-void Tag::deleteAttribute(const QString& attrName)
+void Tag::deleteAttribute(const TQString& attrName)
{
for (uint i = 0 ; i < attrs.count(); i++)
{
@@ -564,12 +564,12 @@ void Tag::deleteAttribute(const QString& attrName)
}
}
-void Tag::modifyAttributes(QDict<QString> *attrDict)
+void Tag::modifyAttributes(TQDict<TQString> *attrDict)
{
QTag *qTag = QuantaCommon::tagFromDTD(m_dtd, name);
- QDictIterator<QString> it(*attrDict);
- QString attribute;
- QString value;
+ TQDictIterator<TQString> it(*attrDict);
+ TQString attribute;
+ TQString value;
while ( it.current() )
{
attribute = it.currentKey();
@@ -591,13 +591,13 @@ void Tag::modifyAttributes(QDict<QString> *attrDict)
}
}
-QString Tag::toString()
+TQString Tag::toString()
{
QTag *qTag = QuantaCommon::tagFromDTD(m_dtd, name);
- QValueList<TagAttr>::Iterator it;
+ TQValueList<TagAttr>::Iterator it;
TagAttr attr;
- QString attrString;
- QString tagString;
+ TQString attrString;
+ TQString tagString;
for (it = attrs.begin(); it != attrs.end(); ++it)
{
attr = *it;
@@ -652,7 +652,7 @@ void Tag::setDtd(const DTDStruct *dtd)
m_dtd = dtd;
}
-bool Tag::isInsideScript(const QString &str)
+bool Tag::isInsideScript(const TQString &str)
{
if (!m_dtd)
return false; //happens when the DTD is not known yet, e.g in Document::findDTDName
@@ -662,7 +662,7 @@ bool Tag::isInsideScript(const QString &str)
//TODO: speed up if you can...
if (str.find(m_dtd->specialAreaStartRx) != -1)
{
- QString foundString = m_dtd->specialAreaStartRx.cap();
+ TQString foundString = m_dtd->specialAreaStartRx.cap();
if (str.find(m_dtd->specialAreas[foundString]) == -1)
{
return true;
diff --git a/quanta/parsers/tag.h b/quanta/parsers/tag.h
index de2c0a7b..43ed610a 100644
--- a/quanta/parsers/tag.h
+++ b/quanta/parsers/tag.h
@@ -16,9 +16,9 @@
#ifndef TAG_H
#define TAG_H
-#include <qstring.h>
-#include <qdict.h>
-#include <qvaluelist.h>
+#include <tqstring.h>
+#include <tqdict.h>
+#include <tqvaluelist.h>
class QDomElement;
#include "qtag.h"
@@ -39,11 +39,11 @@ struct TagAttr {
TagAttr() {nameLine = nameCol = valueLine = valueCol = 0; quoted = true; special = false;}
/** For Kafka copy/paste */
- void save(QDomElement& element) const;
- bool load(QDomElement const& element);
+ void save(TQDomElement& element) const;
+ bool load(TQDomElement const& element);
- QString name; //attr name
- QString value; //attr value
+ TQString name; //attr name
+ TQString value; //attr value
int nameLine, nameCol; //where the attr name begins
int valueLine, valueCol;//where the attr value begins
bool quoted; //quote or not the attribute
@@ -73,17 +73,17 @@ public:
Tag operator = ( const Tag& );
/** For Kafka copy/paste */
- void save(QDomElement& element) const;
- bool load(QDomElement const& element);
+ void save(TQDomElement& element) const;
+ bool load(TQDomElement const& element);
/** Parse the p_tagStr in p_write and build up the tag's attributes and values */
- void parse (const QString &p_tagStr, Document *p_write);
+ void parse (const TQString &p_tagStr, Document *p_write);
/** Return the attribute at index*/
- QString attribute(int index);
+ TQString attribute(int index);
/** Return the attribute value at index*/
- QString attributeValue(int index);
+ TQString attributeValue(int index);
/** Return the value of attr*/
- QString attributeValue(const QString &attr, bool ignoreCase = false);
+ TQString attributeValue(const TQString &attr, bool ignoreCase = false);
/** Add an attribute */
void addAttribute(TagAttr attr) {attrs.append(attr);}
/** Get the attribute number index */
@@ -92,13 +92,13 @@ public:
void deleteAttribute(uint index) {attrs.remove(attrs.at(index));}
/** Insert a new Attribute, even if it already exists. Prefer using editAttribute.
Return true if something was mdofied. */
- bool editAttribute(const QString& attrName, const QString& attrValue);
+ bool editAttribute(const TQString& attrName, const TQString& attrValue);
/** Delete the attribute attrName */
- void deleteAttribute(const QString& attrName);
+ void deleteAttribute(const TQString& attrName);
/** Returns the quotation status of the attribute */
bool isQuotedAttribute(int index) const {return attrs[index].quoted;}
/** Check if this tag has the attr attribute defined */
- bool hasAttribute(const QString &attr, bool ignoreCase = false);
+ bool hasAttribute(const TQString &attr, bool ignoreCase = false);
/** set the coordinates of a tag attribute */
void setAttributePosition(int index, int bLineName, int bColName, int bLineValue, int bColValue);
/** Set the coordinates of tag inside the document */
@@ -116,9 +116,9 @@ public:
/** Where the attr value at index begins in the document */
void attributeValuePos(int index, int &line, int &col);
/** Set the internal string which is parsed */
- void setStr(const QString &p_tagStr);
+ void setStr(const TQString &p_tagStr);
/** Get the tag in string format */
- QString tagStr() const {return m_tagStr;};
+ TQString tagStr() const {return m_tagStr;};
/** Get the document where the tag lies */
Document *write() {return m_write;}
/** Set the document where the tag lies */
@@ -128,14 +128,14 @@ public:
/** Returns the index of attributevalue at (line,col). */
int valueIndexAtPos(int line, int col);
/** Return the index of attr. */
- int attributeIndex(const QString &attr);
+ int attributeIndex(const TQString &attr);
void namePos(int &line, int &col);
int attrCount() const {return attrs.count();}
/** modify the attributes of tag according to the attrDict*/
- void modifyAttributes(QDict<QString> *attrDict);
+ void modifyAttributes(TQDict<TQString> *attrDict);
/** returns the tag as a string */
- QString toString();
+ TQString toString();
/** returns true if the tag is a closing tag (name or namespace starts with "/") */
bool isClosingTag();
/** Sets the special flag of attribute at index*/
@@ -163,13 +163,13 @@ public:
//TODO: write setting/retrieving methods for the below attributes, and add
//them the m_ prefix
- QString name;
- QString nameSpace;
- QString cleanStr;
+ TQString name;
+ TQString nameSpace;
+ TQString cleanStr;
int type; //one of the TokenType
bool single; // tags like <tag />
bool closingMissing; //closing tag is optional and missing
- QString structBeginStr; //if it's a special block, contains the block beginning definition string (like <? or <style language="foo">)
+ TQString structBeginStr; //if it's a special block, contains the block beginning definition string (like <? or <style language="foo">)
bool validXMLTag; //false if the closing ">" was not found
bool cleanStrBuilt() {return m_cleanStrBuilt;}
@@ -196,15 +196,15 @@ private:
void init();
/** Verifies if the last char from @param str is inside a script area or not */
- bool isInsideScript(const QString& str);
+ bool isInsideScript(const TQString& str);
AreaStruct m_area; //where the tag is in the doc
int m_nameLine;//where the tag name begins
int m_nameCol;
const DTDStruct* m_dtd; //the tag belongs to this DTD
- QValueList<TagAttr> attrs; //attributes in a tag
- QString m_tagStr; //the tag in string format (as it is in the document)
+ TQValueList<TagAttr> attrs; //attributes in a tag
+ TQString m_tagStr; //the tag in string format (as it is in the document)
Document *m_write; //the document
};
diff --git a/quanta/parts/kafka/cursors.h b/quanta/parts/kafka/cursors.h
index 22eea7b1..6ff94439 100644
--- a/quanta/parts/kafka/cursors.h
+++ b/quanta/parts/kafka/cursors.h
@@ -85,13 +85,13 @@ public:
* @return Returns the location of the Node where the selection begin (and where the cursor is if
* m_cursorAtSelectionStart).
*/
- QValueList<int>& cursorNode() {return m_cursorNode;}
+ TQValueList<int>& cursorNode() {return m_cursorNode;}
/**
* @param cursorNode Set the location of the Node where the selection begin (and where the cursor is if
* m_cursorAtSelectionStart)
*/
- void setCursorNode(QValueList<int> cursorNode) {m_cursorNode = cursorNode;}
+ void setCursorNode(TQValueList<int> cursorNode) {m_cursorNode = cursorNode;}
/**
* @return Returns the offset of the cursor where the selection begin (and where the cursor is if
@@ -121,13 +121,13 @@ public:
* selection ends.
* Empty if this instance only carry the cursor coordinates.
*/
- QValueList<int>& cursorNodeEndSel() {return m_cursorNodeEndSel;}
+ TQValueList<int>& cursorNodeEndSel() {return m_cursorNodeEndSel;}
/**
* @param cursorNodeEndSel Set the location of the end selection Node where the
* selection ends.
*/
- void setCursorNodeEndSel(QValueList<int> cursorNodeEndSel)
+ void setCursorNodeEndSel(TQValueList<int> cursorNodeEndSel)
{m_cursorNodeEndSel = cursorNodeEndSel;}
/**
@@ -142,7 +142,7 @@ public:
{m_cursorOffsetEndSel = cursorOffsetEndSel;}
private:
- QValueList<int> m_cursorNode, m_cursorNodeEndSel;
+ TQValueList<int> m_cursorNode, m_cursorNodeEndSel;
int m_cursorOffset, m_cursorOffsetEndSel;
bool m_cursorAtSelectionStart;
};
diff --git a/quanta/parts/kafka/domtreeview.cpp b/quanta/parts/kafka/domtreeview.cpp
index 14fe17d2..5ed55a1b 100644
--- a/quanta/parts/kafka/domtreeview.cpp
+++ b/quanta/parts/kafka/domtreeview.cpp
@@ -21,13 +21,13 @@
#include <kdebug.h>
#include <khtml_part.h>
#include <klocale.h>
-#include <qstring.h>
-#include <qlayout.h>
+#include <tqstring.h>
+#include <tqlayout.h>
#include <dom/dom_text.h>
#include "domtreeview.moc"
-DOMTreeView::DOMTreeView(QWidget *parent, KHTMLPart *currentpart, const char * name) : KListView(parent, name)
+DOMTreeView::DOMTreeView(TQWidget *parent, KHTMLPart *currentpart, const char * name) : KListView(parent, name)
{
setCaption(name);
setRootIsDecorated(true);
@@ -38,11 +38,11 @@ DOMTreeView::DOMTreeView(QWidget *parent, KHTMLPart *currentpart, const char * n
addColumn("");
setSorting(-1);
part = currentpart;
- connect(part, SIGNAL(nodeActivated(const DOM::Node &)), this, SLOT(showTree(const DOM::Node &)));
- connect(this, SIGNAL(clicked(QListViewItem *)), this, SLOT(slotItemClicked(QListViewItem *)));
+ connect(part, TQT_SIGNAL(nodeActivated(const DOM::Node &)), this, TQT_SLOT(showTree(const DOM::Node &)));
+ connect(this, TQT_SIGNAL(clicked(TQListViewItem *)), this, TQT_SLOT(slotItemClicked(TQListViewItem *)));
m_nodedict.setAutoDelete(true);
title = "";
- titleItem = new QListViewItem(static_cast<QListView *>(this), title, "");
+ titleItem = new TQListViewItem(static_cast<TQListView *>(this), title, "");
}
DOMTreeView::~DOMTreeView()
@@ -50,7 +50,7 @@ DOMTreeView::~DOMTreeView()
disconnect(part);
}
-void DOMTreeView::setTitle(const QString &str)
+void DOMTreeView::setTitle(const TQString &str)
{
title = str;
titleItem->setText(1, title);
@@ -78,7 +78,7 @@ void DOMTreeView::showTree(const DOM::Node &pNode)
document = pNode.ownerDocument();
recursive(0, pNode.ownerDocument());
}
- titleItem = new QListViewItem(static_cast<QListView *>(this), title, "");
+ titleItem = new TQListViewItem(static_cast<TQListView *>(this), title, "");
// }
setCurrentItem(m_itemdict[pNode.handle()]);
ensureItemVisible(m_itemdict[pNode.handle()]);
@@ -86,30 +86,30 @@ void DOMTreeView::showTree(const DOM::Node &pNode)
void DOMTreeView::recursive(const DOM::Node &pNode, const DOM::Node &node)
{
- QListViewItem *cur_item;
+ TQListViewItem *cur_item;
int len;
if(pNode.ownerDocument() != document)
{
- QString val = node.nodeValue().string();
+ TQString val = node.nodeValue().string();
if ( val.length() > 20 )
val.truncate( 20 );
- cur_item = new QListViewItem(static_cast<QListView *>(this), node.nodeName().string(), val);
+ cur_item = new TQListViewItem(static_cast<TQListView *>(this), node.nodeName().string(), val);
document = pNode.ownerDocument();
}
else {
- QString val = node.nodeValue().string();
+ TQString val = node.nodeValue().string();
if ( val.length() > 20 )
val.truncate( 20 );
if(node.nodeType() == DOM::Node::TEXT_NODE)
len = (static_cast<DOM::CharacterData>(node)).length();
else
len = 0;
- cur_item = new QListViewItem(m_itemdict[pNode.handle()], node.nodeName().string(), val, QString::number(len), QString::number(node.elementId()) );
+ cur_item = new TQListViewItem(m_itemdict[pNode.handle()], node.nodeName().string(), val, TQString::number(len), TQString::number(node.elementId()) );
unsigned long i;
- QListViewItem *tmp = new QListViewItem(cur_item, "properties");
+ TQListViewItem *tmp = new TQListViewItem(cur_item, "properties");
for(i = 0; i < node.attributes().length(); i++)
{
- new QListViewItem(tmp, node.attributes().item(i).nodeName().string(),
+ new TQListViewItem(tmp, node.attributes().item(i).nodeName().string(),
node.attributes().item(i).nodeValue().string());
}
}
@@ -128,7 +128,7 @@ void DOMTreeView::recursive(const DOM::Node &pNode, const DOM::Node &node)
}
}
-void DOMTreeView::slotItemClicked(QListViewItem *cur_item)
+void DOMTreeView::slotItemClicked(TQListViewItem *cur_item)
{
DOM::Node *handle = m_nodedict[cur_item];
if(handle) {
@@ -137,11 +137,11 @@ void DOMTreeView::slotItemClicked(QListViewItem *cur_item)
}
}
-KafkaDOMTreeDialog::KafkaDOMTreeDialog(QWidget *parent, KHTMLPart *part, const char* name, bool modal, WFlags fl )
- : QDialog(parent, name, modal, fl)
+KafkaDOMTreeDialog::KafkaDOMTreeDialog(TQWidget *parent, KHTMLPart *part, const char* name, bool modal, WFlags fl )
+ : TQDialog(parent, name, modal, fl)
{
- setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)1, 0, 0, sizePolicy().hasHeightForWidth() ) );
- DialogLayout = new QGridLayout( this, 1, 1, 11, 6, "DialogLayout");
+ setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)1, 0, 0, sizePolicy().hasHeightForWidth() ) );
+ DialogLayout = new TQGridLayout( this, 1, 1, 11, 6, "DialogLayout");
domview = new DOMTreeView(this, part, name);
domview->setTitle(i18n( "Debugging KafkaWidget DOM Tree " ));
DialogLayout->addWidget(domview, 1,1);
diff --git a/quanta/parts/kafka/domtreeview.h b/quanta/parts/kafka/domtreeview.h
index 4e2a560f..60c6fed3 100644
--- a/quanta/parts/kafka/domtreeview.h
+++ b/quanta/parts/kafka/domtreeview.h
@@ -23,10 +23,10 @@
#ifdef HEAVY_DEBUG
#include <klistview.h>
#include <kdebug.h>
-#include <qlistview.h>
-#include <qptrdict.h>
+#include <tqlistview.h>
+#include <tqptrdict.h>
#include <dom/dom_core.h>
-#include <qdialog.h>
+#include <tqdialog.h>
class QString;
class QGridLayout;
@@ -39,9 +39,9 @@ class DOMTreeView : public KListView
{
Q_OBJECT
public:
- DOMTreeView(QWidget *parent, KHTMLPart *part, const char * name = 0);
+ DOMTreeView(TQWidget *parent, KHTMLPart *part, const char * name = 0);
~DOMTreeView();
- void setTitle(const QString &str);
+ void setTitle(const TQString &str);
void recursive(const DOM::Node &pNode, const DOM::Node &node);
signals:
@@ -51,13 +51,13 @@ class DOMTreeView : public KListView
void showTree(const DOM::Node &pNode);
protected slots:
- void slotItemClicked(QListViewItem *);
+ void slotItemClicked(TQListViewItem *);
private:
- QString title;
- QListViewItem *titleItem;
- QPtrDict<QListViewItem> m_itemdict;
- QPtrDict<DOM::Node> m_nodedict;
+ TQString title;
+ TQListViewItem *titleItem;
+ TQPtrDict<TQListViewItem> m_itemdict;
+ TQPtrDict<DOM::Node> m_nodedict;
DOM::Node document;
KHTMLPart *part;
@@ -67,10 +67,10 @@ class KafkaDOMTreeDialog : public QDialog
{
Q_OBJECT
public:
- KafkaDOMTreeDialog(QWidget *parent = 0, KHTMLPart *part = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
+ KafkaDOMTreeDialog(TQWidget *parent = 0, KHTMLPart *part = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
~KafkaDOMTreeDialog();
DOMTreeView *domview;
- QGridLayout *DialogLayout;
+ TQGridLayout *DialogLayout;
};
#endif
diff --git a/quanta/parts/kafka/htmldocumentproperties.cpp b/quanta/parts/kafka/htmldocumentproperties.cpp
index 0099f313..d8fee439 100644
--- a/quanta/parts/kafka/htmldocumentproperties.cpp
+++ b/quanta/parts/kafka/htmldocumentproperties.cpp
@@ -44,14 +44,14 @@
#include "viewmanager.h"
-htmlDocumentProperties::htmlDocumentProperties( QWidget* parent, bool forceInsertionOfBasicNodes, const char* name,
+htmlDocumentProperties::htmlDocumentProperties( TQWidget* parent, bool forceInsertionOfBasicNodes, const char* name,
bool modal, WFlags fl) :
htmlDocumentPropertiesui(parent, name, modal, fl), titleNode( 0L ), htmlNode( 0L ),
headNode( 0L ), linkNode( 0L ), bodyNode( 0L), doctypeNode( 0L ), CSSNode ( 0L ),
xmlNode( 0L ), titleDirty(false), linkDirty(false)
{
Node *node;
- QString text, nodeName;
+ TQString text, nodeName;
bool b;
int index;
KURL url, baseURL;
@@ -69,17 +69,17 @@ htmlDocumentProperties::htmlDocumentProperties( QWidget* parent, bool forceInser
ok->setAutoDefault(true);
//set the taborder and disable focus for some widgets.
- currentDTD->setFocusPolicy(QWidget::NoFocus);
- QWidget::setTabOrder(title, metaItems);
- QWidget::setTabOrder(metaItems, metaItemsAdd);
- QWidget::setTabOrder(metaItemsAdd, metaItemsDelete);
- QWidget::setTabOrder(metaItemsDelete, cssRules);
- QWidget::setTabOrder(cssRules, cssRulesAdd);
- QWidget::setTabOrder(cssRulesAdd, cssRulesEdit);
- QWidget::setTabOrder(cssRulesEdit, cssRulesDelete);
- QWidget::setTabOrder(cssRulesDelete, cssStylesheet);
- QWidget::setTabOrder(cssStylesheet, ok);
- QWidget::setTabOrder(ok, cancel);
+ currentDTD->setFocusPolicy(TQWidget::NoFocus);
+ TQWidget::setTabOrder(title, metaItems);
+ TQWidget::setTabOrder(metaItems, metaItemsAdd);
+ TQWidget::setTabOrder(metaItemsAdd, metaItemsDelete);
+ TQWidget::setTabOrder(metaItemsDelete, cssRules);
+ TQWidget::setTabOrder(cssRules, cssRulesAdd);
+ TQWidget::setTabOrder(cssRulesAdd, cssRulesEdit);
+ TQWidget::setTabOrder(cssRulesEdit, cssRulesDelete);
+ TQWidget::setTabOrder(cssRulesDelete, cssStylesheet);
+ TQWidget::setTabOrder(cssStylesheet, ok);
+ TQWidget::setTabOrder(ok, cancel);
//set the current DTD name
currentDTD->setText(ViewManager::ref()->activeDocument()->defaultDTD()->nickName);
@@ -87,7 +87,7 @@ htmlDocumentProperties::htmlDocumentProperties( QWidget* parent, bool forceInser
//set the metaItems DualEditableTree
metaItems->addColumn(i18n("Name"));
metaItems->addColumn(i18n("Content"));
- metaItems->setFrameStyle( QFrame::Panel | QFrame::Sunken );
+ metaItems->setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
metaItems->setLineWidth( 2 );
metaItems->setSorting(0, true);
@@ -96,9 +96,9 @@ htmlDocumentProperties::htmlDocumentProperties( QWidget* parent, bool forceInser
//cssRules->setEditable(false);
cssRules->addColumn(i18n("Selector"));
cssRules->addColumn(i18n("Rule"));
- cssRules->setFrameStyle( QFrame::Panel | QFrame::Sunken );
+ cssRules->setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
cssRules->setLineWidth( 2 );
- //cssRules->setFocusPolicy(QWidget::ClickFocus);
+ //cssRules->setFocusPolicy(TQWidget::ClickFocus);
cssRules->setSorting(-1);
//search for the head, html, title Node
@@ -230,20 +230,20 @@ htmlDocumentProperties::htmlDocumentProperties( QWidget* parent, bool forceInser
cancel->setIconSet(SmallIconSet("button_cancel"));
//connect buttons
- connect(ok, SIGNAL(clicked()), this, SLOT(accept()));
- connect(cancel, SIGNAL(clicked()), this, SLOT(reject()));
- connect(cssRulesAdd, SIGNAL(clicked()), this, SLOT(newCSSRule()));
- connect(cssRulesEdit, SIGNAL(clicked()), this, SLOT(editCSSRule()));
- connect (cssRulesDelete, SIGNAL(clicked()), this, SLOT(deleteCurrentCSSRule()));
- connect(metaItemsAdd, SIGNAL(clicked()), this, SLOT(newMetaItem()));
- connect(metaItemsDelete, SIGNAL(clicked()), this, SLOT(deleteCurrentMetaItem()));
- connect(title, SIGNAL(textChanged(const QString &)), this, SLOT(titleChanged(const QString &)));
- connect(metaItems, SIGNAL(itemModified( QListViewItem * )),
- this, SLOT(metaChanged(QListViewItem * )));
- connect(cssRules, SIGNAL(itemModified( QListViewItem * )),
- this, SLOT(CSSChanged(QListViewItem * )));
- connect(cssStylesheet, SIGNAL(textChanged(const QString &)),
- this, SLOT(linkChanged( const QString& )));
+ connect(ok, TQT_SIGNAL(clicked()), this, TQT_SLOT(accept()));
+ connect(cancel, TQT_SIGNAL(clicked()), this, TQT_SLOT(reject()));
+ connect(cssRulesAdd, TQT_SIGNAL(clicked()), this, TQT_SLOT(newCSSRule()));
+ connect(cssRulesEdit, TQT_SIGNAL(clicked()), this, TQT_SLOT(editCSSRule()));
+ connect (cssRulesDelete, TQT_SIGNAL(clicked()), this, TQT_SLOT(deleteCurrentCSSRule()));
+ connect(metaItemsAdd, TQT_SIGNAL(clicked()), this, TQT_SLOT(newMetaItem()));
+ connect(metaItemsDelete, TQT_SIGNAL(clicked()), this, TQT_SLOT(deleteCurrentMetaItem()));
+ connect(title, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(titleChanged(const TQString &)));
+ connect(metaItems, TQT_SIGNAL(itemModified( TQListViewItem * )),
+ this, TQT_SLOT(metaChanged(TQListViewItem * )));
+ connect(cssRules, TQT_SIGNAL(itemModified( TQListViewItem * )),
+ this, TQT_SLOT(CSSChanged(TQListViewItem * )));
+ connect(cssStylesheet, TQT_SIGNAL(textChanged(const TQString &)),
+ this, TQT_SLOT(linkChanged( const TQString& )));
}
htmlDocumentProperties::~htmlDocumentProperties()
@@ -254,7 +254,7 @@ htmlDocumentProperties::~htmlDocumentProperties()
void htmlDocumentProperties::loadMetaNode(Node *node)
{
int index;
- QString name, content;
+ TQString name, content;
NodeLinkedViewItem *item;
index = node->tag->attributeIndex("name");
@@ -276,7 +276,7 @@ void htmlDocumentProperties::loadMetaNode(Node *node)
void htmlDocumentProperties::loadCSS(Node *node)
{
NodeLinkedViewItem *item;
- QString selector;
+ TQString selector;
CSSNode = node;
node = node->child;
@@ -314,7 +314,7 @@ void htmlDocumentProperties::deleteCurrentMetaItem()
{
if(metaItems->currentItem())
{
- QListViewItem *item = metaItems->currentItem();
+ TQListViewItem *item = metaItems->currentItem();
(static_cast<NodeLinkedViewItem *>(item))->deleted = true;
(static_cast<NodeLinkedViewItem *>(item))->dirty = true;
(static_cast<AttributeItem *>(item))->hideEditor(0);
@@ -344,7 +344,7 @@ void htmlDocumentProperties::deleteCurrentCSSRule()
{
if(cssRules->currentItem())
{
- QListViewItem *item = cssRules->currentItem();
+ TQListViewItem *item = cssRules->currentItem();
(static_cast<NodeLinkedViewItem *>(item))->deleted = true;
(static_cast<NodeLinkedViewItem *>(item))->dirty = true;
(static_cast<AttributeItem *>(item))->hideEditor(0);
@@ -354,24 +354,24 @@ void htmlDocumentProperties::deleteCurrentCSSRule()
}
-void htmlDocumentProperties::titleChanged(const QString &)
+void htmlDocumentProperties::titleChanged(const TQString &)
{
titleDirty = true;
}
-void htmlDocumentProperties::metaChanged(QListViewItem * item)
+void htmlDocumentProperties::metaChanged(TQListViewItem * item)
{
if(item)
(static_cast<NodeLinkedViewItem *>(item))->dirty = true;
}
-void htmlDocumentProperties::CSSChanged(QListViewItem * item)
+void htmlDocumentProperties::CSSChanged(TQListViewItem * item)
{
if(item)
(static_cast<NodeLinkedViewItem *>(item))->dirty = true;
}
-void htmlDocumentProperties::linkChanged( const QString& )
+void htmlDocumentProperties::linkChanged( const TQString& )
{
linkDirty = true;
}
@@ -384,7 +384,7 @@ void htmlDocumentProperties::accept()
TagAttr attr;
NodeModifsSet *modifs = new NodeModifsSet();
KURL url, baseURL;
- QString finalURL;
+ TQString finalURL;
NodeSelection *cursorPos;
bool goUp;
//TODO:see for !doctype
@@ -595,7 +595,7 @@ void htmlDocumentProperties::addBasicNodes(NodeModifsSet *modifs)
Node *n, *nextNode;
bool htmlNodeCreated = false, bodyNodeCreated = false;
QTag *qHead, *qBody;
- QString tagName;
+ TQString tagName;
if(headNode)
return;
@@ -732,7 +732,7 @@ void htmlDocumentProperties::addBasicNodes(NodeModifsSet *modifs)
}
}
-NodeLinkedViewItem::NodeLinkedViewItem(EditableTree *listView, const QString& title, const QString& title2)
+NodeLinkedViewItem::NodeLinkedViewItem(EditableTree *listView, const TQString& title, const TQString& title2)
: AttributeItem(listView, title, title2, 0L)
{
node = 0L;
diff --git a/quanta/parts/kafka/htmldocumentproperties.h b/quanta/parts/kafka/htmldocumentproperties.h
index 62a64659..3bcfdcb1 100644
--- a/quanta/parts/kafka/htmldocumentproperties.h
+++ b/quanta/parts/kafka/htmldocumentproperties.h
@@ -23,7 +23,7 @@ class NodeModifsSet;
class AttributeItem;
class EditableTree;
-#include <qptrlist.h>
+#include <tqptrlist.h>
#include "tagattributeitems.h"
#include "htmldocumentpropertiesui.h"
@@ -31,7 +31,7 @@ class EditableTree;
class NodeLinkedViewItem : public AttributeItem
{
public:
- NodeLinkedViewItem(EditableTree *listView, const QString& title, const QString& title2);
+ NodeLinkedViewItem(EditableTree *listView, const TQString& title, const TQString& title2);
virtual ~NodeLinkedViewItem();
Node *node;
@@ -50,7 +50,7 @@ public:
* @param forceInsertionOfBasicNodes Force the insertion of the basic Nodes (HTML, BODY, HEAD, ...) if pressing OK
* without having made any changes.
*/
- htmlDocumentProperties( QWidget* parent = 0, bool forceInsertionOfBasicNodes = false,
+ htmlDocumentProperties( TQWidget* parent = 0, bool forceInsertionOfBasicNodes = false,
const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
~htmlDocumentProperties();
@@ -66,10 +66,10 @@ private slots:
virtual void editCSSRule();
virtual void deleteCurrentCSSRule();
- virtual void titleChanged(const QString &);
- virtual void metaChanged(QListViewItem * );
- virtual void CSSChanged(QListViewItem * );
- virtual void linkChanged( const QString& );
+ virtual void titleChanged(const TQString &);
+ virtual void metaChanged(TQListViewItem * );
+ virtual void CSSChanged(TQListViewItem * );
+ virtual void linkChanged( const TQString& );
private:
/**
@@ -83,7 +83,7 @@ private:
void loadMetaNode(Node *node);
void loadCSS(Node *node);
- QPtrList<NodeLinkedViewItem> CSSList, metaList;
+ TQPtrList<NodeLinkedViewItem> CSSList, metaList;
Node *titleNode, *htmlNode, *headNode, *linkNode, *bodyNode, *doctypeNode, *CSSNode, *xmlNode;
bool titleDirty, linkDirty, m_forceInsertionOfBasicNodes;
};
diff --git a/quanta/parts/kafka/htmlenhancer.cpp b/quanta/parts/kafka/htmlenhancer.cpp
index 257ad239..d900d77d 100644
--- a/quanta/parts/kafka/htmlenhancer.cpp
+++ b/quanta/parts/kafka/htmlenhancer.cpp
@@ -52,7 +52,7 @@ bool HTMLEnhancer::enhanceNode(Node *node, DOM::Node parentDNode, DOM::Node next
DOM::Node domNode, domNode2, attr, *ptDomNode;
bool tbody, goUp;
Node *n;
- QString script, filename, text, oldName;
+ TQString script, filename, text, oldName;
KURL url, baseURL;
int oldType;
@@ -236,7 +236,7 @@ bool HTMLEnhancer::enhanceNode(Node *node, DOM::Node parentDNode, DOM::Node next
if(node->rootNode() && node->rootNode()->nodeName().string().lower() == "input")
{
domNode = *(node->rootNode());
- QString text = node->tag->attributeValue("name");
+ TQString text = node->tag->attributeValue("name");
kafkaCommon::editDomNodeAttribute(domNode, "input", m_wkafkapart->defaultDTD(),
"title", text, m_wkafkapart->getKafkaWidget()->document());
}
diff --git a/quanta/parts/kafka/kafkacommon.cpp b/quanta/parts/kafka/kafkacommon.cpp
index fe147bc7..0220646d 100644
--- a/quanta/parts/kafka/kafkacommon.cpp
+++ b/quanta/parts/kafka/kafkacommon.cpp
@@ -15,7 +15,7 @@
* *
***************************************************************************/
-#include <qptrdict.h>
+#include <tqptrdict.h>
#include <kdebug.h>
#include <dom/dom_exception.h>
@@ -136,17 +136,17 @@ Node* kafkaCommon::getPrevNodeNE(Node *node, Node *endNode)
}
Node* kafkaCommon::DTDGetCommonParent(Node* startNode, Node* endNode,
- QValueList<int>& commonParentStartChildLocation,
- QValueList<int>& commonParentEndChildLocation, Node* nodeSubtree)
+ TQValueList<int>& commonParentStartChildLocation,
+ TQValueList<int>& commonParentEndChildLocation, Node* nodeSubtree)
{
// look for commonParent
Node* commonParent = 0;
Node* commonParentStartChild = 0, *commonParentEndChild = 0;
int locOffset = 1;
- QValueList<int> startNodeLocation = getLocation(startNode);
- QValueList<int> endNodeLocation = getLocation(endNode);
- QValueList<int>::iterator itStart = startNodeLocation.begin();
- QValueList<int>::iterator itEnd = endNodeLocation.begin();
+ TQValueList<int> startNodeLocation = getLocation(startNode);
+ TQValueList<int> endNodeLocation = getLocation(endNode);
+ TQValueList<int>::iterator itStart = startNodeLocation.begin();
+ TQValueList<int>::iterator itEnd = endNodeLocation.begin();
while(itStart != startNodeLocation.end() && itEnd != endNodeLocation.end() &&
(*itStart) == (*itEnd))
{
@@ -186,17 +186,17 @@ Node* kafkaCommon::DTDGetCommonParent(Node* startNode, Node* endNode,
}
Node* kafkaCommon::DTDGetNonInlineCommonParent(Node* startNode, Node* endNode,
- QValueList<int>& commonParentStartChildLocation,
- QValueList<int>& commonParentEndChildLocation, Node* nodeSubtree)
+ TQValueList<int>& commonParentStartChildLocation,
+ TQValueList<int>& commonParentEndChildLocation, Node* nodeSubtree)
{
// look for commonParent
Node* commonParent = 0;
Node* commonParentStartChild = 0, *commonParentEndChild = 0;
int locOffset = 1;
- QValueList<int> startNodeLocation = getLocation(startNode);
- QValueList<int> endNodeLocation = getLocation(endNode);
- QValueList<int>::iterator itStart = startNodeLocation.begin();
- QValueList<int>::iterator itEnd = endNodeLocation.begin();
+ TQValueList<int> startNodeLocation = getLocation(startNode);
+ TQValueList<int> endNodeLocation = getLocation(endNode);
+ TQValueList<int>::iterator itStart = startNodeLocation.begin();
+ TQValueList<int>::iterator itEnd = endNodeLocation.begin();
while(itStart != startNodeLocation.end() && itEnd != endNodeLocation.end() &&
(*itStart) == (*itEnd))
{
@@ -368,7 +368,7 @@ void kafkaCommon::applyIndentation(Node *node, int nbOfSpaces, int nbOfTabs, Nod
Node *parent, *nextNE, *prevNE, *realPrevNE, *realNextNE, *realPrev, *realNext, *prev, *next;
int nonInlineDepth = 0, nonInlineDepth2 = 0, i;
bool b = false;
- QString indentation1, indentation2, text;
+ TQString indentation1, indentation2, text;
if(!node)
return;
@@ -431,13 +431,13 @@ void kafkaCommon::applyIndentation(Node *node, int nbOfSpaces, int nbOfTabs, Nod
if(nbOfSpaces == 0) // tabs are used
{
- indentation1 += QString().fill('\t', nbOfTabs * nonInlineDepth);
- indentation2 += QString().fill('\t', nbOfTabs * nonInlineDepth2);
+ indentation1 += TQString().fill('\t', nbOfTabs * nonInlineDepth);
+ indentation2 += TQString().fill('\t', nbOfTabs * nonInlineDepth2);
}
else // spaces are used
{
- indentation1 += QString().fill(' ', nbOfSpaces * nonInlineDepth);
- indentation2 += QString().fill(' ', nbOfSpaces * nonInlineDepth2);
+ indentation1 += TQString().fill(' ', nbOfSpaces * nonInlineDepth);
+ indentation2 += TQString().fill(' ', nbOfSpaces * nonInlineDepth2);
}
//test and add indentations if necessary
@@ -759,7 +759,7 @@ void kafkaCommon::fitsNodesPosition(Node* startNode, int colMovement, int lineMo
int kafkaCommon::getNodeDisplay(Node *node, bool closingNodeToo)
{
- QString nodeName;
+ TQString nodeName;
if(!node)
return kafkaCommon::errorDisplay;
@@ -822,10 +822,10 @@ int kafkaCommon::getNodeDisplay(Node *node, bool closingNodeToo)
return kafkaCommon::errorDisplay;
}
-QString kafkaCommon::removeUnnecessaryWhitespaces(const QString &string,
+TQString kafkaCommon::removeUnnecessaryWhitespaces(const TQString &string,
bool removeAllSpacesAtTheLeft, bool removeAllSpacesAtTheRight)
{
- /**QString newString;
+ /**TQString newString;
int i;
if(string.length() == 0)
@@ -845,11 +845,11 @@ QString kafkaCommon::removeUnnecessaryWhitespaces(const QString &string,
newString = newString.mid(0, newString.length() - 1);
return newString;*/
- QString newString;
+ TQString newString;
bool hasLeftWhiteSpaces, hasRightWhiteSpaces;
if(string.length() == 0)
- return QString();
+ return TQString();
hasLeftWhiteSpaces = (string[0].isSpace());
hasRightWhiteSpaces = (string[string.length() - 1].isSpace());
@@ -863,7 +863,7 @@ QString kafkaCommon::removeUnnecessaryWhitespaces(const QString &string,
return newString;
}
-Node* kafkaCommon::createNode(const QString &nodeName, const QString &tagString, int nodeType, Document *doc)
+Node* kafkaCommon::createNode(const TQString &nodeName, const TQString &tagString, int nodeType, Document *doc)
{
Node *node;
@@ -922,10 +922,10 @@ Node *kafkaCommon::createDoctypeNode(Document *doc)
return node;
}
-Node *kafkaCommon::createXmlDeclarationNode(Document *doc, const QString &encoding)
+Node *kafkaCommon::createXmlDeclarationNode(Document *doc, const TQString &encoding)
{
Node *node, *child, *closingNode;
- QString text;
+ TQString text;
if(!doc)
return 0L;
@@ -951,7 +951,7 @@ Node* kafkaCommon::createMandatoryNodeSubtree(Node *node, Document *doc)
QTag *nodeQTag, *oldNodeQTag;
bool searchForMandatoryNode;
Node *currentParent;
- QMap<QString, bool>::iterator it;
+ TQMap<TQString, bool>::iterator it;
if(!node)
return 0L;
@@ -1353,8 +1353,8 @@ Node* kafkaCommon::DTDInsertNodeSubtree(Node *newNode, NodeSelectionInd& selecti
}
// look for commonParent
- QValueList<int> commonParentStartChildLocation;
- QValueList<int> commonParentEndChildLocation;
+ TQValueList<int> commonParentStartChildLocation;
+ TQValueList<int> commonParentEndChildLocation;
Node* commonParent = DTDGetNonInlineCommonParent(startNode, startNode,
commonParentStartChildLocation, commonParentEndChildLocation, 0);
@@ -1501,8 +1501,8 @@ bool kafkaCommon::DTDinsertNode(Node *newNode, Node *startNode, int startOffset,
kdDebug(25001)<< "kafkaCommon::DTDinsertNode()" << endl;
#endif
- QValueList<int> startNodeLocation, endNodeLocation;
- QValueList<int>::iterator itStart, itEnd;
+ TQValueList<int> startNodeLocation, endNodeLocation;
+ TQValueList<int>::iterator itStart, itEnd;
Node *commonParent = 0L, *commonParentStartChild, *commonParentEndChild, *parentNode, *node;
Node *lastValidStartParent = 0L, *lastValidEndParent = 0L, *newParentNode, *child, *next;
Node *oldCommonParent, *lastNewNode, *oldParentNode;
@@ -1797,7 +1797,7 @@ bool kafkaCommon::DTDinsertRemoveNode(Node *newNode, Node *startNode, int startO
//what should we do?
}
-Node *kafkaCommon::createAndInsertNode(const QString &nodeName, const QString &tagString,
+Node *kafkaCommon::createAndInsertNode(const TQString &nodeName, const TQString &tagString,
int nodeType, Document *doc, Node* parent, Node* nextSibling, NodeModifsSet *modifs,
bool merge)
{
@@ -1817,7 +1817,7 @@ Node *kafkaCommon::createAndInsertNode(const QString &nodeName, const QString &t
return node;
}
-Node *kafkaCommon::createAndInsertNode(const QString &nodeName, const QString &tagString,
+Node *kafkaCommon::createAndInsertNode(const TQString &nodeName, const TQString &tagString,
int nodeType, Document *doc, Node *parent, Node *nextSibling, Node *nextEndSibling,
NodeModifsSet *modifs)
{
@@ -1837,7 +1837,7 @@ Node *kafkaCommon::createAndInsertNode(const QString &nodeName, const QString &t
return node;
}
-Node *kafkaCommon::createAndInsertNode(const QString &nodeName, const QString &tagString,
+Node *kafkaCommon::createAndInsertNode(const TQString &nodeName, const TQString &tagString,
int nodeType, Document *doc, Node *parent, Node *startNodeToSurround,
Node *endNodeToSurround, int startOffset, int endOffset, NodeModifsSet *modifs)
{
@@ -1862,7 +1862,7 @@ Node *kafkaCommon::createAndInsertNode(const QString &nodeName, const QString &t
}
-bool kafkaCommon::DTDcreateAndInsertNode(const QString &nodeName, const QString &tagString,
+bool kafkaCommon::DTDcreateAndInsertNode(const TQString &nodeName, const TQString &tagString,
int nodeType, Document *doc, Node *startNode, int startOffset, Node *endNode, int endOffset,
Node **cursorNode, long &cursorOffset, NodeModifsSet *modifs)
{
@@ -2160,7 +2160,7 @@ Node* kafkaCommon::getLastChild(Node* node)
Node *kafkaCommon::duplicateNodeSubtree(Node *node, bool childAndClosingTagOnly)
{
- QPtrList<NodeLink> nodeLinkList;
+ TQPtrList<NodeLink> nodeLinkList;
bool goUp = false;
Node *currentNode, *currentNewNode, *newRootNode = 0, *newNext, *newParent, *newPrev;
NodeLink *link;
@@ -2221,9 +2221,9 @@ Node* kafkaCommon::extractNode(Node *node, NodeModifsSet *modifs, bool extractCh
//Node *prev;
bool isSingle;
int type;
- QString namespaceName, nodeName, caseSensitive;
- QString closingNamespaceName, closingNodeName, closingCaseSensitive;
- QValueList<int> location;
+ TQString namespaceName, nodeName, caseSensitive;
+ TQString closingNamespaceName, closingNodeName, closingCaseSensitive;
+ TQValueList<int> location;
if(!node)
return 0L;
@@ -2363,8 +2363,8 @@ Node* kafkaCommon::DTDExtractNodeSubtree(Node *startNode, int startOffset, Node
if(!startNode || !endNode)
return 0;
- QValueList<int> commonParentStartChildLocation;
- QValueList<int> commonParentEndChildLocation;
+ TQValueList<int> commonParentStartChildLocation;
+ TQValueList<int> commonParentEndChildLocation;
Node* commonParent = 0;
@@ -2423,8 +2423,8 @@ Node* kafkaCommon::DTDExtractNodeSubtree(Node *startNode, int startOffset, Node
if(!startNode || !endNode)
return 0;
- QValueList<int> commonParentStartChildLocation;
- QValueList<int> commonParentEndChildLocation;
+ TQValueList<int> commonParentStartChildLocation;
+ TQValueList<int> commonParentEndChildLocation;
Node* commonParent = 0;
if(extractInlineParentNodes)
@@ -2519,8 +2519,8 @@ Node* kafkaCommon::getNodeSubtree(Node *startNode, int startOffset, Node *endNod
if(!startNode || !endNode)
return 0;
- QValueList<int> commonParentStartChildLocation;
- QValueList<int> commonParentEndChildLocation;
+ TQValueList<int> commonParentStartChildLocation;
+ TQValueList<int> commonParentEndChildLocation;
Node* commonParent = 0;
if(extractInlineParentNodes)
@@ -2536,20 +2536,20 @@ Node* kafkaCommon::getNodeSubtree(Node *startNode, int startOffset, Node *endNod
Node* newCommonParent = duplicateNodeSubtree(commonParent, true);
- QValueList<int> const startNodeLocation = getLocation(startNode);
- QValueList<int> const commonParentLocation = getLocation(commonParent);
+ TQValueList<int> const startNodeLocation = getLocation(startNode);
+ TQValueList<int> const commonParentLocation = getLocation(commonParent);
uint const commonParentDepth = commonParentLocation.size();
uint const newStartNodeDepth = startNodeLocation.size() - commonParentDepth + 1;
uint const newEndNodeDepth = startNodeLocation.size() - commonParentDepth + 1;
- QValueList<int> newStartNodeLocation, newEndNodeLocation;
+ TQValueList<int> newStartNodeLocation, newEndNodeLocation;
newStartNodeLocation.push_back(1);
newEndNodeLocation.push_back(1);
for(uint i = 1; i != newStartNodeDepth; ++i)
newStartNodeLocation.push_back(startNodeLocation[i + commonParentDepth - 1]);
- QValueList<int> const endNodeLocation = getLocation(endNode);
+ TQValueList<int> const endNodeLocation = getLocation(endNode);
for(uint i = 1; i != newEndNodeDepth; ++i)
newEndNodeLocation.push_back(endNodeLocation[i + commonParentDepth - 1]);
@@ -2577,7 +2577,7 @@ void kafkaCommon::extractAndDeleteNode(Node *node, NodeModifsSet *modifs, bool d
{
NodeModif modif;
Node *curNode, *nodePrev, *nodeNext, *nodeNext2, *n, *n2;
- QString nodeName, closingNodeName, namespaceName, namespaceName2;
+ TQString nodeName, closingNodeName, namespaceName, namespaceName2;
bool isSingle, caseSensitive, caseSensitive2;
if(!node)
@@ -2639,7 +2639,7 @@ void kafkaCommon::extractAndDeleteNode(Node *node, NodeModifsSet *modifs, bool d
}
}
-int kafkaCommon::DTDExtractNode(const QString &nodeName, Document *doc, Node *startNode,
+int kafkaCommon::DTDExtractNode(const TQString &nodeName, Document *doc, Node *startNode,
int startOffset, Node *endNode, int endOffset, Node **cursorNode, long &cursorOffset,
NodeModifsSet *modifs)
{
@@ -2904,7 +2904,7 @@ bool kafkaCommon::splitNode(Node *n, int offset, NodeModifsSet *modifs)
{
NodeModif *modif;
Tag *tag;
- QString tagStr;
+ TQString tagStr;
Node *node;
if(!n || (n->tag->type != Tag::Text && n->tag->type != Tag::Empty) || offset <= 0 || offset >=
@@ -2939,7 +2939,7 @@ bool kafkaCommon::splitNode(Node *n, int offset, NodeModifsSet *modifs)
}
void kafkaCommon::splitStartNodeSubtree(Node* startNode, Node* commonParent,
- QValueList<int>& commonParentStartChildLocation, NodeModifsSet* modifs)
+ TQValueList<int>& commonParentStartChildLocation, NodeModifsSet* modifs)
{
//Then we "split" the lastValidStartParent - startNode subtree into two : the first part is untouched
// and the second will be surrounded by the new Node. Same thing for endNode.
@@ -2970,8 +2970,8 @@ void kafkaCommon::splitStartNodeSubtree(Node* startNode, Node* commonParent,
}
void kafkaCommon::splitEndNodeSubtree(Node* endNode, Node* commonParent,
- QValueList<int>& commonParentStartChildLocation,
- QValueList<int>& commonParentEndChildLocation,
+ TQValueList<int>& commonParentStartChildLocation,
+ TQValueList<int>& commonParentEndChildLocation,
bool subTree, NodeModifsSet* modifs)
{
Node* node = endNode;
@@ -3016,8 +3016,8 @@ void kafkaCommon::splitEndNodeSubtree(Node* endNode, Node* commonParent,
}
void kafkaCommon::splitStartAndEndNodeSubtree(Node*& startNode, int startOffset, Node*& endNode, int endOffset, Node*& commonParent,
- QValueList<int>& commonParentStartChildLocation,
- QValueList<int>& commonParentEndChildLocation,
+ TQValueList<int>& commonParentStartChildLocation,
+ TQValueList<int>& commonParentEndChildLocation,
NodeSelection& cursorHolder,
Node* subTree, NodeModifsSet* modifs, bool extractInlineParentNodes)
{
@@ -3109,8 +3109,8 @@ bool kafkaCommon::mergeNodes(Node *n, Node *n2, NodeModifsSet *modifs, bool merg
}
// have in consideration two spaces in a row
- QString nStr(n->tag->tagStr());
- QString n2Str(n2->tag->tagStr());
+ TQString nStr(n->tag->tagStr());
+ TQString n2Str(n2->tag->tagStr());
if(nStr[nStr.length() - 1] == ' ' && n2Str[0] == ' ')
{
nStr = nStr.left(nStr.length() - 1);
@@ -3165,8 +3165,8 @@ bool kafkaCommon::mergeNodes(Node *n, Node *n2, NodeSelection& cursorHolder, Nod
}
// have in consideration two spaces in a row
- QString nStr(n->tag->tagStr());
- QString n2Str(n2->tag->tagStr());
+ TQString nStr(n->tag->tagStr());
+ TQString n2Str(n2->tag->tagStr());
if(nStr[nStr.length() - 1] == ' ' && n2Str[0] == ' ')
{
nStr = nStr.left(nStr.length() - 1);
@@ -3293,7 +3293,7 @@ void kafkaCommon::mergeInlineNode(Node *startNode, Node *endNode, Node **cursorN
}
}
-void kafkaCommon::getEndPosition(const QString &tagString, int bLine, int bCol, int &eLine, int &eCol)
+void kafkaCommon::getEndPosition(const TQString &tagString, int bLine, int bCol, int &eLine, int &eCol)
{
/**int result, oldResult;
@@ -3342,7 +3342,7 @@ void kafkaCommon::getEndPosition(Node *node, int bLine, int bCol, int &eLine, in
getEndPosition(node->tag->tagStr(), bLine, bCol, eLine, eCol);
}
-void kafkaCommon::setTagString(Node *node, const QString &newTagString, NodeModifsSet* modifs)
+void kafkaCommon::setTagString(Node *node, const TQString &newTagString, NodeModifsSet* modifs)
{
int eLine, eCol, bLine, bCol;
Tag *tag;
@@ -3368,7 +3368,7 @@ void kafkaCommon::setTagString(Node *node, const QString &newTagString, NodeModi
node->tag->setTagPosition(bLine, bCol, eLine, eCol);
}
-void kafkaCommon::setTagStringAndFitsNodes(Node *node, const QString &newTagString, NodeModifsSet* modifs)
+void kafkaCommon::setTagStringAndFitsNodes(Node *node, const TQString &newTagString, NodeModifsSet* modifs)
{
int eLine, eCol, oldELine, oldECol;
bool b = false;
@@ -3383,7 +3383,7 @@ void kafkaCommon::setTagStringAndFitsNodes(Node *node, const QString &newTagStri
fitsNodesPosition(getNextNode(node, b), eCol - oldECol, eLine - oldELine);
}
-void kafkaCommon::editNodeAttribute(Node* node, const QString& name, const QString& value, NodeModifsSet* modifs)
+void kafkaCommon::editNodeAttribute(Node* node, const TQString& name, const TQString& value, NodeModifsSet* modifs)
{
NodeModif *modif = 0;
@@ -3406,9 +3406,9 @@ void kafkaCommon::editNodeAttribute(Node* node, const QString& name, const QStri
}
}
-QValueList<int> kafkaCommon::getLocation(Node * node)
+TQValueList<int> kafkaCommon::getLocation(Node * node)
{
- QValueList<int> loc;
+ TQValueList<int> loc;
int i = 0;
while(node)
@@ -3425,9 +3425,9 @@ QValueList<int> kafkaCommon::getLocation(Node * node)
return loc;
}
-QValueList<int> kafkaCommon::getLocation(DOM::Node domNode)
+TQValueList<int> kafkaCommon::getLocation(DOM::Node domNode)
{
- QValueList<int> loc;
+ TQValueList<int> loc;
int i = 0;
while(!domNode.isNull())
@@ -3444,9 +3444,9 @@ QValueList<int> kafkaCommon::getLocation(DOM::Node domNode)
return loc;
}
-Node* kafkaCommon::getNodeFromLocation(QValueList<int> loc)
+Node* kafkaCommon::getNodeFromLocation(TQValueList<int> loc)
{
- QValueList<int>::iterator it;
+ TQValueList<int>::iterator it;
Node *node = baseNode;
Node *m = 0L;
int i;
@@ -3469,9 +3469,9 @@ Node* kafkaCommon::getNodeFromLocation(QValueList<int> loc)
return m;
}
-Node* kafkaCommon::getNodeFromLocation(QValueList<int> loc, Node* nodeTree)
+Node* kafkaCommon::getNodeFromLocation(TQValueList<int> loc, Node* nodeTree)
{
- QValueList<int>::iterator it;
+ TQValueList<int>::iterator it;
Node *node = nodeTree;
if(!node)
node = baseNode;
@@ -3496,9 +3496,9 @@ Node* kafkaCommon::getNodeFromLocation(QValueList<int> loc, Node* nodeTree)
return m;
}
-DOM::Node kafkaCommon::getNodeFromLocation(QValueList<int> loc, DOM::Node rootNode)
+DOM::Node kafkaCommon::getNodeFromLocation(TQValueList<int> loc, DOM::Node rootNode)
{
- QValueList<int>::iterator it;
+ TQValueList<int>::iterator it;
DOM::Node node = rootNode;
DOM::Node m = rootNode;
int i;
@@ -3522,10 +3522,10 @@ DOM::Node kafkaCommon::getNodeFromLocation(QValueList<int> loc, DOM::Node rootNo
return m;
}
-Node* kafkaCommon::getNodeFromSubLocation(QValueList<int> loc, int locOffset)
+Node* kafkaCommon::getNodeFromSubLocation(TQValueList<int> loc, int locOffset)
{
- QValueList<int>::iterator it = loc.begin();
- QValueList<int> list;
+ TQValueList<int>::iterator it = loc.begin();
+ TQValueList<int> list;
int i;
for(i = 0; i < locOffset; ++i)
@@ -3537,10 +3537,10 @@ Node* kafkaCommon::getNodeFromSubLocation(QValueList<int> loc, int locOffset)
return getNodeFromLocation(list);
}
-Node* kafkaCommon::getNodeFromSubLocation(QValueList<int> loc, int locOffset, Node* nodeTree)
+Node* kafkaCommon::getNodeFromSubLocation(TQValueList<int> loc, int locOffset, Node* nodeTree)
{
- QValueList<int>::iterator it = loc.begin();
- QValueList<int> list;
+ TQValueList<int>::iterator it = loc.begin();
+ TQValueList<int> list;
int i;
for(i = 0; i != locOffset; ++i)
@@ -3552,9 +3552,9 @@ Node* kafkaCommon::getNodeFromSubLocation(QValueList<int> loc, int locOffset, No
return getNodeFromLocation(list, nodeTree);
}
-int kafkaCommon::compareNodePosition(QValueList<int> pos1, QValueList<int> pos2)
+int kafkaCommon::compareNodePosition(TQValueList<int> pos1, TQValueList<int> pos2)
{
- QValueList<int>::iterator it1, it2;
+ TQValueList<int>::iterator it1, it2;
it1 = pos1.begin();
it2 = pos2.begin();
@@ -3578,7 +3578,7 @@ int kafkaCommon::compareNodePosition(QValueList<int> pos1, QValueList<int> pos2)
int kafkaCommon::compareNodePosition(Node *n1, Node *n2)
{
- QValueList<int> pos1, pos2;
+ TQValueList<int> pos1, pos2;
if(!n1 || !n2)
return kafkaCommon::positionError;
@@ -3644,7 +3644,7 @@ int kafkaCommon::nodeDepth(Node *node)
return depth;
}
-Node* kafkaCommon::hasParent(Node *node, const QString &name)
+Node* kafkaCommon::hasParent(Node *node, const TQString &name)
{
node = node->parent;
while(node)
@@ -3657,15 +3657,15 @@ Node* kafkaCommon::hasParent(Node *node, const QString &name)
return 0L;
}
-Node* kafkaCommon::hasParent(Node* startNode, Node* endNode, const QString &name)
+Node* kafkaCommon::hasParent(Node* startNode, Node* endNode, const TQString &name)
{
Q_ASSERT(startNode && endNode);
//Andras: don't crash
if (!startNode || !endNode)
return 0;
- QValueList<int> commonParentStartChildLocation;
- QValueList<int> commonParentEndChildLocation;
+ TQValueList<int> commonParentStartChildLocation;
+ TQValueList<int> commonParentEndChildLocation;
Node* node = DTDGetCommonParent(startNode, endNode, commonParentStartChildLocation, commonParentEndChildLocation, 0);
@@ -3726,7 +3726,7 @@ bool kafkaCommon::removeDomNode(DOM::Node node)
return true;
}
-DOM::Node kafkaCommon::createDomNode(const QString &nodeName, const DTDStruct* dtd,
+DOM::Node kafkaCommon::createDomNode(const TQString &nodeName, const DTDStruct* dtd,
DOM::Document rootNode)
{
// FIXME
@@ -3757,13 +3757,13 @@ DOM::Node kafkaCommon::createDomNode(Node *node, DOM::Document rootNode)
return createDomNode(node->tag->name, node->tag->dtd(), rootNode);
}
-DOM::Node kafkaCommon::createTextDomNode(const QString &textString, DOM::Document rootNode)
+DOM::Node kafkaCommon::createTextDomNode(const TQString &textString, DOM::Document rootNode)
{
return rootNode.createTextNode(textString);
}
-DOM::Node kafkaCommon::createDomNodeAttribute(const QString &nodeName, const DTDStruct* dtd,
- const QString &attrName, const QString &attrValue, DOM::Document rootNode)
+DOM::Node kafkaCommon::createDomNodeAttribute(const TQString &nodeName, const DTDStruct* dtd,
+ const TQString &attrName, const TQString &attrValue, DOM::Document rootNode)
{
DOM::Node attr;
QTag *qTag = 0L;
@@ -3786,7 +3786,7 @@ DOM::Node kafkaCommon::createDomNodeAttribute(const QString &nodeName, const DTD
return attr;
}
-DOM::Node kafkaCommon::createDomNodeAttribute(Node* node, const QString &attrName,
+DOM::Node kafkaCommon::createDomNodeAttribute(Node* node, const TQString &attrName,
DOM::Document rootNode)
{
if(!node)
@@ -3795,7 +3795,7 @@ DOM::Node kafkaCommon::createDomNodeAttribute(Node* node, const QString &attrNam
return createDomNodeAttribute(node->tag->name, node->tag->dtd(), attrName, "", rootNode);
}
-//DOM::node kafkaCommon::createDomNodeAttribute(DOM::Node node, const QString &attrName,
+//DOM::node kafkaCommon::createDomNodeAttribute(DOM::Node node, const TQString &attrName,
// DOM::Document rootNode)
//{
/**if(node.isNull())
@@ -3815,8 +3815,8 @@ bool kafkaCommon::insertDomNodeAttribute(DOM::Node node, DOM::Node attr)
return true;
}
-bool kafkaCommon::editDomNodeAttribute(DOM::Node node, const QString &nodeName, const DTDStruct* dtd,
- const QString &attrName, const QString &attrValue, DOM::Document rootNode)
+bool kafkaCommon::editDomNodeAttribute(DOM::Node node, const TQString &nodeName, const DTDStruct* dtd,
+ const TQString &attrName, const TQString &attrValue, DOM::Document rootNode)
{
DOM::Node attr;
@@ -3837,7 +3837,7 @@ bool kafkaCommon::editDomNodeAttribute(DOM::Node node, const QString &nodeName,
}
bool kafkaCommon::editDomNodeAttribute(DOM::Node domNode, Node* node,
- const QString &attrName, const QString &attrValue, DOM::Document rootNode)
+ const TQString &attrName, const TQString &attrValue, DOM::Document rootNode)
{
if(!node)
return false;
@@ -3846,7 +3846,7 @@ bool kafkaCommon::editDomNodeAttribute(DOM::Node domNode, Node* node,
attrName, attrValue, rootNode);
}
-DOM::Node kafkaCommon::hasParent(DOM::Node domNode, const QString &name)
+DOM::Node kafkaCommon::hasParent(DOM::Node domNode, const TQString &name)
{
while(!domNode.isNull())
{
@@ -3935,9 +3935,9 @@ bool kafkaCommon::parentSupports(DOM::Node parent, DOM::Node startNode, DOM::Nod
return true;
}
-bool kafkaCommon::isInline(const QString &nodeNam)
+bool kafkaCommon::isInline(const TQString &nodeNam)
{
- QString nodeName = nodeNam.lower();
+ TQString nodeName = nodeNam.lower();
if(nodeName == "q" || nodeName == "u" || nodeName == "i" || nodeName == "b" ||
nodeName == "cite" || nodeName == "em" || nodeName == "var" || nodeName == "em" ||
nodeName == "tt" || nodeName == "code" || nodeName == "kbd" || nodeName == "samp" ||
@@ -3961,7 +3961,7 @@ void kafkaCommon::coutDomTree(DOM::Node, int)
#endif
{
#ifdef HEAVY_DEBUG
- QString output, dots;
+ TQString output, dots;
int j;
DOM::Node node;
if(rootNode.isNull())
@@ -4002,7 +4002,7 @@ void kafkaCommon::coutDomTree(DOM::Node, int)
void kafkaCommon::coutTree(Node *node, int indent)
{
- QString output, dots;
+ TQString output, dots;
int bLine, bCol, eLine, eCol, j;
if(!node)
kdDebug(25001)<< "kafkaCommon::coutTree() - bad node!" << endl;
@@ -4056,7 +4056,7 @@ void kafkaCommon::coutTree(Node *node, int indent)
}
}
-int kafkaCommon::isInsideTag(Node* start_node, Node* end_node, QString const& tag_name)
+int kafkaCommon::isInsideTag(Node* start_node, Node* end_node, TQString const& tag_name)
{
Q_ASSERT(start_node && end_node);
//Andras: don't crash
@@ -4078,8 +4078,8 @@ int kafkaCommon::isInsideTag(Node* start_node, Node* end_node, QString const& ta
return -1; // neither the nodes have tag_name as parent
}
-int kafkaCommon::isInsideTag(Node* start_node, Node* end_node, QString const& tag_name,
- QString const& attribute_name, QString const& attribute_value)
+int kafkaCommon::isInsideTag(Node* start_node, Node* end_node, TQString const& tag_name,
+ TQString const& attribute_name, TQString const& attribute_value)
{
Q_ASSERT(start_node && end_node);
//Andras: don't crash
@@ -4109,7 +4109,7 @@ bool kafkaCommon::isBetweenWords(Node* node, int offset)
if (!node)
return false; //FIXME: Andras: don't crash
- QString tag_str = node->tag->tagStr();
+ TQString tag_str = node->tag->tagStr();
return !
(tag_str[offset].isSpace() || tag_str[offset].isPunct() ||
@@ -4129,7 +4129,7 @@ void kafkaCommon::getStartOfWord(Node*& node, int& offset)
kdDebug(23100) << "getStartOfWord node length: " << node->tag->tagStr().length() << endl;
kdDebug(23100) << "getStartOfWord offset BEGIN: " << offset << endl;
- QString tag_str = node->tag->tagStr();
+ TQString tag_str = node->tag->tagStr();
while(offset >= 0 && !tag_str[offset].isSpace() && !tag_str[offset].isPunct())
--offset;
@@ -4173,7 +4173,7 @@ void kafkaCommon::getEndOfWord(Node*& node, int& offset)
return;
- QString tag_str = node->tag->tagStr();
+ TQString tag_str = node->tag->tagStr();
while((uint)offset != tag_str.length() && !tag_str[offset].isSpace() && !tag_str[offset].isPunct())
++offset;
diff --git a/quanta/parts/kafka/kafkacommon.h b/quanta/parts/kafka/kafkacommon.h
index d71783aa..7de7d77e 100644
--- a/quanta/parts/kafka/kafkacommon.h
+++ b/quanta/parts/kafka/kafkacommon.h
@@ -18,7 +18,7 @@
#ifndef KAFKACOMMON_H
#define KAFKACOMMON_H
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
#include <dom/dom_node.h>
namespace DOM
@@ -96,15 +96,15 @@ public:
* @return The first, non inline, common parent of startNode and endNode.
*/
static Node* DTDGetNonInlineCommonParent(Node* startNode, Node* endNode,
- QValueList<int>& commonParentStartChildLocation,
- QValueList<int>& commonParentEndChildLocation, Node* nodeSubtree);
+ TQValueList<int>& commonParentStartChildLocation,
+ TQValueList<int>& commonParentEndChildLocation, Node* nodeSubtree);
/**
* Same as above, only that the common parent can be inline.
*/
static Node* DTDGetCommonParent(Node* startNode, Node* endNode,
- QValueList<int>& commonParentStartChildLocation,
- QValueList<int>& commonParentEndChildLocation, Node* nodeSubtree);
+ TQValueList<int>& commonParentStartChildLocation,
+ TQValueList<int>& commonParentEndChildLocation, Node* nodeSubtree);
/**
* This function returns the next DOM::Node after node : the first child of
@@ -184,7 +184,7 @@ public:
/**
* Create/Delete the necessary Empty Nodes between n1 and n2 so that a nice indentation can be
* generated by the undoRedo system. The undoRedo system can't create itself these Nodes
- * because it will create them only during the synchronization, making all the QValueList<int>
+ * because it will create them only during the synchronization, making all the TQValueList<int>
* Nodes location wrong.
* WARNING n1 and n2 must be siblings or parent-child. If there are sibling and n1 is a XmlTag,
* n1 should not have non empty childs.
@@ -237,7 +237,7 @@ public:
* unlike the above example.
* @return Returns the modified string.
*/
- static QString removeUnnecessaryWhitespaces(const QString &string,
+ static TQString removeUnnecessaryWhitespaces(const TQString &string,
bool removeAllSpacesAtTheLeft = false, bool removeAllSpacesAtTheRight = false);
@@ -251,7 +251,7 @@ public:
* @param doc The document the Node will belong to.
* @return Returns the newly created node.
*/
- static Node* createNode(const QString &nodeName, const QString &tagString, int nodeType,
+ static Node* createNode(const TQString &nodeName, const TQString &tagString, int nodeType,
Document *doc);
/**
@@ -273,7 +273,7 @@ public:
* @param doc It needs the document where the xml node will be inserted.
* @param encoding The encoding to use (usually get it with quantaApp->defaultEncoding())
*/
- static Node *createXmlDeclarationNode(Document *doc, const QString &encoding);
+ static Node *createXmlDeclarationNode(Document *doc, const TQString &encoding);
/**
* Create a node subtree which contains the mandatory Nodes in order to be DTD compliant.
@@ -429,7 +429,7 @@ public:
* @param nextSibling The next sibling of the Node.
* @return Returns a pointer to the newly created Node.
*/
- static Node *createAndInsertNode(const QString &nodeName, const QString &tagString, int nodeType,
+ static Node *createAndInsertNode(const TQString &nodeName, const TQString &tagString, int nodeType,
Document *doc, Node* parent, Node* nextSibling, NodeModifsSet *modifs, bool merge = true);
/**
@@ -442,7 +442,7 @@ public:
* All the Nodes between the new Node and its closing Tag will be moved as childs of the new Node.
* @param modifs The changes made are logged into modifs.
*/
- static Node *createAndInsertNode(const QString &nodeName, const QString &tagString, int nodeType,
+ static Node *createAndInsertNode(const TQString &nodeName, const TQString &tagString, int nodeType,
Document *doc, Node *parent, Node *nextSibling, Node *nextEndSibling, NodeModifsSet *modifs);
/**
@@ -455,7 +455,7 @@ public:
* @param startOffset The first Node will be splitted at offset startOffset, the right part will be enclosed.
* @param endOffset The last Node will be splitted at offset endOffset, the left part will be enclosed.
*/
- static Node *createAndInsertNode(const QString &nodeName, const QString &tagString,
+ static Node *createAndInsertNode(const TQString &nodeName, const TQString &tagString,
int nodeType, Document *doc, Node *parent, Node *startNodeToSurround,
Node *endNodeToSurround, int startOffset, int endOffset, NodeModifsSet *modifs);
@@ -472,7 +472,7 @@ public:
* @param endOffset If endNode is a text, specify at which offset the new Node must stop to surround.
* @return Returns false if it wasn't possible to insert the tag because e.g. of an invalid parent.
*/
- static bool DTDcreateAndInsertNode(const QString &nodeName, const QString &tagString, int nodeType,
+ static bool DTDcreateAndInsertNode(const TQString &nodeName, const TQString &tagString, int nodeType,
Document *doc, Node *startNode, int startOffset, Node *endNode, int endOffset,
Node **cursorNode, long &cursorOffset, NodeModifsSet *modifs);
@@ -621,7 +621,7 @@ public:
* @param modifs The usual modifs to log the modifications made for the undo/redo system.
* @return Returns a kafkaCommon::extractNodeStatus.
*/
- static int DTDExtractNode(const QString &nodeName, Document *doc, Node *startNode,
+ static int DTDExtractNode(const TQString &nodeName, Document *doc, Node *startNode,
int startOffset, Node *endNode, int endOffset, Node **cursorNode, long &cursorOffset,
NodeModifsSet *modifs);
@@ -705,8 +705,8 @@ public:
* @param modifs The changes made are logged into modifs.
*/
static void splitStartAndEndNodeSubtree(Node*& startNode, int startOffset, Node*& endNode, int endOffset, Node*& commonParent,
- QValueList<int>& commonParentStartChildLocation,
- QValueList<int>& commonParentEndChildLocation,
+ TQValueList<int>& commonParentStartChildLocation,
+ TQValueList<int>& commonParentEndChildLocation,
NodeSelection& cursorHolder,
Node* subTree, NodeModifsSet* modifs, bool extractInlineParentNodes = true);
@@ -746,7 +746,7 @@ public:
* @param eLine Returns the line of the last letter of tagString.
* @param eCol Returns the col of the last letter of tagString.
*/
- static void getEndPosition(const QString & tagString, int bLine, int bCol, int &eLine, int &eCol);
+ static void getEndPosition(const TQString & tagString, int bLine, int bCol, int &eLine, int &eCol);
/**
* It behaves essentially like the above function except that the string is the Tag String of Node.
@@ -760,18 +760,18 @@ public:
* @param newTagString The new tag String :-)
* @param modifs The changes made are logged into modifs.
*/
- static void setTagString(Node *node, const QString &newTagString, NodeModifsSet* modifs);
+ static void setTagString(Node *node, const TQString &newTagString, NodeModifsSet* modifs);
/**
* This function behaves essentially like the above function except that all the others Nodes' position
* are updated too.
*/
- static void setTagStringAndFitsNodes(Node *node, const QString &newTagString, NodeModifsSet* modifs);
+ static void setTagStringAndFitsNodes(Node *node, const TQString &newTagString, NodeModifsSet* modifs);
/**
* This function behaves exactly like Node::editAttribute except that the change is logged inside a NodeModifsSet.
*/
- static void editNodeAttribute(Node* node, const QString& name, const QString& value, NodeModifsSet* modifs);
+ static void editNodeAttribute(Node* node, const TQString& name, const TQString& value, NodeModifsSet* modifs);
/**
* Gets the location of a Node in a pointer-independant suit of ints e.g. 1,3,5 means
@@ -780,31 +780,31 @@ public:
* @param node The Node we want the location.
* @return Returns the location.
*/
- static QValueList<int> getLocation(Node* node);
+ static TQValueList<int> getLocation(Node* node);
/**
* It behaves essentially like the above function except that it operate on DOM::Nodes.
*/
- static QValueList<int> getLocation(DOM::Node domNode);
+ static TQValueList<int> getLocation(DOM::Node domNode);
/**
* Get the node corresponding to a location. See the above function.
* @param loc We want the Node from this location.
* @return Returns the Node at location loc.
*/
- static Node* getNodeFromLocation(QValueList<int> loc);
+ static Node* getNodeFromLocation(TQValueList<int> loc);
/**
* Similar to the above function but instead of using baseNode it uses the passes Node tree.
* @param nodeTree Node tree where to get the location.
*/
- static Node* getNodeFromLocation(QValueList<int> loc, Node* nodeTree);
+ static Node* getNodeFromLocation(TQValueList<int> loc, Node* nodeTree);
/**
* It behaves essentially like the above function except that it operate on DOM::Nodes.
* @rootNode It needs the root Node of the DOM::Node Tree i.e. the document() Node.
*/
- static DOM::Node getNodeFromLocation(QValueList<int> loc, DOM::Node rootNode);
+ static DOM::Node getNodeFromLocation(TQValueList<int> loc, DOM::Node rootNode);
/**
* Get the node corresponding to a sublocation.
@@ -812,9 +812,9 @@ public:
* @locOffset We want the (totalNumberOfParent - locOffset)th parent of Node.
* @return Returns a parent of the node pointed by loc.
*/
- static Node* getNodeFromSubLocation(QValueList<int> loc, int locOffset);
+ static Node* getNodeFromSubLocation(TQValueList<int> loc, int locOffset);
- static Node* getNodeFromSubLocation(QValueList<int> loc, int locOffset, Node* nodeTree);
+ static Node* getNodeFromSubLocation(TQValueList<int> loc, int locOffset, Node* nodeTree);
/**
* A enumeration for kafkaCommon::compareNodePosition().
@@ -839,7 +839,7 @@ public:
* @param pos2 The location of the Node to be compared to.
* @return Return a kafkaCommon::position flag.
*/
- static int compareNodePosition(QValueList<int> pos1, QValueList<int> pos2);
+ static int compareNodePosition(TQValueList<int> pos1, TQValueList<int> pos2);
/**
* It behave essentially like the above function except that it is based on Nodes.
@@ -864,12 +864,12 @@ public:
* Looks if node has a parent which is named name.
* @return Returns the first parent which is named name or 0L if not found.
*/
- static Node* hasParent(Node *node, const QString &name);
+ static Node* hasParent(Node *node, const TQString &name);
/**
* Tries to find the common parent to startNode and endNode, in the same conditions as above.
*/
- static Node* hasParent(Node* startNode, Node* endNode, const QString &name);
+ static Node* hasParent(Node* startNode, Node* endNode, const TQString &name);
/** ----------------- DOM::NODE TREE MODIFICATIONS --------------------*/
@@ -907,7 +907,7 @@ public:
* @param rootNode The rootNode is needed in order to create a new DOM::Node.
* @return Returns the DOM::Node created or a null DOM::Node if nodeName is invalid.
*/
- static DOM::Node createDomNode(const QString &nodeName, const DTDStruct* dtd, DOM::Document rootNode);
+ static DOM::Node createDomNode(const TQString &nodeName, const DTDStruct* dtd, DOM::Document rootNode);
/**
* It behaves essentially like the above function.
@@ -921,7 +921,7 @@ public:
* @param rootNode The rootNode is needed in order to create a new Text DOM::Node.
* @return a new text DOM::Node.
*/
- static DOM::Node createTextDomNode(const QString &textString, DOM::Document rootNode);
+ static DOM::Node createTextDomNode(const TQString &textString, DOM::Document rootNode);
/**
* Create a new attribute and check if the attrName can have this attribute.
@@ -932,21 +932,21 @@ public:
* @param rootNode The rootNode is needed in order to create a new Attribute.
* @return Returns the new Attribute or a null DOM::Node if attrName is invalid.
*/
- static DOM::Node createDomNodeAttribute(const QString &nodeName, const DTDStruct* dtd,
- const QString &attrName, const QString &attrValue, DOM::Document rootNode);
+ static DOM::Node createDomNodeAttribute(const TQString &nodeName, const DTDStruct* dtd,
+ const TQString &attrName, const TQString &attrValue, DOM::Document rootNode);
/**
* It behaves essentially like the above function.
* @param node The corresponding DOM::Node of node will get the attribute. It don't add the attribute.
*/
- static DOM::Node createDomNodeAttribute(Node* node, const QString &attrName, DOM::Document rootNode);
+ static DOM::Node createDomNodeAttribute(Node* node, const TQString &attrName, DOM::Document rootNode);
/**
* It behaves essentially like the above function except that it use the DOM::Node->Node* link to get the
* corresponding Node. So be sure that the link is set.
* @param node The node which will get the attribute. It don't add the attribute.
*/
- //static DOM::node createDomNodeAttribute(DOM::Node node, const QString &attrName,
+ //static DOM::node createDomNodeAttribute(DOM::Node node, const TQString &attrName,
// DOM::Document rootNode);
/**
@@ -967,21 +967,21 @@ public:
* @param rootNode The rootNode is needed in order to create a new Attribute.
* @return Returns if the operation was successfull.
*/
- static bool editDomNodeAttribute(DOM::Node node, const QString &nodeName, const DTDStruct* dtd,
- const QString &attrName, const QString &attrValue, DOM::Document rootNode);
+ static bool editDomNodeAttribute(DOM::Node node, const TQString &nodeName, const DTDStruct* dtd,
+ const TQString &attrName, const TQString &attrValue, DOM::Document rootNode);
/**
* It behaves essentially like the above function.
* @param node The DOM::Node comes from this node.
*/
static bool editDomNodeAttribute(DOM::Node domNode, Node* node,
- const QString &attrName, const QString &attrValue, DOM::Document rootNode);
+ const TQString &attrName, const TQString &attrValue, DOM::Document rootNode);
/**
* Looks if domNode has a parent which is named name.
* @return Returns the first parent which is named name or an empty DOM::Node if not found.
*/
- static DOM::Node hasParent(DOM::Node domNode, const QString &name);
+ static DOM::Node hasParent(DOM::Node domNode, const TQString &name);
/**
* Returns the position of the child domNode.
@@ -1018,7 +1018,7 @@ public:
* TEMPORARY, HTML specific
* @return Returns true if it is a inline Node. Official DTD List, unlike getNodeDisplay().
*/
- static bool isInline(const QString &nodename);
+ static bool isInline(const TQString &nodename);
/**
* Prints in stdout the current DOM::Node tree.
@@ -1043,10 +1043,10 @@ public:
* 1 is inside tag_name
* 0 mixed
*/
- static int isInsideTag(Node* start_node, Node* end_node, QString const& tag_name);
+ static int isInsideTag(Node* start_node, Node* end_node, TQString const& tag_name);
- static int isInsideTag(Node* start_node, Node* end_node, QString const& tag_name,
- QString const& attribute_name, QString const& attribute_value);
+ static int isInsideTag(Node* start_node, Node* end_node, TQString const& tag_name,
+ TQString const& attribute_name, TQString const& attribute_value);
/**
* Return whether the offset is placed between two words in a text node.
@@ -1125,7 +1125,7 @@ private:
* @param modifs The changes made are logged into modifs.
*/
static void splitStartNodeSubtree(Node* startNode, Node* commonParent,
- QValueList<int>& commonParentStartChildLocation, NodeModifsSet* modifs);
+ TQValueList<int>& commonParentStartChildLocation, NodeModifsSet* modifs);
/**
* Split the last valid start parent (commonParentStartChild) into two.
* The following tree:
@@ -1169,8 +1169,8 @@ private:
* @param modifs The changes made are logged into modifs.
*/
static void splitEndNodeSubtree(Node* endNode, Node* commonParent,
- QValueList<int>& commonParentStartChildLocation,
- QValueList<int>& commonParentEndChildLocation,
+ TQValueList<int>& commonParentStartChildLocation,
+ TQValueList<int>& commonParentEndChildLocation,
bool subTree, NodeModifsSet* modifs);
};
diff --git a/quanta/parts/kafka/kafkadragobject.cpp b/quanta/parts/kafka/kafkadragobject.cpp
index 652ea6f2..7d546036 100644
--- a/quanta/parts/kafka/kafkadragobject.cpp
+++ b/quanta/parts/kafka/kafkadragobject.cpp
@@ -17,8 +17,8 @@
#include <kdebug.h>
-#include <qdom.h>
-#include <qtextstream.h>
+#include <tqdom.h>
+#include <tqtextstream.h>
#include "kafkadragobject.h"
#include "node.h"
@@ -26,24 +26,24 @@
char const* KafkaDragObject::m_mimetype = "application/kafka-nodeselection";
-KafkaDragObject::KafkaDragObject(Node const* item, QWidget* dragSource, const char* name)
- : QStoredDrag(m_mimetype, dragSource, name), m_item(item)
+KafkaDragObject::KafkaDragObject(Node const* item, TQWidget* dragSource, const char* name)
+ : TQStoredDrag(m_mimetype, dragSource, name), m_item(item)
{
- QDomDocument doc("KafkaSelection");
- QString docstart = "<KafkaSelection/>";
+ TQDomDocument doc("KafkaSelection");
+ TQString docstart = "<KafkaSelection/>";
doc.setContent(docstart);
- QDomElement itemsElement = doc.createElement("Items");
+ TQDomElement itemsElement = doc.createElement("Items");
doc.documentElement().appendChild(itemsElement);
//kdDebug(25001) << doc.toString() << endl;
item->save(itemsElement);
- //QDataStream s(m_array, IO_WriteOnly);
- QTextStream s(m_array, IO_WriteOnly);
+ //TQDataStream s(m_array, IO_WriteOnly);
+ TQTextStream s(m_array, IO_WriteOnly);
s << doc.toString();
//s << "biltre";
/*
kdDebug(25001) << m_array.size() << endl;
kdDebug(25001) << doc.toString() << endl;
- kdDebug(25001) << QString(m_array) << endl;
+ kdDebug(25001) << TQString(m_array) << endl;
*/
//setEncodedData(m_array);
}
@@ -51,12 +51,12 @@ KafkaDragObject::KafkaDragObject(Node const* item, QWidget* dragSource, const ch
KafkaDragObject::~KafkaDragObject()
{}
-QByteArray KafkaDragObject::encodedData(const char* mimetype) const
+TQByteArray KafkaDragObject::encodedData(const char* mimetype) const
{
if(m_mimetype == mimetype)
return m_array;
- return QByteArray();
+ return TQByteArray();
}
Node const* KafkaDragObject::getItem() const
@@ -64,19 +64,19 @@ Node const* KafkaDragObject::getItem() const
return m_item;
}
-bool KafkaDragObject::canDecode(QMimeSource *e)
+bool KafkaDragObject::canDecode(TQMimeSource *e)
{
return e->provides(m_mimetype);
}
-bool KafkaDragObject::decode(QMimeSource* e, Node* node)
+bool KafkaDragObject::decode(TQMimeSource* e, Node* node)
{
if(!node || !e->provides(m_mimetype))
return false;
- QByteArray data = e->encodedData(m_mimetype);
- //kdDebug(25001) << QString(data) << endl;
- QDomDocument doc;
+ TQByteArray data = e->encodedData(m_mimetype);
+ //kdDebug(25001) << TQString(data) << endl;
+ TQDomDocument doc;
doc.setContent(data, false);
//kdDebug(25001) << doc.toString() << endl;
node->load(doc.documentElement().firstChild().toElement());
diff --git a/quanta/parts/kafka/kafkadragobject.h b/quanta/parts/kafka/kafkadragobject.h
index 3325812c..8b6c2e6e 100644
--- a/quanta/parts/kafka/kafkadragobject.h
+++ b/quanta/parts/kafka/kafkadragobject.h
@@ -18,8 +18,8 @@
#ifndef KAFKADRAGOBJECT_H
#define KAFKADRAGOBJECT_H
-#include <qcstring.h>
-#include <qdragobject.h>
+#include <tqcstring.h>
+#include <tqdragobject.h>
class Node;
@@ -31,17 +31,17 @@ class KafkaDragObject: public QStoredDrag
Q_OBJECT
public:
- KafkaDragObject(Node const* item, QWidget* dragSource = 0, const char* name = 0);
+ KafkaDragObject(Node const* item, TQWidget* dragSource = 0, const char* name = 0);
~KafkaDragObject();
- QByteArray encodedData(const char* c) const;
+ TQByteArray encodedData(const char* c) const;
Node const* getItem() const;
- static bool canDecode(QMimeSource*);
- static bool decode(QMimeSource*, Node* node);
+ static bool canDecode(TQMimeSource*);
+ static bool decode(TQMimeSource*, Node* node);
private:
- QByteArray m_array;
+ TQByteArray m_array;
Node const* m_item;
static char const* m_mimetype;
diff --git a/quanta/parts/kafka/kafkahtmlpart.cpp b/quanta/parts/kafka/kafkahtmlpart.cpp
index 493a9a3f..bcbc7611 100644
--- a/quanta/parts/kafka/kafkahtmlpart.cpp
+++ b/quanta/parts/kafka/kafkahtmlpart.cpp
@@ -16,15 +16,15 @@
* *
***************************************************************************/
-#include <qfile.h>
-#include <qpainter.h>
-#include <qtextstream.h>
-#include <qstringlist.h>
-#include <qlayout.h>
-#include <qmainwindow.h>
-#include <qtimer.h>
-#include <qtooltip.h>
-#include <qpopupmenu.h>
+#include <tqfile.h>
+#include <tqpainter.h>
+#include <tqtextstream.h>
+#include <tqstringlist.h>
+#include <tqlayout.h>
+#include <tqmainwindow.h>
+#include <tqtimer.h>
+#include <tqtooltip.h>
+#include <tqpopupmenu.h>
#include <kdebug.h>
#include <klocale.h>
@@ -44,7 +44,7 @@
#include "kafkacommon.h"
#ifdef HEAVY_DEBUG
#include "domtreeview.h"
-#include <qdialog.h>
+#include <tqdialog.h>
#endif
#include "wkafkapart.h"
#include "undoredo.h"
@@ -83,12 +83,12 @@ public:
#endif
};
-KafkaWidget::KafkaWidget(QWidget *parent, QWidget *widgetParent, KafkaDocument *part,
+KafkaWidget::KafkaWidget(TQWidget *parent, TQWidget *widgetParent, KafkaDocument *part,
const char *name)
: KHTMLPart(widgetParent, name, parent, name),
w(part)
{
- m_contextPopupMenu = new QPopupMenu();
+ m_contextPopupMenu = new TQPopupMenu();
d = new KafkaWidgetPrivate();
@@ -102,12 +102,12 @@ KafkaWidget::KafkaWidget(QWidget *parent, QWidget *widgetParent, KafkaDocument *
// With the mix of Leo Savernik's caret Mode and the current editing
// functions, it will be kind of VERY messy
setCaretMode(true);
- connect(this, SIGNAL(caretPositionChanged(const DOM::Node &, long)),
- this, SLOT(slotNewCursorPos(const DOM::Node &, long)));
+ connect(this, TQT_SIGNAL(caretPositionChanged(const DOM::Node &, long)),
+ this, TQT_SLOT(slotNewCursorPos(const DOM::Node &, long)));
setCaretDisplayPolicyNonFocused(KHTMLPart::CaretVisible);
- connect(this, SIGNAL(popupMenu(const QString&, const QPoint&)),
- this, SLOT(slotContextMenuRequested(const QString&, const QPoint&)));
+ connect(this, TQT_SIGNAL(popupMenu(const TQString&, const TQPoint&)),
+ this, TQT_SLOT(slotContextMenuRequested(const TQString&, const TQPoint&)));
view()->setMouseTracking(true);
view()->installEventFilter(this);
@@ -130,7 +130,7 @@ void KafkaWidget::newDocument()
{
//FIXME: Somehow we should get it from Quanta settings: qConfig.attrValueQuotation
//-->No need for that: Quotations aren't stored in the DOM::Nodes
- QString newPageHTMLCode = "<html>\n"
+ TQString newPageHTMLCode = "<html>\n"
"<head>\n"
"</head>\n"
"<body>\n"
@@ -143,7 +143,7 @@ void KafkaWidget::newDocument()
}
-void KafkaWidget::insertText(DOM::Node node, const QString &text, int position)
+void KafkaWidget::insertText(DOM::Node node, const TQString &text, int position)
{
#ifdef LIGHT_DEBUG
kdDebug(25001)<< "KafkaWidget::insertText text " << text << " pos " << position << endl;
@@ -184,7 +184,7 @@ void KafkaWidget::insertText(DOM::Node node, const QString &text, int position)
kdDebug(25001) << "KafkaWidget::insertText() - added text - 1" << endl;
#endif
- QTimer::singleShot(0, this, SLOT(slotDelayedSetCaretPosition()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotDelayedSetCaretPosition()));
return;
}
}
@@ -261,7 +261,7 @@ void KafkaWidget::insertText(DOM::Node node, const QString &text, int position)
}
//document().updateRendering();
- QTimer::singleShot(0, this, SLOT(slotDelayedSetCaretPosition()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotDelayedSetCaretPosition()));
}
void KafkaWidget::slotDelayedSetCaretPosition()
@@ -270,7 +270,7 @@ void KafkaWidget::slotDelayedSetCaretPosition()
emit domNodeNewCursorPos(m_currentNode, d->m_cursorOffset);
}
-void KafkaWidget::insertText(const QString &text, int position)
+void KafkaWidget::insertText(const TQString &text, int position)
{
insertText(m_currentNode, text, (position == -1 ? d->m_cursorOffset : position));
}
@@ -465,7 +465,7 @@ void KafkaWidget::keyReturn(bool specialPressed)
kdDebug(25001)<< "CURNODE : " << m_currentNode.nodeName().string() << ":"
<< m_currentNode.nodeValue().string() << " : " << d->m_cursorOffset << endl;
- QTimer::singleShot(0, this, SLOT(slotDelayedSetCaretPosition()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotDelayedSetCaretPosition()));
kdDebug(25001)<< "CURNODE : " << m_currentNode.nodeName().string() << ":"
<< m_currentNode.nodeValue().string() << " : " << d->m_cursorOffset << endl;
//emit domNodeNewCursorPos(m_currentNode, d->m_cursorOffset);
@@ -476,17 +476,17 @@ void KafkaWidget::keyReturn(bool specialPressed)
<< m_currentNode.nodeValue().string() << " : " << d->m_cursorOffset << endl;
#endif
- QTimer::singleShot(0, this, SLOT(slotDelayedSetCaretPosition()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotDelayedSetCaretPosition()));
}
-bool KafkaWidget::eventFilter(QObject *, QEvent *event)
+bool KafkaWidget::eventFilter(TQObject *, TQEvent *event)
{
bool forgetEvent = false;
//tmp
//DOM::Node attr, tmpNode;
//end tmp
- if(event->type() == QEvent::FocusIn)
+ if(event->type() == TQEvent::FocusIn)
{
#ifdef LIGHT_DEBUG
kdDebug(25001) << "KafkaWidget::eventFilter() FocusIn" << endl;
@@ -495,7 +495,7 @@ bool KafkaWidget::eventFilter(QObject *, QEvent *event)
emit hasFocus(true);
}
- if(event->type() == QEvent::FocusOut)
+ if(event->type() == TQEvent::FocusOut)
{
#ifdef LIGHT_DEBUG
kdDebug(25001) << "KafkaWidget::eventFilter() FocusOut" << endl;
@@ -504,9 +504,9 @@ bool KafkaWidget::eventFilter(QObject *, QEvent *event)
emit hasFocus(false);
}
- if(event->type() == QEvent::KeyPress)
+ if(event->type() == TQEvent::KeyPress)
{
- QKeyEvent *keyevent = static_cast<QKeyEvent *>(event);
+ TQKeyEvent *keyevent = static_cast<TQKeyEvent *>(event);
//Create a new NodeModifsSet where the changes will be logged.
m_modifs = new NodeModifsSet();
@@ -694,7 +694,7 @@ bool KafkaWidget::eventFilter(QObject *, QEvent *event)
return forgetEvent;
}
-void KafkaWidget::slotContextMenuRequested(const QString& /*url*/, const QPoint& point)
+void KafkaWidget::slotContextMenuRequested(const TQString& /*url*/, const TQPoint& point)
{
TagActionManager::self()->fillWithTagActions(m_contextPopupMenu, nodeUnderMouse());
@@ -1204,7 +1204,7 @@ void KafkaWidget::keyBackspace()
DOM::Node toplevelBlock, toplevelBlock2, startNode, endNode, startNode2, endNode2;
DOM::Node childOfCommonParent, childOfCommonParent2, commonParent;
bool _goingTowardsRootNode, singleNodeDeleted, isParent, prevIsBlock, endNodeIsNotInline, boolTmp;
- QString text;
+ TQString text;
if(hasSelection())
{
@@ -1531,7 +1531,7 @@ void KafkaWidget::keyBackspace()
emit domNodeModified(temp, m_modifs);
if(boolTmp)
- QTimer::singleShot(0, this, SLOT(slotDelayedSetCaretPosition()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotDelayedSetCaretPosition()));
}
}
@@ -1597,7 +1597,7 @@ void KafkaWidget::keyBackspace()
{
m_currentNode = _nodePrev;
d->m_cursorOffset += (static_cast<DOM::CharacterData>(_nodePrev)).length();
- QTimer::singleShot(0, this, SLOT(slotDelayedSetCaretPosition()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotDelayedSetCaretPosition()));
}
_nodePrev.setNodeValue(_nodePrev.nodeValue() + _node.nodeValue());
emit domNodeModified(_nodePrev, m_modifs);
@@ -1618,7 +1618,7 @@ void KafkaWidget::keyBackspace()
m_currentNode = m_currentNode.previousSibling();
d->m_cursorOffset = 0;
- QTimer::singleShot(0, this, SLOT(slotDelayedSetCaretPosition()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotDelayedSetCaretPosition()));
}
else if(!m_currentNode.nextSibling().isNull())
{
@@ -1839,18 +1839,18 @@ return;
// Iterate all toggable toolbar actions and toggle them on or off
// Look if there is a selection
TagAction* tag_action = 0;
- QPtrList<TagAction> tag_actions = quantaApp->tagActions();
+ TQPtrList<TagAction> tag_actions = quantaApp->tagActions();
for (tag_action = tag_actions.first(); tag_action; tag_action = tag_actions.next())
{
if(tag_action->toggable())
{
- QString tag_name = tag_action->XMLTagName();
+ TQString tag_name = tag_action->XMLTagName();
if(tag_name.isEmpty())
break;
- QDomElement data(tag_action->data());
- QString attribute_name(data.attribute("attribute_name", QString()));
- QString attribute_value(data.attribute("attribute_value", QString()));
+ TQDomElement data(tag_action->data());
+ TQString attribute_name(data.attribute("attribute_name", TQString()));
+ TQString attribute_value(data.attribute("attribute_value", TQString()));
int inside_tag;
if(!attribute_name.isEmpty() && !attribute_value.isEmpty())
@@ -2088,7 +2088,7 @@ void KafkaWidget::setCurrentNode(DOM::Node node, int offset)
d->m_cursorOffset = offset;
makeCursorVisible();
if(!m_currentNode.isNull() && m_currentNode.nodeName().string() != "#document")
- QTimer::singleShot(0, this, SLOT(slotDelayedSetCaretPosition()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotDelayedSetCaretPosition()));
//setCaretPosition(m_currentNode, (long)d->m_cursorOffset);
}
@@ -2139,7 +2139,7 @@ void KafkaWidget::putCursorAtFirstAvailableLocation()
}
m_currentNode = node;
d->m_cursorOffset = 0;
- QTimer::singleShot(0, this, SLOT(slotDelayedSetCaretPosition()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotDelayedSetCaretPosition()));
#ifdef LIGHT_DEBUG
@@ -2236,7 +2236,7 @@ void KafkaWidget::removeSelection()
setCurrentNode(m_currentNode, domNodeCursorOffset);
- QTimer::singleShot(0, this, SLOT(slotDelayedSetCaretPosition()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotDelayedSetCaretPosition()));
NodeSelection* cursorPos = new NodeSelection();
cursorPos->setCursorNode(cursorNode);
@@ -2252,9 +2252,9 @@ void KafkaWidget::removeSelection()
void KafkaWidget::applyQueuedToggableTagActions()
{
- QStringList queued_actions = quantaApp->tagActionPool();
- QPtrList<TagAction> action_list = quantaApp->tagActions();
- for(QStringList::Iterator it = queued_actions.begin(); it != queued_actions.end(); ++it)
+ TQStringList queued_actions = quantaApp->tagActionPool();
+ TQPtrList<TagAction> action_list = quantaApp->tagActions();
+ for(TQStringList::Iterator it = queued_actions.begin(); it != queued_actions.end(); ++it)
{
TagAction* tag_action = 0;
for (tag_action = action_list.first(); tag_action; tag_action = action_list.next())
diff --git a/quanta/parts/kafka/kafkahtmlpart.h b/quanta/parts/kafka/kafkahtmlpart.h
index f1dc79c1..52a7b031 100644
--- a/quanta/parts/kafka/kafkahtmlpart.h
+++ b/quanta/parts/kafka/kafkahtmlpart.h
@@ -24,10 +24,10 @@
#include <khtml_events.h>
#include <kparts/event.h>
-#include <qstringlist.h>
-#include <qptrlist.h>
-#include <qdockwindow.h>
-#include <qevent.h>
+#include <tqstringlist.h>
+#include <tqptrlist.h>
+#include <tqdockwindow.h>
+#include <tqevent.h>
#include <dom/dom_node.h>
#include <dom/dom_element.h>
@@ -47,7 +47,7 @@ class KafkaWidget : public KHTMLPart
{
Q_OBJECT
public:
- KafkaWidget(QWidget *parent, QWidget *widgetParent, KafkaDocument *part,
+ KafkaWidget(TQWidget *parent, TQWidget *widgetParent, KafkaDocument *part,
const char *name = 0);
~KafkaWidget();
@@ -133,7 +133,7 @@ public slots:
* @param text The text to be added
* @param position Specifies the position where to add text
*/
- void insertText(DOM::Node node, const QString &text, int position);
+ void insertText(DOM::Node node, const TQString &text, int position);
/**
* Category: HTML Editing Functions
@@ -142,7 +142,7 @@ public slots:
* @param position Specifies the position where to add text, if it's -1
* the text will be appended after the last position
*/
- void insertText(const QString &text, int position);
+ void insertText(const TQString &text, int position);
/**
* Puts all the child Text DOM::Node into a "normal" form where only
@@ -168,7 +168,7 @@ public slots:
void slotNewCursorPos(const DOM::Node &domNode, long offset);
/**
- * Called to set the cursor Position with a QTimer::singleShot() after calling
+ * Called to set the cursor Position with a TQTimer::singleShot() after calling
* document->updateRendering()
*/
void slotDelayedSetCaretPosition();
@@ -232,7 +232,7 @@ signals:
void hasFocus(bool focus);
protected:
- bool eventFilter(QObject *object, QEvent *event);
+ bool eventFilter(TQObject *object, TQEvent *event);
virtual void khtmlMouseMoveEvent(khtml::MouseMoveEvent *event);
virtual void khtmlMousePressEvent(khtml::MousePressEvent *event);
@@ -241,7 +241,7 @@ protected:
private slots:
- void slotContextMenuRequested(const QString& url, const QPoint& point);
+ void slotContextMenuRequested(const TQString& url, const TQPoint& point);
private:
#if 0
@@ -309,7 +309,7 @@ private:
KafkaDocument *w;
friend class KafkaWidgetPrivate;
- QPopupMenu* m_contextPopupMenu;
+ TQPopupMenu* m_contextPopupMenu;
};
#endif
diff --git a/quanta/parts/kafka/kafkasyncoptions.cpp b/quanta/parts/kafka/kafkasyncoptions.cpp
index a355b99a..e7066187 100644
--- a/quanta/parts/kafka/kafkasyncoptions.cpp
+++ b/quanta/parts/kafka/kafkasyncoptions.cpp
@@ -15,9 +15,9 @@
* *
***************************************************************************/
-#include <qradiobutton.h>
-#include <qcheckbox.h>
-#include <qspinbox.h>
+#include <tqradiobutton.h>
+#include <tqcheckbox.h>
+#include <tqspinbox.h>
#include <kconfig.h>
#include <kdebug.h>
@@ -25,7 +25,7 @@
#include "kafkasyncoptions.h"
#include "kafkasyncoptions.moc"
-KafkaSyncOptions::KafkaSyncOptions( KConfig *a_config, QWidget* parent, const char* name )
+KafkaSyncOptions::KafkaSyncOptions( KConfig *a_config, TQWidget* parent, const char* name )
: KafkaSyncOptionsUI( parent, name )
{
config = a_config;
@@ -34,9 +34,9 @@ KafkaSyncOptions::KafkaSyncOptions( KConfig *a_config, QWidget* parent, const c
bool showIcons = config->readBoolEntry("Show Scripts Icons", true);
config->setGroup("Kafka Synchronization options");
- QString sourceRefresh = config->readEntry("Source refresh", "delay");
+ TQString sourceRefresh = config->readEntry("Source refresh", "delay");
int sourceRefreshDelay = config->readNumEntry("Source refresh delay", 500);
- QString kafkaRefresh = config->readEntry("Kafka refresh", "focus");
+ TQString kafkaRefresh = config->readEntry("Kafka refresh", "focus");
int kafkaRefreshDelay = config->readNumEntry("Kafka refresh delay", 4000);
if ( !name )
diff --git a/quanta/parts/kafka/kafkasyncoptions.h b/quanta/parts/kafka/kafkasyncoptions.h
index 25b200d7..daf67117 100644
--- a/quanta/parts/kafka/kafkasyncoptions.h
+++ b/quanta/parts/kafka/kafkasyncoptions.h
@@ -27,7 +27,7 @@ class KafkaSyncOptions : public KafkaSyncOptionsUI
Q_OBJECT
public:
- KafkaSyncOptions( KConfig *config, QWidget* parent = 0, const char* name = 0);
+ KafkaSyncOptions( KConfig *config, TQWidget* parent = 0, const char* name = 0);
~KafkaSyncOptions();
void updateConfig();
diff --git a/quanta/parts/kafka/undoredo.cpp b/quanta/parts/kafka/undoredo.cpp
index 7ca12718..dfe07142 100644
--- a/quanta/parts/kafka/undoredo.cpp
+++ b/quanta/parts/kafka/undoredo.cpp
@@ -16,9 +16,9 @@
***************************************************************************/
//debug only
-#include <qdatetime.h>
+#include <tqdatetime.h>
//end debug only
-#include <qtabwidget.h>
+#include <tqtabwidget.h>
#include <kapplication.h>
#include <kconfig.h>
@@ -174,9 +174,9 @@ void undoRedo::addNewModifsSet(NodeModifsSet *modifs, int modifLocation, NodeSel
kdDebug(25001)<< "undoRedo::addNewModifsSet() - NodeModifsSet type: " << modifLocation << endl;
#endif
- QValueList<NodeModif>::iterator it2;
+ TQValueList<NodeModif>::iterator it2;
NodeModifsSet *NMSet;
- QValueList<int> loc;
+ TQValueList<int> loc;
int curFocus, foo, foo2;
int diff, diff2;
NodeSelectionInd *nodeSelection;
@@ -233,7 +233,7 @@ void undoRedo::addNewModifsSet(NodeModifsSet *modifs, int modifLocation, NodeSel
if(modifs->nodeModifList().count() >= 1 && modifs->indentationStartOffset() == 1 &&
modifs->nodeModifList().at(0)->type() == NodeModif::NodeModified)
{
- QPtrListIterator<NodeModifsSet> it(m_undoList);
+ TQPtrListIterator<NodeModifsSet> it(m_undoList);
it = documentIterator;
if((*it) && (*it)->nodeModifList().count() >= 1 && (*it)->indentationStartOffset() == 1 &&
(*it)->nodeModifList().at(0)->type() == NodeModif::NodeModified &&
@@ -354,12 +354,12 @@ bool undoRedo::undo()
#ifdef LIGHT_DEBUG
kdDebug(25001)<< "undoRedo::undo()"<< endl;
- QTime t;
+ TQTime t;
t.start();
#endif
if(documentIterator.isEmpty() || !(*documentIterator))
return false;
- QPtrListIterator<NodeModif> it((*documentIterator)->nodeModifList());
+ TQPtrListIterator<NodeModif> it((*documentIterator)->nodeModifList());
it.toLast();
while(*it)
@@ -393,7 +393,7 @@ bool undoRedo::undo()
//Update the modified flag
m_doc->setModified((*documentIterator)->isModifiedBefore());
- QPtrListIterator<NodeModifsSet> currentIt(documentIterator);
+ TQPtrListIterator<NodeModifsSet> currentIt(documentIterator);
--documentIterator;
//TEMP: Reload the kafka editor TODO: update only the modified Nodes
@@ -420,7 +420,7 @@ bool undoRedo::redo()
bool success = true;
#ifdef LIGHT_DEBUG
- QTime t;
+ TQTime t;
t.start();
kdDebug(25001)<< "undoRedo::redo()" << endl;
#endif
@@ -432,7 +432,7 @@ bool undoRedo::redo()
else
++documentIterator;
- QPtrListIterator<NodeModif> it((*documentIterator)->nodeModifList());
+ TQPtrListIterator<NodeModif> it((*documentIterator)->nodeModifList());
it.toFirst();
while(*it)
@@ -486,7 +486,7 @@ bool undoRedo::redo()
bool undoRedo::undoNodeModif(NodeModif *nodeModif)
{
Node *node, *newNode;
- QValueList<int> ref;
+ TQValueList<int> ref;
Tag *tag;
bool b;
@@ -547,7 +547,7 @@ bool undoRedo::undoNodeModif(NodeModif *nodeModif)
// No node at this location, getting the parent Node and appending newNode after
// the last child of the parent.
ref = nodeModif->location();
- QValueList<int> loc(ref);
+ TQValueList<int> loc(ref);
loc.remove(loc.fromLast());
if(loc.empty())
{
@@ -584,7 +584,7 @@ bool undoRedo::undoNodeModif(NodeModif *nodeModif)
bool undoRedo::redoNodeModif(NodeModif *nodeModif)
{
bool success;
- QValueList<int> tmp;
+ TQValueList<int> tmp;
//To do the opposite action of undoNodeModif(), we simply have
//to change the type of nodeModif
@@ -907,7 +907,7 @@ void undoRedo::reloadKafkaEditor(bool force, NodeSelection *selection)
void undoRedo::reloadQuantaEditor(bool force, bool syncQuantaCursor, bool encodeText)
{
- QString text, allText;
+ TQString text, allText;
Node *node = baseNode, *child;
int bCol, bLine, eCol, eLine, bCol2, bLine2, bCol3, bLine3, eCol3, eLine3, i;
KafkaDocument *kafkaInterface = KafkaDocument::ref();
@@ -1096,8 +1096,8 @@ bool undoRedo::syncKafkaView()
#ifdef LIGHT_DEBUG
kdDebug(25001)<< "undoRedo::syncKafkaView()" << endl;
#endif
- /** QValueList<NodeModifsSet>::iterator it;
- QValueList<NodeModif>::iterator it2;
+ /** TQValueList<NodeModifsSet>::iterator it;
+ TQValueList<NodeModif>::iterator it2;
bool undoKafkaView = true;
if(kafkaIterator == sourceIterator)
@@ -1250,8 +1250,8 @@ bool undoRedo::syncQuantaView()
#ifdef LIGHT_DEBUG
kdDebug(25001)<< "undoRedo::syncQuantaView()" << endl;
#endif
- /**QValueList<NodeModifsSet>::iterator it;
- QValueList<NodeModif>::iterator it2;
+ /**TQValueList<NodeModifsSet>::iterator it;
+ TQValueList<NodeModif>::iterator it2;
bool undoQuantaView = true;
if(kafkaIterator == sourceIterator)
@@ -1431,7 +1431,7 @@ void undoRedo::debugOutput()
kdDebug(24000)<< "Empty!" << endl;
return;
}
- QPtrListIterator<NodeModifsSet> it(m_undoList);
+ TQPtrListIterator<NodeModifsSet> it(m_undoList);
for(it.toFirst(); it ; ++it )
{
kdDebug(24000)<< "== Node Modifications set #" << i << "(" << (*it)->isModifiedBefore() << "," <<
@@ -1445,12 +1445,12 @@ void undoRedo::debugOutput()
}
//kdDebug(24000)<< "== Cursor Pos: " << (*it).cursorY << ":" << (*it).cursorX << endl;
//kdDebug(24000)<< "== Cursor Pos2:" << (*it).cursorY2 << ":" << (*it).cursorX2 << endl;
- QPtrListIterator<NodeModif> it2((*it)->nodeModifList());
+ TQPtrListIterator<NodeModif> it2((*it)->nodeModifList());
for(it2.toFirst(); it2; ++it2)
{
kdDebug(24000)<< "==== NodeModif type:" << (*it2)->type() << endl;
kdDebug(24000)<< "==== Location1: " << endl;
- QValueList<int>::iterator it3;
+ TQValueList<int>::iterator it3;
if((*it2)->location().empty())
{
kdDebug(24000)<< "==== Empty location!!" << endl;
@@ -1492,7 +1492,7 @@ void undoRedo::debugOutput()
void undoRedo::fileSaved()
{
- QPtrListIterator<NodeModifsSet> it(m_undoList);
+ TQPtrListIterator<NodeModifsSet> it(m_undoList);
bool previousWasDocIt = false;
for(it.toFirst(); it ; ++it )
{
@@ -1515,7 +1515,7 @@ void undoRedo::fileSaved()
}
}
/**
- QValueList<NodeModifsSet>::iterator it = sourceIterator;
+ TQValueList<NodeModifsSet>::iterator it = sourceIterator;
(*sourceIterator).isModified = false;
//seting isModified = true to all others
while(it != begin())
diff --git a/quanta/parts/kafka/undoredo.h b/quanta/parts/kafka/undoredo.h
index f9ec09cf..390dc5bb 100644
--- a/quanta/parts/kafka/undoredo.h
+++ b/quanta/parts/kafka/undoredo.h
@@ -18,9 +18,9 @@
#ifndef UNDOREDO_H
#define UNDOREDO_H
-#include <qvaluelist.h>
-#include <qptrlist.h>
-#include <qobject.h>
+#include <tqvaluelist.h>
+#include <tqptrlist.h>
+#include <tqobject.h>
#include "node.h"
class Document;
@@ -53,23 +53,23 @@ public:
* For all type : Location of the Node added/modified/removed/moved.
* @param location The location of the Node, cf kafkaCommon::getNodeLocation()
*/
- void setLocation(QValueList<int> location) {m_location = location;}
+ void setLocation(TQValueList<int> location) {m_location = location;}
/**
* @return Returns the location of the Node which have been modified.
*/
- QValueList<int>& location() {return m_location;}
+ TQValueList<int>& location() {return m_location;}
/**
* For Node move : Final location of the Node moved.
* @param location The final location of the Node moved, cf kafkaCommon::getNodeLocation()
*/
- void setFinalLocation(QValueList<int> location) {m_finalLocation = location;}
+ void setFinalLocation(TQValueList<int> location) {m_finalLocation = location;}
/**
* @return Returns the final location of the Node which was moved.
*/
- QValueList<int>& finalLocation() {return m_finalLocation;}
+ TQValueList<int>& finalLocation() {return m_finalLocation;}
/**
* For Node deletion: Store the deleted Node.
@@ -145,7 +145,7 @@ public:
private:
int m_type;
- QValueList<int> m_location, m_finalLocation;
+ TQValueList<int> m_location, m_finalLocation;
Node *m_node;
Tag *m_tag;
int m_childrenMovedUp;
@@ -170,7 +170,7 @@ public:
/**
* Returns the list of NodeModifs.
*/
- QPtrList<NodeModif> & nodeModifList() {return m_nodeModifList;}
+ TQPtrList<NodeModif> & nodeModifList() {return m_nodeModifList;}
/**
* Set the Modified flag BEFORE the user input.
@@ -195,12 +195,12 @@ public:
/**
* Set a description to the user input.
*/
- void setDescription(const QString &description) {m_description = description;}
+ void setDescription(const TQString &description) {m_description = description;}
/**
* @return Returns the description of the user input.
*/
- QString description() {return m_description;}
+ TQString description() {return m_description;}
/**
* Set the coordinates of the selection before the user input.
@@ -237,9 +237,9 @@ public:
private:
- QPtrList<NodeModif> m_nodeModifList;
+ TQPtrList<NodeModif> m_nodeModifList;
bool m_isModifiedBefore, m_isModifiedAfter;
- QString m_description;
+ TQString m_description;
NodeSelectionInd *m_selectionBefore, *m_selectionAfter;
int m_indentationStartOffset, m_type;
};
@@ -429,7 +429,7 @@ private:
/**
* The main undoRedo list which contains the NodeModifsSet.
*/
- QPtrList<NodeModifsSet> m_undoList;
+ TQPtrList<NodeModifsSet> m_undoList;
/**
* The undoRedo list iterators which point the current location of each component in
* the undoRedo list.
@@ -437,13 +437,13 @@ private:
* sourceIterator point the current location of the source view (kate).
* kafkaIterator point the current location of the VPL view (kafka).
*/
- QPtrListIterator<NodeModifsSet> documentIterator;
- QPtrListIterator<NodeModifsSet> sourceIterator;
- QPtrListIterator<NodeModifsSet> kafkaIterator;
+ TQPtrListIterator<NodeModifsSet> documentIterator;
+ TQPtrListIterator<NodeModifsSet> sourceIterator;
+ TQPtrListIterator<NodeModifsSet> kafkaIterator;
int m_listLimit;
bool m_merging;
bool addingText;
- QValueList<int> m_currentLoc;
+ TQValueList<int> m_currentLoc;
Document *m_doc;
bool m_mergeNext;
int m_dontAddModifSet;
diff --git a/quanta/parts/kafka/wkafkapart.cpp b/quanta/parts/kafka/wkafkapart.cpp
index 5641bb36..73e2a019 100644
--- a/quanta/parts/kafka/wkafkapart.cpp
+++ b/quanta/parts/kafka/wkafkapart.cpp
@@ -32,12 +32,12 @@
#include <kglobal.h>
#include <kcharsets.h>
-#include <qregexp.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qdatetime.h>
-#include <qclipboard.h>
-#include <qptrvector.h>
+#include <tqregexp.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqdatetime.h>
+#include <tqclipboard.h>
+#include <tqptrvector.h>
#include "document.h"
#include "viewmanager.h"
@@ -61,25 +61,25 @@
KafkaWidget *kafkaWidget;
KafkaDocument *kafkaDoc;
-KafkaDocument::KafkaDocument(QWidget *parent, QWidget *widgetParent, const char *name)
+KafkaDocument::KafkaDocument(TQWidget *parent, TQWidget *widgetParent, const char *name)
:domNodeProps(1021), _docLoaded(false)
{
// i18n reserve
-QString a = i18n("Selector");QString b = i18n("Attribute");QString c = i18n("Class");
-QString d = i18n("Pseudo-class");QString e = i18n("CSS rules");QString f = i18n("Universal selector");
-QString g = i18n("Linked stylesheets");QString h = i18n("Embedded stylesheets");QString i = i18n("Inline style attribute");
-QString j = i18n("Link");QString k = i18n("Priority");QString l = i18n("ID");
-QString m = i18n("Browser support");QString n = i18n("Pseudo-element");QString o = i18n("Imported");
-QString p = i18n("Inheritance");QString q = i18n("Inherited");QString r = "";
-
-QString s = i18n("Name");QString tt = i18n("Undo");QString u = i18n("Redo");
-QString v = i18n("Undo/Redo history");QString w = i18n("CSS styles");
-
-QString x = i18n("Sorry, VPL does not support this functionality yet.");
-QString y = i18n("Merge cells");
-QString z = i18n("Split cells");
-QString aa = i18n("Edit CSS style of this Tag");
-QString ab = i18n("Ident all");
+TQString a = i18n("Selector");TQString b = i18n("Attribute");TQString c = i18n("Class");
+TQString d = i18n("Pseudo-class");TQString e = i18n("CSS rules");TQString f = i18n("Universal selector");
+TQString g = i18n("Linked stylesheets");TQString h = i18n("Embedded stylesheets");TQString i = i18n("Inline style attribute");
+TQString j = i18n("Link");TQString k = i18n("Priority");TQString l = i18n("ID");
+TQString m = i18n("Browser support");TQString n = i18n("Pseudo-element");TQString o = i18n("Imported");
+TQString p = i18n("Inheritance");TQString q = i18n("Inherited");TQString r = "";
+
+TQString s = i18n("Name");TQString tt = i18n("Undo");TQString u = i18n("Redo");
+TQString v = i18n("Undo/Redo history");TQString w = i18n("CSS styles");
+
+TQString x = i18n("Sorry, VPL does not support this functionality yet.");
+TQString y = i18n("Merge cells");
+TQString z = i18n("Split cells");
+TQString aa = i18n("Edit CSS style of this Tag");
+TQString ab = i18n("Ident all");
//end
#ifdef LIGHT_DEBUG
@@ -96,13 +96,13 @@ QString ab = i18n("Ident all");
domNodeProps.setAutoDelete(false);
KStandardDirs *m_stddirs = new KStandardDirs();
- QFile file( m_stddirs->findResource("data", "kafkapart/entities" )/**locate("appdata","chars") */);
+ TQFile file( m_stddirs->findResource("data", "kafkapart/entities" )/**locate("appdata","chars") */);
delete m_stddirs;
- QString tmp;
+ TQString tmp;
if ( file.open(IO_ReadOnly) )
{
- QTextStream t( &file ); // use a text stream
- t.setEncoding(QTextStream::UnicodeUTF8);
+ TQTextStream t( &file ); // use a text stream
+ t.setEncoding(TQTextStream::UnicodeUTF8);
while ( !t.eof() )
{
tmp = t.readLine();
@@ -116,17 +116,17 @@ QString ab = i18n("Ident all");
file.close();
}
- connect(m_kafkaPart, SIGNAL(domNodeInserted(DOM::Node, bool, NodeModifsSet*)),
- this, SLOT(slotDomNodeInserted(DOM::Node, bool, NodeModifsSet*)));
- connect(m_kafkaPart, SIGNAL(domNodeModified(DOM::Node, NodeModifsSet*)),
- this, SLOT(slotDomNodeModified(DOM::Node, NodeModifsSet*)));
- connect(m_kafkaPart, SIGNAL(domNodeIsAboutToBeRemoved(DOM::Node, bool, NodeModifsSet*)),
- this, SLOT(slotDomNodeAboutToBeRemoved(DOM::Node, bool, NodeModifsSet*)));
- connect(m_kafkaPart, SIGNAL(domNodeIsAboutToBeMoved(DOM::Node, DOM::Node, DOM::Node, NodeModifsSet*)),
- this, SLOT(slotDomNodeIsAboutToBeMoved(DOM::Node, DOM::Node, DOM::Node, NodeModifsSet*)));
+ connect(m_kafkaPart, TQT_SIGNAL(domNodeInserted(DOM::Node, bool, NodeModifsSet*)),
+ this, TQT_SLOT(slotDomNodeInserted(DOM::Node, bool, NodeModifsSet*)));
+ connect(m_kafkaPart, TQT_SIGNAL(domNodeModified(DOM::Node, NodeModifsSet*)),
+ this, TQT_SLOT(slotDomNodeModified(DOM::Node, NodeModifsSet*)));
+ connect(m_kafkaPart, TQT_SIGNAL(domNodeIsAboutToBeRemoved(DOM::Node, bool, NodeModifsSet*)),
+ this, TQT_SLOT(slotDomNodeAboutToBeRemoved(DOM::Node, bool, NodeModifsSet*)));
+ connect(m_kafkaPart, TQT_SIGNAL(domNodeIsAboutToBeMoved(DOM::Node, DOM::Node, DOM::Node, NodeModifsSet*)),
+ this, TQT_SLOT(slotDomNodeIsAboutToBeMoved(DOM::Node, DOM::Node, DOM::Node, NodeModifsSet*)));
- connect(m_kafkaPart, SIGNAL(domNodeNewCursorPos(DOM::Node, int)),
- this, SLOT(slotdomNodeNewCursorPos(DOM::Node, int)));
+ connect(m_kafkaPart, TQT_SIGNAL(domNodeNewCursorPos(DOM::Node, int)),
+ this, TQT_SLOT(slotdomNodeNewCursorPos(DOM::Node, int)));
}
@@ -152,7 +152,7 @@ void KafkaDocument::loadDocument(Document *doc)
if(!m_kafkaPart) return;
if(!doc) return;
#ifdef LIGHT_DEBUG
- QTime t;
+ TQTime t;
t.start();
#endif
m_currentDoc = doc;
@@ -336,7 +336,7 @@ Node *KafkaDocument::getNode(DOM::Node _domNode)
kNodeAttrs* KafkaDocument::connectDomNodeToQuantaNode(DOM::Node domNode, Node *node)
{
- QString name;
+ TQString name;
kNodeAttrs *props;
if(domNode.isNull())
@@ -512,7 +512,7 @@ bool KafkaDocument::buildKafkaNodeFromNode(Node *node, bool insertNode)
#endif
DOM::Node newNode, newNode2, attr, nextNode, parentNode, *ptDomNode;
bool removeLeftWhitespaces, removeRightWhitespaces;
- QString str, nodeValue;
+ TQString str, nodeValue;
Node *n, *parent;
int i;
@@ -686,7 +686,7 @@ bool KafkaDocument::buildKafkaNodeFromNode(Node *node, bool insertNode)
if(!attr.isNull())
{
//TODO: create a createAttr function and add this (setNodeValue sometimes
- //don't like null QString)
+ //don't like null TQString)
if(!node->tag->attributeValue(i).isNull())
attr.setNodeValue(node->tag->attributeValue(i));
kafkaCommon::insertDomNodeAttribute(newNode, attr);
@@ -806,7 +806,7 @@ void KafkaDocument::buildNodeFromKafkaNode(Node *node, DOM::Node domNode)
node->tag->setIndentationDone(false);
if(domNode.nodeType() == DOM::Node::TEXT_NODE)
{
- QString text = domNode.nodeValue().string();
+ TQString text = domNode.nodeValue().string();
text.replace("<", "&lt;");
text.replace(">", "&gt;");
node->tag->setStr(text);
@@ -873,9 +873,9 @@ Node * KafkaDocument::buildNodeFromKafkaNode(DOM::Node domNode, Node *nodeParent
return node;
}
-QString KafkaDocument::getDecodedChar(const QString &encodedChar)
+TQString KafkaDocument::getDecodedChar(const TQString &encodedChar)
{
- QMap<QString, QString>::Iterator it = encodedChars.find(encodedChar);
+ TQMap<TQString, TQString>::Iterator it = encodedChars.find(encodedChar);
if(it == encodedChars.end())
{
//try this
@@ -884,16 +884,16 @@ QString KafkaDocument::getDecodedChar(const QString &encodedChar)
return it.data();
}
-QString KafkaDocument::getDecodedText(const QString &a_encodedText, bool translateWhiteSpacesAndLineBreaks,
+TQString KafkaDocument::getDecodedText(const TQString &a_encodedText, bool translateWhiteSpacesAndLineBreaks,
bool removeLeftWhitespaces, bool removeRightWhitespaces)
{
- QString encodedText = a_encodedText;
+ TQString encodedText = a_encodedText;
if (encodedText.isEmpty())
encodedText = " ";
- QString decodedChar;
+ TQString decodedChar;
int i, j;
#ifdef LIGHT_DEBUG
- QString oldEncodedText = encodedText;
+ TQString oldEncodedText = encodedText;
#endif
i = -1;
@@ -913,11 +913,11 @@ QString KafkaDocument::getDecodedText(const QString &a_encodedText, bool transla
i = -1;
while((unsigned)++i < encodedText.length())
{
- if(QString(encodedText[i]) == "&")
+ if(TQString(encodedText[i]) == "&")
{
j = i;
while((unsigned)++i < encodedText.length() &&
- QString(encodedText[i]) != ";")
+ TQString(encodedText[i]) != ";")
{}
decodedChar = getDecodedChar(encodedText.mid(j, i - j + 1));
encodedText.remove(j, i - j + 1);
@@ -943,28 +943,28 @@ QString KafkaDocument::getDecodedText(const QString &a_encodedText, bool transla
//return KGlobal::charsets()->resolveEntities(encodedText); =>nice but not sufficient
}
-QString KafkaDocument::getEncodedChar(const QString &decodedChar, const QString &previousDecodedChar)
+TQString KafkaDocument::getEncodedChar(const TQString &decodedChar, const TQString &previousDecodedChar)
{
if(decodedChar[0].isSpace() && !previousDecodedChar[0].isSpace())
return " ";
else if(decodedChar[0].isSpace())
//FIXME:for an unknown reason, by default it return &iquest; instead of &nbsp;
return "&nbsp;";
- QMap<QString, QString>::Iterator it = decodedChars.find(decodedChar);
+ TQMap<TQString, TQString>::Iterator it = decodedChars.find(decodedChar);
if(it == decodedChars.end())
return decodedChar;
return it.data();
}
-QString KafkaDocument::getEncodedText(const QString &a_decodedText, int bLine, int bCol, int &eLine, int &eCol,
+TQString KafkaDocument::getEncodedText(const TQString &a_decodedText, int bLine, int bCol, int &eLine, int &eCol,
bool translateWhiteSpaces)
{
- QString decodedText = a_decodedText;
- QString Encodedchar;
- QString decodedChar, previousDecodedChar;
+ TQString decodedText = a_decodedText;
+ TQString Encodedchar;
+ TQString decodedChar, previousDecodedChar;
#ifdef LIGHT_DEBUG
- QString oldDecodedText = decodedText;
+ TQString oldDecodedText = decodedText;
#endif
int i;
#ifdef LIGHT_DEBUG
@@ -975,11 +975,11 @@ QString KafkaDocument::getEncodedText(const QString &a_decodedText, int bLine, i
while((unsigned)++i < decodedText.length())
{
previousDecodedChar = decodedChar;
- decodedChar = QString(decodedText[i]);
+ decodedChar = TQString(decodedText[i]);
if(translateWhiteSpaces || !decodedText[i].isSpace())
- Encodedchar = getEncodedChar(QString(decodedText[i]),
- (i>=1)?previousDecodedChar:QString(""));
+ Encodedchar = getEncodedChar(TQString(decodedText[i]),
+ (i>=1)?previousDecodedChar:TQString(""));
else
Encodedchar = decodedChar;
bCol += Encodedchar.length();
@@ -997,15 +997,15 @@ QString KafkaDocument::getEncodedText(const QString &a_decodedText, int bLine, i
return decodedText;
}
-QString KafkaDocument::getEncodedText(const QString& decodedText)
+TQString KafkaDocument::getEncodedText(const TQString& decodedText)
{
int a = 0, b = 0, c, d;
return getEncodedText(decodedText, a, b, c, d);
}
-QString KafkaDocument::generateCodeFromNode(Node *node, int bLine, int bCol, int &eLine, int &eCol, bool encodeText)
+TQString KafkaDocument::generateCodeFromNode(Node *node, int bLine, int bCol, int &eLine, int &eCol, bool encodeText)
{
- QString text, _char;
+ TQString text, _char;
Node *openingNode;
int bLineAttr, bColAttr;
int j = 0;
@@ -1102,7 +1102,7 @@ QString KafkaDocument::generateCodeFromNode(Node *node, int bLine, int bCol, int
/** Can't use KGlobal::charsets()->toEntity() :
* It translate all chars into entities! */
else if(!hasPreParent)
- text = node->tag->tagStr().replace(QRegExp("\\s+"), " ");
+ text = node->tag->tagStr().replace(TQRegExp("\\s+"), " ");
else
text = node->tag->tagStr();
}
@@ -1142,7 +1142,7 @@ void KafkaDocument::translateQuantaIntoKafkaCursorPosition(uint curLine, uint cu
{
Node *node;
int bCol, bLine, eCol, eLine, col, line;
- QString curChar, decodedChar, currentLine;
+ TQString curChar, decodedChar, currentLine;
bool lookForEntity, lookForSpaces, found;
node = baseNode;
@@ -1248,7 +1248,7 @@ void KafkaDocument::translateQuantaIntoKafkaCursorPosition(uint curLine, uint cu
void KafkaDocument::translateQuantaIntoNodeCursorPosition(uint line, uint col, Node **node, long &offset)
{
int curCol, curLine, beginCol, beginLine;
- QString currentLine;
+ TQString currentLine;
*node = parser->nodeAt(line, col, false);
@@ -1288,8 +1288,8 @@ void KafkaDocument::translateQuantaIntoNodeCursorPosition(uint line, uint col, N
void KafkaDocument::translateKafkaIntoNodeCursorPosition(DOM::Node domNode, long domNodeOffset, Node **node, long &offset)
{
- QString decodedText, encodedChar, encodedText, currentChar;
- QChar curChar, oldChar;
+ TQString decodedText, encodedChar, encodedText, currentChar;
+ TQChar curChar, oldChar;
long currentOffset;
bool waitForSpace = false, found = false;
int curNodeOffset, bLine = 0, bCol = 0, eLine, eCol;
@@ -1356,10 +1356,10 @@ void KafkaDocument::translateKafkaIntoNodeCursorPosition(DOM::Node domNode, long
{
curChar = decodedText.at(domNodeOffset - currentOffset);
#ifdef HEAVY_DEBUG
- //kdDebug(24000)<< "CurChar:" << QString(curChar) << ": oldChar:" <<
- // QString(oldChar) << endl;
+ //kdDebug(24000)<< "CurChar:" << TQString(curChar) << ": oldChar:" <<
+ // TQString(oldChar) << endl;
#endif
- encodedChar = getEncodedChar(QString(curChar), QString(oldChar));
+ encodedChar = getEncodedChar(TQString(curChar), TQString(oldChar));
if(encodedChar == "&nbsp;")
encodedChar = " ";
found = false;
@@ -1409,8 +1409,8 @@ void KafkaDocument::translateKafkaIntoQuantaCursorPosition(DOM::Node _currentDom
{
Node *_currentNode, *closingNode, *node;
kNodeAttrs *attrs;
- QString decodedText, encodedChar, currentLine, currentChar;
- QChar curChar, oldChar;
+ TQString decodedText, encodedChar, currentLine, currentChar;
+ TQChar curChar, oldChar;
int currentOffset;
int curLine, curCol, endLine, endCol;
int i;
@@ -1504,9 +1504,9 @@ void KafkaDocument::translateKafkaIntoQuantaCursorPosition(DOM::Node _currentDom
{
curChar = decodedText[offset - currentOffset];
#ifdef HEAVY_DEBUG
-// kdDebug(24000)<< "CurChar:" << QString(curChar) << ": oldChar:" << QString(oldChar) << endl;
+// kdDebug(24000)<< "CurChar:" << TQString(curChar) << ": oldChar:" << TQString(oldChar) << endl;
#endif
- encodedChar = getEncodedChar(QString(curChar), QString(oldChar));
+ encodedChar = getEncodedChar(TQString(curChar), TQString(oldChar));
if(encodedChar == "&nbsp;")
encodedChar = " ";
found = false;
@@ -1631,7 +1631,7 @@ void KafkaDocument::translateKafkaIntoQuantaCursorPosition(DOM::Node _currentDom
void KafkaDocument::translateNodeIntoKafkaCursorPosition(Node *node, int offset, DOM::Node &domNode,
long &domNodeOffset)
{
- QString textNode, curChar;
+ TQString textNode, curChar;
int col;
bool lookForEntity, lookForSpaces, found;
@@ -1820,7 +1820,7 @@ void KafkaDocument::coutLinkTree(Node *, int)
#endif
{
#ifdef HEAVY_DEBUG
- QString output, dots;
+ TQString output, dots;
DOM::Node domNode;
Node *n = 0L;
if(!node)
@@ -1869,7 +1869,7 @@ void KafkaDocument::slotDomNodeInserted(DOM::Node domNode, bool insertChilds, No
bool b = false;
#ifdef LIGHT_DEBUG
- QTime t;
+ TQTime t;
t.start();
#endif
@@ -1935,7 +1935,7 @@ void KafkaDocument::slotDomNodeModified(DOM::Node domNode, NodeModifsSet* modifs
QTag *qTag;
#ifdef LIGHT_DEBUG
- QTime t;
+ TQTime t;
t.start();
#endif
@@ -2065,7 +2065,7 @@ void KafkaDocument::slotDomNodeAboutToBeRemoved(DOM::Node _domNode, bool deleteC
NodeModif *modif;
#ifdef LIGHT_DEBUG
- QTime t;
+ TQTime t;
t.start();
#endif
@@ -2285,7 +2285,7 @@ void KafkaDocument::slotdomNodeNewCursorPos(DOM::Node, int)
void KafkaDocument::slotCut()
{
- QString text = m_kafkaPart->selectedText();
+ TQString text = m_kafkaPart->selectedText();
NodeSelectionInd selection_ind;
selection_ind.fillWithVPLCursorSelection();
@@ -2305,7 +2305,7 @@ void KafkaDocument::slotCut()
}
void KafkaDocument::slotCut(Node* startNode, int startOffset, Node* endNode, int endOffset,
- Node** cursorNode, long cursorOffset, QString const& text)
+ Node** cursorNode, long cursorOffset, TQString const& text)
{
if(!startNode || !endNode)
return;
@@ -2323,12 +2323,12 @@ void KafkaDocument::slotCut(Node* startNode, int startOffset, Node* endNode, int
if(subtree_root)
{
KafkaDragObject* node_drag = new KafkaDragObject(subtree_root);
- QTextDrag* text_drag = new QTextDrag(text);
+ TQTextDrag* text_drag = new TQTextDrag(text);
KMultipleDrag* drag_object = new KMultipleDrag();
drag_object->addDragObject(node_drag);
drag_object->addDragObject(text_drag);
- QApplication::clipboard()->setData(drag_object);
+ TQApplication::clipboard()->setData(drag_object);
#ifdef LIGHT_DEBUG
kafkaCommon::coutTree(subtree_root, 3);
#endif
@@ -2337,7 +2337,7 @@ void KafkaDocument::slotCut(Node* startNode, int startOffset, Node* endNode, int
void KafkaDocument::slotCopy()
{
- QString text = m_kafkaPart->selectedText();
+ TQString text = m_kafkaPart->selectedText();
NodeSelectionInd selection_ind;
selection_ind.fillWithVPLCursorSelection();
@@ -2350,7 +2350,7 @@ void KafkaDocument::slotCopy()
slotCopy(startNode, startOffset, endNode, endOffset, text);
}
-void KafkaDocument::slotCopy(Node* startNode, int startOffset, Node* endNode, int endOffset, QString const& text)
+void KafkaDocument::slotCopy(Node* startNode, int startOffset, Node* endNode, int endOffset, TQString const& text)
{
if(!startNode || !endNode)
return;
@@ -2360,12 +2360,12 @@ void KafkaDocument::slotCopy(Node* startNode, int startOffset, Node* endNode, in
if(subtree_root)
{
KafkaDragObject* node_drag = new KafkaDragObject(subtree_root);
- QTextDrag* text_drag = new QTextDrag(text);
+ TQTextDrag* text_drag = new TQTextDrag(text);
KMultipleDrag* drag_object = new KMultipleDrag();
drag_object->addDragObject(node_drag);
drag_object->addDragObject(text_drag);
- QApplication::clipboard()->setData(drag_object);
+ TQApplication::clipboard()->setData(drag_object);
// FIXME delete the subtree
#ifdef LIGHT_DEBUG
kafkaCommon::coutTree(subtree_root, 3);
@@ -2375,8 +2375,8 @@ void KafkaDocument::slotCopy(Node* startNode, int startOffset, Node* endNode, in
void KafkaDocument::slotPaste()
{
- QClipboard *cb = QApplication::clipboard();
- QMimeSource* e = cb->data();
+ QClipboard *cb = TQApplication::clipboard();
+ TQMimeSource* e = cb->data();
Node* node = new Node(0);
if(KafkaDragObject::decode(e, node))
diff --git a/quanta/parts/kafka/wkafkapart.h b/quanta/parts/kafka/wkafkapart.h
index 6b045150..712dc2e2 100644
--- a/quanta/parts/kafka/wkafkapart.h
+++ b/quanta/parts/kafka/wkafkapart.h
@@ -34,9 +34,9 @@ struct DTDStruct;
class NodeSelectionInd;
class NodeModifsSet;
-#include <qmap.h>
-#include <qobject.h>
-#include <qptrdict.h>
+#include <tqmap.h>
+#include <tqobject.h>
+#include <tqptrdict.h>
#include "kafkahtmlpart.h"
@@ -52,7 +52,7 @@ class KafkaDocument : public QObject
Q_OBJECT
public:
/** Returns a reference to the KafkaDocument object */
- static KafkaDocument* const ref(QWidget *parent = 0L, QWidget *widgetParent = 0L, const char *name = 0L)
+ static KafkaDocument* const ref(TQWidget *parent = 0L, TQWidget *widgetParent = 0L, const char *name = 0L)
{
static KafkaDocument *m_ref;
if (!m_ref) m_ref = new KafkaDocument(parent, widgetParent, name);
@@ -184,7 +184,7 @@ public:
* from its encoded form (e.g. &nbsp;)
* @return Returns the special character.
*/
- QString getDecodedChar(const QString &encodedChar);
+ TQString getDecodedChar(const TQString &encodedChar);
/**
* This function returns the text decoded from its XML-encoded form.
@@ -197,7 +197,7 @@ public:
* e.g. if the current text is the last child of a BLOCK Node (e.g. P)
* @return Returns the text decoded.
*/
- QString getDecodedText(const QString &encodedText, bool translateWhiteSpacesAndLineBreaks = true,
+ TQString getDecodedText(const TQString &encodedText, bool translateWhiteSpacesAndLineBreaks = true,
bool removeLeftWhitespaces = false, bool removeRightWhitespaces = false);
/**
@@ -207,7 +207,7 @@ public:
* @param previousDecodedchar The previous decoded character.
* @return Returns the XML-encoded character.
*/
- QString getEncodedChar(const QString &decodedChar, const QString &previousDecodedChar);
+ TQString getEncodedChar(const TQString &decodedChar, const TQString &previousDecodedChar);
/**
* This function returns the text with all the special XML characters encoded.
@@ -220,14 +220,14 @@ public:
* into &nbsp; Set it to false for PRE Tag.
* @return Return the XML-encoded text.
*/
- QString getEncodedText(const QString &decodedText, int bLine, int bCol, int &eLine, int &eCol,
+ TQString getEncodedText(const TQString &decodedText, int bLine, int bCol, int &eLine, int &eCol,
bool translateWhiteSpaces = true);
/**
* This function behaves essentially like the above function except that it doesn't
* return the position of the encoded text.
*/
- QString getEncodedText(const QString &decodedText);
+ TQString getEncodedText(const TQString &decodedText);
/**
* This function generates the code corresponding to the XML node.
@@ -240,7 +240,7 @@ public:
* (e.g. whitespace => &nbsp;)
* @return Returns the code.
*/
- QString generateCodeFromNode(Node *node, int bLine, int bCol, int &eLine, int &eCol,
+ TQString generateCodeFromNode(Node *node, int bLine, int bCol, int &eLine, int &eCol,
bool encodeText = true);
@@ -448,23 +448,23 @@ public slots:
void slotPaste();
void slotCut(Node* startNode, int startOffset, Node* endNode, int endOffset,
- Node** cursorNode, long cursorOffset, QString const& plainText);
- void slotCopy(Node* startNode, int startOffset, Node* endNode, int endOffset, QString const& plainText);
+ Node** cursorNode, long cursorOffset, TQString const& plainText);
+ void slotCopy(Node* startNode, int startOffset, Node* endNode, int endOffset, TQString const& plainText);
public:
- //use a QPtrList aferwards
+ //use a TQPtrList aferwards
NodeEnhancer *mainEnhancer;
private:
/**
* Create a KafkaWidget.
*/
- KafkaDocument(QWidget *parent, QWidget *widgetParent, const char *name);
+ KafkaDocument(TQWidget *parent, TQWidget *widgetParent, const char *name);
- QMap<QString, QString> decodedChars;
- QMap<QString, QString> encodedChars;
- QPtrDict<kNodeAttrs> domNodeProps;
- QGuardedPtr<KafkaWidget> m_kafkaPart;
+ TQMap<TQString, TQString> decodedChars;
+ TQMap<TQString, TQString> encodedChars;
+ TQPtrDict<kNodeAttrs> domNodeProps;
+ TQGuardedPtr<KafkaWidget> m_kafkaPart;
Document *m_currentDoc;
bool _docLoaded;
diff --git a/quanta/parts/preview/whtmlpart.cpp b/quanta/parts/preview/whtmlpart.cpp
index b84ffe5c..1b34e123 100644
--- a/quanta/parts/preview/whtmlpart.cpp
+++ b/quanta/parts/preview/whtmlpart.cpp
@@ -16,8 +16,8 @@
***************************************************************************/
//qt includes
-#include <qfileinfo.h>
-#include <qtextcodec.h>
+#include <tqfileinfo.h>
+#include <tqtextcodec.h>
//kde includes
#include <kconfig.h>
@@ -33,8 +33,8 @@
#include "whtmlpart.h"
#include "resource.h"
-WHTMLPart::WHTMLPart(QWidget *parentWidget, const char *widgetName, bool enableViewSource,
- QObject *parent, const char *name, GUIProfile prof)
+WHTMLPart::WHTMLPart(TQWidget *parentWidget, const char *widgetName, bool enableViewSource,
+ TQObject *parent, const char *name, GUIProfile prof)
: KHTMLPart(parentWidget, widgetName, parent, name, prof), m_contextMenu(0)
{
//kdDebug(24000) << "WHTMLPart: " << parentWidget << " " << widgetName << " " << parent << " " << name << this << endl;
@@ -53,11 +53,11 @@ WHTMLPart::WHTMLPart(QWidget *parentWidget, const char *widgetName, bool enableV
if (m_enableViewSource)
{
m_contextMenu = new KPopupMenu(parentWidget);
- m_contextMenu->insertItem(i18n("View &Document Source"), this, SLOT(slotViewSource()));
+ m_contextMenu->insertItem(i18n("View &Document Source"), this, TQT_SLOT(slotViewSource()));
- connect(this, SIGNAL(popupMenu(const QString&, const QPoint&)), SLOT(popupMenu(const QString&, const QPoint&)));
+ connect(this, TQT_SIGNAL(popupMenu(const TQString&, const TQPoint&)), TQT_SLOT(popupMenu(const TQString&, const TQPoint&)));
}
- connect(browserExtension(), SIGNAL(openURLRequest (const KURL &, const KParts::URLArgs &)), this, SLOT(openURL(const KURL&)));
+ connect(browserExtension(), TQT_SIGNAL(openURLRequest (const KURL &, const KParts::URLArgs &)), this, TQT_SLOT(openURL(const KURL&)));
// setCharset( konqConfig.readEntry("DefaultEncoding") );
// setEncoding( konqConfig.readEntry("DefaultEncoding") );
@@ -86,7 +86,7 @@ bool WHTMLPart::openURL(const KURL& url)
return KHTMLPart::openURL(url);
}
-void WHTMLPart::urlSelected ( const QString &url, int button, int state, const QString &target, KParts::URLArgs args)
+void WHTMLPart::urlSelected ( const TQString &url, int button, int state, const TQString &target, KParts::URLArgs args)
{
KHTMLPart::urlSelected (url, button, state, target, args);
KURL cURL = completeURL( url );
@@ -120,7 +120,7 @@ void WHTMLPart::back()
}
-void WHTMLPart::addToHistory(const QString &url)
+void WHTMLPart::addToHistory(const TQString &url)
{
if ( history.count() > 0 )
@@ -149,26 +149,26 @@ bool WHTMLPart::forwardEnable()
return hpos < history.count()-1;
}
-KParts::ReadOnlyPart *WHTMLPart::createPart( QWidget * parentWidget, const char *widgetName,
- QObject *parent, const char *name,
- const QString &, QString &,
- QStringList &, const QStringList &)
+KParts::ReadOnlyPart *WHTMLPart::createPart( TQWidget * parentWidget, const char *widgetName,
+ TQObject *parent, const char *name,
+ const TQString &, TQString &,
+ TQStringList &, const TQStringList &)
{
//kdDebug(24000) << "Create WHTMLPart: " << parentWidget << " " << widgetName << " " << parent << " " << name << endl;
return new WHTMLPart(parentWidget, widgetName, m_enableViewSource, parent, name);
}
-bool WHTMLPart::eventFilter(QObject *watched, QEvent *e)
+bool WHTMLPart::eventFilter(TQObject *watched, TQEvent *e)
{
- if (watched == view() && e->type() == QEvent::FocusOut && (!m_contextMenu || !m_contextMenu->hasFocus()))
+ if (watched == view() && e->type() == TQEvent::FocusOut && (!m_contextMenu || !m_contextMenu->hasFocus()))
emit previewHasFocus(false);
else
- if (watched == view() && e->type() == QEvent::FocusIn)
+ if (watched == view() && e->type() == TQEvent::FocusIn)
emit previewHasFocus(true);
return false;
}
-void WHTMLPart::popupMenu(const QString &/*url*/, const QPoint &point)
+void WHTMLPart::popupMenu(const TQString &/*url*/, const TQPoint &point)
{
m_contextMenu->popup(point);
}
@@ -176,9 +176,9 @@ void WHTMLPart::popupMenu(const QString &/*url*/, const QPoint &point)
void WHTMLPart::slotViewSource()
{
KTempFile *tmpFile = new KTempFile(tmpDir + "-preview-", ".html");
- QString tempFileName = QFileInfo(*(tmpFile->file())).filePath();
+ TQString tempFileName = TQFileInfo(*(tmpFile->file())).filePath();
tmpFile->setAutoDelete(true);
- tmpFile->textStream()->setCodec(QTextCodec::codecForName("utf8"));
+ tmpFile->textStream()->setCodec(TQTextCodec::codecForName("utf8"));
*(tmpFile->textStream()) << documentSource();
tmpFile->close();
tempFileList.append(tmpFile);
diff --git a/quanta/parts/preview/whtmlpart.h b/quanta/parts/preview/whtmlpart.h
index 1c0c83c0..63be955b 100644
--- a/quanta/parts/preview/whtmlpart.h
+++ b/quanta/parts/preview/whtmlpart.h
@@ -18,7 +18,7 @@
#ifndef WHTMLPART_H
#define WHTMLPART_H
-#include <qstrlist.h>
+#include <tqstrlist.h>
#include <khtml_part.h>
@@ -30,8 +30,8 @@ class KPopupMenu;
class WHTMLPart : public KHTMLPart {
Q_OBJECT
public:
- WHTMLPart(QWidget *parentWidget = 0, const char *widgetname = 0, bool enableViewSource = false,
- QObject *parent = 0, const char *name = 0, GUIProfile prof = DefaultGUI );
+ WHTMLPart(TQWidget *parentWidget = 0, const char *widgetname = 0, bool enableViewSource = false,
+ TQObject *parent = 0, const char *name = 0, GUIProfile prof = DefaultGUI );
virtual ~WHTMLPart();
/** Specify the URL where the preview was started */
@@ -46,29 +46,29 @@ public slots:
*/
void forward();
void back();
- void popupMenu(const QString &url, const QPoint &point);
+ void popupMenu(const TQString &url, const TQPoint &point);
void slotViewSource();
- void addToHistory(const QString &url);
- virtual bool eventFilter(QObject *watched, QEvent *e);
+ void addToHistory(const TQString &url);
+ virtual bool eventFilter(TQObject *watched, TQEvent *e);
signals:
void updateStatus( bool back, bool forward );
void previewHasFocus(bool focus);
void showPreview(bool show);
- void openFile(const KURL&, const QString&, bool);
+ void openFile(const KURL&, const TQString&, bool);
protected:
- virtual void urlSelected( const QString &url, int button, int state, const QString &_target, KParts::URLArgs args = KParts::URLArgs());
- virtual KParts::ReadOnlyPart *createPart( QWidget *parentWidget, const char *widgetName,
- QObject *parent, const char *name,
- const QString &mimetype, QString &serviceName,
- QStringList &serviceTypes, const QStringList &params);
+ virtual void urlSelected( const TQString &url, int button, int state, const TQString &_target, KParts::URLArgs args = KParts::URLArgs());
+ virtual KParts::ReadOnlyPart *createPart( TQWidget *parentWidget, const char *widgetName,
+ TQObject *parent, const char *name,
+ const TQString &mimetype, TQString &serviceName,
+ TQStringList &serviceTypes, const TQStringList &params);
private:
KURL m_previewedURL;
KPopupMenu *m_contextMenu;
- QStrList history;
+ TQStrList history;
unsigned int hpos;
bool m_enableViewSource;
};
diff --git a/quanta/plugins/quantaplugin.cpp b/quanta/plugins/quantaplugin.cpp
index 89cde63f..730e41f2 100644
--- a/quanta/plugins/quantaplugin.cpp
+++ b/quanta/plugins/quantaplugin.cpp
@@ -28,13 +28,13 @@
#include <kmessagebox.h>
/* QT INCLUDES */
-#include <qstring.h>
-#include <qfile.h>
-#include <qfileinfo.h>
-#include <qwidget.h>
-#include <qwidgetstack.h>
-#include <qstringlist.h>
-#include <qobject.h>
+#include <tqstring.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
+#include <tqwidget.h>
+#include <tqwidgetstack.h>
+#include <tqstringlist.h>
+#include <tqobject.h>
/* OTHER INCLUDES */
#include "quantaplugin.h"
@@ -68,27 +68,27 @@ QuantaPlugin::~QuantaPlugin()
}
/** Sets the superficial name of the plugin */
-void QuantaPlugin::setPluginName(const QString &a_name)
+void QuantaPlugin::setPluginName(const TQString &a_name)
{
m_name = a_name;
if (!m_action)
{
- m_action = new KToggleAction(i18n(a_name.utf8()), 0, this, SLOT(toggle()), quantaApp->actionCollection(), a_name);
+ m_action = new KToggleAction(i18n(a_name.utf8()), 0, this, TQT_SLOT(toggle()), quantaApp->actionCollection(), a_name);
}
m_action->setText(a_name);
}
-QString QuantaPlugin::pluginName() const
+TQString QuantaPlugin::pluginName() const
{
return m_name;
}
-void QuantaPlugin::setLocation(const QString &a_location)
+void QuantaPlugin::setLocation(const TQString &a_location)
{
m_location = a_location;
}
-QString QuantaPlugin::location() const
+TQString QuantaPlugin::location() const
{
return m_location;
}
@@ -98,7 +98,7 @@ bool QuantaPlugin::load()
if(isLoaded())
return false;
- QString loc = location();
+ TQString loc = location();
if(loc.isEmpty())
{
KStandardDirs *dirs = QuantaCommon::pluginDirs("lib");
@@ -107,12 +107,12 @@ bool QuantaPlugin::load()
}
else
{
- loc += QString("/") + fileName();
+ loc += TQString("/") + fileName();
}
- QFileInfo partInfo(loc);
- QString ow = outputWindow();
- m_targetWidget = new QWidget(quantaApp);
+ TQFileInfo partInfo(loc);
+ TQString ow = outputWindow();
+ m_targetWidget = new TQWidget(quantaApp);
if (m_readOnlyPart)
m_part = KParts::ComponentFactory::createPartInstanceFromLibrary<KParts::ReadOnlyPart>(partInfo.baseName().latin1(), m_targetWidget, 0, m_targetWidget, 0 );
else
@@ -126,7 +126,7 @@ bool QuantaPlugin::load()
}
m_part->setName(m_name); // for better debug output
m_part->widget()->setName(m_name); //needed to be able to dock the same plugin twice in separate toolviews
- m_part->widget()->setFocusPolicy(QWidget::ClickFocus);
+ m_part->widget()->setFocusPolicy(TQWidget::ClickFocus);
quantaApp->slotNewPart(m_part, false); // register the part in the partmanager
return true;
}
@@ -184,8 +184,8 @@ bool QuantaPlugin::run()
}
addWidget();
setRunning(true);
- connect( m_part, SIGNAL(setStatusBarText(const QString &)),
- quantaApp, SLOT(slotStatusMsg( const QString & )));
+ connect( m_part, TQT_SIGNAL(setStatusBarText(const TQString &)),
+ quantaApp, TQT_SLOT(slotStatusMsg( const TQString & )));
emit pluginStarted();
@@ -214,25 +214,25 @@ bool QuantaPlugin::toggle()
}
/** Returns the file name of the plugin */
-QString QuantaPlugin::fileName() const
+TQString QuantaPlugin::fileName() const
{
return m_fileName;
}
/** Sets the file name of the plugin */
-void QuantaPlugin::setFileName(const QString &a_fileName)
+void QuantaPlugin::setFileName(const TQString &a_fileName)
{
m_fileName = a_fileName;
}
/** Sets the output window */
-void QuantaPlugin::setOutputWindow(const QString &a_outputWindow)
+void QuantaPlugin::setOutputWindow(const TQString &a_outputWindow)
{
m_outputWindow = a_outputWindow;
}
/** Gets the output window */
-QString QuantaPlugin::outputWindow() const
+TQString QuantaPlugin::outputWindow() const
{
return m_outputWindow;
}
@@ -249,16 +249,16 @@ bool QuantaPlugin::validatePlugin(QuantaPlugin *a_plugin)
}
/** Returns true if the information of a plugin is valid, otherwise false */
-bool QuantaPlugin::validatePluginInfo(const QString & /*a_name*/,
- const QString &a_location, const QString &a_fileName, const QString &/*a_outputWindow*/)
+bool QuantaPlugin::validatePluginInfo(const TQString & /*a_name*/,
+ const TQString &a_location, const TQString &a_fileName, const TQString &/*a_outputWindow*/)
{
bool valid = true;
// look the file up if location is null
if(!a_location.isEmpty())
{
- QString path = a_location + QString("/") + a_fileName;
+ TQString path = a_location + TQString("/") + a_fileName;
- QFileInfo pluginFile(path);
+ TQFileInfo pluginFile(path);
if(!pluginFile.exists())
valid = false;
/* TODO : What other tests should we perform? Permissions etc? */
@@ -287,8 +287,8 @@ bool QuantaPlugin::unload(bool remove)
if(!isLoaded())
return false;
- disconnect( m_part, SIGNAL(setStatusBarText(const QString &)),
- quantaApp, SLOT(slotStatusMsg( const QString & )));
+ disconnect( m_part, TQT_SIGNAL(setStatusBarText(const TQString &)),
+ quantaApp, TQT_SLOT(slotStatusMsg( const TQString & )));
delete (KParts::ReadOnlyPart*) m_part;
m_part = 0;
@@ -327,22 +327,22 @@ bool QuantaPlugin::isStandard() const
}
/** No descriptions */
-QString QuantaPlugin::standardName()
+TQString QuantaPlugin::standardName()
{
return m_standardName;
}
/** No descriptions */
-void QuantaPlugin::setStandardName(const QString& a_stdName)
+void QuantaPlugin::setStandardName(const TQString& a_stdName)
{
m_standardName = a_stdName;
}
/** No descriptions */
-QString QuantaPlugin::icon()
+TQString QuantaPlugin::icon()
{
return m_icon;
}
/** No descriptions */
-void QuantaPlugin::setIcon(const QString& a_icon)
+void QuantaPlugin::setIcon(const TQString& a_icon)
{
m_icon = a_icon;
if (m_action) m_action->setIcon(a_icon);
@@ -350,7 +350,7 @@ void QuantaPlugin::setIcon(const QString& a_icon)
void QuantaPlugin::addWidget()
{
- QString ow = outputWindow();
+ TQString ow = outputWindow();
if(ow == i18n("Separate Toolview"))
{
m_part->widget()->setCaption(m_name);
@@ -366,7 +366,7 @@ void QuantaPlugin::addWidget()
void QuantaPlugin::removeWidget()
{
- QString ow = outputWindow();
+ TQString ow = outputWindow();
if(ow == i18n("Separate Toolview"))
{
delete m_pluginToolView;
@@ -378,7 +378,7 @@ void QuantaPlugin::removeWidget()
}
}
-QWidget *QuantaPlugin::widget()
+TQWidget *QuantaPlugin::widget()
{
if (isLoaded()) {
return m_part->widget();
@@ -387,7 +387,7 @@ QWidget *QuantaPlugin::widget()
}
}
-void QuantaPlugin::plugAction(QPopupMenu *menu)
+void QuantaPlugin::plugAction(TQPopupMenu *menu)
{
m_action->plug(menu);
}
diff --git a/quanta/plugins/quantaplugin.h b/quanta/plugins/quantaplugin.h
index 08b4dbdc..fb01477c 100644
--- a/quanta/plugins/quantaplugin.h
+++ b/quanta/plugins/quantaplugin.h
@@ -22,8 +22,8 @@
#include <kparts/part.h>
/* QT INCLUDES */
-#include <qguardedptr.h>
-#include <qobject.h>
+#include <tqguardedptr.h>
+#include <tqobject.h>
class QString;
@@ -44,26 +44,26 @@ public:
~QuantaPlugin();
virtual bool isRunning() const;
/** Gets the superficial plugin name */
- virtual QString pluginName() const;
+ virtual TQString pluginName() const;
/** Gets the location of the plugin */
- virtual QString location() const;
+ virtual TQString location() const;
/** Gets the plugin's standard attribute */
virtual bool isStandard() const;
/** Gets the output window */
- virtual QString outputWindow() const;
+ virtual TQString outputWindow() const;
/** Returns true if the plugin specified by a_plugin is valid, false otherwise */
static bool validatePlugin(QuantaPlugin *);
/** Returns true if the options of a plugin are valid, otherwise false */
- static bool validatePluginInfo(const QString &, const QString &,
- const QString &, const QString &);
+ static bool validatePluginInfo(const TQString &, const TQString &,
+ const TQString &, const TQString &);
virtual void addWidget();
virtual void removeWidget();
- QWidget *widget();
+ TQWidget *widget();
KParts::ReadOnlyPart *part() {return m_part;}
- QString name() {return m_name;}
+ TQString name() {return m_name;}
/** plugs action into menu */
- void plugAction(QPopupMenu *menu);
+ void plugAction(TQPopupMenu *menu);
public slots:
/** Sets whether the plugin is running or not */
virtual void setRunning(bool);
@@ -76,29 +76,29 @@ public slots:
/** Runs the plugin if it's not running yet, unloads otherwise.*/
virtual bool toggle();
/** Sets the superficial name of the plugin */
- virtual void setPluginName(const QString &);
+ virtual void setPluginName(const TQString &);
/** Sets the output window */
- virtual void setOutputWindow(const QString &);
+ virtual void setOutputWindow(const TQString &);
/** Sets the plugin's standard attribute */
virtual void setStandard(bool isStandard);
/** Sets the location of the plugin */
- virtual void setLocation(const QString &);
+ virtual void setLocation(const TQString &);
/** Sets the file name of the plugin */
- virtual void setFileName(const QString &);
+ virtual void setFileName(const TQString &);
/** Returns the file name of the plugin */
- virtual QString fileName() const;
+ virtual TQString fileName() const;
virtual int input() {return m_input;}
virtual void setInput(int a_input) { m_input = a_input;}
/** Returns whether the plugin is loaded or not */
virtual bool isLoaded();
/** No descriptions */
- void setIcon(const QString& a_icon);
+ void setIcon(const TQString& a_icon);
/** No descriptions */
- QString icon();
+ TQString icon();
/** No descriptions */
- void setStandardName(const QString& a_stdName);
+ void setStandardName(const TQString& a_stdName);
/** No descriptions */
- QString standardName();
+ TQString standardName();
void setReadOnlyPart(bool a_readOnlyPart) {m_readOnlyPart = a_readOnlyPart;}
bool readOnlyPart() {return m_readOnlyPart;}
signals:
@@ -106,23 +106,23 @@ signals:
void pluginStopped();
protected:
/** Superficial name of plugin */
- QString m_fileName;
- QString m_name;
- QString m_location;
- QString m_icon;
- QString m_outputWindow;
+ TQString m_fileName;
+ TQString m_name;
+ TQString m_location;
+ TQString m_icon;
+ TQString m_outputWindow;
int m_input;
/** True, if it is not a user added plugin. Special handling code may be necessary for standard plugins. */
bool m_standard;
bool m_isRunning;
- QGuardedPtr<KParts::ReadOnlyPart> m_part;
+ TQGuardedPtr<KParts::ReadOnlyPart> m_part;
bool m_readOnlyPart;
QuantaView *m_view;
KToggleAction *m_action;
private: // Private attributes
- QString m_standardName;
+ TQString m_standardName;
KMdiToolViewAccessor* m_pluginToolView;
- QWidget *m_targetWidget; //this will be the parent, used only to make the plugin widget hidden until addWidget is called
+ TQWidget *m_targetWidget; //this will be the parent, used only to make the plugin widget hidden until addWidget is called
};
#endif
diff --git a/quanta/plugins/quantapluginconfig.cpp b/quanta/plugins/quantapluginconfig.cpp
index a03ffc2c..30fd6ee2 100644
--- a/quanta/plugins/quantapluginconfig.cpp
+++ b/quanta/plugins/quantapluginconfig.cpp
@@ -23,32 +23,32 @@
#include <kicondialog.h>
/* QT INCLUDES */
-#include <qpushbutton.h>
-#include <qcheckbox.h>
-#include <qlineedit.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qcombobox.h>
-#include <qwidgetstack.h>
+#include <tqpushbutton.h>
+#include <tqcheckbox.h>
+#include <tqlineedit.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqcombobox.h>
+#include <tqwidgetstack.h>
/* OTHER INCLUDES */
#include "quantapluginconfig.h"
#include "quantaplugin.h"
#include "pluginconfig.h"
-QuantaPluginConfig::QuantaPluginConfig(QWidget *a_parent, const char *a_name)
+QuantaPluginConfig::QuantaPluginConfig(TQWidget *a_parent, const char *a_name)
: KDialogBase(a_parent, a_name, true, i18n("Configure Plugin"), KDialogBase::Ok | KDialogBase::Cancel)
{
m_pluginConfigWidget = new PluginConfig(this);
- QStringList windows;
+ TQStringList windows;
i18n("Message Area Tab");
windows << i18n("Editor Tab") << i18n("Separate Toolview");
m_pluginConfigWidget->outputWindow->insertStringList(windows);
m_pluginConfigWidget->iconButton->setStrictIconSize(false);
- connect(m_pluginConfigWidget->pluginName, SIGNAL(textChanged(const QString &)), this, SLOT(nameChanged(const QString &)));
- connect(m_pluginConfigWidget->locationButton, SIGNAL(clicked()), this, SLOT(selectLocation()));
+ connect(m_pluginConfigWidget->pluginName, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(nameChanged(const TQString &)));
+ connect(m_pluginConfigWidget->locationButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(selectLocation()));
setMainWidget(m_pluginConfigWidget);
}
@@ -77,16 +77,16 @@ void QuantaPluginConfig::accept()
/** Gets the plugin location */
void QuantaPluginConfig::selectLocation()
{
- QString pluginLocation = KFileDialog::getExistingDirectory(QString::null, this, i18n("Select Plugin Folder"));
+ TQString pluginLocation = KFileDialog::getExistingDirectory(TQString::null, this, i18n("Select Plugin Folder"));
if(!pluginLocation.isNull())
{
m_pluginConfigWidget->location->setText(pluginLocation);
}
}
-void QuantaPluginConfig::nameChanged(const QString &a_text)
+void QuantaPluginConfig::nameChanged(const TQString &a_text)
{
- QString text = a_text;
+ TQString text = a_text;
text = "lib" + text + ".la";
m_pluginConfigWidget->pluginFileName->setText(text.lower());
}
diff --git a/quanta/plugins/quantapluginconfig.h b/quanta/plugins/quantapluginconfig.h
index f56142e9..7fa81750 100644
--- a/quanta/plugins/quantapluginconfig.h
+++ b/quanta/plugins/quantapluginconfig.h
@@ -31,7 +31,7 @@ class QuantaPluginConfig : public KDialogBase
{
Q_OBJECT
public:
- QuantaPluginConfig(QWidget *, const char *);
+ QuantaPluginConfig(TQWidget *, const char *);
~QuantaPluginConfig();
public slots:
/** Validates the dialog before accepting */
@@ -39,7 +39,7 @@ public slots:
/** Gets the plugin location */
void selectLocation();
/** Updates other widgets based on the name */
- void nameChanged(const QString &);
+ void nameChanged(const TQString &);
protected:
PluginConfig *m_pluginConfigWidget;
diff --git a/quanta/plugins/quantaplugineditor.cpp b/quanta/plugins/quantaplugineditor.cpp
index e7c32ec0..42f6a237 100644
--- a/quanta/plugins/quantaplugineditor.cpp
+++ b/quanta/plugins/quantaplugineditor.cpp
@@ -24,14 +24,14 @@
#include <kdialogbase.h>
/* QT INCLUDES */
-#include <qwidget.h>
-#include <qobject.h>
-#include <qdict.h>
-#include <qcheckbox.h>
-#include <qpushbutton.h>
-#include <qlineedit.h>
-#include <qcombobox.h>
-#include <qlistview.h>
+#include <tqwidget.h>
+#include <tqobject.h>
+#include <tqdict.h>
+#include <tqcheckbox.h>
+#include <tqpushbutton.h>
+#include <tqlineedit.h>
+#include <tqcombobox.h>
+#include <tqlistview.h>
/* OTHER INCLUDES */
#include "quantaplugineditor.h"
@@ -41,32 +41,32 @@
#include "plugineditor.h"
#include "resource.h"
-QuantaPluginEditor::QuantaPluginEditor(QWidget *a_parent, const char *a_name)
+QuantaPluginEditor::QuantaPluginEditor(TQWidget *a_parent, const char *a_name)
: KDialogBase(a_parent, a_name, true, i18n("Edit Plugins"), KDialogBase::Ok | KDialogBase::Cancel)
{
// m_plugins.setAutoDelete(true);
m_pluginEditorWidget = new PluginEditor(this);
setMainWidget(m_pluginEditorWidget);
- m_pluginEditorWidget->pluginList->setSelectionMode(QListView::Single);
+ m_pluginEditorWidget->pluginList->setSelectionMode(TQListView::Single);
m_pluginEditorWidget->pluginList->setAllColumnsShowFocus(true);
m_pluginEditorWidget->pluginList->setColumnAlignment(2, Qt::AlignHCenter);
- connect(this, SIGNAL(pluginsChanged()), SLOT(refreshPlugins()));
- connect(m_pluginEditorWidget->refreshButton, SIGNAL(clicked()), SLOT(refreshPlugins()));
- connect(m_pluginEditorWidget->addButton, SIGNAL(clicked()), SLOT(addPlugin()));
- connect(m_pluginEditorWidget->removeButton, SIGNAL(clicked()), SLOT(removePlugin()));
- connect(m_pluginEditorWidget->addSearchPathButton, SIGNAL(clicked()), SLOT(addSearchPath()));
- connect(m_pluginEditorWidget->configureButton, SIGNAL(clicked()), SLOT(configurePlugin()));
- connect(m_pluginEditorWidget->pluginList, SIGNAL(doubleClicked(QListViewItem*, const QPoint&, int)),
- SLOT(configurePlugin(QListViewItem*, const QPoint&, int)));
+ connect(this, TQT_SIGNAL(pluginsChanged()), TQT_SLOT(refreshPlugins()));
+ connect(m_pluginEditorWidget->refreshButton, TQT_SIGNAL(clicked()), TQT_SLOT(refreshPlugins()));
+ connect(m_pluginEditorWidget->addButton, TQT_SIGNAL(clicked()), TQT_SLOT(addPlugin()));
+ connect(m_pluginEditorWidget->removeButton, TQT_SIGNAL(clicked()), TQT_SLOT(removePlugin()));
+ connect(m_pluginEditorWidget->addSearchPathButton, TQT_SIGNAL(clicked()), TQT_SLOT(addSearchPath()));
+ connect(m_pluginEditorWidget->configureButton, TQT_SIGNAL(clicked()), TQT_SLOT(configurePlugin()));
+ connect(m_pluginEditorWidget->pluginList, TQT_SIGNAL(doubleClicked(TQListViewItem*, const TQPoint&, int)),
+ TQT_SLOT(configurePlugin(TQListViewItem*, const TQPoint&, int)));
}
QuantaPluginEditor::~QuantaPluginEditor()
{
}
-QDict<QuantaPlugin> QuantaPluginEditor::plugins()
+TQDict<QuantaPlugin> QuantaPluginEditor::plugins()
{
return m_plugins;
}
@@ -90,7 +90,7 @@ void QuantaPluginEditor::addPlugin()
newPlugin->setOutputWindow(configWidget->outputWindow->currentText());
newPlugin->setStandard(false);
newPlugin->setIcon(configWidget->iconButton->icon());
- QString pluginName = newPlugin->pluginName();
+ TQString pluginName = newPlugin->pluginName();
m_plugins.insert(pluginName, newPlugin);
emit pluginsChanged();
}
@@ -100,7 +100,7 @@ void QuantaPluginEditor::addPlugin()
void QuantaPluginEditor::addSearchPath()
{
// Get a dir and append it to the line edit
- QString appendDir = KFileDialog::getExistingDirectory(QString::null, 0, i18n("Select Folder"));
+ TQString appendDir = KFileDialog::getExistingDirectory(TQString::null, 0, i18n("Select Folder"));
if(!appendDir.isNull())
{
m_pluginEditorWidget->searchPaths->setText(m_pluginEditorWidget->searchPaths->text()+appendDir+":");
@@ -110,8 +110,8 @@ void QuantaPluginEditor::addSearchPath()
void QuantaPluginEditor::configurePlugin()
{
// create a new config dialog. populate with plugin data
- QString key;
- QListViewItem *item = m_pluginEditorWidget->pluginList->currentItem();
+ TQString key;
+ TQListViewItem *item = m_pluginEditorWidget->pluginList->currentItem();
if(item)
key = item->text(0);
@@ -146,7 +146,7 @@ void QuantaPluginEditor::configurePlugin()
}
}
-void QuantaPluginEditor::configurePlugin(QListViewItem* item, const QPoint&, int)
+void QuantaPluginEditor::configurePlugin(TQListViewItem* item, const TQPoint&, int)
{
if (item)
configurePlugin();
@@ -157,15 +157,15 @@ void QuantaPluginEditor::refreshPlugins()
// call validate on all plugins to refresh their status
m_pluginEditorWidget->pluginList->clear();
- QDictIterator<QuantaPlugin> it(m_plugins);
+ TQDictIterator<QuantaPlugin> it(m_plugins);
for(;it.current();++it)
{
- QListViewItem *newItem = new PluginEditorItem(m_pluginEditorWidget->pluginList);
+ TQListViewItem *newItem = new PluginEditorItem(m_pluginEditorWidget->pluginList);
QuantaPlugin *curPlugin = it.current();
newItem->setText(0, curPlugin->pluginName());
- QPixmap statusIcon;
+ TQPixmap statusIcon;
bool isValid = QuantaPlugin::validatePlugin(curPlugin);
if(isValid)
statusIcon = SmallIcon("ok", KGlobal::instance());
@@ -183,7 +183,7 @@ void QuantaPluginEditor::refreshPlugins()
void QuantaPluginEditor::removePlugin()
{
- QListViewItem *currentItem = m_pluginEditorWidget->pluginList->currentItem();
+ TQListViewItem *currentItem = m_pluginEditorWidget->pluginList->currentItem();
if (currentItem)
{
QuantaPlugin *plugin = m_plugins.find(currentItem->text(0));
@@ -196,32 +196,32 @@ void QuantaPluginEditor::removePlugin()
}
}
-void QuantaPluginEditor::setPlugins(QDict<QuantaPlugin> a_plugins)
+void QuantaPluginEditor::setPlugins(TQDict<QuantaPlugin> a_plugins)
{
m_plugins = a_plugins;
emit pluginsChanged();
}
-PluginEditorItem::PluginEditorItem(QListView *a_parent)
- : QListViewItem(a_parent)
+PluginEditorItem::PluginEditorItem(TQListView *a_parent)
+ : TQListViewItem(a_parent)
{
}
-void PluginEditorItem::paintCell(QPainter *a_painter, const QColorGroup &a_cg, int a_column, int a_width, int a_align)
+void PluginEditorItem::paintCell(TQPainter *a_painter, const TQColorGroup &a_cg, int a_column, int a_width, int a_align)
{
/*
if(a_column == 2)
a_align = Qt::AlignCenter;
FIXME : Why won't QT let us align cell contents?
*/
- QListViewItem::paintCell(a_painter, a_cg, a_column, a_width, a_align);
+ TQListViewItem::paintCell(a_painter, a_cg, a_column, a_width, a_align);
}
/** No descriptions */
-void QuantaPluginEditor::setSearchPaths(const QStringList& paths)
+void QuantaPluginEditor::setSearchPaths(const TQStringList& paths)
{
- QString str;
+ TQString str;
for (uint i =0; i < paths.count(); i++)
{
str += paths[i] +":";
@@ -229,10 +229,10 @@ void QuantaPluginEditor::setSearchPaths(const QStringList& paths)
m_pluginEditorWidget->searchPaths->setText(str);
}
/** No descriptions */
-QStringList QuantaPluginEditor::searchPathList()
+TQStringList QuantaPluginEditor::searchPathList()
{
- QString str = m_pluginEditorWidget->searchPaths->text();
- QStringList paths = QStringList::split(":",str);
+ TQString str = m_pluginEditorWidget->searchPaths->text();
+ TQStringList paths = TQStringList::split(":",str);
return paths;
}
diff --git a/quanta/plugins/quantaplugineditor.h b/quanta/plugins/quantaplugineditor.h
index fc028056..88da3cfc 100644
--- a/quanta/plugins/quantaplugineditor.h
+++ b/quanta/plugins/quantaplugineditor.h
@@ -22,8 +22,8 @@
#include <kdialogbase.h>
/* QT INCLUDES */
-#include <qdict.h>
-#include <qlistview.h>
+#include <tqdict.h>
+#include <tqlistview.h>
/* OTHER INCLUDES */
#include "quantaplugin.h"
@@ -44,36 +44,36 @@ class QuantaPluginEditor : public KDialogBase
Q_OBJECT
public:
- QuantaPluginEditor(QWidget *, const char *);
+ QuantaPluginEditor(TQWidget *, const char *);
~QuantaPluginEditor();
- QDict<QuantaPlugin> plugins();
+ TQDict<QuantaPlugin> plugins();
/** No descriptions */
- QStringList searchPathList();
+ TQStringList searchPathList();
/** No descriptions */
- void setSearchPaths(const QStringList& paths);
+ void setSearchPaths(const TQStringList& paths);
signals:
void pluginsChanged();
public slots:
- void setPlugins(QDict<QuantaPlugin>);
+ void setPlugins(TQDict<QuantaPlugin>);
void addSearchPath();
void addPlugin();
void removePlugin();
void configurePlugin();
- void configurePlugin(QListViewItem*, const QPoint&, int);
+ void configurePlugin(TQListViewItem*, const TQPoint&, int);
void refreshPlugins();
protected:
- QDict<QuantaPlugin> m_plugins;
+ TQDict<QuantaPlugin> m_plugins;
PluginEditor *m_pluginEditorWidget;
};
class PluginEditorItem : public QListViewItem
{
public:
- PluginEditorItem(QListView *);
- virtual void paintCell(QPainter *, const QColorGroup &, int, int, int);
+ PluginEditorItem(TQListView *);
+ virtual void paintCell(TQPainter *, const TQColorGroup &, int, int, int);
};
#endif
diff --git a/quanta/plugins/quantaplugininterface.cpp b/quanta/plugins/quantaplugininterface.cpp
index 45fb8caa..098c7828 100644
--- a/quanta/plugins/quantaplugininterface.cpp
+++ b/quanta/plugins/quantaplugininterface.cpp
@@ -25,10 +25,10 @@
#include <kmessagebox.h>
/* QT INCLUDES */
-#include <qdict.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qfileinfo.h>
+#include <tqdict.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqfileinfo.h>
/* OTHER INCLUDES */
#include "quantaplugininterface.h"
@@ -38,11 +38,11 @@
#include "resource.h"
#include "quantacommon.h"
-QuantaPluginInterface::QuantaPluginInterface(QWidget *parent)
+QuantaPluginInterface::QuantaPluginInterface(TQWidget *parent)
{
m_parent = parent;
(void) new KAction( i18n( "Configure &Plugins..." ), 0, 0,
- this, SLOT( slotPluginsEdit() ),
+ this, TQT_SLOT( slotPluginsEdit() ),
((KMainWindow*)parent)->actionCollection(), "configure_plugins" );
m_pluginMenu = 0L;
// m_plugins.setAutoDelete(true);
@@ -54,33 +54,33 @@ QuantaPluginInterface::~QuantaPluginInterface()
// TODO : free plugins
}
-void QuantaPluginInterface::readConfigFile(const QString& configFile)
+void QuantaPluginInterface::readConfigFile(const TQString& configFile)
{
KConfig *config = new KConfig(configFile);
config->setGroup("General");
- QStringList pList = config->readListEntry("Plugins");
- for(QStringList::Iterator it = pList.begin();it != pList.end(); ++it)
+ TQStringList pList = config->readListEntry("Plugins");
+ for(TQStringList::Iterator it = pList.begin();it != pList.end(); ++it)
(*it) = (*it).stripWhiteSpace();
//setPluginNames(pList);
- QStringList paths = QuantaCommon::readPathListEntry(config, "SearchPaths");
- for(QStringList::Iterator it = paths.begin();it != paths.end(); ++it)
+ TQStringList paths = QuantaCommon::readPathListEntry(config, "SearchPaths");
+ for(TQStringList::Iterator it = paths.begin();it != paths.end(); ++it)
(*it) = (*it).stripWhiteSpace();
qConfig.pluginSearchPaths = paths;
// now that we have a list of the plugins, go through and get the details of them
- for(QStringList::Iterator it = pList.begin();it != pList.end();++it)
+ for(TQStringList::Iterator it = pList.begin();it != pList.end();++it)
{
if (m_plugins.find(*it))
continue;
config->setGroup(*it);
QuantaPlugin *newPlugin = 0;
- QString pluginType = config->readEntry("Type", "KPart");
+ TQString pluginType = config->readEntry("Type", "KPart");
bool isStandard = config->readBoolEntry("Standard",false);
/* if (isStandard)
{
- QString stdName = config->readEntry("Standard Name");
+ TQString stdName = config->readEntry("Standard Name");
if (newPlugin)
{
newPlugin->setStandardName(stdName);
@@ -101,7 +101,7 @@ void QuantaPluginInterface::readConfigFile(const QString& configFile)
newPlugin->setFileName(config->readEntry("FileName"));
newPlugin->setLocation(config->readEntry("Location"));
newPlugin->setIcon(config->readEntry("Icon"));
- QString type = config->readEntry("OutputWindow");
+ TQString type = config->readEntry("OutputWindow");
if (type == "Message Frame" || type == "Separate Toolview")
type = i18n("Separate Toolview");
else
@@ -121,8 +121,8 @@ void QuantaPluginInterface::readConfig()
m_plugins.clear();
// read the local plugins.rc
- QString configFile = locateLocal("appdata", "plugins.rc");
- if (QFileInfo(configFile).exists())
+ TQString configFile = locateLocal("appdata", "plugins.rc");
+ if (TQFileInfo(configFile).exists())
readConfigFile(configFile);
// read the global plugins.rc
configFile = qConfig.globalDataDir + resourceDir + "plugins.rc";
@@ -135,13 +135,13 @@ void QuantaPluginInterface::writeConfig()
// write the plugin settings to the rc file
KConfig *config = new KConfig(locateLocal("appdata", "plugins.rc"));
- QStringList names = pluginNames();
+ TQStringList names = pluginNames();
config->setGroup("General");
config->writeEntry("Plugins", names);
config->writePathEntry("SearchPaths", qConfig.pluginSearchPaths);
- for(QStringList::Iterator it = names.begin();it != names.end(); ++it)
+ for(TQStringList::Iterator it = names.begin();it != names.end(); ++it)
{
config->setGroup(*it);
@@ -152,7 +152,7 @@ void QuantaPluginInterface::writeConfig()
config->writeEntry("Type", "KPart"); //not used, but just to be compatible
config->writeEntry("Location", curPlugin->location());
config->writeEntry("Icon", curPlugin->icon());
- QString type = curPlugin->outputWindow();
+ TQString type = curPlugin->outputWindow();
if (type == i18n("Editor Tab")) type = "Editor Tab";
if (type == i18n("Separate Toolview")) type = "Separate Toolview";
config->writeEntry("OutputWindow", type);
@@ -172,7 +172,7 @@ void QuantaPluginInterface::writeConfig()
/** Returns true if the plugin is available */
-bool QuantaPluginInterface::pluginAvailable(const QString &a_name)
+bool QuantaPluginInterface::pluginAvailable(const TQString &a_name)
{
if (a_name.isEmpty())
return false;
@@ -184,10 +184,10 @@ bool QuantaPluginInterface::pluginAvailable(const QString &a_name)
}
/** Gets the plugin names */
-QStringList QuantaPluginInterface::pluginNames() const
+TQStringList QuantaPluginInterface::pluginNames() const
{
- QStringList names;
- QDictIterator<QuantaPlugin> it(m_plugins);
+ TQStringList names;
+ TQDictIterator<QuantaPlugin> it(m_plugins);
for(;it.current();++it)
{
names << (*it)->pluginName();
@@ -197,7 +197,7 @@ QStringList QuantaPluginInterface::pluginNames() const
/** Gets the plugin specified by a_name */
-QuantaPlugin *QuantaPluginInterface::plugin(const QString &a_name)
+QuantaPlugin *QuantaPluginInterface::plugin(const TQString &a_name)
{
if (a_name.isEmpty())
return 0L;
@@ -210,7 +210,7 @@ void QuantaPluginInterface::buildPluginMenu()
m_pluginMenu->clear();
// m_pluginMenu->setCheckable(true);
- QDictIterator<QuantaPlugin> it(m_plugins);
+ TQDictIterator<QuantaPlugin> it(m_plugins);
for(;it.current() != 0;++it)
{
QuantaPlugin *curPlugin = it.current();
@@ -240,8 +240,8 @@ void QuantaPluginInterface::slotPluginsEdit()
void QuantaPluginInterface::slotPluginsValidate()
{
- QValueList<QuantaPlugin*> invalidPlugins;
- QDictIterator<QuantaPlugin> it(m_plugins);
+ TQValueList<QuantaPlugin*> invalidPlugins;
+ TQDictIterator<QuantaPlugin> it(m_plugins);
for(;it.current();++it)
{
if(!QuantaPlugin::validatePlugin(it.current()))
@@ -252,7 +252,7 @@ void QuantaPluginInterface::slotPluginsValidate()
uint invalidCount = invalidPlugins.count();
if (invalidCount > 0)
{
- QString invalidNames;
+ TQString invalidNames;
for (uint i=0; i < invalidCount; i++)
{
invalidNames += "<br>" + invalidPlugins[i]->name();
diff --git a/quanta/plugins/quantaplugininterface.h b/quanta/plugins/quantaplugininterface.h
index a3e85030..2749fbd0 100644
--- a/quanta/plugins/quantaplugininterface.h
+++ b/quanta/plugins/quantaplugininterface.h
@@ -23,10 +23,10 @@
#include <kstandarddirs.h>
/* QT INCLUDES */
-#include <qobject.h>
-#include <qdict.h>
-#include <qstringlist.h>
-#include <qpopupmenu.h>
+#include <tqobject.h>
+#include <tqdict.h>
+#include <tqstringlist.h>
+#include <tqpopupmenu.h>
/* OTHER INCLUDES */
@@ -45,7 +45,7 @@ public:
* the parameters are only used at the first call to create the class
*
*/
- static QuantaPluginInterface* const ref(QWidget *parent = 0L)
+ static QuantaPluginInterface* const ref(TQWidget *parent = 0L)
{
static QuantaPluginInterface *m_ref;
if (!m_ref) m_ref = new QuantaPluginInterface (parent);
@@ -58,16 +58,16 @@ public:
/** Write the rc file */
virtual void writeConfig();
/* Returns TRUE if the plugin specified by a_name is available for us*/
- bool pluginAvailable(const QString &);
+ bool pluginAvailable(const TQString &);
/** Gets the plugins */
- QDict<QuantaPlugin> plugins() {return m_plugins;};
+ TQDict<QuantaPlugin> plugins() {return m_plugins;};
/** Sets the plugins */
- void setPlugins(QDict<QuantaPlugin> plugins) {m_plugins = plugins;};
+ void setPlugins(TQDict<QuantaPlugin> plugins) {m_plugins = plugins;};
/** Gets the plugin specified by a_name */
- virtual QuantaPlugin *plugin(const QString &);
+ virtual QuantaPlugin *plugin(const TQString &);
/** Gets the plugin menu */
- virtual QPopupMenu *pluginMenu() {return m_pluginMenu;};
- void setPluginMenu(QPopupMenu *pluginMenu) {m_pluginMenu = pluginMenu;}
+ virtual TQPopupMenu *pluginMenu() {return m_pluginMenu;};
+ void setPluginMenu(TQPopupMenu *pluginMenu) {m_pluginMenu = pluginMenu;}
/** Builds the plugins menu dynamically */
void buildPluginMenu();
@@ -76,7 +76,7 @@ private:
* If you need the class use QuantaPluginInterface::ref() for
* construction and reference
*/
- QuantaPluginInterface(QWidget *parent);
+ QuantaPluginInterface(TQWidget *parent);
protected slots:
/** slot for the menu: validate */
@@ -86,18 +86,18 @@ protected slots:
protected:
/** Gets the plugin names */
- virtual QStringList pluginNames() const;
- void readConfigFile(const QString& configFile);
+ virtual TQStringList pluginNames() const;
+ void readConfigFile(const TQString& configFile);
- QDict<QuantaPlugin> m_plugins;
+ TQDict<QuantaPlugin> m_plugins;
- QWidget *m_parent;
+ TQWidget *m_parent;
- QPopupMenu *m_pluginMenu;
+ TQPopupMenu *m_pluginMenu;
signals:
void hideSplash();
- void statusMsg(const QString &);
+ void statusMsg(const TQString &);
};
#endif
diff --git a/quanta/project/eventconfigurationdlg.cpp b/quanta/project/eventconfigurationdlg.cpp
index e85ce7f6..29d23964 100644
--- a/quanta/project/eventconfigurationdlg.cpp
+++ b/quanta/project/eventconfigurationdlg.cpp
@@ -15,7 +15,7 @@
***************************************************************************/
//qt includes
-#include <qdom.h>
+#include <tqdom.h>
//kde includes
#include <kcombobox.h>
@@ -29,7 +29,7 @@
#include "eventeditordlg.h"
#include "qpevents.h"
-EventConfigurationDlg::EventConfigurationDlg(KActionCollection *actionCollection, QWidget* parent, const char* name, WFlags fl)
+EventConfigurationDlg::EventConfigurationDlg(KActionCollection *actionCollection, TQWidget* parent, const char* name, WFlags fl)
: EventConfigurationDlgS(parent,name,fl)
{
m_actionCollection = actionCollection;
@@ -41,14 +41,14 @@ EventConfigurationDlg::~EventConfigurationDlg()
void EventConfigurationDlg::initEvents(EventActions *events)
{
- QListViewItem *item;
+ TQListViewItem *item;
for (EventActions::ConstIterator it = events->constBegin(); it != events->constEnd(); ++it)
{
- QValueList<EventAction> evList = it.data();
- for (QValueList<EventAction>::ConstIterator it2 = evList.constBegin(); it2 != evList.constEnd(); ++it2)
+ TQValueList<EventAction> evList = it.data();
+ for (TQValueList<EventAction>::ConstIterator it2 = evList.constBegin(); it2 != evList.constEnd(); ++it2)
{
EventAction ev = *it2;
- item = new QListViewItem(eventsListView, QPEvents::ref()->fullEventName(it.key()), QPEvents::ref()->fullActionName(ev.action));
+ item = new TQListViewItem(eventsListView, QPEvents::ref()->fullEventName(it.key()), QPEvents::ref()->fullActionName(ev.action));
int argcount = ev.arguments.count();
if (argcount > 0)
item->setText(2, ev.arguments[0]);
@@ -62,22 +62,22 @@ void EventConfigurationDlg::initEvents(EventActions *events)
}
}
-void EventConfigurationDlg::saveEvents(QDomDocument dom)
+void EventConfigurationDlg::saveEvents(TQDomDocument dom)
{
- QDomNode projectNode = dom.firstChild().firstChild();
- QDomNode eventsNode = projectNode.namedItem("events");
+ TQDomNode projectNode = dom.firstChild().firstChild();
+ TQDomNode eventsNode = projectNode.namedItem("events");
projectNode.removeChild(eventsNode);
eventsNode = dom.createElement("events");
projectNode.appendChild(eventsNode);
- QDomElement node;
- QListViewItemIterator it(eventsListView);
- QListViewItem *item;
+ TQDomElement node;
+ TQListViewItemIterator it(eventsListView);
+ TQListViewItem *item;
while (it.current())
{
item = it.current();
node = dom.createElement("event");
eventsNode.appendChild(node);
- QDomElement el = node.toElement();
+ TQDomElement el = node.toElement();
el.setAttribute("name", QPEvents::ref()->eventName(item->text(0)));
el.setAttribute("action", QPEvents::ref()->actionName(item->text(1)));
if (el.attribute("action") == "script" || el.attribute("action") == "action")
@@ -86,10 +86,10 @@ void EventConfigurationDlg::saveEvents(QDomDocument dom)
el.setAttribute("type", "internal");
for (uint i = 2; i < 6; i++)
{
- QString s = item->text(i);
+ TQString s = item->text(i);
if (s.isEmpty())
s = "--not set--";
- QDomNode argNode = dom.createElement("argument");
+ TQDomNode argNode = dom.createElement("argument");
node.appendChild(argNode);
argNode.appendChild(dom.createTextNode(s));
}
@@ -104,7 +104,7 @@ void EventConfigurationDlg::slotAddEvent()
editDlg.setMainWidget(&eventDlg);
if (editDlg.exec())
{
- QListViewItem *item = new QListViewItem(eventsListView);
+ TQListViewItem *item = new TQListViewItem(eventsListView);
item->setText(0, eventDlg.eventCombo->currentText());
item->setText(1, eventDlg.actionCombo->currentText());
item->setText(2, eventDlg.argument1());
@@ -116,14 +116,14 @@ void EventConfigurationDlg::slotAddEvent()
void EventConfigurationDlg::slotEditEvent()
{
- QListViewItem *item = eventsListView->currentItem();
+ TQListViewItem *item = eventsListView->currentItem();
if (!item) return;
KDialogBase editDlg(this, "edit_event", true, i18n("Edit Event"), KDialogBase::Ok | KDialogBase::Cancel);
EventEditorDlg eventDlg(m_actionCollection, &editDlg);
editDlg.setMainWidget(&eventDlg);
eventDlg.setEvent(item->text(0));
eventDlg.setAction(item->text(1));
- QStringList arguments;
+ TQStringList arguments;
arguments << item->text(2) << item->text(3) << item->text(4) << item->text(5);
eventDlg.setArguments(arguments);
if (editDlg.exec())
@@ -139,7 +139,7 @@ void EventConfigurationDlg::slotEditEvent()
void EventConfigurationDlg::slotDeleteEvent()
{
- QListViewItem *item = eventsListView->currentItem();
+ TQListViewItem *item = eventsListView->currentItem();
if (!item) return;
if (KMessageBox::warningContinueCancel(this, i18n("<qt>Are you sure that you want to remove the configuration of the <b>%1</b> event?</qt>").arg(item->text(0)), i18n("Delete Event Configuration"),KStdGuiItem::del()) == KMessageBox::Continue)
{
diff --git a/quanta/project/eventconfigurationdlg.h b/quanta/project/eventconfigurationdlg.h
index b1e4c14d..170a681c 100644
--- a/quanta/project/eventconfigurationdlg.h
+++ b/quanta/project/eventconfigurationdlg.h
@@ -22,17 +22,17 @@
class QDomDocument;
class KActionCollection;
struct EventAction;
-typedef QMap<QString, QValueList<EventAction> > EventActions;
+typedef TQMap<TQString, TQValueList<EventAction> > EventActions;
class EventConfigurationDlg : public EventConfigurationDlgS
{
Q_OBJECT
public:
- EventConfigurationDlg(KActionCollection *actionCollection, QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
+ EventConfigurationDlg(KActionCollection *actionCollection, TQWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
~EventConfigurationDlg();
void initEvents(EventActions *events);
- void saveEvents(QDomDocument dom);
+ void saveEvents(TQDomDocument dom);
public slots:
void slotEditEvent();
diff --git a/quanta/project/eventeditordlg.cpp b/quanta/project/eventeditordlg.cpp
index d67251f0..2926f916 100644
--- a/quanta/project/eventeditordlg.cpp
+++ b/quanta/project/eventeditordlg.cpp
@@ -15,9 +15,9 @@
***************************************************************************/
//qt includes
-#include <qlabel.h>
-#include <qregexp.h>
-#include <qtooltip.h>
+#include <tqlabel.h>
+#include <tqregexp.h>
+#include <tqtooltip.h>
//kde includes
#include <kaction.h>
@@ -30,12 +30,12 @@
#include "project.h"
#include "tagaction.h"
-extern QString simpleMemberStr;
-extern QString taskLeaderStr;
-extern QString teamLeaderStr;
-extern QString subprojectLeaderStr;
+extern TQString simpleMemberStr;
+extern TQString taskLeaderStr;
+extern TQString teamLeaderStr;
+extern TQString subprojectLeaderStr;
-EventEditorDlg::EventEditorDlg(KActionCollection *actionCollection, QWidget* parent, const char* name, WFlags fl)
+EventEditorDlg::EventEditorDlg(KActionCollection *actionCollection, TQWidget* parent, const char* name, WFlags fl)
: EventEditorDlgS(parent,name,fl)
{
m_actionCollection = actionCollection;
@@ -48,7 +48,7 @@ EventEditorDlg::~EventEditorDlg()
{
}
-void EventEditorDlg::setEvent(const QString &name)
+void EventEditorDlg::setEvent(const TQString &name)
{
for (int i = 0; i < eventCombo->count(); i++)
{
@@ -60,7 +60,7 @@ void EventEditorDlg::setEvent(const QString &name)
}
}
-void EventEditorDlg::setAction(const QString &name)
+void EventEditorDlg::setAction(const TQString &name)
{
for (int i = 0; i < actionCombo->count(); i++)
{
@@ -73,12 +73,12 @@ void EventEditorDlg::setAction(const QString &name)
}
}
-QString EventEditorDlg::argument1()
+TQString EventEditorDlg::argument1()
{
if (argument1Combo->isEnabled())
{
- QString s = argument1Combo->currentText();
- QString actionType = actionCombo->currentText();
+ TQString s = argument1Combo->currentText();
+ TQString actionType = actionCombo->currentText();
if (actionType == QPEvents::ref()->fullActionName("email"))
{
if (s == i18n(teamLeaderStr.utf8()))
@@ -98,8 +98,8 @@ QString EventEditorDlg::argument1()
} else
if (actionType == QPEvents::ref()->fullActionName("script"))
{
- QString s = argument1Combo->currentText();
- for (QMap<QString, QString>::ConstIterator it = m_scriptActions.constBegin(); it != m_scriptActions.constEnd(); ++it)
+ TQString s = argument1Combo->currentText();
+ for (TQMap<TQString, TQString>::ConstIterator it = m_scriptActions.constBegin(); it != m_scriptActions.constEnd(); ++it)
{
if (it.data() == s)
{
@@ -111,8 +111,8 @@ QString EventEditorDlg::argument1()
} else
if (actionType == QPEvents::ref()->fullActionName("action"))
{
- QString s = argument1Combo->currentText();
- for (QMap<QString, QString>::ConstIterator it = m_otherActions.constBegin(); it != m_otherActions.constEnd(); ++it)
+ TQString s = argument1Combo->currentText();
+ for (TQMap<TQString, TQString>::ConstIterator it = m_otherActions.constBegin(); it != m_otherActions.constEnd(); ++it)
{
if (it.data() == s)
{
@@ -126,14 +126,14 @@ QString EventEditorDlg::argument1()
return s;
}
- return QString::null;
+ return TQString::null;
}
-QString EventEditorDlg::argument2()
+TQString EventEditorDlg::argument2()
{
if (argument2Combo->isEnabled())
{
- QString actionType = actionCombo->currentText();
+ TQString actionType = actionCombo->currentText();
if (actionType == QPEvents::ref()->fullActionName("log"))
{
int id = argument2Combo->currentItem();
@@ -152,14 +152,14 @@ QString EventEditorDlg::argument2()
}
return argument2Combo->currentText();
} else
- return QString::null;
+ return TQString::null;
}
-QString EventEditorDlg::argument3()
+TQString EventEditorDlg::argument3()
{
if (argument3Combo->isEnabled())
{
- QString actionType = actionCombo->currentText();
+ TQString actionType = actionCombo->currentText();
if (actionType == QPEvents::ref()->fullActionName("log"))
{
int id = argument3Combo->currentItem();
@@ -170,24 +170,24 @@ QString EventEditorDlg::argument3()
}
return argument3Combo->currentText();
} else
- return QString::null;
+ return TQString::null;
}
-QString EventEditorDlg::argument4()
+TQString EventEditorDlg::argument4()
{
if (argument4Combo->isEnabled())
{
return argument4Combo->currentText();
} else
- return QString::null;
+ return TQString::null;
}
-void EventEditorDlg::setArguments(const QStringList& arguments)
+void EventEditorDlg::setArguments(const TQStringList& arguments)
{
- QString actionType = actionCombo->currentText();
+ TQString actionType = actionCombo->currentText();
if (actionType == QPEvents::ref()->fullActionName("email"))
{
- QString s = arguments[0];
+ TQString s = arguments[0];
if (s == "teamleader")
s = i18n(teamLeaderStr.utf8());
else
@@ -220,7 +220,7 @@ void EventEditorDlg::setArguments(const QStringList& arguments)
} else
if (actionType == QPEvents::ref()->fullActionName("script"))
{
- QString s = arguments[0];
+ TQString s = arguments[0];
if (m_scriptActions.contains(s))
s = m_scriptActions[s];
if (argument1Combo->contains(s))
@@ -248,7 +248,7 @@ void EventEditorDlg::setArguments(const QStringList& arguments)
} else
if (actionType == QPEvents::ref()->fullActionName("action"))
{
- QString s = arguments[0];
+ TQString s = arguments[0];
if (m_otherActions.contains(s))
s = m_otherActions[s];
if (argument1Combo->contains(s))
@@ -272,7 +272,7 @@ void EventEditorDlg::setArguments(const QStringList& arguments)
{
argument1Combo->insertItem(arguments[0], 0);
argument1Combo->setCurrentItem(0);
- QString s = arguments[1];
+ TQString s = arguments[1];
if (s == "full")
argument2Combo->setCurrentItem(0);
else if (s == "minimal")
@@ -296,17 +296,17 @@ void EventEditorDlg::setArguments(const QStringList& arguments)
argument4Combo->setCurrentItem(0);
}
-void EventEditorDlg::resetArgumentWidgets(QLabel *label, KComboBox *combo)
+void EventEditorDlg::resetArgumentWidgets(TQLabel *label, KComboBox *combo)
{
label->setText(i18n("Argument:"));
label->setEnabled(false);
combo->setEnabled(false);
combo->setEditable(true);
combo->clear();
- QToolTip::remove(combo);
+ TQToolTip::remove(combo);
}
-void EventEditorDlg::slotActionChanged(const QString &name)
+void EventEditorDlg::slotActionChanged(const TQString &name)
{
resetArgumentWidgets(argument1Label, argument1Combo);
resetArgumentWidgets(argument2Label, argument2Combo);
@@ -318,14 +318,14 @@ void EventEditorDlg::slotActionChanged(const QString &name)
argument1Label->setText(i18n("Receiver:"));
argument1Combo->setEnabled(true);
argument1Combo->insertItem(i18n(teamLeaderStr.utf8()));
- QValueList<SubProject> *subprojects = Project::ref()->subprojects();
+ TQValueList<SubProject> *subprojects = Project::ref()->subprojects();
for (uint i = 0; i < subprojects->count(); i++)
{
- QString s = (*subprojects)[i].name;
+ TQString s = (*subprojects)[i].name;
if (!Project::ref()->subprojectLeader(s).name.isEmpty())
argument1Combo->insertItem(i18n(subprojectLeaderStr.utf8()) + " - " + s);
}
- QStringList tasks = Project::ref()->tasks();
+ TQStringList tasks = Project::ref()->tasks();
for (uint i = 0; i < tasks.count(); i++)
{
argument1Combo->insertItem(i18n(taskLeaderStr.utf8()) + " - " + tasks[i]);
@@ -336,7 +336,7 @@ void EventEditorDlg::slotActionChanged(const QString &name)
argument1Label->setEnabled(true);
argument1Label->setText(i18n("Log file:"));
argument1Combo->setEnabled(true);
- QToolTip::add(argument1Combo, i18n("A relative file to the project folder or a file outside of the project folder in which case the full path must be specified."));
+ TQToolTip::add(argument1Combo, i18n("A relative file to the project folder or a file outside of the project folder in which case the full path must be specified."));
argument2Label->setEnabled(true);
argument2Label->setText(i18n("Detail:"));
argument2Combo->setEnabled(true);
@@ -355,9 +355,9 @@ void EventEditorDlg::slotActionChanged(const QString &name)
argument1Label->setEnabled(true);
argument1Label->setText(i18n("Action name:"));
TagAction *action = 0L;
- QString s;
- QStringList items;
- QRegExp r("\\&(?!\\&)");
+ TQString s;
+ TQStringList items;
+ TQRegExp r("\\&(?!\\&)");
for (uint i = 0; i < m_actionCollection->count(); i++)
{
action = dynamic_cast<TagAction*>(m_actionCollection->action(i));
@@ -383,9 +383,9 @@ void EventEditorDlg::slotActionChanged(const QString &name)
argument1Label->setEnabled(true);
argument1Label->setText(i18n("Action name:"));
TagAction *action = 0L;
- QString s;
- QRegExp r("\\&(?!\\&)");
- QStringList items;
+ TQString s;
+ TQRegExp r("\\&(?!\\&)");
+ TQStringList items;
for (uint i = 0; i < m_actionCollection->count(); i++)
{
KAction *a = m_actionCollection->action(i);
diff --git a/quanta/project/eventeditordlg.h b/quanta/project/eventeditordlg.h
index a8dd6842..86ef5d08 100644
--- a/quanta/project/eventeditordlg.h
+++ b/quanta/project/eventeditordlg.h
@@ -29,24 +29,24 @@ class EventEditorDlg : public EventEditorDlgS
Q_OBJECT
public:
- EventEditorDlg(KActionCollection *actionCollection, QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
+ EventEditorDlg(KActionCollection *actionCollection, TQWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
~EventEditorDlg();
- void setEvent(const QString &name);
- void setAction(const QString &name);
- void setArguments(const QStringList& arguments);
- QString argument1();
- QString argument2();
- QString argument3();
- QString argument4();
+ void setEvent(const TQString &name);
+ void setAction(const TQString &name);
+ void setArguments(const TQStringList& arguments);
+ TQString argument1();
+ TQString argument2();
+ TQString argument3();
+ TQString argument4();
public slots:
- void slotActionChanged(const QString &name);
+ void slotActionChanged(const TQString &name);
protected:
- void resetArgumentWidgets(QLabel *label, KComboBox *combo);
+ void resetArgumentWidgets(TQLabel *label, KComboBox *combo);
- QMap<QString, QString> m_scriptActions;
- QMap<QString, QString> m_otherActions;
+ TQMap<TQString, TQString> m_scriptActions;
+ TQMap<TQString, TQString> m_otherActions;
KActionCollection *m_actionCollection;
protected slots:
diff --git a/quanta/project/membereditdlg.cpp b/quanta/project/membereditdlg.cpp
index 6e47d044..1b27d354 100644
--- a/quanta/project/membereditdlg.cpp
+++ b/quanta/project/membereditdlg.cpp
@@ -14,7 +14,7 @@
* *
***************************************************************************/
//qt includes
-#include <qcheckbox.h>
+#include <tqcheckbox.h>
//kde includes
#include <kcombobox.h>
@@ -32,28 +32,28 @@
#include "subprojecteditdlgs.h"
#include "project.h"
-QString simpleMemberStr = I18N_NOOP("Simple Member");
-QString taskLeaderStr = I18N_NOOP("Task Leader");
-QString teamLeaderStr = I18N_NOOP("Team Leader");
-QString subprojectLeaderStr = I18N_NOOP("Subproject Leader");
+TQString simpleMemberStr = I18N_NOOP("Simple Member");
+TQString taskLeaderStr = I18N_NOOP("Task Leader");
+TQString teamLeaderStr = I18N_NOOP("Team Leader");
+TQString subprojectLeaderStr = I18N_NOOP("Subproject Leader");
-MemberEditDlg::MemberEditDlg(QWidget *parent, const char *name)
+MemberEditDlg::MemberEditDlg(TQWidget *parent, const char *name)
: MemberEditDlgS(parent, name)
{
- QValueList<SubProject> *subprojects = Project::ref()->subprojects();
- for (QValueList<SubProject>::ConstIterator it = subprojects->constBegin(); it != subprojects->constEnd(); ++it)
+ TQValueList<SubProject> *subprojects = Project::ref()->subprojects();
+ for (TQValueList<SubProject>::ConstIterator it = subprojects->constBegin(); it != subprojects->constEnd(); ++it)
subprojectCombo->insertItem((*it).name);
subprojectCombo->setEnabled(false);
editSubprojectsButton->setEnabled(false);
- QMap<QString, TeamMember> members = Project::ref()->allMembers();
- QStringList items;
- for (QMap<QString, TeamMember>::ConstIterator it = members.constBegin(); it != members.constEnd(); ++it)
+ TQMap<TQString, TeamMember> members = Project::ref()->allMembers();
+ TQStringList items;
+ for (TQMap<TQString, TeamMember>::ConstIterator it = members.constBegin(); it != members.constEnd(); ++it)
{
nameCombo->insertItem(it.key());
}
- nameCombo->insertItem(QString::null, 0);
+ nameCombo->insertItem(TQString::null, 0);
roleCombo->insertItem(i18n(teamLeaderStr.utf8()));
roleCombo->insertItem(i18n(subprojectLeaderStr.utf8()));
@@ -67,7 +67,7 @@ MemberEditDlg::~MemberEditDlg()
{
}
-void MemberEditDlg::slotRoleSelected(const QString &roleName)
+void MemberEditDlg::slotRoleSelected(const TQString &roleName)
{
if (roleName != i18n(subprojectLeaderStr.utf8()))
{
@@ -85,7 +85,7 @@ void MemberEditDlg::slotEditSubprojects()
KDialogBase editDlg(this, "edit_subprojects", true, i18n("Edit Subprojects"), KDialogBase::Ok | KDialogBase::Cancel);
SubprojectEditDlgS subprojectDlg(&editDlg);
editDlg.setMainWidget(&subprojectDlg);
- QValueList<SubProject> *subprojects = Project::ref()->subprojects();
+ TQValueList<SubProject> *subprojects = Project::ref()->subprojects();
int idx = 0;
SubProject subProject;
for (uint i = 0; i < subprojects->count(); i++)
@@ -103,7 +103,7 @@ void MemberEditDlg::slotEditSubprojects()
subprojectDlg.createNew->setChecked(true);
if (editDlg.exec())
{
- QString oldName = subProject.name;
+ TQString oldName = subProject.name;
subProject.name = subprojectDlg.nameEdit->text();
subProject.location = subprojectDlg.locationEdit->text();
if (subprojectDlg.createNew->isChecked() && (subProject.name != oldName))
@@ -121,15 +121,15 @@ void MemberEditDlg::slotEditSubprojects()
void MemberEditDlg::slotMemberSelected()
{
- QString name = nameCombo->currentText();
- QMap<QString, TeamMember> members = Project::ref()->allMembers();
+ TQString name = nameCombo->currentText();
+ TQMap<TQString, TeamMember> members = Project::ref()->allMembers();
if (members.contains(name))
{
emailEdit->setText(members[name].email);
}
}
-void MemberEditDlg::selectMember(const QString &name)
+void MemberEditDlg::selectMember(const TQString &name)
{
bool found = false;
for (int i = 0; i < nameCombo->count(); i++)
@@ -150,9 +150,9 @@ void MemberEditDlg::selectMember(const QString &name)
void MemberEditDlg::slotSelectFromAddrBook()
{
- QMap<QString, QString> uidMap;
- QString name;
- QStringList result;
+ TQMap<TQString, TQString> uidMap;
+ TQString name;
+ TQStringList result;
KABC::AddressBook *addressBook = KABC::StdAddressBook::self();
KABC::AddressBook::ConstIterator it;
KABC::AddressBook::ConstIterator end = addressBook->end();
diff --git a/quanta/project/membereditdlg.h b/quanta/project/membereditdlg.h
index 33669488..3c6c94a8 100644
--- a/quanta/project/membereditdlg.h
+++ b/quanta/project/membereditdlg.h
@@ -26,12 +26,12 @@ class MemberEditDlg : public MemberEditDlgS
{
Q_OBJECT
public:
- MemberEditDlg(QWidget *parent = 0, const char *name = 0);
+ MemberEditDlg(TQWidget *parent = 0, const char *name = 0);
~MemberEditDlg();
- void selectMember(const QString &name);
+ void selectMember(const TQString &name);
public slots:
- void slotRoleSelected(const QString& roleName);
+ void slotRoleSelected(const TQString& roleName);
void slotEditSubprojects();
void slotMemberSelected();
void slotSelectFromAddrBook();
diff --git a/quanta/project/project.cpp b/quanta/project/project.cpp
index 3601e628..abe47943 100644
--- a/quanta/project/project.cpp
+++ b/quanta/project/project.cpp
@@ -22,9 +22,9 @@
#include <unistd.h>
// include QT files
-#include <qcheckbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
// include files for KDE
#include <kactionclasses.h>
@@ -63,16 +63,16 @@
#include "viewmanager.h"
#include "qpevents.h"
-extern QString simpleMemberStr;
-extern QString taskLeaderStr;
-extern QString teamLeaderStr;
-extern QString subprojectLeaderStr;
+extern TQString simpleMemberStr;
+extern TQString taskLeaderStr;
+extern TQString teamLeaderStr;
+extern TQString subprojectLeaderStr;
Project::Project(KMainWindow *parent)
- : QObject()
+ : TQObject()
{
d = new ProjectPrivate(this);
- connect(d, SIGNAL(eventHappened(const QString&, const QString&, const QString& )), this, SIGNAL(eventHappened(const QString&, const QString&, const QString& )));
+ connect(d, TQT_SIGNAL(eventHappened(const TQString&, const TQString&, const TQString& )), this, TQT_SIGNAL(eventHappened(const TQString&, const TQString&, const TQString& )));
d->m_mainWindow = parent;
d->m_uploadDialog = 0L;
keepPasswd = true;
@@ -86,9 +86,9 @@ Project::~Project()
}
-QStringList Project::fileNameList()
+TQStringList Project::fileNameList()
{
- QStringList list;
+ TQStringList list;
ProjectList::Iterator it( d->m_projectFiles );
for ( ; it.current(); ++it) {
if (! it.current()->fileName(false).isEmpty())
@@ -124,15 +124,15 @@ void Project::insertFile(const KURL& nameURL, bool repaint )
KURL destination = urlRequesterDlg->selectedURL();
if (destination.isLocalFile())
{
- QDir dir(destination.path());
+ TQDir dir(destination.path());
destination.setPath(dir.canonicalPath());
}
delete urlRequesterDlg;
if ( !destination.isEmpty() )
{
CopyTo *dlg = new CopyTo(d->baseURL);
- connect(dlg, SIGNAL(deleteDialog(CopyTo*)), d,
- SLOT(slotDeleteCopytoDlg(CopyTo*)));
+ connect(dlg, TQT_SIGNAL(deleteDialog(CopyTo*)), d,
+ TQT_SLOT(slotDeleteCopytoDlg(CopyTo*)));
url = dlg->copy( nameURL, destination );
}
else // Copy canceled, addition aborted
@@ -140,7 +140,7 @@ void Project::insertFile(const KURL& nameURL, bool repaint )
return;
}
}
- QDomElement el;
+ TQDomElement el;
while ( d->baseURL.isParentOf(url) )
{
if ( !d->m_projectFiles.contains(url) )
@@ -157,11 +157,11 @@ void Project::insertFile(const KURL& nameURL, bool repaint )
}
url.setPath(url.directory(false));
}
- emit eventHappened("after_project_add", url.url(), QString::null);
+ emit eventHappened("after_project_add", url.url(), TQString::null);
setModified();
if ( repaint )
{
- emit reloadTree( &(d->m_projectFiles), false, QStringList());
+ emit reloadTree( &(d->m_projectFiles), false, TQStringList());
emit newStatus();
}
}
@@ -181,33 +181,33 @@ void Project::readConfig(KConfig *config)
void Project::loadLastProject(bool reload)
{
d->config->setGroup("Projects");
- QStringList projectList = QuantaCommon::readPathListEntry(d->config, "OpenProjects");
- QStringList tempList = QuantaCommon::readPathListEntry(d->config, "ProjectTempFiles");
- QStringList sessionTempList = QuantaCommon::readPathListEntry(d->config, "ProjectSessionTempFiles");
+ TQStringList projectList = QuantaCommon::readPathListEntry(d->config, "OpenProjects");
+ TQStringList tempList = QuantaCommon::readPathListEntry(d->config, "ProjectTempFiles");
+ TQStringList sessionTempList = QuantaCommon::readPathListEntry(d->config, "ProjectSessionTempFiles");
// remove all local open projects because project and temp file are the same
for (uint i = 0; i < projectList.count(); ++i)
{
if (KURL::fromPathOrURL( projectList[i] ).isLocalFile())
{
projectList.remove( projectList.at(i) );
- QStringList::Iterator it = tempList.at(i);
+ TQStringList::Iterator it = tempList.at(i);
if (it != tempList.end())
tempList.remove(it);
- QStringList::Iterator it2 = sessionTempList.at(i);
+ TQStringList::Iterator it2 = sessionTempList.at(i);
if (it2 != sessionTempList.end())
sessionTempList.remove(it2);
--i;
}
}
- QString urlPath;
+ TQString urlPath;
KURL url;
// have we still a project left ?
while (projectList.count() > 0)
{
urlPath = projectList[0];
QuantaCommon::setUrl(url, urlPath);
- QString tempPath = tempList[0];
- QString sessionTempPath = sessionTempList[0];
+ TQString tempPath = tempList[0];
+ TQString sessionTempPath = sessionTempList[0];
// test if the remote project is available
if ( KIO::NetAccess::exists(url, false, d->m_mainWindow) )
{
@@ -262,7 +262,7 @@ void Project::slotOpenProject(const KURL &url)
{
emit hideSplash();
if (KMessageBox::questionYesNo(d->m_mainWindow,
- i18n("<qt>The file <b>%1</b> does not exist.<br> Do you want to remove it from the list?</qt>").arg(url.prettyURL(0, KURL::StripFileProtocol)), QString::null, KStdGuiItem::del(), i18n("Keep") )
+ i18n("<qt>The file <b>%1</b> does not exist.<br> Do you want to remove it from the list?</qt>").arg(url.prettyURL(0, KURL::StripFileProtocol)), TQString::null, KStdGuiItem::del(), i18n("Keep") )
== KMessageBox::Yes)
{
d->m_projectRecent->removeURL(url);
@@ -271,7 +271,7 @@ void Project::slotOpenProject(const KURL &url)
} else
{
d->loadProject ( url );
- emit eventHappened("after_project_open", url.url(), QString::null);
+ emit eventHappened("after_project_open", url.url(), TQString::null);
}
}
}
@@ -307,10 +307,10 @@ void Project::slotAddDirectory(const KURL& p_dirURL, bool showDlg)
(!destination.isEmpty()) )
{
CopyTo *dlg = new CopyTo(d->baseURL);
- connect(dlg, SIGNAL(addFilesToProject(const KURL::List&)),
- SLOT (slotInsertFilesAfterCopying(const KURL::List&)));
- connect(dlg, SIGNAL(deleteDialog(CopyTo *)), d,
- SLOT (slotDeleteCopytoDlg(CopyTo *)));
+ connect(dlg, TQT_SIGNAL(addFilesToProject(const KURL::List&)),
+ TQT_SLOT (slotInsertFilesAfterCopying(const KURL::List&)));
+ connect(dlg, TQT_SIGNAL(deleteDialog(CopyTo *)), d,
+ TQT_SLOT (slotDeleteCopytoDlg(CopyTo *)));
//if ( rdir.right(1) == "/" ) rdir.remove( rdir.length()-1,1);
dirURL = dlg->copy(dirURL, destination);
return;
@@ -324,7 +324,7 @@ void Project::slotAddDirectory(const KURL& p_dirURL, bool showDlg)
//And again, insert now directly the directory name into the project.
//It's important if rdir doesn't contain any files or subdirectories.
d->insertFiles(dirURL);
- emit reloadTree( &(d->m_projectFiles), false, QStringList() );
+ emit reloadTree( &(d->m_projectFiles), false, TQStringList() );
}
}
@@ -338,7 +338,7 @@ void Project::slotInsertFilesAfterCopying(const KURL::List& a_urlList)
//url.adjustPath(1);
d->insertFiles( url, "*" );
}
- emit reloadTree( &(d->m_projectFiles), false, QStringList() );
+ emit reloadTree( &(d->m_projectFiles), false, TQStringList() );
}
//rename the elements in the project dom tree
@@ -356,7 +356,7 @@ void Project::slotRenamed(const KURL& oldURL, const KURL& newURL)
progressBar->setValue(0);
progressBar->setTextEnabled(true);
- QDomElement el;
+ TQDomElement el;
bool isFolder = oldURL.fileName(false).isEmpty();
ProjectList::Iterator it( d->m_projectFiles );
for ( ; it.current(); ++it)
@@ -379,11 +379,11 @@ void Project::slotRenamed(const KURL& oldURL, const KURL& newURL)
progressBar->setValue(0);
progressBar->setTextEnabled(false);
- emit statusMsg(QString::null);
+ emit statusMsg(TQString::null);
if (d->m_modified)
setModified(); // there happens more than setting the flag !
- emit reloadTree(&(d->m_projectFiles), false, QStringList());
+ emit reloadTree(&(d->m_projectFiles), false, TQStringList());
emit newStatus();
}
@@ -406,7 +406,7 @@ void Project::slotRemove(const KURL& urlToRemove)
{
d->m_projectFiles.removeFromListAndXML(url);
d->m_modified = true;
- emit eventHappened("after_project_remove", url.url(), QString::null);
+ emit eventHappened("after_project_remove", url.url(), TQString::null);
if (!isFolder)
break;
}
@@ -417,26 +417,26 @@ void Project::slotRemove(const KURL& urlToRemove)
progressBar->setValue(0);
progressBar->setTextEnabled(false);
- emit statusMsg(QString::null);
+ emit statusMsg(TQString::null);
if (d->m_modified)
setModified(); // there happens more than setting the flag !
- emit reloadTree( &(d->m_projectFiles), false, QStringList() );
+ emit reloadTree( &(d->m_projectFiles), false, TQStringList() );
emit newStatus();
- QString urlPath = QExtFileInfo::toRelative(urlToRemove, d->baseURL).path();
- QString nice = urlPath;
+ TQString urlPath = QExtFileInfo::toRelative(urlToRemove, d->baseURL).path();
+ TQString nice = urlPath;
nice = KStringHandler::lsqueeze(nice, 60);
if (KMessageBox::warningContinueCancel(d->m_mainWindow, i18n("<qt>Do you want to remove <br><b>%1</b><br> from the server(s) as well?</qt>").arg(nice), i18n("Remove From Server"), KStdGuiItem::remove(), "RemoveFromServer") == KMessageBox::Continue )
{
- QDomNode profilesNode = d->m_sessionDom.firstChild().firstChild().namedItem("uploadprofiles");
- QDomNodeList profileList = profilesNode.toElement().elementsByTagName("profile");
- QDomElement e;
- QString s;
+ TQDomNode profilesNode = d->m_sessionDom.firstChild().firstChild().namedItem("uploadprofiles");
+ TQDomNodeList profileList = profilesNode.toElement().elementsByTagName("profile");
+ TQDomElement e;
+ TQString s;
for (uint i = 0; i < profileList.count(); i++)
{
e = profileList.item(i).toElement();
- QString path = e.attribute("remote_path","");
+ TQString path = e.attribute("remote_path","");
if (!path.startsWith("/"))
path.prepend("/");
KURL baseUrl;
@@ -445,7 +445,7 @@ void Project::slotRemove(const KURL& urlToRemove)
baseUrl.setHost(e.attribute("remote_host",""));
baseUrl.setPath(path);
baseUrl.setUser(e.attribute("user",""));
- QString passwd = password(e.attribute("remote_protocol") + "://" + e.attribute("user") + "@" + e.attribute("remote_host"));
+ TQString passwd = password(e.attribute("remote_protocol") + "://" + e.attribute("user") + "@" + e.attribute("remote_host"));
baseUrl.setPass(passwd);
baseUrl.addPath(urlPath);
KIO::NetAccess::del(baseUrl, d->m_mainWindow);
@@ -462,9 +462,9 @@ void Project::slotOptions()
// optionsDlg.setMainWidget(&optionsPage);
//add the main options page
- QFrame *page = optionsDlg.addPage(i18n("Options"));
+ TQFrame *page = optionsDlg.addPage(i18n("Options"));
ProjectOptions optionsPage(page);
- QVBoxLayout *topLayout = new QVBoxLayout( page, 0, KDialog::spacingHint() );
+ TQVBoxLayout *topLayout = new TQVBoxLayout( page, 0, KDialog::spacingHint() );
topLayout->addWidget(&optionsPage);
optionsPage.linePrjName->setText( d->projectName );
@@ -477,10 +477,10 @@ void Project::slotOptions()
optionsPage.lineEmail->setText( d->email );
// Signals to handle debugger settings
- connect(optionsPage.buttonDebuggerOptions, SIGNAL(clicked()),
- d, SLOT(slotDebuggerOptions()));
- connect(optionsPage.comboDebuggerClient, SIGNAL(activated(const QString &)),
- d, SLOT(slotDebuggerChanged(const QString &)));
+ connect(optionsPage.buttonDebuggerOptions, TQT_SIGNAL(clicked()),
+ d, TQT_SLOT(slotDebuggerOptions()));
+ connect(optionsPage.comboDebuggerClient, TQT_SIGNAL(activated(const TQString &)),
+ d, TQT_SLOT(slotDebuggerChanged(const TQString &)));
// Debuggers Combo
@@ -505,7 +505,7 @@ void Project::slotOptions()
optionsPage.checkDebuggerPersistentBreakpoints->setChecked(d->m_debuggerPersistentBreakpoints);
optionsPage.checkDebuggerPersistentWatches->setChecked(d->m_debuggerPersistentWatches);
- QString excludeStr;
+ TQString excludeStr;
for (uint i = 0; i < d->excludeList.count(); i++)
{
excludeStr.append(d->excludeList[i]);
@@ -515,7 +515,7 @@ void Project::slotOptions()
optionsPage.checkCvsignore->setChecked(d->m_excludeCvsignore);
optionsPage.linePrefix->setText(d->previewPrefix.prettyURL());
- QStringList lst = DTDs::ref()->nickNameList(true);
+ TQStringList lst = DTDs::ref()->nickNameList(true);
uint pos = 0;
for (uint i = 0; i < lst.count(); i++)
{
@@ -526,9 +526,9 @@ void Project::slotOptions()
optionsPage.dtdCombo->setCurrentItem(pos);
- QStringList availableEncodingNames(KGlobal::charsets()->availableEncodingNames());
+ TQStringList availableEncodingNames(KGlobal::charsets()->availableEncodingNames());
optionsPage.encodingCombo->insertStringList( availableEncodingNames );
- QStringList::ConstIterator iter;
+ TQStringList::ConstIterator iter;
int iIndex = -1;
for (iter = availableEncodingNames.begin(); iter != availableEncodingNames.end(); ++iter)
{
@@ -541,8 +541,8 @@ void Project::slotOptions()
}
- QStringList list = d->projectViewList();
- QString defaultView = d->dom.firstChild().firstChild().namedItem("autoload").toElement().attribute("projectview");
+ TQStringList list = d->projectViewList();
+ TQString defaultView = d->dom.firstChild().firstChild().namedItem("autoload").toElement().attribute("projectview");
if (list.count() > 0)
{
optionsPage.viewCombo->insertStringList(list);
@@ -566,39 +566,39 @@ void Project::slotOptions()
//add upload profiles page
page = optionsDlg.addPage(i18n("Up&load Profiles"));
UploadProfilesPage uploadProfilesPage(page);
- topLayout = new QVBoxLayout( page, 0, KDialog::spacingHint() );
+ topLayout = new TQVBoxLayout( page, 0, KDialog::spacingHint() );
topLayout->addWidget(&uploadProfilesPage);
- QDomElement uploadEl = d->m_sessionDom.firstChild().firstChild().namedItem("uploadprofiles").toElement();
+ TQDomElement uploadEl = d->m_sessionDom.firstChild().firstChild().namedItem("uploadprofiles").toElement();
uploadProfilesPage.profileLabel->setText(uploadEl.attribute("defaultProfile"));
uploadProfilesPage.checkShowUploadTreeviews->setChecked(d->m_showUploadTreeviews);
//add the team members page
page = optionsDlg.addPage(i18n("Team Configuration"));
TeamMembersDlg membersPage(page);
- topLayout = new QVBoxLayout( page, 0, KDialog::spacingHint() );
+ topLayout = new TQVBoxLayout( page, 0, KDialog::spacingHint() );
topLayout->addWidget(&membersPage);
- QListViewItem *item;
+ TQListViewItem *item;
if (!teamLeader().name.isEmpty())
{
TeamMember member = teamLeader();
- item = new QListViewItem(membersPage.membersListView, member.name, member.nickName, member.email, i18n("Team Leader"), member.task);
+ item = new TQListViewItem(membersPage.membersListView, member.name, member.nickName, member.email, i18n("Team Leader"), member.task);
membersPage.membersListView->insertItem(item);
}
- for (QMap<QString, TeamMember>::ConstIterator it = d->m_subprojectLeaders.constBegin(); it != d->m_subprojectLeaders.constEnd(); ++it)
+ for (TQMap<TQString, TeamMember>::ConstIterator it = d->m_subprojectLeaders.constBegin(); it != d->m_subprojectLeaders.constEnd(); ++it)
{
TeamMember member = it.data();
- item = new QListViewItem(membersPage.membersListView, member.name, member.nickName, member.email, i18n("Subproject Leader"), member.task, it.key());
+ item = new TQListViewItem(membersPage.membersListView, member.name, member.nickName, member.email, i18n("Subproject Leader"), member.task, it.key());
}
- for (QMap<QString, TeamMember>::ConstIterator it = d->m_taskLeaders.constBegin(); it != d->m_taskLeaders.constEnd(); ++it)
+ for (TQMap<TQString, TeamMember>::ConstIterator it = d->m_taskLeaders.constBegin(); it != d->m_taskLeaders.constEnd(); ++it)
{
TeamMember member = it.data();
- item = new QListViewItem(membersPage.membersListView, member.name, member.nickName, member.email, i18n("Task Leader"), it.key());
+ item = new TQListViewItem(membersPage.membersListView, member.name, member.nickName, member.email, i18n("Task Leader"), it.key());
}
- for (QValueList<TeamMember>::ConstIterator it = d->m_simpleMembers.constBegin(); it != d->m_simpleMembers.constEnd(); ++it)
+ for (TQValueList<TeamMember>::ConstIterator it = d->m_simpleMembers.constBegin(); it != d->m_simpleMembers.constEnd(); ++it)
{
TeamMember member = *it;
- item = new QListViewItem(membersPage.membersListView, member.name, member.nickName, member.email, i18n("Simple Member"), member.task);
+ item = new TQListViewItem(membersPage.membersListView, member.name, member.nickName, member.email, i18n("Simple Member"), member.task);
}
membersPage.mailingListEdit->setText(d->m_mailingList);
membersPage.setYourself(d->m_yourself);
@@ -606,7 +606,7 @@ void Project::slotOptions()
//add the event configuration page
page = optionsDlg.addPage(i18n("Event Configuration"));
EventConfigurationDlg eventsPage(d->m_mainWindow->actionCollection(), page);
- topLayout = new QVBoxLayout( page, 0, KDialog::spacingHint() );
+ topLayout = new TQVBoxLayout( page, 0, KDialog::spacingHint() );
topLayout->addWidget(&eventsPage);
eventsPage.initEvents(d->m_events);
eventsPage.enableEventsBox->setChecked(d->m_eventsEnabled);
@@ -645,8 +645,8 @@ void Project::slotOptions()
d->usePreviewPrefix = optionsPage.checkPrefix->isChecked();
d->m_persistentBookmarks = optionsPage.checkPersistentBookmarks->isChecked();
- QDomNode projectNode = d->dom.firstChild().firstChild();
- QDomElement el;
+ TQDomNode projectNode = d->dom.firstChild().firstChild();
+ TQDomElement el;
el = projectNode.toElement();
el.setAttribute("name",d->projectName);
@@ -747,24 +747,24 @@ void Project::slotOptions()
}
uploadEl.setAttribute("showtreeviews", uploadProfilesPage.checkShowUploadTreeviews->isChecked() ? "true" : "false");
- QDomNode teamNode = projectNode.namedItem("teamdata");
+ TQDomNode teamNode = projectNode.namedItem("teamdata");
if (!teamNode.isNull())
projectNode.removeChild(teamNode);
teamNode = d->dom.createElement("teamdata");
- QDomNode taskLeadersNode = d->dom.createElement("taskleaders");
+ TQDomNode taskLeadersNode = d->dom.createElement("taskleaders");
teamNode.appendChild(taskLeadersNode);
- QDomNode subLeadersNode = d->dom.createElement("subprojectleaders");
+ TQDomNode subLeadersNode = d->dom.createElement("subprojectleaders");
teamNode.appendChild(subLeadersNode);
- QListViewItemIterator it(membersPage.membersListView);
- QListViewItem *item;
- QStringList savedSubprojects;
+ TQListViewItemIterator it(membersPage.membersListView);
+ TQListViewItem *item;
+ TQStringList savedSubprojects;
while (it.current())
{
item = it.current();
- QString role = item->text(3);
+ TQString role = item->text(3);
if (role == i18n(teamLeaderStr.utf8()))
{
- QDomElement leaderEl = d->dom.createElement("leader");
+ TQDomElement leaderEl = d->dom.createElement("leader");
teamNode.appendChild(leaderEl);
el = d->dom.createElement("name");
leaderEl.appendChild(el);
@@ -778,9 +778,9 @@ void Project::slotOptions()
} else
if (role == i18n(subprojectLeaderStr.utf8()))
{
- QString prjName = item->text(5);
+ TQString prjName = item->text(5);
savedSubprojects.append(prjName);
- QDomElement subEl = d->dom.createElement("subproject");
+ TQDomElement subEl = d->dom.createElement("subproject");
for (uint i = 0; i < d->m_subprojects.count(); i++)
{
if (d->m_subprojects[i].name == prjName)
@@ -808,7 +808,7 @@ void Project::slotOptions()
} else
if (role == i18n(simpleMemberStr.utf8()))
{
- QDomElement memberEl = d->dom.createElement("member");
+ TQDomElement memberEl = d->dom.createElement("member");
memberEl.setAttribute("task", item->text(4));
teamNode.appendChild(memberEl);
el = d->dom.createElement("name");
@@ -863,13 +863,13 @@ void Project::slotUpload()
if (!d->m_uploadDialog)
{
d->m_uploadDialog = new ProjectUpload(KURL(), "", false, false, false, i18n("Upload project items..."));
- connect(d->m_uploadDialog, SIGNAL(eventHappened(const QString&, const QString&, const QString& )), this, SIGNAL(eventHappened(const QString&, const QString&, const QString& )));
+ connect(d->m_uploadDialog, TQT_SIGNAL(eventHappened(const TQString&, const TQString&, const TQString& )), this, TQT_SIGNAL(eventHappened(const TQString&, const TQString&, const TQString& )));
d->m_uploadDialog->show();
} else
d->m_uploadDialog->raise();
}
-void Project::slotUploadURL(const KURL& urlToUpload, const QString& profileName, bool quickUpload, bool markOnly)
+void Project::slotUploadURL(const KURL& urlToUpload, const TQString& profileName, bool quickUpload, bool markOnly)
{
if (!ViewManager::ref()->saveAll())
return;
@@ -878,14 +878,14 @@ void Project::slotUploadURL(const KURL& urlToUpload, const QString& profileName,
if (!d->m_uploadDialog)
{
d->m_uploadDialog = new ProjectUpload(url, profileName, false, quickUpload, markOnly, i18n("Upload project items..."));
- connect(d->m_uploadDialog, SIGNAL(eventHappened(const QString&, const QString&, const QString& )), this, SIGNAL(eventHappened(const QString&, const QString&, const QString& )));
+ connect(d->m_uploadDialog, TQT_SIGNAL(eventHappened(const TQString&, const TQString&, const TQString& )), this, TQT_SIGNAL(eventHappened(const TQString&, const TQString&, const TQString& )));
d->m_uploadDialog->show();
} else
d->m_uploadDialog->raise();
}
-void Project::slotGetMessages(const QString& data)
+void Project::slotGetMessages(const TQString& data)
{
emit messages(data);
}
@@ -898,7 +898,7 @@ void Project::slotRescanPrjDir()
{
d->insertFiles(dlg->files());
setModified();
- emit reloadTree(&(d->m_projectFiles), false, QStringList());
+ emit reloadTree(&(d->m_projectFiles), false, TQStringList());
}
delete dlg;
}
@@ -928,13 +928,13 @@ bool Project::contains(const KURL& url)
return d->m_projectFiles.contains(url);
}
-void Project::slotFileDescChanged(const KURL& url, const QString& desc)
+void Project::slotFileDescChanged(const KURL& url, const TQString& desc)
{
ProjectURL *proUrl = d->m_projectFiles.find(url);
if (! proUrl)
return;
- QDomElement el = proUrl->domElement;
+ TQDomElement el = proUrl->domElement;
el.setAttribute("desc", desc);
proUrl->fileDesc = desc;
setModified();
@@ -945,8 +945,8 @@ void Project::slotUploadStatusChanged(const KURL& url, int status)
if (! d->m_projectFiles.contains(url))
return;
- QDomElement el;
- QString urlStr = url.url();
+ TQDomElement el;
+ TQString urlStr = url.url();
ProjectList::Iterator it( d->m_projectFiles );
for ( ; it.current(); ++it)
{
@@ -966,7 +966,7 @@ void Project::slotChangeDocumentFolderStatus(const KURL &url, bool status)
if (! proUrl)
return;
- QDomElement el = proUrl->domElement;
+ TQDomElement el = proUrl->domElement;
el.setAttribute("documentFolder", (status ? "true" : "false"));
proUrl->documentFolder = status;
setModified();
@@ -994,7 +994,7 @@ KURL Project::projectBaseURL()
return result;
}
-void Project::savePassword(const QString &entry, const QString &passwd, bool store)
+void Project::savePassword(const TQString &entry, const TQString &passwd, bool store)
{
d->m_passwdList[entry] = passwd;
KConfig *config = kapp->config();
@@ -1011,7 +1011,7 @@ void Project::savePassword(const QString &entry, const QString &passwd, bool sto
config->sync();
}
-QString Project::password(const QString &entry)
+TQString Project::password(const TQString &entry)
{
if (d->m_passwdList.contains(entry))
return d->m_passwdList[entry];
@@ -1019,18 +1019,18 @@ QString Project::password(const QString &entry)
{
KConfig *config = kapp->config();
config->setGroup("Projects");
- QString passwd = KStringHandler::obscure(config->readEntry(d->projectName + " | " + entry,""));
-// QString passwd = config->readEntry(d->projectName + " | " + entry,"");
+ TQString passwd = KStringHandler::obscure(config->readEntry(d->projectName + " | " + entry,""));
+// TQString passwd = config->readEntry(d->projectName + " | " + entry,"");
return passwd;
}
}
-bool Project::passwordSaved(const QString &entry)
+bool Project::passwordSaved(const TQString &entry)
{
KConfig *config = kapp->config();
config->setGroup("Projects");
- QString passwd = KStringHandler::obscure(config->readEntry(d->projectName + " | " + entry,""));
-// QString passwd = config->readEntry(d->projectName + " | " + entry,"");
+ TQString passwd = KStringHandler::obscure(config->readEntry(d->projectName + " | " + entry,""));
+// TQString passwd = config->readEntry(d->projectName + " | " + entry,"");
return !passwd.isEmpty();
}
@@ -1052,12 +1052,12 @@ void Project::slotReloadProjectDocs()
{
delete d->m_dirWatch;
d->m_dirWatch = new KDirWatch(this);
- connect(d->m_dirWatch, SIGNAL(dirty(const QString &)), SIGNAL(reloadProjectDocs()));
- connect(d->m_dirWatch, SIGNAL(deleted(const QString &)), SIGNAL(reloadProjectDocs()));
+ connect(d->m_dirWatch, TQT_SIGNAL(dirty(const TQString &)), TQT_SIGNAL(reloadProjectDocs()));
+ connect(d->m_dirWatch, TQT_SIGNAL(deleted(const TQString &)), TQT_SIGNAL(reloadProjectDocs()));
if (d->baseURL.isLocalFile())
d->m_dirWatch->addDir(d->baseURL.path() + "/doc");
KURL url;
- QString path;
+ TQString path;
ProjectList::Iterator it( d->m_projectFiles );
for ( ; it.current(); ++it) {
url = *(it.current());
@@ -1077,18 +1077,18 @@ bool Project::hasProject()
return !d->projectName.isNull();
}
-QString Project::projectName()
+TQString Project::projectName()
{
return d->projectName;
}
-const QString& Project::defaultDTD()
+const TQString& Project::defaultDTD()
{
return d->m_defaultDTD;
}
-const QString& Project::defaultEncoding()
+const TQString& Project::defaultEncoding()
{
return d->m_defaultEncoding;
}
@@ -1106,22 +1106,22 @@ KURL Project::templateURL()
}
-QString Project::email()
+TQString Project::email()
{
return d->email;
}
-QDomDocument* Project::dom()
+TQDomDocument* Project::dom()
{
return &d->dom;
}
-QDomDocument* Project::sessionDom()
+TQDomDocument* Project::sessionDom()
{
return &d->m_sessionDom;
}
-QString Project::debuggerClient()
+TQString Project::debuggerClient()
{
return d->debuggerClient;
}
@@ -1151,27 +1151,27 @@ EventActions* Project::events()
return 0L;
}
-QString Project::yourself()
+TQString Project::yourself()
{
return d->m_yourself;
}
-QStringList Project::yourRoles()
+TQStringList Project::yourRoles()
{
- QStringList roles;
+ TQStringList roles;
if (d->m_yourself.isEmpty())
return roles;
- QString yourNick = d->m_yourself.lower();
+ TQString yourNick = d->m_yourself.lower();
if (d->m_teamLeader.nickName.lower() == yourNick)
roles += "team leader";
- QValueList<SubProject>::ConstIterator end = d->m_subprojects.constEnd();
- for (QValueList<SubProject>::ConstIterator it = d->m_subprojects.constBegin(); it != end; ++it)
+ TQValueList<SubProject>::ConstIterator end = d->m_subprojects.constEnd();
+ for (TQValueList<SubProject>::ConstIterator it = d->m_subprojects.constBegin(); it != end; ++it)
{
if (subprojectLeader((*it).name).nickName.lower() == yourNick)
roles += "subproject leader:" + (*it).name.lower();
}
- for (QMap<QString, TeamMember>::ConstIterator it = d->m_taskLeaders.constBegin(); it != d->m_taskLeaders.constEnd(); ++it)
+ for (TQMap<TQString, TeamMember>::ConstIterator it = d->m_taskLeaders.constBegin(); it != d->m_taskLeaders.constEnd(); ++it)
{
if (it.data().nickName.lower() == yourNick)
roles += "task leader:" + it.key().lower();
@@ -1185,7 +1185,7 @@ TeamMember Project::teamLeader()
return d->m_teamLeader;
}
-TeamMember Project::subprojectLeader(const QString &name)
+TeamMember Project::subprojectLeader(const TQString &name)
{
if (d->m_subprojectLeaders.contains(name))
return d->m_subprojectLeaders[name];
@@ -1193,7 +1193,7 @@ TeamMember Project::subprojectLeader(const QString &name)
return TeamMember();
}
-TeamMember Project::taskLeader(const QString &name)
+TeamMember Project::taskLeader(const TQString &name)
{
if (d->m_taskLeaders.contains(name))
return d->m_taskLeaders[name];
@@ -1201,45 +1201,45 @@ TeamMember Project::taskLeader(const QString &name)
return TeamMember();
}
-QValueList<TeamMember> Project::simpleMembers()
+TQValueList<TeamMember> Project::simpleMembers()
{
return d->m_simpleMembers;
}
-QString Project::mailingList()
+TQString Project::mailingList()
{
return d->m_mailingList;
}
-QValueList<SubProject>* Project::subprojects()
+TQValueList<SubProject>* Project::subprojects()
{
return &d->m_subprojects;
}
-QStringList Project::tasks()
+TQStringList Project::tasks()
{
- QStringList result;
- for (QMap<QString, TeamMember>::ConstIterator it = d->m_taskLeaders.constBegin(); it != d->m_taskLeaders.constEnd(); ++it)
+ TQStringList result;
+ for (TQMap<TQString, TeamMember>::ConstIterator it = d->m_taskLeaders.constBegin(); it != d->m_taskLeaders.constEnd(); ++it)
{
result << it.key();
}
return result;
}
-QMap<QString, TeamMember> Project::allMembers()
+TQMap<TQString, TeamMember> Project::allMembers()
{
- QMap<QString, TeamMember> members;
- for (QValueList<TeamMember>::ConstIterator it = d->m_simpleMembers.constBegin(); it != d->m_simpleMembers.constEnd(); ++it)
+ TQMap<TQString, TeamMember> members;
+ for (TQValueList<TeamMember>::ConstIterator it = d->m_simpleMembers.constBegin(); it != d->m_simpleMembers.constEnd(); ++it)
{
members[(*it).name] = *it;
}
if (!d->m_teamLeader.name.isEmpty())
members[d->m_teamLeader.name] = d->m_teamLeader;
- for (QMap<QString, TeamMember>::ConstIterator it = d->m_subprojectLeaders.constBegin(); it != d->m_subprojectLeaders.constEnd(); ++it)
+ for (TQMap<TQString, TeamMember>::ConstIterator it = d->m_subprojectLeaders.constBegin(); it != d->m_subprojectLeaders.constEnd(); ++it)
{
members[it.data().name] = it.data();
}
- for (QMap<QString, TeamMember>::ConstIterator it = d->m_taskLeaders.constBegin(); it != d->m_taskLeaders.constEnd(); ++it)
+ for (TQMap<TQString, TeamMember>::ConstIterator it = d->m_taskLeaders.constBegin(); it != d->m_taskLeaders.constEnd(); ++it)
{
members[it.data().name] = it.data();
}
@@ -1257,7 +1257,7 @@ bool Project::queryClose()
bool canExit = true;
if (hasProject())
{
- emit eventHappened("before_project_close", d->baseURL.url(), QString::null);
+ emit eventHappened("before_project_close", d->baseURL.url(), TQString::null);
d->config->setGroup("Projects");
KURL url = d->projectURL.url();
url.setPass("");
@@ -1270,18 +1270,18 @@ bool Project::queryClose()
}
if (canExit)
{
- emit eventHappened("after_project_close", d->baseURL.url(), QString::null);
+ emit eventHappened("after_project_close", d->baseURL.url(), TQString::null);
// empty dom tree
d->dom.clear();
d->m_sessionDom.clear();
d->m_events->clear();
d->init();
newProjectLoaded(d->projectName, d->baseURL, d->templateURL);
- reloadTree( &(d->m_projectFiles), true, QStringList());
+ reloadTree( &(d->m_projectFiles), true, TQStringList());
d->adjustActions();
d->m_projectRecent->setCurrentItem(-1);
newStatus();
-// kapp->processEvents(QEventLoop::ExcludeUserInput | QEventLoop::ExcludeSocketNotifiers);
+// kapp->processEvents(TQEventLoop::ExcludeUserInput | TQEventLoop::ExcludeSocketNotifiers);
}
}
return canExit;
@@ -1296,7 +1296,7 @@ void Project::slotShowProjectToolbar(bool show)
{
if (d->m_mainWindow && d->m_mainWindow->factory())
{
- QWidget *w = d->m_mainWindow->factory()->container("project_toolbar", d->m_mainWindow);
+ TQWidget *w = d->m_mainWindow->factory()->container("project_toolbar", d->m_mainWindow);
if (w)
{
if (show && m_projectToolbarVisible)
@@ -1315,16 +1315,16 @@ void Project::loadBookmarks(const KURL &url, KTextEditor::MarkInterface *markIf)
{
if (!markIf || !hasProject() || !contains(url) || !d->m_persistentBookmarks)
return;
- QDomNodeList nl = d->dom.elementsByTagName("item");
- QDomElement el;
+ TQDomNodeList nl = d->dom.elementsByTagName("item");
+ TQDomElement el;
KURL u = QExtFileInfo::toRelative(url, d->baseURL);
for ( uint i = 0; i < nl.count(); i++ )
{
el = nl.item(i).toElement();
if ( el.attribute("url") == QuantaCommon::qUrl(u) )
{
- QString markListStr = el.attribute("bookmarks");
- QStringList markList = QStringList::split(",", markListStr);
+ TQString markListStr = el.attribute("bookmarks");
+ TQStringList markList = TQStringList::split(",", markListStr);
for (uint j = 0; j < markList.count(); j++)
{
int line = markList[j].toInt();
@@ -1339,16 +1339,16 @@ void Project::saveBookmarks(const KURL &url, KTextEditor::MarkInterface *markIf)
{
if (!markIf || !hasProject() || !contains(url) || !d->m_persistentBookmarks)
return;
- QStringList markList;
- QPtrList<KTextEditor::Mark> marks = markIf->marks();
+ TQStringList markList;
+ TQPtrList<KTextEditor::Mark> marks = markIf->marks();
for (uint i = 0; i < marks.count(); i++)
{
KTextEditor::Mark *mark = marks.at(i);
if (mark->type == KTextEditor::MarkInterface::Bookmark)
- markList << QString("%1").arg(mark->line);
+ markList << TQString("%1").arg(mark->line);
}
- QDomNodeList nl = d->dom.elementsByTagName("item");
- QDomElement el;
+ TQDomNodeList nl = d->dom.elementsByTagName("item");
+ TQDomElement el;
KURL u = QExtFileInfo::toRelative(url, d->baseURL);
for ( uint i = 0; i < nl.count(); i++ )
{
@@ -1365,15 +1365,15 @@ void Project::loadCursorPosition(const KURL &url, KTextEditor::ViewCursorInterfa
{
if (!viewCursorIf || !hasProject() || !contains(url))
return;
- QDomNodeList nl = d->m_sessionDom.elementsByTagName("item");
- QDomElement el;
+ TQDomNodeList nl = d->m_sessionDom.elementsByTagName("item");
+ TQDomElement el;
KURL u = QExtFileInfo::toRelative(url, d->baseURL);
for ( uint i = 0; i < nl.count(); i++ )
{
el = nl.item(i).toElement();
if ( el.attribute("url") == QuantaCommon::qUrl(u) )
{
- QString s = el.attribute("line");
+ TQString s = el.attribute("line");
uint line, col;
bool ok;
line = s.toUInt(&ok, 10);
@@ -1398,8 +1398,8 @@ void Project::saveCursorPosition(const KURL &url, KTextEditor::ViewCursorInterfa
{
if (!viewCursorIf || !hasProject() || !contains(url))
return;
- QDomNodeList nl = d->m_sessionDom.elementsByTagName("item");
- QDomElement el;
+ TQDomNodeList nl = d->m_sessionDom.elementsByTagName("item");
+ TQDomElement el;
KURL u = QExtFileInfo::toRelative(url, d->baseURL);
uint line, col;
viewCursorIf->cursorPosition(&line, &col);
@@ -1421,7 +1421,7 @@ void Project::saveCursorPosition(const KURL &url, KTextEditor::ViewCursorInterfa
el.setAttribute("column", col);
el.setAttribute("line", line);
el.setAttribute("url", QuantaCommon::qUrl(u));
- QDomNode no = d->m_sessionDom.firstChild().firstChild().namedItem("itemcursorpositions");
+ TQDomNode no = d->m_sessionDom.firstChild().firstChild().namedItem("itemcursorpositions");
no.appendChild(el);
}
}
diff --git a/quanta/project/project.h b/quanta/project/project.h
index b6775da7..95995036 100644
--- a/quanta/project/project.h
+++ b/quanta/project/project.h
@@ -18,7 +18,7 @@
#ifndef PROJECT_H
#define PROJECT_H
-#include <qobject.h>
+#include <tqobject.h>
#include "projecturl.h"
@@ -30,7 +30,7 @@ namespace KTextEditor{
class ViewCursorInterface;
}
struct EventAction;
-typedef QMap<QString, QValueList<EventAction> > EventActions;
+typedef TQMap<TQString, TQValueList<EventAction> > EventActions;
/**project
*@author Yacovlev Alexander & Dmitry Poplavsky & Andras Mantia & Jens Herden
@@ -40,18 +40,18 @@ class KConfig;
class KMainWindow;
struct TeamMember {
- QString name;
- QString email;
- QString nickName;
- QString task;
+ TQString name;
+ TQString email;
+ TQString nickName;
+ TQString task;
};
struct SubProject {
- QString name;
- QString location;
+ TQString name;
+ TQString location;
};
-class Project : public QObject {
+class Project : public TQObject {
Q_OBJECT
friend class ProjectPrivate; // need this because I use the signals
@@ -73,9 +73,9 @@ public:
~Project();
bool hasProject();
- QString projectName();
+ TQString projectName();
- QStringList fileNameList();
+ TQStringList fileNameList();
KURL::List files();
void insertFile( const KURL& nameURL, bool repaint );
@@ -87,9 +87,9 @@ public:
/** Returns the relative url with the prefix inserted. */
KURL urlWithPrefix(const KURL& url);
bool contains(const KURL &url);
- /** Read property of QString defaultDTD. */
- const QString& defaultDTD();
- const QString& defaultEncoding();
+ /** Read property of TQString defaultDTD. */
+ const TQString& defaultDTD();
+ const TQString& defaultEncoding();
/** Returns the project's base URL if it exists,
* the HOME dir if there is no project and no opened document
@@ -100,17 +100,17 @@ public:
KURL documentFolderForURL(const KURL &url);
/** Saves the password for entry into a list. Stores on disc if store == true */
- void savePassword(const QString& entry, const QString& passwd, bool store);
+ void savePassword(const TQString& entry, const TQString& passwd, bool store);
/** Returns the saved password for entry */
- QString password(const QString &entry);
- bool passwordSaved(const QString &entry);
- QDomDocument *dom();
- QDomDocument *sessionDom();
- QString debuggerClient();
+ TQString password(const TQString &entry);
+ bool passwordSaved(const TQString &entry);
+ TQDomDocument *dom();
+ TQDomDocument *sessionDom();
+ TQString debuggerClient();
bool debuggerPersistentBreakpoints();
bool debuggerPersistentWatches();
bool keepPasswd;
- QString email();
+ TQString email();
KURL templateURL();
KURL toolbarURL();
EventActions* events();
@@ -118,21 +118,21 @@ public:
* Get the nickname of the current user (you)
* @return the nickname
*/
- QString yourself();
+ TQString yourself();
/**
* Get the roles of the current user in the form "role:task".
* Examples: "team leader", "project leader:subprojectname", "task leader:taskname".
* @return the roles (in lowercase)
*/
- QStringList yourRoles();
+ TQStringList yourRoles();
TeamMember teamLeader();
- TeamMember subprojectLeader(const QString &name);
- TeamMember taskLeader(const QString &name);
- QValueList<TeamMember> simpleMembers();
- QString mailingList();
- QValueList<SubProject>* subprojects();
- QStringList tasks();
- QMap<QString, TeamMember> allMembers();
+ TeamMember subprojectLeader(const TQString &name);
+ TeamMember taskLeader(const TQString &name);
+ TQValueList<TeamMember> simpleMembers();
+ TQString mailingList();
+ TQValueList<SubProject>* subprojects();
+ TQStringList tasks();
+ TQMap<TQString, TeamMember> allMembers();
bool eventsEnabled();
void setProjectToolbarVisible(bool visible) {m_projectToolbarVisible = visible;}
@@ -157,7 +157,7 @@ public slots:
void slotOpenProject(const KURL&);
void slotOptions();
void slotUpload();
- void slotUploadURL(const KURL &urlToUpload, const QString &profileName, bool quickUpload, bool markOnly);
+ void slotUploadURL(const KURL &urlToUpload, const TQString &profileName, bool quickUpload, bool markOnly);
void slotAddDirectory(const KURL& dirURL, bool showDlg = true);
void slotInsertFile(const KURL& url);
@@ -168,10 +168,10 @@ public slots:
void slotRemove(const KURL& urlToRemove);
- void slotGetMessages(const QString&);
+ void slotGetMessages(const TQString&);
void slotRescanPrjDir();
- void slotFileDescChanged(const KURL& url, const QString& desc);
+ void slotFileDescChanged(const KURL& url, const TQString& desc);
void slotUploadStatusChanged(const KURL& url, int status);
void slotChangeDocumentFolderStatus(const KURL& url, bool status);
@@ -183,28 +183,28 @@ public slots:
signals:
- void openFile( const KURL&, const QString& );
- void openFiles( const KURL::List&, const QString& );
+ void openFile( const KURL&, const TQString& );
+ void openFiles( const KURL::List&, const TQString& );
void closeFile( const KURL&);
void closeFiles();
- void reloadTree(ProjectList *, bool, const QStringList &);
+ void reloadTree(ProjectList *, bool, const TQStringList &);
- void messages(const QString& );
+ void messages(const TQString& );
void enableMessageWidget();
void newStatus();
- void statusMsg(const QString &);
+ void statusMsg(const TQString &);
/** No descriptions */
- void newProjectLoaded(const QString &, const KURL &, const KURL &);
+ void newProjectLoaded(const TQString &, const KURL &, const KURL &);
void reloadProjectDocs();
void hideSplash();
void addProjectDoc(const KURL &);
void getUserToolbarFiles(KURL::List *);
void loadToolbarFile(const KURL &);
/** ask for the tree status for saving in project */
- void getTreeStatus(QStringList *);
- void eventHappened(const QString&, const QString&, const QString& );
+ void getTreeStatus(TQStringList *);
+ void eventHappened(const TQString&, const TQString&, const TQString& );
private:
/** The constructor is privat because we use singleton patter.
diff --git a/quanta/project/projectlist.cpp b/quanta/project/projectlist.cpp
index f5fdc24e..fabec2fd 100644
--- a/quanta/project/projectlist.cpp
+++ b/quanta/project/projectlist.cpp
@@ -15,9 +15,9 @@
***************************************************************************/
// qt includes
-#include <qdom.h>
-#include <qstring.h>
-#include <qfileinfo.h>
+#include <tqdom.h>
+#include <tqstring.h>
+#include <tqfileinfo.h>
// kde includes
#include <kprogress.h>
@@ -39,19 +39,19 @@ void ProjectList::clear()
ProjectUrlList::clear();
}
-bool ProjectList::readFromXML(QDomDocument &dom, const KURL &baseURL,
- const KURL &/*templateURL*/, const QRegExp &excludeRx)
+bool ProjectList::readFromXML(TQDomDocument &dom, const KURL &baseURL,
+ const KURL &/*templateURL*/, const TQRegExp &excludeRx)
{
clear(); // empty the list
m_baseURL = baseURL; // remember this
bool modified = false;
- QDomElement el;
- QDomNodeList nl = dom.firstChild().firstChild().childNodes();
+ TQDomElement el;
+ TQDomNodeList nl = dom.firstChild().firstChild().childNodes();
progressBar->setTotalSteps(nl.count() - 1);
progressBar->setValue(0);
progressBar->setTextEnabled(true);
- QString path;
- QString tmpString;
+ TQString path;
+ TQString tmpString;
uint nlCount = nl.count();
for ( uint i = 0; i < nlCount; i++ )
{
@@ -86,7 +86,7 @@ bool ProjectList::readFromXML(QDomDocument &dom, const KURL &baseURL,
//remove non-existent local files
if ( url.isLocalFile() )
{
- QFileInfo fi( url.path() );
+ TQFileInfo fi( url.path() );
if ( !fi.exists() )
{
el.parentNode().removeChild( el );
@@ -128,7 +128,7 @@ bool ProjectList::removeFromListAndXML(const KURL &url)
{
ProjectURL *p = find(url);
if (p) {
- QDomElement el = p->domElement;
+ TQDomElement el = p->domElement;
el.parentNode().removeChild(el);
remove(url.url(-1));
return true;
@@ -162,25 +162,25 @@ bool ProjectList::isFolder(const KURL &url) const
}
-void ProjectList::insert(const QString & key, const ProjectURL * item)
+void ProjectList::insert(const TQString & key, const ProjectURL * item)
{
ProjectUrlList::insert(key, item);
}
-ProjectURL * ProjectList::find ( const QString & key ) const
+ProjectURL * ProjectList::find ( const TQString & key ) const
{
return ProjectUrlList::find(key);
}
-bool ProjectList::remove ( const QString & key )
+bool ProjectList::remove ( const TQString & key )
{
return ProjectUrlList::remove(key);
}
-void ProjectList::replace(const QString & key, const ProjectURL * item)
+void ProjectList::replace(const TQString & key, const ProjectURL * item)
{
ProjectUrlList::replace(key, item);
}
diff --git a/quanta/project/projectlist.h b/quanta/project/projectlist.h
index 505fbfd0..87593daf 100644
--- a/quanta/project/projectlist.h
+++ b/quanta/project/projectlist.h
@@ -26,7 +26,7 @@ class QDomDocument;
/**
@short Container for the project files.
- For fast lookup this container is based on QDict.
+ For fast lookup this container is based on TQDict.
The key is generated without a trailing '/' so it doesn't matter if you
search for a folder in this container with or without trailing '/'
*/
@@ -34,12 +34,12 @@ class QDomDocument;
class ProjectList : public ProjectUrlList
{
public:
- /** 1009 is a guess for maximum files in an average project, this number should be prime (@ref QDict)
+ /** 1009 is a guess for maximum files in an average project, this number should be prime (@ref TQDict)
*/
ProjectList( int size = 1009 );
~ProjectList() {};
- typedef QDictIterator<ProjectURL> Iterator;
+ typedef TQDictIterator<ProjectURL> Iterator;
/** resets @ref m_baseURL */
void clear();
@@ -49,8 +49,8 @@ public:
invalid entries gets removed!
@return true if an old structure was found
*/
- bool readFromXML(QDomDocument &dom, const KURL &baseURL,
- const KURL &templateURL, const QRegExp &excludeRx);
+ bool readFromXML(TQDomDocument &dom, const KURL &baseURL,
+ const KURL &templateURL, const TQRegExp &excludeRx);
/**
@return the relative URL
*/
@@ -93,23 +93,23 @@ private:
private because I want to control the key.
use insert(ProjectURL *url) instead.
*/
- void insert(const QString & key, const ProjectURL * item);
+ void insert(const TQString & key, const ProjectURL * item);
/**
private because I want to control the key.
use find(const KURL &url) instead.
*/
- ProjectURL *find ( const QString & key ) const;
+ ProjectURL *find ( const TQString & key ) const;
/**
private because I want to control the key.
*/
- bool remove ( const QString & key );
+ bool remove ( const TQString & key );
/**
private because I want to control the key.
*/
- void replace(const QString & key, const ProjectURL * item);
+ void replace(const TQString & key, const ProjectURL * item);
};
#endif // PROJECTFILES_H
diff --git a/quanta/project/projectnewfinal.cpp b/quanta/project/projectnewfinal.cpp
index c1901e69..b96e8b6f 100644
--- a/quanta/project/projectnewfinal.cpp
+++ b/quanta/project/projectnewfinal.cpp
@@ -16,8 +16,8 @@
***************************************************************************/
// qt includes
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
// kde includes
#include <kiconloader.h>
@@ -26,7 +26,7 @@
#include "projectnewfinal.h"
#include "projectnewfinal.moc"
-ProjectNewFinal::ProjectNewFinal(QWidget *parent, const char *name )
+ProjectNewFinal::ProjectNewFinal(TQWidget *parent, const char *name )
: ProjectNewFinalS(parent,name)
{
imagelabel->setPixmap( UserIcon("wiznewprjfin") );
diff --git a/quanta/project/projectnewfinal.h b/quanta/project/projectnewfinal.h
index 5cde0ac5..16a40791 100644
--- a/quanta/project/projectnewfinal.h
+++ b/quanta/project/projectnewfinal.h
@@ -27,7 +27,7 @@
class ProjectNewFinal : public ProjectNewFinalS {
Q_OBJECT
public:
- ProjectNewFinal(QWidget *parent=0, const char *name=0);
+ ProjectNewFinal(TQWidget *parent=0, const char *name=0);
~ProjectNewFinal();
void setMargin(int);
diff --git a/quanta/project/projectnewgeneral.cpp b/quanta/project/projectnewgeneral.cpp
index 3f5fe547..28c4b611 100644
--- a/quanta/project/projectnewgeneral.cpp
+++ b/quanta/project/projectnewgeneral.cpp
@@ -16,14 +16,14 @@
***************************************************************************/
// qt includes
-#include <qdir.h>
-#include <qevent.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlineedit.h>
-#include <qpushbutton.h>
-#include <qradiobutton.h>
-#include <qcombobox.h>
+#include <tqdir.h>
+#include <tqevent.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
+#include <tqpushbutton.h>
+#include <tqradiobutton.h>
+#include <tqcombobox.h>
// kde includes
#include <kfiledialog.h>
@@ -39,19 +39,19 @@
#include "quantacommon.h"
#include "qextfileinfo.h"
-ProjectNewGeneral::ProjectNewGeneral(QWidget *parent, const char *name )
+ProjectNewGeneral::ProjectNewGeneral(TQWidget *parent, const char *name )
: ProjectNewGeneralS(parent,name)
{
imagelabel->setPixmap( UserIcon("wiznewprjglb") );
linePrjName->setFocus();
- QStringList protocols = KProtocolInfo::protocols();
+ TQStringList protocols = KProtocolInfo::protocols();
protocols.sort();
for ( uint i=0; i<protocols.count(); i++ )
{
KURL p;
p.setProtocol(protocols[i]);
- QString protocol = protocols[i];
+ TQString protocol = protocols[i];
if ( KProtocolInfo::supportsWriting(p) &&
KProtocolInfo::supportsMakeDir(p) &&
KProtocolInfo::supportsDeleting(p) &&
@@ -67,21 +67,21 @@ ProjectNewGeneral::ProjectNewGeneral(QWidget *parent, const char *name )
linePrjTmpl->setText("templates");
linePrjToolbar->setText("toolbars");
- connect(comboProtocol, SIGNAL(activated(const QString&)), SLOT(slotProtocolChanged(const QString &)));
- connect( linePrjFile, SIGNAL(textChanged(const QString &)),
- this, SLOT(slotLinePrjFile(const QString &)));
- connect( linePrjName, SIGNAL(textChanged(const QString &)),
- this, SLOT(slotLinePrjFile(const QString &)));
- connect( linePrjDir, SIGNAL(textChanged(const QString &)),
- this, SLOT(slotLinePrjFile(const QString &)));
- connect( buttonDir, SIGNAL(clicked()),
- this, SLOT(slotButtonDir()));
- connect( linePrjName, SIGNAL(textChanged(const QString &)),
- this, SLOT(slotChangeNames(const QString &)));
- connect( linePrjTmpl, SIGNAL(textChanged(const QString &)), SLOT(slotLinePrjFile(const QString &)));
- connect( buttonTmpl, SIGNAL(clicked()), SLOT(slotButtonTmpl()));
- connect( linePrjToolbar, SIGNAL(textChanged(const QString &)), SLOT(slotLinePrjFile(const QString &)));
- connect( buttonToolbar, SIGNAL(clicked()), SLOT(slotButtonToolbar()));
+ connect(comboProtocol, TQT_SIGNAL(activated(const TQString&)), TQT_SLOT(slotProtocolChanged(const TQString &)));
+ connect( linePrjFile, TQT_SIGNAL(textChanged(const TQString &)),
+ this, TQT_SLOT(slotLinePrjFile(const TQString &)));
+ connect( linePrjName, TQT_SIGNAL(textChanged(const TQString &)),
+ this, TQT_SLOT(slotLinePrjFile(const TQString &)));
+ connect( linePrjDir, TQT_SIGNAL(textChanged(const TQString &)),
+ this, TQT_SLOT(slotLinePrjFile(const TQString &)));
+ connect( buttonDir, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotButtonDir()));
+ connect( linePrjName, TQT_SIGNAL(textChanged(const TQString &)),
+ this, TQT_SLOT(slotChangeNames(const TQString &)));
+ connect( linePrjTmpl, TQT_SIGNAL(textChanged(const TQString &)), TQT_SLOT(slotLinePrjFile(const TQString &)));
+ connect( buttonTmpl, TQT_SIGNAL(clicked()), TQT_SLOT(slotButtonTmpl()));
+ connect( linePrjToolbar, TQT_SIGNAL(textChanged(const TQString &)), TQT_SLOT(slotLinePrjFile(const TQString &)));
+ connect( buttonToolbar, TQT_SIGNAL(clicked()), TQT_SLOT(slotButtonToolbar()));
linePrjTmpl->installEventFilter(this);
linePrjToolbar->installEventFilter(this);
@@ -101,7 +101,7 @@ void ProjectNewGeneral::slotButtonDir()
}
}
-void ProjectNewGeneral::slotLinePrjFile( const QString & )
+void ProjectNewGeneral::slotLinePrjFile( const TQString & )
{
bool valid = !(linePrjFile->text().isEmpty() ||
@@ -110,7 +110,7 @@ void ProjectNewGeneral::slotLinePrjFile( const QString & )
linePrjTmpl->text().isEmpty() ||
linePrjToolbar->text().isEmpty());
KURL url;
- QString s = lineHost->text();
+ TQString s = lineHost->text();
if (! s.isEmpty())
url.setHost(s);
@@ -145,16 +145,16 @@ void ProjectNewGeneral::slotLinePrjFile( const QString & )
emit enableNextButton( this, valid );
}
-void ProjectNewGeneral::slotChangeNames( const QString &text )
+void ProjectNewGeneral::slotChangeNames( const TQString &text )
{
int i;
- QString fname = text.lower();
+ TQString fname = text.lower();
while( (i=fname.find(" ")) >=0 ) fname.remove(i,1);
linePrjFile->setText( fname+".webprj" );
}
-QString ProjectNewGeneral::type()
+TQString ProjectNewGeneral::type()
{
// if ( radioCvs ->isChecked() ) return "CVS";
if ( radioLocal->isChecked() ) return "Local";
@@ -197,7 +197,7 @@ void ProjectNewGeneral::slotButtonToolbar()
}
-void ProjectNewGeneral::slotProtocolChanged(const QString& protocol)
+void ProjectNewGeneral::slotProtocolChanged(const TQString& protocol)
{
bool status = true;
if (protocol == i18n("Local"))
@@ -214,9 +214,9 @@ void ProjectNewGeneral::slotProtocolChanged(const QString& protocol)
lineHost->clear();
}
-bool ProjectNewGeneral::eventFilter ( QObject * watched, QEvent * e )
+bool ProjectNewGeneral::eventFilter ( TQObject * watched, TQEvent * e )
{
- if (e->type() == QEvent::FocusOut)
+ if (e->type() == TQEvent::FocusOut)
{
if (watched == linePrjTmpl)
{
diff --git a/quanta/project/projectnewgeneral.h b/quanta/project/projectnewgeneral.h
index b167c15c..6f39fde6 100644
--- a/quanta/project/projectnewgeneral.h
+++ b/quanta/project/projectnewgeneral.h
@@ -29,27 +29,27 @@ class KURL;
class ProjectNewGeneral : public ProjectNewGeneralS {
Q_OBJECT
public:
- ProjectNewGeneral(QWidget *parent=0, const char *name=0);
+ ProjectNewGeneral(TQWidget *parent=0, const char *name=0);
~ProjectNewGeneral();
- QString type();
+ TQString type();
void setMargin(int);
protected:
- bool eventFilter ( QObject * watched, QEvent * e );
+ bool eventFilter ( TQObject * watched, TQEvent * e );
public slots:
void slotButtonDir();
- void slotLinePrjFile(const QString &);
- void slotChangeNames(const QString &);
+ void slotLinePrjFile(const TQString &);
+ void slotChangeNames(const TQString &);
void slotButtonTmpl();
void slotButtonToolbar();
- void slotProtocolChanged(const QString& protocol);
+ void slotProtocolChanged(const TQString& protocol);
signals:
void setBaseURL(const KURL&);
- void enableNextButton(QWidget *, bool);
+ void enableNextButton(TQWidget *, bool);
private:
KURL baseUrl;
diff --git a/quanta/project/projectnewlocal.cpp b/quanta/project/projectnewlocal.cpp
index e037b662..e2d99d30 100644
--- a/quanta/project/projectnewlocal.cpp
+++ b/quanta/project/projectnewlocal.cpp
@@ -16,14 +16,14 @@
***************************************************************************/
// qt includes
-#include <qlabel.h>
-#include <qfileinfo.h>
-#include <qlistview.h>
-#include <qlineedit.h>
-#include <qcheckbox.h>
-#include <qradiobutton.h>
-#include <qpushbutton.h>
-#include <qregexp.h>
+#include <tqlabel.h>
+#include <tqfileinfo.h>
+#include <tqlistview.h>
+#include <tqlineedit.h>
+#include <tqcheckbox.h>
+#include <tqradiobutton.h>
+#include <tqpushbutton.h>
+#include <tqregexp.h>
// kde includes
#include <klocale.h>
@@ -45,7 +45,7 @@
#include "resource.h"
#include "quantacommon.h"
-ProjectNewLocal::ProjectNewLocal(QWidget *parent, const char *name )
+ProjectNewLocal::ProjectNewLocal(TQWidget *parent, const char *name )
: ProjectNewLocalS(parent,name)
{
imagelabel->setPixmap( UserIcon("wiznewprjloc") );
@@ -59,13 +59,13 @@ ProjectNewLocal::ProjectNewLocal(QWidget *parent, const char *name )
checkInsertWeb->setChecked( true );
- connect( checkInsert, SIGNAL(toggled(bool)), this, SLOT(slotSetFiles(bool)));
- connect( checkInsertWeb, SIGNAL(toggled(bool)), this, SLOT(slotSetFiles(bool)));
- connect( checkInsertWithMask, SIGNAL(toggled(bool)), this, SLOT(slotSetFiles(bool)));
+ connect( checkInsert, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotSetFiles(bool)));
+ connect( checkInsertWeb, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotSetFiles(bool)));
+ connect( checkInsertWithMask, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotSetFiles(bool)));
- connect(addFiles, SIGNAL(clicked()),this,SLOT(slotAddFiles()));
- connect(addFolder, SIGNAL(clicked()),this,SLOT(slotAddFolder()));
- connect(clearList, SIGNAL(clicked()),this,SLOT(slotClearList()));
+ connect(addFiles, TQT_SIGNAL(clicked()),this,TQT_SLOT(slotAddFiles()));
+ connect(addFolder, TQT_SIGNAL(clicked()),this,TQT_SLOT(slotAddFolder()));
+ connect(clearList, TQT_SIGNAL(clicked()),this,TQT_SLOT(slotClearList()));
}
ProjectNewLocal::~ProjectNewLocal(){
@@ -86,8 +86,8 @@ KURL::List ProjectNewLocal::files()
//return fileList;
KURL::List r;
- QListViewItem *item;
- QListViewItemIterator it(listView);
+ TQListViewItem *item;
+ TQListViewItemIterator it(listView);
for ( ; it.current(); ++it )
{
item = it.current();
@@ -116,12 +116,12 @@ KURL::List ProjectNewLocal::projectFiles()
!baseURL.path().endsWith("/") ||
!checkInsert->isChecked() ) return list;
- QString fmask = "*";
+ TQString fmask = "*";
if ( checkInsertWeb->isChecked() )
{
KMimeType::List list = KMimeType::allMimeTypes();
KMimeType::List::iterator it;
- QString name;
+ TQString name;
fmask = "";
for ( it = list.begin(); it != list.end(); ++it )
{
@@ -130,7 +130,7 @@ KURL::List ProjectNewLocal::projectFiles()
qConfig.scriptMimeTypes.contains(name) ||
qConfig.imageMimeTypes.contains(name))
{
- QStringList patterns = (*it)->patterns();
+ TQStringList patterns = (*it)->patterns();
for (uint i = 0 ; i < patterns.count(); i++)
{
fmask = fmask+patterns[i]+" ";
@@ -159,7 +159,7 @@ void ProjectNewLocal::slotSetFiles(bool)
if ( !fileList.contains(files[i]))
{
fileList.append(files[i]);
- QListViewItem *it = listView->addItem(files[i], KFileItem(KFileItem::Unknown, KFileItem::Unknown, KURL()));
+ TQListViewItem *it = listView->addItem(files[i], KFileItem(KFileItem::Unknown, KFileItem::Unknown, KURL()));
if (it) it->setSelected(true);
progressBar->setValue(i);
}
@@ -171,7 +171,7 @@ void ProjectNewLocal::slotSetFiles(bool)
}
}
-void ProjectNewLocal::resizeEvent ( QResizeEvent *t )
+void ProjectNewLocal::resizeEvent ( TQResizeEvent *t )
{
ProjectNewLocalS::resizeEvent(t);
listView->setColumnWidth(0,listView->width()-listView->columnWidth(1)-20);
@@ -202,10 +202,10 @@ void ProjectNewLocal::slotAddFiles()
if ( !destination.isEmpty())
{
CopyTo *dlg = new CopyTo( baseURL);
- connect(dlg, SIGNAL(addFilesToProject(const KURL::List&)),
- SLOT (slotInsertFilesAfterCopying(const KURL::List&)));
- connect(dlg, SIGNAL(deleteDialog(CopyTo *)),
- SLOT (slotDeleteCopyToDialog(CopyTo *)));
+ connect(dlg, TQT_SIGNAL(addFilesToProject(const KURL::List&)),
+ TQT_SLOT (slotInsertFilesAfterCopying(const KURL::List&)));
+ connect(dlg, TQT_SIGNAL(deleteDialog(CopyTo *)),
+ TQT_SLOT (slotDeleteCopyToDialog(CopyTo *)));
list = dlg->copy( list, destination );
return;
} else
@@ -222,7 +222,7 @@ void ProjectNewLocal::slotAddFiles()
if (!fileList.contains(list[i]))
{
fileList.append(list[i]);
- QListViewItem *it = listView->addItem(list[i], KFileItem(KFileItem::Unknown, KFileItem::Unknown, KURL()));
+ TQListViewItem *it = listView->addItem(list[i], KFileItem(KFileItem::Unknown, KFileItem::Unknown, KURL()));
if (it) it->setSelected(true);
progressBar->setValue(i);
}
@@ -263,10 +263,10 @@ void ProjectNewLocal::slotAddFolder()
if ( !destination.isEmpty())
{
CopyTo *dlg = new CopyTo( baseURL);
- connect(dlg, SIGNAL(addFilesToProject(const KURL::List&)),
- SLOT (slotInsertFolderAfterCopying(const KURL::List&)));
- connect(dlg, SIGNAL(deleteDialog(CopyTo *)),
- SLOT (slotDeleteCopyToDialog(CopyTo *)));
+ connect(dlg, TQT_SIGNAL(addFilesToProject(const KURL::List&)),
+ TQT_SLOT (slotInsertFolderAfterCopying(const KURL::List&)));
+ connect(dlg, TQT_SIGNAL(deleteDialog(CopyTo *)),
+ TQT_SLOT (slotDeleteCopyToDialog(CopyTo *)));
dirURL = dlg->copy(dirURL, destination);
return;
} else
@@ -304,7 +304,7 @@ void ProjectNewLocal::slotInsertFolderAfterCopying(const KURL::List& a_urlList)
{
fileList.append(u);
listView->addItem(u, KFileItem(KFileItem::Unknown, KFileItem::Unknown, KURL()));
- QListViewItem *it = listView->itemByUrl(u);
+ TQListViewItem *it = listView->itemByUrl(u);
if (it)
{
it->setSelected(true);
@@ -332,7 +332,7 @@ void ProjectNewLocal::slotInsertFilesAfterCopying(const KURL::List& a_urlList)
if ( !fileList.contains(u))
{
fileList.append(u);
- QListViewItem *it = listView->addItem(u, KFileItem(KFileItem::Unknown, KFileItem::Unknown, KURL()));
+ TQListViewItem *it = listView->addItem(u, KFileItem(KFileItem::Unknown, KFileItem::Unknown, KURL()));
if (it)
{
it->setSelected(true);
diff --git a/quanta/project/projectnewlocal.h b/quanta/project/projectnewlocal.h
index 2d2d6d10..498b336d 100644
--- a/quanta/project/projectnewlocal.h
+++ b/quanta/project/projectnewlocal.h
@@ -18,7 +18,7 @@
#ifndef PROJECTNEWLOCAL_H
#define PROJECTNEWLOCAL_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kurl.h>
#include <projectnewlocals.h>
@@ -31,7 +31,7 @@ class CopyTo;
class ProjectNewLocal : public ProjectNewLocalS {
Q_OBJECT
public:
- ProjectNewLocal(QWidget *parent=0, const char *name=0);
+ ProjectNewLocal(TQWidget *parent=0, const char *name=0);
~ProjectNewLocal();
KURL::List files();
@@ -47,7 +47,7 @@ public slots:
void slotInsertFilesAfterCopying(const KURL::List&);
void slotDeleteCopyToDialog(CopyTo*);
- virtual void resizeEvent( QResizeEvent * );
+ virtual void resizeEvent( TQResizeEvent * );
private:
KURL baseURL;
diff --git a/quanta/project/projectnewweb.cpp b/quanta/project/projectnewweb.cpp
index 20685021..5959d01e 100644
--- a/quanta/project/projectnewweb.cpp
+++ b/quanta/project/projectnewweb.cpp
@@ -16,13 +16,13 @@
***************************************************************************/
// qt includes
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qpushbutton.h>
-#include <qstringlist.h>
-#include <qlistview.h>
-#include <qfileinfo.h>
-#include <qcombobox.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
+#include <tqpushbutton.h>
+#include <tqstringlist.h>
+#include <tqlistview.h>
+#include <tqfileinfo.h>
+#include <tqcombobox.h>
// kde includes
#include <klocale.h>
@@ -38,7 +38,7 @@
#include "quantacommon.h"
#include "uploadtreeview.h"
-ProjectNewWeb::ProjectNewWeb(QWidget *parent, const char *name )
+ProjectNewWeb::ProjectNewWeb(TQWidget *parent, const char *name )
: ProjectNewWebS(parent,name)
{
button->setEnabled(false);
@@ -49,14 +49,14 @@ ProjectNewWeb::ProjectNewWeb(QWidget *parent, const char *name )
listView->removeColumn(1);
listView->removeColumn(1);
- connect( commandLine, SIGNAL(textChanged(const QString&)),
- this, SLOT (enableStart(const QString&)));
- connect( siteUrl, SIGNAL(textChanged(const QString&)),
- this, SLOT (setCommandL(const QString&)));
- connect( button, SIGNAL(clicked()),
- this, SLOT (slotStart()));
- connect( protocolCombo,SIGNAL(highlighted(const QString&)),
- this, SLOT (setProtocol(const QString&)));
+ connect( commandLine, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT (enableStart(const TQString&)));
+ connect( siteUrl, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT (setCommandL(const TQString&)));
+ connect( button, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT (slotStart()));
+ connect( protocolCombo,TQT_SIGNAL(highlighted(const TQString&)),
+ this, TQT_SLOT (setProtocol(const TQString&)));
start = false;
KLed1->setState(KLed::Off);
@@ -66,21 +66,21 @@ ProjectNewWeb::ProjectNewWeb(QWidget *parent, const char *name )
ProjectNewWeb::~ProjectNewWeb(){
}
-void ProjectNewWeb::enableStart(const QString&)
+void ProjectNewWeb::enableStart(const TQString&)
{
if ( !commandLine->text().isEmpty() ) button->setEnabled(true);
else button->setEnabled(false);
}
-void ProjectNewWeb::setCommandL(const QString& url)
+void ProjectNewWeb::setCommandL(const TQString& url)
{
- QString siteurl = url;
+ TQString siteurl = url;
commandLine->setText("wget -c -np -r --level=5 -nH "+ protocolCombo->currentText().lower()+ "://"+siteurl);
}
/** No descriptions */
-void ProjectNewWeb::setProtocol(const QString& protocol)
+void ProjectNewWeb::setProtocol(const TQString& protocol)
{
commandLine->setText("wget -c -np -r --level=5 -nH "+ protocol.lower()+ "://"+siteUrl->text());
}
@@ -108,25 +108,25 @@ void ProjectNewWeb::slotStart()
proc = new KProcess();
proc ->clearArguments();
- QStringList list = QStringList::split (" ", commandLine->text());
+ TQStringList list = TQStringList::split (" ", commandLine->text());
- for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it )
+ for ( TQStringList::Iterator it = list.begin(); it != list.end(); ++it )
{
*proc << *it;
}
- connect( proc, SIGNAL(receivedStdout( KProcess*,char*,int)), this,
- SLOT( slotGetWgetOutput(KProcess*,char*,int)));
- connect( proc, SIGNAL(receivedStderr( KProcess*,char*,int)), this,
- SLOT( slotGetWgetOutput(KProcess*,char*,int)));
- connect( proc, SIGNAL(processExited( KProcess *)), this,
- SLOT( slotGetWgetExited(KProcess *)));
+ connect( proc, TQT_SIGNAL(receivedStdout( KProcess*,char*,int)), this,
+ TQT_SLOT( slotGetWgetOutput(KProcess*,char*,int)));
+ connect( proc, TQT_SIGNAL(receivedStderr( KProcess*,char*,int)), this,
+ TQT_SLOT( slotGetWgetOutput(KProcess*,char*,int)));
+ connect( proc, TQT_SIGNAL(processExited( KProcess *)), this,
+ TQT_SLOT( slotGetWgetExited(KProcess *)));
if (proc->start(KProcess::NotifyOnExit, KProcess::AllOutput))
{
start = true;
button->setText( i18n("Stop") );
- emit enableNextButton((QWidget *)this->parent(),false);
+ emit enableNextButton((TQWidget *)this->parent(),false);
} else
{
KMessageBox::error(this, i18n("There was an error while trying to run the \"wget\" application.\
@@ -138,14 +138,14 @@ void ProjectNewWeb::slotStart()
KMessageBox::sorry(this,i18n("This feature is available only if the project lies on a local disk."));
start = false;
button->setText( i18n("Start") );
- emit enableNextButton((QWidget *)this->parent(),true);
+ emit enableNextButton((TQWidget *)this->parent(),true);
}
} else
{
QuantaCommon::dirCreationError(this, baseURL);
start = false;
button->setText( i18n("Start") );
- emit enableNextButton((QWidget *)this->parent(),true);
+ emit enableNextButton((TQWidget *)this->parent(),true);
}
} else {
@@ -155,7 +155,7 @@ void ProjectNewWeb::slotStart()
start = false;
button->setText( i18n("Start") );
- emit enableNextButton((QWidget *)this->parent(),true);
+ emit enableNextButton((TQWidget *)this->parent(),true);
}
}
@@ -166,18 +166,18 @@ void ProjectNewWeb::slotGetWgetExited(KProcess*)
start = false;
button->setText( i18n("Start") );
emit messages(i18n("wget finished...\n"));
- emit enableNextButton((QWidget *)this->parent(),true);
+ emit enableNextButton((TQWidget *)this->parent(),true);
}
void ProjectNewWeb::slotGetWgetOutput(KProcess *, char *buffer, int buflen)
{
- QString output = buffer;
+ TQString output = buffer;
output = output.left( buflen );
emit messages(output);
int pos;
- QString basePath = baseURL.path(1);
+ TQString basePath = baseURL.path(1);
while ( (pos = output.find("saved")) != -1 )
{
if (KLed1->state() == KLed::Off)
@@ -201,7 +201,7 @@ void ProjectNewWeb::slotGetWgetOutput(KProcess *, char *buffer, int buflen)
continue;
}
- QString fileName = output.left(endName);
+ TQString fileName = output.left(endName);
fileName = fileName.right( endName - begName-1);
output = output.remove(0,pos+1);
@@ -218,8 +218,8 @@ KURL::List ProjectNewWeb::files()
KURL::List r;
KURL u;
- QListViewItem *item;
- QListViewItemIterator it(listView);
+ TQListViewItem *item;
+ TQListViewItemIterator it(listView);
for ( ; it.current(); ++it )
{
item = it.current();
@@ -236,7 +236,7 @@ KURL::List ProjectNewWeb::files()
return r;
}
-void ProjectNewWeb::resizeEvent ( QResizeEvent *t )
+void ProjectNewWeb::resizeEvent ( TQResizeEvent *t )
{
ProjectNewWebS::resizeEvent(t);
// listView->setColumnWidth(0,listView->width()-listView->columnWidth(1)-20);
diff --git a/quanta/project/projectnewweb.h b/quanta/project/projectnewweb.h
index 62da219f..28a395b4 100644
--- a/quanta/project/projectnewweb.h
+++ b/quanta/project/projectnewweb.h
@@ -19,8 +19,8 @@
#define PROJECTNEWWEB_H
//qt includes
-#include <qwidget.h>
-#include <qstringlist.h>
+#include <tqwidget.h>
+#include <tqstringlist.h>
//app includes
#include "projectnewwebs.h"
@@ -35,12 +35,12 @@ class KURL;
class ProjectNewWeb : public ProjectNewWebS {
Q_OBJECT
public:
- ProjectNewWeb(QWidget *parent=0, const char *name=0);
+ ProjectNewWeb(TQWidget *parent=0, const char *name=0);
~ProjectNewWeb();
public slots:
- void enableStart(const QString&);
- void setCommandL(const QString&);
+ void enableStart(const TQString&);
+ void setCommandL(const TQString&);
void setBaseURL(const KURL& a_baseURL);
void slotStart();
@@ -50,15 +50,15 @@ public slots:
void slotGetWgetExited(KProcess *);
void slotGetWgetOutput(KProcess *proc, char *buffer, int buflen);
- virtual void resizeEvent( QResizeEvent * );
+ virtual void resizeEvent( TQResizeEvent * );
signals:
void enableMessagesWidget();
- void messages(const QString& );
+ void messages(const TQString& );
/** No descriptions */
- void enableNextButton(QWidget *,bool);
+ void enableNextButton(TQWidget *,bool);
private:
KURL baseURL;
@@ -69,7 +69,7 @@ private:
private slots: // Private slots
/** No descriptions */
- void setProtocol(const QString& protocol);
+ void setProtocol(const TQString& protocol);
};
#endif
diff --git a/quanta/project/projectprivate.cpp b/quanta/project/projectprivate.cpp
index c74b1dc9..86f4e221 100644
--- a/quanta/project/projectprivate.cpp
+++ b/quanta/project/projectprivate.cpp
@@ -18,13 +18,13 @@
#include "projectprivate.h"
//qt includes
-#include <qcheckbox.h>
-#include <qdir.h>
-#include <qfile.h>
-#include <qradiobutton.h>
-#include <qwidgetstack.h>
-#include <qwizard.h>
-#include <qeventloop.h>
+#include <tqcheckbox.h>
+#include <tqdir.h>
+#include <tqfile.h>
+#include <tqradiobutton.h>
+#include <tqwidgetstack.h>
+#include <tqwizard.h>
+#include <tqeventloop.h>
//kde includes
#include <kaction.h>
@@ -63,7 +63,7 @@
#include "viewmanager.h"
ProjectPrivate::ProjectPrivate(Project *p)
- : QObject(), config(0L), m_dirWatch(0L), tempFile(0L), sessionTempFile(0L)
+ : TQObject(), config(0L), m_dirWatch(0L), tempFile(0L), sessionTempFile(0L)
{
parent = p;
m_projectFiles.setAutoDelete(true);
@@ -83,73 +83,73 @@ ProjectPrivate::~ProjectPrivate()
void ProjectPrivate::initActions(KActionCollection *ac)
{
(void) new KAction( i18n( "&New Project..." ), "window_new", 0,
- this, SLOT( slotNewProject() ),
+ this, TQT_SLOT( slotNewProject() ),
ac, "project_new" );
(void) new KAction( i18n( "&Open Project..." ), "project_open", 0,
- this, SLOT( slotOpenProject() ),
+ this, TQT_SLOT( slotOpenProject() ),
ac, "project_open" );
m_projectRecent =
- KStdAction::openRecent(parent, SLOT(slotOpenProject(const KURL&)),
+ KStdAction::openRecent(parent, TQT_SLOT(slotOpenProject(const KURL&)),
ac, "project_open_recent");
m_projectRecent->setText(i18n("Open Recent Project"));
m_projectRecent->setIcon("project_open");
m_projectRecent->setToolTip(i18n("Open/Open recent project"));
- connect(m_projectRecent, SIGNAL(activated()), this, SLOT(slotOpenProject()));
+ connect(m_projectRecent, TQT_SIGNAL(activated()), this, TQT_SLOT(slotOpenProject()));
closeprjAction = new KAction( i18n( "&Close Project" ), "fileclose", 0,
- this, SLOT( slotCloseProject() ),
+ this, TQT_SLOT( slotCloseProject() ),
ac, "project_close" );
openPrjViewAction = new KSelectAction( i18n( "Open Project &View..." ), 0,
ac, "project_view_open" );
- connect(openPrjViewAction, SIGNAL(activated(const QString &)),
- this, SLOT(slotOpenProjectView(const QString &)));
+ connect(openPrjViewAction, TQT_SIGNAL(activated(const TQString &)),
+ this, TQT_SLOT(slotOpenProjectView(const TQString &)));
openPrjViewAction->setToolTip(i18n("Open project view"));
savePrjViewAction = new KAction( i18n( "&Save Project View" ), "filesave", 0,
- this, SLOT( slotSaveProjectView() ),
+ this, TQT_SLOT( slotSaveProjectView() ),
ac, "project_view_save" );
saveAsPrjViewAction = new KAction( i18n( "Save Project View &As..." ), "filesaveas", 0,
- this, SLOT( slotSaveAsProjectView() ),
+ this, TQT_SLOT( slotSaveAsProjectView() ),
ac, "project_view_save_as" );
deletePrjViewAction = new KSelectAction( i18n( "&Delete Project View" ), "editdelete", 0,
ac, "project_view_delete" );
- connect(deletePrjViewAction, SIGNAL(activated(const QString &)),
- this, SLOT(slotDeleteProjectView(const QString &)));
+ connect(deletePrjViewAction, TQT_SIGNAL(activated(const TQString &)),
+ this, TQT_SLOT(slotDeleteProjectView(const TQString &)));
deletePrjViewAction->setToolTip(i18n("Close project view"));
insertFileAction = new KAction( i18n( "&Insert Files..." ), 0,
- this, SLOT( slotAddFiles() ),
+ this, TQT_SLOT( slotAddFiles() ),
ac, "project_insert_file" );
insertDirAction = new KAction( i18n( "Inser&t Folder..." ), 0,
- this, SLOT( slotAddDirectory() ),
+ this, TQT_SLOT( slotAddDirectory() ),
ac, "project_insert_directory" );
rescanPrjDirAction = new KAction( i18n( "&Rescan Project Folder..." ), "reload", 0,
- parent, SLOT( slotRescanPrjDir() ),
+ parent, TQT_SLOT( slotRescanPrjDir() ),
ac, "project_rescan" );
uploadProjectAction = new KAction( i18n( "&Upload Project..." ), "up", Key_F8,
- parent, SLOT( slotUpload() ),
+ parent, TQT_SLOT( slotUpload() ),
ac, "project_upload" );
projectOptionAction = new KAction( i18n( "&Project Properties" ), "configure", SHIFT + Key_F7,
- parent, SLOT( slotOptions() ),
+ parent, TQT_SLOT( slotOptions() ),
ac, "project_options" );
saveAsProjectTemplateAction =
new KAction( i18n( "Save as Project Template..." ), 0,
- m_mainWindow, SLOT( slotFileSaveAsProjectTemplate() ),
+ m_mainWindow, TQT_SLOT( slotFileSaveAsProjectTemplate() ),
ac, "save_project_template" );
saveSelectionAsProjectTemplateAction =
new KAction( i18n( "Save Selection to Project Template File..." ), 0,
- m_mainWindow, SLOT( slotFileSaveSelectionAsProjectTemplate() ),
+ m_mainWindow, TQT_SLOT( slotFileSaveSelectionAsProjectTemplate() ),
ac, "save_selection_project_template" );
adjustActions();
}
@@ -179,8 +179,8 @@ void ProjectPrivate::adjustActions()
void ProjectPrivate::adjustViewActions()
{
- QStringList viewList = projectViewList();
- QString oldItem = openPrjViewAction->currentText();
+ TQStringList viewList = projectViewList();
+ TQString oldItem = openPrjViewAction->currentText();
openPrjViewAction->clear();
openPrjViewAction->setItems(viewList);
int i = viewList.findIndex(oldItem);
@@ -193,11 +193,11 @@ void ProjectPrivate::adjustViewActions()
}
-QStringList ProjectPrivate::projectViewList()
+TQStringList ProjectPrivate::projectViewList()
{
- QStringList list;
- QDomNodeList nl = dom.elementsByTagName("projectview");
- QDomElement el;
+ TQStringList list;
+ TQDomNodeList nl = dom.elementsByTagName("projectview");
+ TQDomElement el;
for (uint i = 0; i < nl.count(); i++)
{
el = nl.item(i).cloneNode().toElement();
@@ -211,7 +211,7 @@ void ProjectPrivate::init()
{
projectURL = KURL();
templateURL = KURL();
- projectName = QString::null;
+ projectName = TQString::null;
m_modified = false;
m_defaultDTD = qConfig.defaultDocType;
excludeRx.setPattern(".*~$");
@@ -223,11 +223,11 @@ void ProjectPrivate::init()
m_debuggerPersistentBreakpoints = false;
m_debuggerPersistentWatches = false;
m_excludeCvsignore = false;
- currentProjectView = QString::null;
+ currentProjectView = TQString::null;
m_projectFiles.clear();
- m_mailingList = QString::null;
- m_teamLeader.name = QString::null;
- m_teamLeader.email = QString::null;
+ m_mailingList = TQString::null;
+ m_teamLeader.name = TQString::null;
+ m_teamLeader.email = TQString::null;
m_taskLeaders.clear();
m_subprojectLeaders.clear();
m_subprojects.clear();
@@ -241,17 +241,17 @@ void ProjectPrivate::openCurrentView()
if (currentProjectView.isEmpty())
return;
KURL::List urlsToOpen, urlsInView;
- QDomNodeList nl = dom.elementsByTagName("projectview");
- QDomElement el;
+ TQDomNodeList nl = dom.elementsByTagName("projectview");
+ TQDomElement el;
for (uint i = 0; i < nl.count(); i++)
{
el = nl.item(i).cloneNode().toElement();
if (el.attribute("name") == currentProjectView)
{
- QDomNodeList itemNodes = el.childNodes();
+ TQDomNodeList itemNodes = el.childNodes();
for (uint j = 0; j < itemNodes.count(); j++)
{
- QDomElement el2 = itemNodes.item(j).cloneNode().toElement();
+ TQDomElement el2 = itemNodes.item(j).cloneNode().toElement();
KURL url = baseURL;
QuantaCommon::setUrl(url,el2.attribute("url"));
url = QExtFileInfo::toAbsolute(url, baseURL);
@@ -280,7 +280,7 @@ void ProjectPrivate::openCurrentView()
break;
}
}
- QStringList viewList = projectViewList();
+ TQStringList viewList = projectViewList();
int i = viewList.findIndex(currentProjectView);
if (i > -1)
openPrjViewAction->setCurrentItem(i);
@@ -288,7 +288,7 @@ void ProjectPrivate::openCurrentView()
}
/** Opens a project view (toolbars & files). */
-void ProjectPrivate::slotOpenProjectView(const QString &view)
+void ProjectPrivate::slotOpenProjectView(const TQString &view)
{
currentProjectView = view;
openCurrentView();
@@ -297,8 +297,8 @@ void ProjectPrivate::slotOpenProjectView(const QString &view)
/** insert files */
void ProjectPrivate::insertFiles( KURL::List files )
{
- QDomElement el;
- QDomNodeList nl = dom.elementsByTagName("item");
+ TQDomElement el;
+ TQDomNodeList nl = dom.elementsByTagName("item");
parent->statusMsg( i18n("Adding files to the project...") );
progressBar->setTotalSteps(2 * files.count() - 2);
progressBar->setValue(0);
@@ -328,7 +328,7 @@ void ProjectPrivate::insertFiles( KURL::List files )
el.setAttribute("url", QuantaCommon::qUrl(QExtFileInfo::toRelative(url, baseURL, false)));
dom.firstChild().firstChild().appendChild(el);
m_projectFiles.insert( new ProjectURL(url, "", 1, false, el) );
- emit eventHappened("after_project_add", url.url(), QString::null);
+ emit eventHappened("after_project_add", url.url(), TQString::null);
m_modified = true;
}
url.setPath(url.directory(false));
@@ -340,7 +340,7 @@ void ProjectPrivate::insertFiles( KURL::List files )
el.setAttribute("url", QuantaCommon::qUrl(QExtFileInfo::toRelative(url, baseURL, false)));
dom.firstChild().firstChild().appendChild(el);
m_projectFiles.insert( new ProjectURL(url, "", 1, false, el) );
- emit eventHappened("after_project_add", url.url(), QString::null);
+ emit eventHappened("after_project_add", url.url(), TQString::null);
m_modified = true;
}
}
@@ -350,14 +350,14 @@ void ProjectPrivate::insertFiles( KURL::List files )
progressBar->setValue(0);
progressBar->setTextEnabled(false);
- parent->reloadTree(&(m_projectFiles), false, QStringList());
+ parent->reloadTree(&(m_projectFiles), false, TQStringList());
parent->newStatus();
- parent->statusMsg(QString::null);
+ parent->statusMsg(TQString::null);
}
/** insert files from dir recursive */
-void ProjectPrivate::insertFiles(const KURL& pathURL, const QString& mask )
+void ProjectPrivate::insertFiles(const KURL& pathURL, const TQString& mask )
{
KURL::List list;
@@ -372,10 +372,10 @@ void ProjectPrivate::loadProjectXML()
//TODO: Optimize reading. For example iterate through all the nodes and handle them
//according to the found node type
parent->statusMsg( i18n("Reading the project file...") );
- QDomNode no;
- QDomElement el;
+ TQDomNode no;
+ TQDomElement el;
KURL url;
- QDomNode projectNode = dom.firstChild().firstChild();
+ TQDomNode projectNode = dom.firstChild().firstChild();
projectName = projectNode.toElement().attribute("name");
if ( projectNode.isNull() || projectName.isEmpty() )
@@ -387,8 +387,8 @@ void ProjectPrivate::loadProjectXML()
}
m_modified = false;
- QString tmpString;
- QDomNode sessionNode;
+ TQString tmpString;
+ TQDomNode sessionNode;
if (!m_createSessionDom)
{
@@ -439,7 +439,7 @@ void ProjectPrivate::loadProjectXML()
currentProjectView = no.toElement().attribute("projectview");
if (currentProjectView.isEmpty())
{
- QStringList list = projectViewList();
+ TQStringList list = projectViewList();
if (list.count() > 0)
currentProjectView = list[0];
}
@@ -508,13 +508,13 @@ void ProjectPrivate::loadProjectXML()
no = projectNode.namedItem("exclude");
m_excludeCvsignore = (no.toElement().attribute("cvsignore", "false") == "true");
- QString excludeStr = no.firstChild().nodeValue();
- QString regExpStr = "";
- excludeList = QStringList::split(';', excludeStr);
+ TQString excludeStr = no.firstChild().nodeValue();
+ TQString regExpStr = "";
+ excludeList = TQStringList::split(';', excludeStr);
for (uint i = 0; i < excludeList.count(); i++)
{
excludeStr = excludeList[i].stripWhiteSpace();
- QString str = excludeStr;
+ TQString str = excludeStr;
if (!excludeStr.startsWith("*"))
{
if (!excludeStr.endsWith("*"))
@@ -531,10 +531,10 @@ void ProjectPrivate::loadProjectXML()
if (i+1 < excludeList.count())
regExpStr.append("|");
}
- QDomNodeList nl = dom.firstChild().firstChild().childNodes();
+ TQDomNodeList nl = dom.firstChild().firstChild().childNodes();
if (m_excludeCvsignore && projectURL.isLocalFile())
{
- QStringList cvsIgnoreList;
+ TQStringList cvsIgnoreList;
uint nlCount = nl.count();
for ( uint i = 0; i < nlCount; i++ )
{
@@ -544,18 +544,18 @@ void ProjectPrivate::loadProjectXML()
cvsIgnoreList.append(tmpString);
}
cvsIgnoreList.append("");
- for (QStringList::ConstIterator it = cvsIgnoreList.constBegin(); it != cvsIgnoreList.constEnd(); ++it)
+ for (TQStringList::ConstIterator it = cvsIgnoreList.constBegin(); it != cvsIgnoreList.constEnd(); ++it)
{
tmpString = *it;
- QString rxStr;
+ TQString rxStr;
KURL cvsIgnoreURL;
cvsIgnoreURL.setPath(baseURL.path(1) + tmpString + ".cvsignore");
- QFile f(cvsIgnoreURL.path());
+ TQFile f(cvsIgnoreURL.path());
if (f.open(IO_ReadOnly))
{
- QTextStream stream(&f);
- stream.setEncoding(QTextStream::UnicodeUTF8);
- QString line;
+ TQTextStream stream(&f);
+ stream.setEncoding(TQTextStream::UnicodeUTF8);
+ TQString line;
while (!stream.atEnd())
{
line = stream.readLine().stripWhiteSpace();
@@ -588,10 +588,10 @@ void ProjectPrivate::loadProjectXML()
else
ev.type = EventAction::External;
ev.action = el.attribute("action");
- QDomNodeList nl2 = el.elementsByTagName("argument");
+ TQDomNodeList nl2 = el.elementsByTagName("argument");
for (uint j = 0; j < nl2.count(); j++)
{
- QString s = nl2.item(j).toElement().text();
+ TQString s = nl2.item(j).toElement().text();
if (s != "--not set--" && !s.isEmpty())
ev.arguments << s;
}
@@ -600,13 +600,13 @@ void ProjectPrivate::loadProjectXML()
(*m_events)[el.attribute("name")].append(ev);
} else
{
- QValueList<EventAction> evList;
+ TQValueList<EventAction> evList;
evList.append(ev);
m_events->insert(el.attribute("name"), evList);
}
}
- QDomNode teamNode = projectNode.namedItem("teamdata");
+ TQDomNode teamNode = projectNode.namedItem("teamdata");
no = teamNode.namedItem("leader");
if (!no.isNull())
{
@@ -622,7 +622,7 @@ void ProjectPrivate::loadProjectXML()
for (uint i = 0; i < nl.count(); i++)
{
el = nl.item(i).toElement();
- QDomElement el2 = el.namedItem("subprojectleader").toElement();
+ TQDomElement el2 = el.namedItem("subprojectleader").toElement();
TeamMember member;
member.name = el2.attribute("name");
member.nickName = el2.attribute("nickName");
@@ -667,7 +667,7 @@ void ProjectPrivate::loadProjectXML()
if (m_projectFiles.readFromXML(dom, baseURL, templateURL, excludeRx))
m_modified = true;
- QDomNode uploadNode;
+ TQDomNode uploadNode;
if (!m_createSessionDom)
{
uploadNode = sessionNode.namedItem("uploadprofiles");
@@ -677,7 +677,7 @@ void ProjectPrivate::loadProjectXML()
sessionNode.appendChild(uploadNode);
}
- QDomElement uploadEl = uploadNode.toElement();
+ TQDomElement uploadEl = uploadNode.toElement();
m_showUploadTreeviews = uploadEl.attribute("showtreeviews", "true") == "true";
if (m_showUploadTreeviews)
{
@@ -688,7 +688,7 @@ void ProjectPrivate::loadProjectXML()
if (m_createSessionDom)
{
- QDomNode node;
+ TQDomNode node;
node = projectNode.namedItem("treestatus").cloneNode(true);
sessionNode.appendChild(node);
node = projectNode.namedItem("debuggers").cloneNode(true);
@@ -696,7 +696,7 @@ void ProjectPrivate::loadProjectXML()
}
- parent->statusMsg(QString::null);
+ parent->statusMsg(TQString::null);
parent->newProjectLoaded(projectName, baseURL, templateURL);
parent->reloadTree(&(m_projectFiles), true, treeStatusFromXML());
parent->newStatus();
@@ -708,13 +708,13 @@ void ProjectPrivate::slotAcceptCreateProject()
bool errorOccured = false;
projectName = png->linePrjName->text();
- QString basePath = png->linePrjDir ->text();
+ TQString basePath = png->linePrjDir ->text();
KURL oldBaseURL = baseURL;
baseURL = KURL::fromPathOrURL(basePath);
if (baseURL.isLocalFile())
{
- QString path = QDir(baseURL.path()).canonicalPath();
+ TQString path = TQDir(baseURL.path()).canonicalPath();
if (baseURL.path().endsWith("/"))
path.append("/");
if (!path.isEmpty())
@@ -724,7 +724,7 @@ void ProjectPrivate::slotAcceptCreateProject()
it is important to set the fields only if there is some input
otherwise you set them to an empty string and the treeview will
not recognize it as parent url because:
- QString::Null != ""
+ TQString::Null != ""
*/
if (!png->lineHost->text().isEmpty())
baseURL.setHost(png->lineHost->text());
@@ -759,7 +759,7 @@ void ProjectPrivate::slotAcceptCreateProject()
previewPrefix = KURL::fromPathOrURL( pnf->linePrefix->text() );
usePreviewPrefix = pnf->checkPrefix->isChecked();
- QDomElement el;
+ TQDomElement el;
KURL url;
el = dom.firstChild().firstChild().toElement();
@@ -877,13 +877,13 @@ void ProjectPrivate::slotSaveProjectView()
/** Deletes a project view */
-void ProjectPrivate::slotDeleteProjectView(const QString &view)
+void ProjectPrivate::slotDeleteProjectView(const TQString &view)
{
- QDomNodeList nl = dom.elementsByTagName("projectview");
- QDomElement el;
+ TQDomNodeList nl = dom.elementsByTagName("projectview");
+ TQDomElement el;
for (uint i = 0; i < nl.count(); i++)
{
- QDomNode node = nl.item(i);
+ TQDomNode node = nl.item(i);
el = node.cloneNode().toElement();
if (el.attribute("name") == view)
{
@@ -903,21 +903,21 @@ void ProjectPrivate::slotSaveAsProjectView(bool askForName)
if (askForName)
{
bool ok;
- QString newProjectView = KInputDialog::getText(i18n("Save Project View As"),
+ TQString newProjectView = KInputDialog::getText(i18n("Save Project View As"),
i18n("Enter the name of the view:"), "", &ok, m_mainWindow).lower();
if (!ok)
return;
currentProjectView = newProjectView;
}
- QDomNodeList nl = dom.elementsByTagName("projectview");
+ TQDomNodeList nl = dom.elementsByTagName("projectview");
for (uint i = 0 ;i < nl.count(); i++)
{
- QDomNode node = nl.item(i);
+ TQDomNode node = nl.item(i);
if (node.toElement().attribute("name") == currentProjectView)
{
if (!askForName ||
KMessageBox::warningContinueCancel(m_mainWindow, i18n("<qt>A project view named <b>%1</b> already exists.<br>Do you want to overwrite it?</qt>")
- .arg(currentProjectView), QString::null, i18n("Overwrite")) == KMessageBox::Continue)
+ .arg(currentProjectView), TQString::null, i18n("Overwrite")) == KMessageBox::Continue)
{
node.parentNode().removeChild(node);
break;
@@ -928,9 +928,9 @@ void ProjectPrivate::slotSaveAsProjectView(bool askForName)
}
}
- QDomElement el = dom.createElement("projectview");
+ TQDomElement el = dom.createElement("projectview");
el.setAttribute("name", currentProjectView);
- QDomElement item;
+ TQDomElement item;
KURL::List openURLs = ViewManager::ref()->openedFiles(true); // get open urls
KURL::List::Iterator it;
for ( it = openURLs.begin(); it != openURLs.end(); ++it )
@@ -961,7 +961,7 @@ void ProjectPrivate::slotSaveAsProjectView(bool askForName)
}
-void ProjectPrivate::slotSelectProjectType(const QString &title)
+void ProjectPrivate::slotSelectProjectType(const TQString &title)
{
if ( png->radioLocal->isChecked() ) stack->raiseWidget( 0 );
if ( png->radioWeb ->isChecked() ) stack->raiseWidget( 1 );
@@ -972,9 +972,9 @@ void ProjectPrivate::slotSelectProjectType(const QString &title)
bool ProjectPrivate::createEmptyDom()
{
- QString str;
- QTextStream stream(&str, IO_WriteOnly);
- stream.setEncoding(QTextStream::UnicodeUTF8);
+ TQString str;
+ TQTextStream stream(&str, IO_WriteOnly);
+ stream.setEncoding(TQTextStream::UnicodeUTF8);
stream << "<!DOCTYPE webproject ><webproject>" << endl;
stream << "\t<project name=\"" << projectName << "\">" << endl;
@@ -982,9 +982,9 @@ bool ProjectPrivate::createEmptyDom()
stream << "\t</project>" << endl;
stream << "</webproject>" << endl;
- QString sessionStr;
- QTextStream sessionStream(&sessionStr, IO_WriteOnly);
- sessionStream.setEncoding(QTextStream::UnicodeUTF8);
+ TQString sessionStr;
+ TQTextStream sessionStream(&sessionStr, IO_WriteOnly);
+ sessionStream.setEncoding(TQTextStream::UnicodeUTF8);
sessionStream << "<!DOCTYPE webprojectsession ><webprojectsession>" << endl;
sessionStream << "\t<session>" << endl;
@@ -992,7 +992,7 @@ bool ProjectPrivate::createEmptyDom()
sessionStream << "</webprojectsession>" << endl;
KURL sessionURL = projectURL;
- QString fileName = projectURL.fileName();
+ TQString fileName = projectURL.fileName();
if (fileName.endsWith(".webprj"))
fileName.replace(".webprj", ".session");
else
@@ -1005,7 +1005,7 @@ bool ProjectPrivate::createEmptyDom()
{
tempFile = new KTempFile(tmpDir); // tempFile will get deleted in slotProjectClose()
tempFile->setAutoDelete(true);
- tempFile->textStream()->setEncoding(QTextStream::UnicodeUTF8);
+ tempFile->textStream()->setEncoding(TQTextStream::UnicodeUTF8);
*(tempFile->textStream()) << str;
tempFile->close();
result = QExtFileInfo::createDir(baseURL, m_mainWindow);
@@ -1016,7 +1016,7 @@ bool ProjectPrivate::createEmptyDom()
sessionTempFile = new KTempFile(tmpDir); // sessionTempFile will get deleted in slotProjectClose()
sessionTempFile->setAutoDelete(true);
- sessionTempFile->textStream()->setEncoding(QTextStream::UnicodeUTF8);
+ sessionTempFile->textStream()->setEncoding(TQTextStream::UnicodeUTF8);
*(sessionTempFile->textStream()) << sessionStr;
sessionTempFile->close();
result = KIO::NetAccess::upload(sessionTempFile->name(), sessionURL, m_mainWindow);
@@ -1024,11 +1024,11 @@ bool ProjectPrivate::createEmptyDom()
m_tmpSessionFile= sessionTempFile->name();
} else
{
- QFile f(projectURL.path());
+ TQFile f(projectURL.path());
if (f.open( IO_WriteOnly ))
{
- QTextStream fstream(&f);
- fstream.setEncoding(QTextStream::UnicodeUTF8);
+ TQTextStream fstream(&f);
+ fstream.setEncoding(TQTextStream::UnicodeUTF8);
fstream << str;
m_tmpProjectFile = projectURL.path(); // we are local: the temp file and the projectURL are the same
} else
@@ -1041,8 +1041,8 @@ bool ProjectPrivate::createEmptyDom()
f.setName(sessionURL.path());
if (f.open(IO_WriteOnly))
{
- QTextStream fstream(&f);
- fstream.setEncoding(QTextStream::UnicodeUTF8);
+ TQTextStream fstream(&f);
+ fstream.setEncoding(TQTextStream::UnicodeUTF8);
fstream << sessionStr;
m_tmpSessionFile = sessionURL.path(); // we are local: the temp file and the projectURL are the same
} else
@@ -1071,15 +1071,15 @@ bool ProjectPrivate::createEmptyDom()
}
-QStringList ProjectPrivate::treeStatusFromXML()
+TQStringList ProjectPrivate::treeStatusFromXML()
{
- QStringList folderList;
- QDomNodeList nl = m_sessionDom.elementsByTagName("treestatus");
+ TQStringList folderList;
+ TQDomNodeList nl = m_sessionDom.elementsByTagName("treestatus");
if (nl.count() > 0) {
nl = nl.item(0).childNodes();
for ( unsigned int i = 0; i < nl.count(); i++ )
{
- QString urlString = nl.item(i).toElement().attribute("url");
+ TQString urlString = nl.item(i).toElement().attribute("url");
folderList.append( baseURL.url(1) + urlString);
}
}
@@ -1090,15 +1090,15 @@ QStringList ProjectPrivate::treeStatusFromXML()
void ProjectPrivate::getStatusFromTree()
{
// remove old status
- QDomNodeList nl = m_sessionDom.elementsByTagName("treestatus");
- QDomElement el;
+ TQDomNodeList nl = m_sessionDom.elementsByTagName("treestatus");
+ TQDomElement el;
for ( unsigned int i = 0; i < nl.count(); i++ )
{
el = nl.item(i).toElement();
el.parentNode().removeChild( el );
i--;
}
- QStringList folderList;
+ TQStringList folderList;
parent->getTreeStatus( &folderList );
// toplevel folder is always open in a project and QExtFileInfo::toRelative
// creates strange output -> we remove the toplevel folder
@@ -1106,9 +1106,9 @@ void ProjectPrivate::getStatusFromTree()
folderList.remove(folderList.begin());
if (folderList.count() > 0) {
// create the root element
- QDomElement root = m_sessionDom.createElement("treestatus");
+ TQDomElement root = m_sessionDom.createElement("treestatus");
m_sessionDom.firstChild().firstChild().appendChild(root);
- for (QStringList::Iterator it = folderList.begin(); it != folderList.end(); ++it) {
+ for (TQStringList::Iterator it = folderList.begin(); it != folderList.end(); ++it) {
el = m_sessionDom.createElement("openfolder");
el.setAttribute("url", QuantaCommon::qUrl( QExtFileInfo::toRelative(KURL(*it), baseURL) ) );
root.appendChild( el );
@@ -1120,13 +1120,13 @@ void ProjectPrivate::getStatusFromTree()
/** create new project */
void ProjectPrivate::slotNewProject()
{
- QWizard *wiz = new QWizard(m_mainWindow, "new", true);
+ TQWizard *wiz = new TQWizard(m_mainWindow, "new", true);
wiz->setCaption(i18n("New Project Wizard"));
- wiz->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum);
+ wiz->setSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Minimum);
png = new ProjectNewGeneral(0L);
- stack = new QWidgetStack(0L);
+ stack = new TQWidgetStack(0L);
pnl = new ProjectNewLocal(stack);
pnw = new ProjectNewWeb(stack);
@@ -1145,38 +1145,38 @@ void ProjectPrivate::slotNewProject()
wiz->setNextEnabled ( pnf, false );
wiz->setFinishEnabled( pnf, true );
- connect( png, SIGNAL(enableNextButton(QWidget *,bool)),
- wiz, SLOT(setNextEnabled(QWidget*,bool)));
- connect( png, SIGNAL(setBaseURL(const KURL&)),
- pnl, SLOT( setBaseURL(const KURL&)));
- connect( png, SIGNAL(setBaseURL(const KURL&)),
- pnw, SLOT( setBaseURL(const KURL&)));
- connect( this,SIGNAL(setLocalFiles(bool)),
- pnl, SLOT(slotSetFiles(bool)));
+ connect( png, TQT_SIGNAL(enableNextButton(TQWidget *,bool)),
+ wiz, TQT_SLOT(setNextEnabled(TQWidget*,bool)));
+ connect( png, TQT_SIGNAL(setBaseURL(const KURL&)),
+ pnl, TQT_SLOT( setBaseURL(const KURL&)));
+ connect( png, TQT_SIGNAL(setBaseURL(const KURL&)),
+ pnw, TQT_SLOT( setBaseURL(const KURL&)));
+ connect( this,TQT_SIGNAL(setLocalFiles(bool)),
+ pnl, TQT_SLOT(slotSetFiles(bool)));
- connect(wiz, SIGNAL(selected(const QString &)),
- this, SLOT (slotSelectProjectType(const QString &)));
- connect(wiz, SIGNAL(helpClicked()), SLOT(slotNewProjectHelpClicked()));
-
- connect( pnw, SIGNAL(enableMessagesWidget()),
- parent, SIGNAL(enableMessageWidget()));
- connect( pnw, SIGNAL(messages(const QString&)),
- parent, SLOT (slotGetMessages(const QString&)));
- connect( pnw, SIGNAL(enableNextButton(QWidget *,bool)),
- wiz, SLOT(setNextEnabled(QWidget*,bool)));
- connect( pnw, SIGNAL(enableNextButton(QWidget *,bool)),
- wiz, SLOT(setBackEnabled(QWidget*,bool)));
-
- QStringList lst = DTDs::ref()->nickNameList(true);
+ connect(wiz, TQT_SIGNAL(selected(const TQString &)),
+ this, TQT_SLOT (slotSelectProjectType(const TQString &)));
+ connect(wiz, TQT_SIGNAL(helpClicked()), TQT_SLOT(slotNewProjectHelpClicked()));
+
+ connect( pnw, TQT_SIGNAL(enableMessagesWidget()),
+ parent, TQT_SIGNAL(enableMessageWidget()));
+ connect( pnw, TQT_SIGNAL(messages(const TQString&)),
+ parent, TQT_SLOT (slotGetMessages(const TQString&)));
+ connect( pnw, TQT_SIGNAL(enableNextButton(TQWidget *,bool)),
+ wiz, TQT_SLOT(setNextEnabled(TQWidget*,bool)));
+ connect( pnw, TQT_SIGNAL(enableNextButton(TQWidget *,bool)),
+ wiz, TQT_SLOT(setBackEnabled(TQWidget*,bool)));
+
+ TQStringList lst = DTDs::ref()->nickNameList(true);
pnf->dtdCombo->insertStringList(lst);
- QString defaultDTDName = DTDs::ref()->getDTDNickNameFromName(qConfig.defaultDocType.lower());
+ TQString defaultDTDName = DTDs::ref()->getDTDNickNameFromName(qConfig.defaultDocType.lower());
int pos = lst.findIndex(defaultDTDName);
if (pos >= 0)
pnf->dtdCombo->setCurrentItem(pos);
- QStringList availableEncodingNames(KGlobal::charsets()->availableEncodingNames());
+ TQStringList availableEncodingNames(KGlobal::charsets()->availableEncodingNames());
pnf->encodingCombo->insertStringList( availableEncodingNames );
- QStringList::ConstIterator iter;
+ TQStringList::ConstIterator iter;
int iIndex = -1;
for (iter = availableEncodingNames.begin(); iter != availableEncodingNames.end(); ++iter)
{
@@ -1204,41 +1204,41 @@ void ProjectPrivate::slotNewProject()
void ProjectPrivate::slotCloseProject()
{
if (!parent->hasProject()) return;
- connect(ViewManager::ref(), SIGNAL(filesClosed(bool)), this, SLOT(slotProceedWithCloseProject(bool)));
+ connect(ViewManager::ref(), TQT_SIGNAL(filesClosed(bool)), this, TQT_SLOT(slotProceedWithCloseProject(bool)));
parent->closeFiles();
}
void ProjectPrivate::slotProceedWithCloseProject(bool success)
{
- disconnect(ViewManager::ref(), SIGNAL(filesClosed(bool)), this, SLOT(slotProceedWithCloseProject(bool)));
+ disconnect(ViewManager::ref(), TQT_SIGNAL(filesClosed(bool)), this, TQT_SLOT(slotProceedWithCloseProject(bool)));
if (!success) return;
- emit eventHappened("before_project_close", baseURL.url(), QString::null);
+ emit eventHappened("before_project_close", baseURL.url(), TQString::null);
if (!uploadProjectFile())
{
if (KMessageBox::warningContinueCancel(m_mainWindow, i18n("Saving of project failed. Do you want to continue with closing (might cause data loss)?"), i18n("Project Saving Error"), KStdGuiItem::close()) == KMessageBox::Cancel)
return;
}
- emit eventHappened("after_project_close", baseURL.url(), QString::null);
+ emit eventHappened("after_project_close", baseURL.url(), TQString::null);
// empty dom tree
dom.clear();
m_sessionDom.clear();
m_events->clear();
config->setGroup("Projects");
- config->writePathEntry("Last Project", QString::null);
+ config->writePathEntry("Last Project", TQString::null);
init();
parent->newProjectLoaded(projectName, baseURL, templateURL);
- parent->reloadTree( &(m_projectFiles), true, QStringList());
+ parent->reloadTree( &(m_projectFiles), true, TQStringList());
adjustActions();
m_projectRecent->setCurrentItem(-1);
parent->newStatus();
- kapp->processEvents(QEventLoop::ExcludeUserInput | QEventLoop::ExcludeSocketNotifiers);
+ kapp->processEvents(TQEventLoop::ExcludeUserInput | TQEventLoop::ExcludeSocketNotifiers);
}
/** open project file */
void ProjectPrivate::slotOpenProject()
{
- KURL url = KFileDialog::getOpenURL( QString::null,
+ KURL url = KFileDialog::getOpenURL( TQString::null,
"*.wpj *.webprj"+i18n("|Project Files\n*|All Files"), m_mainWindow,
i18n("Open Project"));
@@ -1255,8 +1255,8 @@ bool ProjectPrivate::saveProject()
if ( !parent->hasProject() ) return false;
bool result = true;
// remove old opened files
- QDomElement el;
- QDomNodeList nl = dom.firstChild().firstChild().childNodes();
+ TQDomElement el;
+ TQDomNodeList nl = dom.firstChild().firstChild().childNodes();
for ( unsigned int i = 0; i < nl.count(); i++ )
{
@@ -1268,18 +1268,18 @@ bool ProjectPrivate::saveProject()
}
}
getStatusFromTree();
- QFile f(m_tmpProjectFile);
+ TQFile f(m_tmpProjectFile);
if (f.open(IO_WriteOnly))
{
- QTextStream stream( &f );
- stream.setEncoding(QTextStream::UnicodeUTF8);
+ TQTextStream stream( &f );
+ stream.setEncoding(TQTextStream::UnicodeUTF8);
dom.save(stream, 2);
f.close();
f.setName(m_tmpSessionFile);
if (f.open(IO_WriteOnly))
{
- QTextStream stream(&f);
- stream.setEncoding(QTextStream::UnicodeUTF8);
+ TQTextStream stream(&f);
+ stream.setEncoding(TQTextStream::UnicodeUTF8);
m_sessionDom.save(stream, 2);
f.close();
}
@@ -1295,21 +1295,21 @@ bool ProjectPrivate::saveProject()
}
-void ProjectPrivate::loadProjectFromTemp(const KURL &url, const QString &tempFile, const QString &sessionTempFile)
+void ProjectPrivate::loadProjectFromTemp(const KURL &url, const TQString &tempFile, const TQString &sessionTempFile)
{
m_createSessionDom = true;
m_tmpProjectFile = tempFile;
if (!sessionTempFile.isEmpty())
m_tmpSessionFile = sessionTempFile;
projectURL = url;
- QFile f(tempFile);
+ TQFile f(tempFile);
if (f.open(IO_ReadOnly))
{
baseURL = url;
baseURL.setPath(url.directory(true, true));
if (baseURL.isLocalFile())
{
- QDir dir(baseURL.path());
+ TQDir dir(baseURL.path());
baseURL.setPath(dir.canonicalPath());
baseURL.adjustPath(-1);
}
@@ -1357,11 +1357,11 @@ bool ProjectPrivate::loadProject(const KURL &url)
if ( projectAlreadyOpen(url.url()) )
{
parent->hideSplash();
- if (KMessageBox::warningContinueCancel(m_mainWindow, i18n("<qt>The project<br><b>%1</b><br> seems to be used by another Quanta instance.<br>You may end up with data loss if you open the same project in two instances, modify and save them in both.<br><br>Do you want to proceed with open?</qt>").arg(url.prettyURL()), QString::null, KStdGuiItem::open()) == KMessageBox::Cancel)
+ if (KMessageBox::warningContinueCancel(m_mainWindow, i18n("<qt>The project<br><b>%1</b><br> seems to be used by another Quanta instance.<br>You may end up with data loss if you open the same project in two instances, modify and save them in both.<br><br>Do you want to proceed with open?</qt>").arg(url.prettyURL()), TQString::null, KStdGuiItem::open()) == KMessageBox::Cancel)
return false;
}
- QString projectTmpFile;
- QString sessionTmpFile;
+ TQString projectTmpFile;
+ TQString sessionTmpFile;
// test if url is writeable and download to local file
if (KIO::NetAccess::exists(url, false, m_mainWindow) &&
@@ -1372,7 +1372,7 @@ bool ProjectPrivate::loadProject(const KURL &url)
slotCloseProject();
}
KURL sessionURL = url;
- QString fileName = url.fileName();
+ TQString fileName = url.fileName();
if (fileName.endsWith(".webprj"))
fileName.replace(".webprj", ".session");
else
@@ -1382,9 +1382,9 @@ bool ProjectPrivate::loadProject(const KURL &url)
KIO::NetAccess::download(sessionURL, sessionTmpFile, m_mainWindow);
else
{
- QString sessionStr;
- QTextStream sessionStream(&sessionStr, IO_WriteOnly);
- sessionStream.setEncoding(QTextStream::UnicodeUTF8);
+ TQString sessionStr;
+ TQTextStream sessionStream(&sessionStr, IO_WriteOnly);
+ sessionStream.setEncoding(TQTextStream::UnicodeUTF8);
sessionStream << "<!DOCTYPE webprojectsession ><webprojectsession>" << endl;
sessionStream << "\t<session>" << endl;
@@ -1394,17 +1394,17 @@ bool ProjectPrivate::loadProject(const KURL &url)
{
sessionTempFile = new KTempFile(tmpDir); // sessionTempFile will get deleted in slotProjectClose()
sessionTempFile->setAutoDelete(true);
- sessionTempFile->textStream()->setEncoding(QTextStream::UnicodeUTF8);
+ sessionTempFile->textStream()->setEncoding(TQTextStream::UnicodeUTF8);
*(sessionTempFile->textStream()) << sessionStr;
sessionTempFile->close();
m_tmpSessionFile = sessionTempFile->name();
} else
{
- QFile f(sessionURL.path());
+ TQFile f(sessionURL.path());
if (f.open(IO_WriteOnly))
{
- QTextStream fstream(&f);
- fstream.setEncoding(QTextStream::UnicodeUTF8);
+ TQTextStream fstream(&f);
+ fstream.setEncoding(TQTextStream::UnicodeUTF8);
fstream << sessionStr;
m_tmpSessionFile = sessionURL.path(); // we are local: the temp file and the projectURL are the same
}
@@ -1446,10 +1446,10 @@ void ProjectPrivate::slotAddFiles()
if ( !destination.isEmpty())
{
CopyTo *dlg = new CopyTo( baseURL);
- connect(dlg, SIGNAL(deleteDialog(CopyTo*)),
- SLOT (slotDeleteCopytoDlg(CopyTo*)));
- connect(dlg, SIGNAL(addFilesToProject(const KURL::List&)), parent,
- SLOT (slotInsertFilesAfterCopying(const KURL::List&)));
+ connect(dlg, TQT_SIGNAL(deleteDialog(CopyTo*)),
+ TQT_SLOT (slotDeleteCopytoDlg(CopyTo*)));
+ connect(dlg, TQT_SIGNAL(addFilesToProject(const KURL::List&)), parent,
+ TQT_SLOT (slotInsertFilesAfterCopying(const KURL::List&)));
list = dlg->copy( list, destination );
return;
}
@@ -1470,7 +1470,7 @@ void ProjectPrivate::slotAddFiles()
}
}
- parent->reloadTree( &(m_projectFiles), false, QStringList());
+ parent->reloadTree( &(m_projectFiles), false, TQStringList());
}
}
@@ -1505,15 +1505,15 @@ void ProjectPrivate::slotDebuggerOptions()
int errCode = 0;
//Workaround for dynamic_cast not working correctly on SUSE 10, gcc 4.0.2
//The correct way should be a simple:
-// DebuggerClient *dbg = KParts::ComponentFactory::createInstanceFromService<DebuggerClient>(service, this, 0, QStringList(), &errCode);
- QObject* obj = KParts::ComponentFactory::createInstanceFromService<QObject>(service, this, 0, QStringList(), &errCode);
+// DebuggerClient *dbg = KParts::ComponentFactory::createInstanceFromService<DebuggerClient>(service, this, 0, TQStringList(), &errCode);
+ TQObject* obj = KParts::ComponentFactory::createInstanceFromService<TQObject>(service, this, 0, TQStringList(), &errCode);
if (obj && obj->inherits("DebuggerClient"))
dbg = static_cast<DebuggerClient *>(obj);
if (dbg)
{
- QDomNode projectNode = m_sessionDom.firstChild().firstChild();
- QDomNode nodeThisDbg;
- QDomNode nodeDbg = projectNode.namedItem("debuggers");
+ TQDomNode projectNode = m_sessionDom.firstChild().firstChild();
+ TQDomNode nodeThisDbg;
+ TQDomNode nodeDbg = projectNode.namedItem("debuggers");
if(nodeDbg.isNull())
{
nodeDbg = m_sessionDom.createElement("debuggers");
@@ -1538,7 +1538,7 @@ void ProjectPrivate::slotDebuggerOptions()
}
}
-void ProjectPrivate::slotDebuggerChanged(const QString &debugger)
+void ProjectPrivate::slotDebuggerChanged(const TQString &debugger)
{
m_debuggerClientEdit = debugger;
}
@@ -1555,7 +1555,7 @@ void ProjectPrivate::writeConfig()
// add project to list
if (!projectURL.isEmpty())
{
- QStringList projectList = QuantaCommon::readPathListEntry(config, "OpenProjects");
+ TQStringList projectList = QuantaCommon::readPathListEntry(config, "OpenProjects");
if (projectList.contains( projectURL.url() ) == 0)
{
projectList.append( projectURL.url() );
@@ -1576,11 +1576,11 @@ void ProjectPrivate::writeConfig()
}
-void ProjectPrivate::removeFromConfig(const QString & urlStr)
+void ProjectPrivate::removeFromConfig(const TQString & urlStr)
{
config->reparseConfiguration();
config->setGroup("Projects");
- QStringList projectList = QuantaCommon::readPathListEntry(config, "OpenProjects");
+ TQStringList projectList = QuantaCommon::readPathListEntry(config, "OpenProjects");
int i = projectList.findIndex( urlStr );
if ( i > -1)
{
@@ -1601,11 +1601,11 @@ void ProjectPrivate::removeFromConfig(const QString & urlStr)
}
-bool ProjectPrivate::projectAlreadyOpen(const QString & urlStr)
+bool ProjectPrivate::projectAlreadyOpen(const TQString & urlStr)
{
config->reparseConfiguration();
config->setGroup("Projects");
- QStringList projectList = QuantaCommon::readPathListEntry(config, "OpenProjects");
+ TQStringList projectList = QuantaCommon::readPathListEntry(config, "OpenProjects");
return (projectList.contains(urlStr) != 0);
}
@@ -1616,7 +1616,7 @@ bool ProjectPrivate::uploadProjectFile()
if (m_tmpProjectFile.isNull() || !saveProject())
return false;
KURL sessionURL = projectURL;
- QString fileName = projectURL.fileName();
+ TQString fileName = projectURL.fileName();
if (fileName.endsWith(".webprj"))
fileName.replace(".webprj", ".session");
else
@@ -1632,7 +1632,7 @@ bool ProjectPrivate::uploadProjectFile()
tempFile = 0L;
delete sessionTempFile;
sessionTempFile = 0L;
- m_tmpProjectFile = QString::null;
+ m_tmpProjectFile = TQString::null;
return true;
}
if (KIO::NetAccess::upload(m_tmpProjectFile, projectURL, m_mainWindow) && KIO::NetAccess::upload(m_tmpSessionFile, sessionURL, m_mainWindow))
@@ -1659,7 +1659,7 @@ bool ProjectPrivate::uploadProjectFile()
{
if (quantaApp)
{
- parent->statusMsg(QString::null );
+ parent->statusMsg(TQString::null );
KMessageBox::error(m_mainWindow, KIO::NetAccess::lastErrorString());
}
return false;
diff --git a/quanta/project/projectprivate.h b/quanta/project/projectprivate.h
index 3ab1a20a..e09977a2 100644
--- a/quanta/project/projectprivate.h
+++ b/quanta/project/projectprivate.h
@@ -19,9 +19,9 @@
#define PROJECTPRIVATE_H
//qt includes
-#include <qmap.h>
-#include <qregexp.h>
-#include <qguardedptr.h>
+#include <tqmap.h>
+#include <tqregexp.h>
+#include <tqguardedptr.h>
//app includes
#include "project.h"
@@ -45,7 +45,7 @@ class ProjectNewWeb;
class ProjectNewFinal;
class ProjectList;
struct EventAction;
-typedef QMap<QString, QValueList<EventAction> > EventActions;
+typedef TQMap<TQString, TQValueList<EventAction> > EventActions;
class ProjectPrivate
: public QObject
@@ -59,7 +59,7 @@ public:
Project *parent;
/** Point to the .webprj file */
KURL projectURL;
- QString projectName;
+ TQString projectName;
/** Points to the directory of the .webprj file */
KURL baseURL;
/** Points to the document root inside the project. Item under this folder
@@ -71,7 +71,7 @@ upload.*/
KURL previewPrefix;
bool usePreviewPrefix;
bool m_persistentBookmarks;
- QString author;
+ TQString author;
KRecentFilesAction *m_projectRecent;
ProjectNewGeneral *png;
@@ -79,39 +79,39 @@ upload.*/
ProjectNewWeb *pnw;
ProjectNewFinal *pnf;
- QWidgetStack *stack;
- QString currentProjectView;
+ TQWidgetStack *stack;
+ TQString currentProjectView;
KConfig *config;
bool m_modified;
bool m_excludeCvsignore;
/** Default DTD for this project. */
- QString m_defaultDTD;
- QString m_defaultEncoding;
- QRegExp excludeRx;
- QStringList excludeList;
+ TQString m_defaultDTD;
+ TQString m_defaultEncoding;
+ TQRegExp excludeRx;
+ TQStringList excludeList;
KMainWindow *m_mainWindow;
- QString m_debuggerClientEdit;
- QMap<QString, QString> m_passwdList;
+ TQString m_debuggerClientEdit;
+ TQMap<TQString, TQString> m_passwdList;
ProjectList m_projectFiles; ///< the list with the _absolute_ URL's of the project
KDirWatch *m_dirWatch; ///< watches some project directories for modification
KURL toolbarURL;
KURL templateURL;
- QString email;
- QDomDocument dom;
- QDomDocument m_sessionDom;
- QString debuggerClient;
+ TQString email;
+ TQDomDocument dom;
+ TQDomDocument m_sessionDom;
+ TQString debuggerClient;
bool m_debuggerPersistentBreakpoints;
bool m_debuggerPersistentWatches;
- QGuardedPtr<ProjectUpload> m_uploadDialog;
+ TQGuardedPtr<ProjectUpload> m_uploadDialog;
TeamMember m_teamLeader;
- QMap<QString, TeamMember> m_subprojectLeaders;
- QMap<QString, TeamMember> m_taskLeaders;
- QValueList<TeamMember> m_simpleMembers;
- QValueList<SubProject> m_subprojects;
- QString m_yourself;
- QString m_mailingList;
+ TQMap<TQString, TeamMember> m_subprojectLeaders;
+ TQMap<TQString, TeamMember> m_taskLeaders;
+ TQValueList<TeamMember> m_simpleMembers;
+ TQValueList<SubProject> m_subprojects;
+ TQString m_yourself;
+ TQString m_mailingList;
bool m_showUploadTreeviews;
bool m_eventsEnabled;
@@ -124,8 +124,8 @@ upload.*/
KSelectAction *openPrjViewAction, *deletePrjViewAction;
/** the filename of the local webprj file after download */
- QString m_tmpProjectFile;
- QString m_tmpSessionFile;
+ TQString m_tmpProjectFile;
+ TQString m_tmpSessionFile;
/** used for creating a new project */
KTempFile *tempFile;
KTempFile *sessionTempFile;
@@ -138,7 +138,7 @@ upload.*/
void adjustViewActions();
- QStringList projectViewList();
+ TQStringList projectViewList();
void init();
@@ -147,7 +147,7 @@ upload.*/
void insertFiles( KURL::List files );
/** insert files from dir recursive */
- void insertFiles(const KURL& pathURL, const QString& mask );
+ void insertFiles(const KURL& pathURL, const TQString& mask );
void loadProjectXML();
@@ -165,7 +165,7 @@ upload.*/
@param tempFile the path of the already downloaded temp file
@param sessionTempFile the path of the downloaded project session file. Empty if no such file was downloaded
*/
- void loadProjectFromTemp(const KURL &url, const QString &tempFile, const QString &sessionTempFile);
+ void loadProjectFromTemp(const KURL &url, const TQString &tempFile, const TQString &sessionTempFile);
void getStatusFromTree();
@@ -185,14 +185,14 @@ upload.*/
@param the url string of the project to remove
*/
- void removeFromConfig(const QString & urlStr);
+ void removeFromConfig(const TQString & urlStr);
/**
test if a project is in the list of open projects in config
@param the url string of the project to test
*/
- bool projectAlreadyOpen(const QString & urlStr);
+ bool projectAlreadyOpen(const TQString & urlStr);
/** uploads the project file
@return false if there was nothing to upload or an error occured during upload
@@ -203,7 +203,7 @@ public slots:
void slotDebuggerOptions();
- void slotDebuggerChanged(const QString &debugger);
+ void slotDebuggerChanged(const TQString &debugger);
/** create new project */
void slotNewProject();
@@ -222,7 +222,7 @@ public slots:
void slotAddFiles();
/** Deletes a project view */
- void slotDeleteProjectView(const QString &view);
+ void slotDeleteProjectView(const TQString &view);
/** Saves a project view (group of files & toolbars) asking for a name. */
void slotSaveAsProjectView(bool askForName = true);
@@ -231,10 +231,10 @@ public slots:
void slotSaveProjectView();
/** Opens a project view (toolbars & files). */
- void slotOpenProjectView(const QString &view);
+ void slotOpenProjectView(const TQString &view);
/** for the new project wizard */
- void slotSelectProjectType(const QString &title);
+ void slotSelectProjectType(const TQString &title);
void slotDeleteCopytoDlg(CopyTo *dlg);
@@ -243,11 +243,11 @@ private slots:
signals:
void setLocalFiles(bool);
- void eventHappened(const QString&, const QString&, const QString& );
+ void eventHappened(const TQString&, const TQString&, const TQString& );
private:
- QStringList treeStatusFromXML();
- QString m_wizTitle ;
+ TQStringList treeStatusFromXML();
+ TQString m_wizTitle ;
bool m_createSessionDom;
};
diff --git a/quanta/project/projectupload.cpp b/quanta/project/projectupload.cpp
index e95f9446..ce621c07 100644
--- a/quanta/project/projectupload.cpp
+++ b/quanta/project/projectupload.cpp
@@ -18,20 +18,20 @@
//qt includes
-#include <qlistview.h>
-#include <qeventloop.h>
-#include <qfileinfo.h>
-#include <qlineedit.h>
-#include <qpushbutton.h>
-#include <qstringlist.h>
-#include <qregexp.h>
-#include <qlabel.h>
-#include <qcombobox.h>
-#include <qurl.h>
-#include <qcheckbox.h>
-#include <qtimer.h>
-#include <qframe.h>
-#include <qtooltip.h>
+#include <tqlistview.h>
+#include <tqeventloop.h>
+#include <tqfileinfo.h>
+#include <tqlineedit.h>
+#include <tqpushbutton.h>
+#include <tqstringlist.h>
+#include <tqregexp.h>
+#include <tqlabel.h>
+#include <tqcombobox.h>
+#include <tqurl.h>
+#include <tqcheckbox.h>
+#include <tqtimer.h>
+#include <tqframe.h>
+#include <tqtooltip.h>
//kde includes
#include <kapplication.h>
@@ -62,7 +62,7 @@
#include "qextfileinfo.h"
#include "resource.h"
-ProjectUpload::ProjectUpload(const KURL& url, const QString& profileName, bool showOnlyProfiles, bool quickUpload, bool markOnly, const char* name)
+ProjectUpload::ProjectUpload(const KURL& url, const TQString& profileName, bool showOnlyProfiles, bool quickUpload, bool markOnly, const char* name)
:ProjectUploadS( 0L, name, false, Qt::WDestructiveClose)
{
m_quickUpload = quickUpload;
@@ -83,7 +83,7 @@ ProjectUpload::ProjectUpload(const KURL& url, const QString& profileName, bool s
{
if (markOnly)
markAsUploaded->setChecked(true);
- QTimer::singleShot(10, this, SLOT(slotBuildTree()));
+ TQTimer::singleShot(10, this, TQT_SLOT(slotBuildTree()));
currentItem = 0L;
}
}
@@ -95,20 +95,20 @@ ProjectUpload::~ProjectUpload()
delete baseUrl;
}
-void ProjectUpload::initProjectInfo(const QString& defaultProfile)
+void ProjectUpload::initProjectInfo(const TQString& defaultProfile)
{
baseUrl = new KURL();
// list->setMultiSelection(true);
- QDomDocument *dom = m_project->sessionDom();
+ TQDomDocument *dom = m_project->sessionDom();
m_profilesNode = dom->firstChild().firstChild().namedItem("uploadprofiles");
if (m_profilesNode.isNull()) //compat code, remove when upgrade from 3.2 is not supported
{
m_currentProfileElement = dom->firstChild().firstChild().namedItem("upload").toElement();
m_defaultProfile = m_currentProfileElement.attribute("user","") + "@" + m_currentProfileElement.attribute("remote_host","");
- QDomElement e = dom->createElement("uploadprofiles");
+ TQDomElement e = dom->createElement("uploadprofiles");
e.setAttribute("defaultProfile", m_defaultProfile);
- QDomElement el = dom->createElement("profile");
+ TQDomElement el = dom->createElement("profile");
el.setAttribute("remote_host", m_currentProfileElement.attribute("remote_host",""));
el.setAttribute("user", m_currentProfileElement.attribute("user",""));
el.setAttribute("remote_path", m_currentProfileElement.attribute("remote_path",""));
@@ -128,10 +128,10 @@ void ProjectUpload::initProjectInfo(const QString& defaultProfile)
m_defaultProfile = m_profilesNode.toElement().attribute("defaultProfile");
else
m_defaultProfile = defaultProfile;
- QDomNodeList profileList = m_profilesNode.toElement().elementsByTagName("profile");
- QDomElement e;
+ TQDomNodeList profileList = m_profilesNode.toElement().elementsByTagName("profile");
+ TQDomElement e;
m_currentProfileElement = profileList.item(0).toElement();
- QString s;
+ TQString s;
int defaultIdx = 0;
for (uint i = 0; i < profileList.count(); i++)
{
@@ -149,7 +149,7 @@ void ProjectUpload::initProjectInfo(const QString& defaultProfile)
buttonRemoveProfile->setEnabled(comboProfile->count() > 1);
keepPasswords->setChecked(m_project->keepPasswd);
uploadInProgress = false;
- connect( this, SIGNAL( uploadNext() ), SLOT( slotUploadNext() ) );
+ connect( this, TQT_SIGNAL( uploadNext() ), TQT_SLOT( slotUploadNext() ) );
setProfileTooltip();
}
@@ -159,12 +159,12 @@ void ProjectUpload::slotBuildTree()
emit eventHappened("upload_requested", m_project->projectBaseURL().url(), "");
loadRemoteUploadInfo();
KIO::UDSEntry entry;
- QString strUrl = QuantaCommon::qUrl(startUrl);
+ TQString strUrl = QuantaCommon::qUrl(startUrl);
bool isDirectory = strUrl.endsWith("/");
bool forceUpload = !startUrl.isEmpty();
- QString s;
- QDomElement el;
- QDomNodeList nl = m_project->dom()->elementsByTagName("item");
+ TQString s;
+ TQDomElement el;
+ TQDomNodeList nl = m_project->dom()->elementsByTagName("item");
totalProgress->setTotalSteps(nl.count() - 1 );
totalProgress->setValue(0);
totalText->setText(i18n("Scanning project files..."));
@@ -174,7 +174,7 @@ void ProjectUpload::slotBuildTree()
{
u = QExtFileInfo::toAbsolute(startUrl, u);
}
- QDict<KFileItem> projectDirFiles;
+ TQDict<KFileItem> projectDirFiles;
if (startUrl.isEmpty() || strUrl.endsWith("/")) //upload a folder
{
@@ -184,7 +184,7 @@ void ProjectUpload::slotBuildTree()
projectDirFiles.insert(u.url(), new KFileItem(KFileItem::Unknown, KFileItem::Unknown, u, true));
}
- QTime t;
+ TQTime t;
t.start();
u = m_project->projectBaseURL();
@@ -245,8 +245,8 @@ void ProjectUpload::slotBuildTree()
void ProjectUpload::buildSelectedItemList()
{
- QListViewItem *item;
- QListViewItemIterator it(list);
+ TQListViewItem *item;
+ TQListViewItemIterator it(list);
toUpload.clear();
needsConfirmation.clear();
for ( ; it.current(); ++it )
@@ -274,7 +274,7 @@ void ProjectUpload::buildSelectedItemList()
void ProjectUpload::initBaseUrl()
{
- QString path = m_currentProfileElement.attribute("remote_path","");
+ TQString path = m_currentProfileElement.attribute("remote_path","");
if (!path.startsWith("/"))
path.prepend("/");
@@ -283,7 +283,7 @@ void ProjectUpload::initBaseUrl()
baseUrl->setHost(m_currentProfileElement.attribute("remote_host",""));
baseUrl->setPath(path);
baseUrl->setUser(m_currentProfileElement.attribute("user",""));
- QString password;
+ TQString password;
if (keepPasswords->isChecked())
{
m_project->keepPasswd = true;
@@ -304,16 +304,16 @@ void ProjectUpload::startUpload()
{
if (m_profilesOnly)
{
- QDialog::accept();
+ TQDialog::accept();
return;
}
stopUpload = false;
initBaseUrl();
if (markAsUploaded->isChecked())
{
- QStringList selectedList;
- QListViewItem *item;
- QListViewItemIterator it(list);
+ TQStringList selectedList;
+ TQListViewItem *item;
+ TQListViewItemIterator it(list);
for ( ; it.current(); ++it )
{
item = it.current();
@@ -333,8 +333,8 @@ void ProjectUpload::startUpload()
}
}
//update upload time
- QDomNodeList nl = m_project->dom()->elementsByTagName("item");
- QDomElement el;
+ TQDomNodeList nl = m_project->dom()->elementsByTagName("item");
+ TQDomElement el;
for ( uint i = 0; i < nl.count(); i++ )
{
el = nl.item(i).toElement();
@@ -351,14 +351,14 @@ void ProjectUpload::startUpload()
int confirmCount = needsConfirmation.count();
if (confirmCount > 0)
{
- QValueList<QListViewItem*>::Iterator it;
- QStringList confirmList;
+ TQValueList<TQListViewItem*>::Iterator it;
+ TQStringList confirmList;
for (it = needsConfirmation.begin(); it != needsConfirmation.end(); ++it)
{
confirmList.append(((UploadTreeFile*)(*it))->url().prettyURL(0, KURL::StripFileProtocol));
}
bool ok;
- QStringList confirmedList = KInputDialog::getItemList(i18n("Confirm Upload"), i18n("Confirm that you want to upload the following files (unselect the files you do not want to upload):"), confirmList, confirmList, true, &ok, this);
+ TQStringList confirmedList = KInputDialog::getItemList(i18n("Confirm Upload"), i18n("Confirm that you want to upload the following files (unselect the files you do not want to upload):"), confirmList, confirmList, true, &ok, this);
if (!ok) return;
for (it = needsConfirmation.begin(); it != needsConfirmation.end(); ++it)
{
@@ -382,7 +382,7 @@ void ProjectUpload::startUpload()
} else
{
if (KMessageBox::warningContinueCancel(this, i18n("<qt><b>%1</b> seems to be unaccessible.<br>Do you want to proceed with upload?</qt>")
- .arg(u.prettyURL(0, KURL::StripFileProtocol)),QString::null,KStdGuiItem::cont()) == KMessageBox::Continue)
+ .arg(u.prettyURL(0, KURL::StripFileProtocol)),TQString::null,KStdGuiItem::cont()) == KMessageBox::Continue)
{
upload();
return;
@@ -456,12 +456,12 @@ void ProjectUpload::upload()
emit eventHappened("before_upload", from.url(), to.url());
KIO::FileCopyJob *job = KIO::file_copy( from, to, fileItem->permissions(), true, false, false );
- connect( job, SIGNAL( result( KIO::Job * ) ),this,
- SLOT( uploadFinished( KIO::Job * ) ) );
- connect( job, SIGNAL( percent( KIO::Job *,unsigned long ) ),
- this, SLOT( uploadProgress( KIO::Job *,unsigned long ) ) );
- connect( job, SIGNAL( infoMessage( KIO::Job *,const QString& ) ),
- this, SLOT( uploadMessage( KIO::Job *,const QString& ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job * ) ),this,
+ TQT_SLOT( uploadFinished( KIO::Job * ) ) );
+ connect( job, TQT_SIGNAL( percent( KIO::Job *,unsigned long ) ),
+ this, TQT_SLOT( uploadProgress( KIO::Job *,unsigned long ) ) );
+ connect( job, TQT_SIGNAL( infoMessage( KIO::Job *,const TQString& ) ),
+ this, TQT_SLOT( uploadMessage( KIO::Job *,const TQString& ) ) );
labelCurFile->setText(i18n("Current: %1").arg(currentURL.fileName()));
currentProgress->setProgress( 0 );
@@ -500,7 +500,7 @@ void ProjectUpload::uploadProgress ( KIO::Job *, unsigned long percent )
currentProgress->setProgress( percent );
}
-void ProjectUpload::uploadMessage ( KIO::Job *, const QString & msg )
+void ProjectUpload::uploadMessage ( KIO::Job *, const TQString & msg )
{
labelCurFile->setText( currentURL.fileName() + " : " + msg );
}
@@ -515,7 +515,7 @@ void ProjectUpload::selectModified()
{
for ( KURL::List::Iterator file = modified.begin(); file != modified.end(); ++file )
{
- QListViewItem *it = list->findItem( (*file).path() );
+ TQListViewItem *it = list->findItem( (*file).path() );
it->setSelected(true);
it->repaint();
}
@@ -544,7 +544,7 @@ void ProjectUpload::collapseAll()
list->collapseAll();
}
-void ProjectUpload::resizeEvent ( QResizeEvent *t )
+void ProjectUpload::resizeEvent ( TQResizeEvent *t )
{
ProjectUploadS::resizeEvent(t);
list->setColumnWidth(0,list->width()-list->columnWidth(1)-list->columnWidth(2)-20);
@@ -556,8 +556,8 @@ void ProjectUpload::slotUploadNext()
if (!suspendUpload)
{
totalProgress->setProgress(totalProgress->progress()+1);
- // QListViewItem *it = list->findItem( currentURL.path() );
- QListViewItem *it = currentItem;
+ // TQListViewItem *it = list->findItem( currentURL.path() );
+ TQListViewItem *it = currentItem;
if (it)
{
it->setSelected(false);
@@ -569,8 +569,8 @@ void ProjectUpload::slotUploadNext()
toUpload.remove( it );
//update upload time
- QDomNodeList nl = m_project->dom()->elementsByTagName("item");
- QDomElement el;
+ TQDomNodeList nl = m_project->dom()->elementsByTagName("item");
+ TQDomElement el;
for ( uint i = 0; i < nl.count(); i++ )
{
el = nl.item(i).toElement();
@@ -587,10 +587,10 @@ void ProjectUpload::slotUploadNext()
void ProjectUpload::clearProjectModified()
{
- QDomNodeList nl = m_project->dom()->elementsByTagName("item");
+ TQDomNodeList nl = m_project->dom()->elementsByTagName("item");
for ( unsigned int i=0; i<nl.count(); i++ )
{
- QDomElement el = nl.item(i).toElement();
+ TQDomElement el = nl.item(i).toElement();
m_uploadTimeList[el.attribute("url")] = el.attribute("modified_time").toInt();
}
modified.clear();
@@ -601,7 +601,7 @@ void ProjectUpload::clearProjectModified()
void ProjectUpload::slotNewProfile()
{
UploadProfileDlgS *profileDlg = new UploadProfileDlgS(this);
- QDomElement el = m_currentProfileElement;
+ TQDomElement el = m_currentProfileElement;
m_currentProfileElement = m_project->dom()->createElement("profile");
fillProfileDlg(profileDlg);
if (profileDlg->exec())
@@ -638,7 +638,7 @@ void ProjectUpload::slotRemoveProfile()
KMessageBox::error(this, i18n("You cannot remove the last profile."), i18n("Profile Removal Error") );
} else
{
- QString profileName = comboProfile->currentText();
+ TQString profileName = comboProfile->currentText();
if (KMessageBox::warningContinueCancel(this, i18n("<qt>Do you really want to remove the <b>%1</b> upload profile?</qt>").arg(profileName),
i18n("Profile Removal"), KStdGuiItem::del()) == KMessageBox::Continue)
{
@@ -648,7 +648,7 @@ void ProjectUpload::slotRemoveProfile()
if (newIdx >= comboProfile->count())
newIdx = idx - 1;
comboProfile->setCurrentItem(newIdx);
- QString currentProfile = comboProfile->currentText();
+ TQString currentProfile = comboProfile->currentText();
slotNewProfileSelected(currentProfile);
if (profileName == defaultProfile())
{
@@ -669,13 +669,13 @@ void ProjectUpload::fillProfileDlg(UploadProfileDlgS *profileDlg)
profileDlg->lineUser->setText(m_currentProfileElement.attribute("user",""));
profileDlg->linePath->setText(m_currentProfileElement.attribute("remote_path",""));
profileDlg->port->setText( m_currentProfileElement.attribute("remote_port","") );
- QString def_p = m_currentProfileElement.attribute("remote_protocol","ftp");
+ TQString def_p = m_currentProfileElement.attribute("remote_protocol","ftp");
- QStringList protocols = KProtocolInfo::protocols();
+ TQStringList protocols = KProtocolInfo::protocols();
protocols.sort();
for ( uint i=0; i<protocols.count(); i++ )
{
- QString protocol = protocols[i];
+ TQString protocol = protocols[i];
KURL p;
p.setProtocol(protocol);
if ( KProtocolInfo::supportsWriting(p) &&
@@ -687,7 +687,7 @@ void ProjectUpload::fillProfileDlg(UploadProfileDlgS *profileDlg)
profileDlg->comboProtocol->setCurrentItem(profileDlg->comboProtocol->count()-1 );
}
}
- QString entry = profileDlg->comboProtocol->currentText() + "://" + profileDlg->lineUser->text() + "@" + profileDlg->lineHost->text();
+ TQString entry = profileDlg->comboProtocol->currentText() + "://" + profileDlg->lineUser->text() + "@" + profileDlg->lineHost->text();
if (m_project->keepPasswd || m_project->passwordSaved(entry))
{
profileDlg->linePasswd->insert(m_project->password(entry));
@@ -703,7 +703,7 @@ void ProjectUpload::fillProfileDlg(UploadProfileDlgS *profileDlg)
void ProjectUpload::readProfileDlg(UploadProfileDlgS *profileDlg)
{
- QString path = profileDlg->linePath->text();
+ TQString path = profileDlg->linePath->text();
if (path.startsWith("~/"))
{
KUser user;
@@ -715,7 +715,7 @@ void ProjectUpload::readProfileDlg(UploadProfileDlgS *profileDlg)
m_currentProfileElement.setAttribute("remote_path", path);
m_currentProfileElement.setAttribute("remote_port", profileDlg->port->text());
m_currentProfileElement.setAttribute("remote_protocol", profileDlg->comboProtocol->currentText());
- QString passwd = QString(profileDlg->linePasswd->password());
+ TQString passwd = TQString(profileDlg->linePasswd->password());
m_project->savePassword(profileDlg->comboProtocol->currentText() + "://" + profileDlg->lineUser->text() + "@" + profileDlg->lineHost->text(), passwd, profileDlg->keepPasswd->isChecked());
m_lastEditedProfileElement = m_currentProfileElement;
m_lastPassword = passwd;
@@ -723,11 +723,11 @@ void ProjectUpload::readProfileDlg(UploadProfileDlgS *profileDlg)
m_profilesNode.toElement().setAttribute("defaultProfile", profileDlg->lineProfileName->text());
}
-void ProjectUpload::slotNewProfileSelected(const QString& profileName)
+void ProjectUpload::slotNewProfileSelected(const TQString& profileName)
{
- QDomNodeList profileList = m_profilesNode.toElement().elementsByTagName("profile");
- QDomElement e;
- QString s;
+ TQDomNodeList profileList = m_profilesNode.toElement().elementsByTagName("profile");
+ TQDomElement e;
+ TQString s;
for (uint i = 0; i < profileList.count(); i++)
{
e = profileList.item(i).toElement();
@@ -747,7 +747,7 @@ void ProjectUpload::slotNewProfileSelected(const QString& profileName)
}
}
-QString ProjectUpload::defaultProfile()
+TQString ProjectUpload::defaultProfile()
{
return m_profilesNode.toElement().attribute("defaultProfile");
}
@@ -767,47 +767,47 @@ void ProjectUpload::reject()
}
}
- QDialog::reject();
+ TQDialog::reject();
}
void ProjectUpload::setProfileTooltip()
{
- QString tip = m_currentProfileElement.attribute("remote_protocol","ftp") + "://";
- QString user = m_currentProfileElement.attribute("user","");
+ TQString tip = m_currentProfileElement.attribute("remote_protocol","ftp") + "://";
+ TQString user = m_currentProfileElement.attribute("user","");
if (! user.isEmpty()) {
tip += user + "@";
}
tip += m_currentProfileElement.attribute("remote_host","");
- QString port = m_currentProfileElement.attribute("remote_port","");
+ TQString port = m_currentProfileElement.attribute("remote_port","");
if (! port.isEmpty()) {
tip += ":" + port;
}
tip += m_currentProfileElement.attribute("remote_path","");
- QToolTip::add(comboProfile, tip);
+ TQToolTip::add(comboProfile, tip);
}
void ProjectUpload::loadRemoteUploadInfo()
{
- QDomNodeList nl = m_currentProfileElement.elementsByTagName("uploadeditem");
+ TQDomNodeList nl = m_currentProfileElement.elementsByTagName("uploadeditem");
for (uint i = 0; i < nl.count(); i++)
{
- QDomElement el = nl.item(i).toElement();
+ TQDomElement el = nl.item(i).toElement();
m_uploadTimeList[el.attribute("url")] = el.attribute("upload_time").toInt();
}
}
void ProjectUpload::saveRemoteUploadInfo()
{
- QDomNode parent = m_currentProfileElement.parentNode();
- QDomNode profileNode = m_currentProfileElement.cloneNode(false);
+ TQDomNode parent = m_currentProfileElement.parentNode();
+ TQDomNode profileNode = m_currentProfileElement.cloneNode(false);
parent.removeChild(m_currentProfileElement);
parent.appendChild(profileNode);
- QMap<QString, int>::ConstIterator it;
+ TQMap<TQString, int>::ConstIterator it;
for (it = m_uploadTimeList.constBegin(); it != m_uploadTimeList.constEnd(); ++it)
{
- QDomElement el = m_uploadStatusDom.createElement("uploadeditem");
+ TQDomElement el = m_uploadStatusDom.createElement("uploadeditem");
el.setAttribute("url", it.key());
el.setAttribute("upload_time", it.data());
profileNode.appendChild(el);
diff --git a/quanta/project/projectupload.h b/quanta/project/projectupload.h
index 375898ec..d76d1767 100644
--- a/quanta/project/projectupload.h
+++ b/quanta/project/projectupload.h
@@ -21,9 +21,9 @@
#include "projectuploads.h"
#include "project.h"
-#include <qdom.h>
-#include <qptrlist.h>
-#include <qstringlist.h>
+#include <tqdom.h>
+#include <tqptrlist.h>
+#include <tqstringlist.h>
#include <kio/job.h>
@@ -44,9 +44,9 @@ public:
If quickUpload is true, the upload starts immediately without checking
for modifications or confirmation from the user. The url will be
uploaded to the default profile */
- ProjectUpload(const KURL& url, const QString& profileName = QString::null, bool showOnlyProfiles = false, bool quickUpload = false, bool markOnly = false, const char * name = 0);
+ ProjectUpload(const KURL& url, const TQString& profileName = TQString::null, bool showOnlyProfiles = false, bool quickUpload = false, bool markOnly = false, const char * name = 0);
~ProjectUpload();
- QString defaultProfile();
+ TQString defaultProfile();
public slots: // Public slots
/** No descriptions */
@@ -57,7 +57,7 @@ protected slots:
void upload();
void uploadFinished( KIO::Job *job );
void uploadProgress ( KIO::Job *job, unsigned long percent );
- void uploadMessage ( KIO::Job *, const QString & msg );
+ void uploadMessage ( KIO::Job *, const TQString & msg );
void slotUploadNext();
void clearSelection();
@@ -71,16 +71,16 @@ protected slots:
void slotNewProfile();
void slotEditProfile();
void slotRemoveProfile();
- void slotNewProfileSelected(const QString &profileName);
+ void slotNewProfileSelected(const TQString &profileName);
- virtual void resizeEvent( QResizeEvent * );
+ virtual void resizeEvent( TQResizeEvent * );
virtual void reject();
signals: // Signals
/** No descriptions */
void uploadNext();
- void eventHappened(const QString&, const QString&, const QString&);
+ void eventHappened(const TQString&, const TQString&, const TQString&);
private:
void buildSelectedItemList();
@@ -89,13 +89,13 @@ private:
void setProfileTooltip();
void loadRemoteUploadInfo();
void saveRemoteUploadInfo();
- void initProjectInfo(const QString& defaultProfile);
+ void initProjectInfo(const TQString& defaultProfile);
void initBaseUrl(); /// Reads the current profile setting and initialize the baseUrl from it
KURL::List modified; // modified files
- QValueList<QListViewItem*> needsConfirmation;
- QPtrList<QListViewItem> toUpload; // list of files , still didn't uploaded
- QListViewItem *currentItem;
+ TQValueList<TQListViewItem*> needsConfirmation;
+ TQPtrList<TQListViewItem> toUpload; // list of files , still didn't uploaded
+ TQListViewItem *currentItem;
KURL currentURL;
KURL::List madeDirs;
KURL *baseUrl;
@@ -103,14 +103,14 @@ private:
bool stopUpload;
bool uploadInProgress;
bool suspendUpload;
- QString m_lastPassword;
+ TQString m_lastPassword;
Project *m_project;
- QString m_defaultProfile;
- QDomElement m_currentProfileElement;
- QDomElement m_lastEditedProfileElement;
- QDomNode m_profilesNode;
- QDomDocument m_uploadStatusDom;
- QMap<QString, int> m_uploadTimeList;
+ TQString m_defaultProfile;
+ TQDomElement m_currentProfileElement;
+ TQDomElement m_lastEditedProfileElement;
+ TQDomNode m_profilesNode;
+ TQDomDocument m_uploadStatusDom;
+ TQMap<TQString, int> m_uploadTimeList;
bool m_profilesOnly;
bool m_quickUpload;
};
diff --git a/quanta/project/projecturl.h b/quanta/project/projecturl.h
index 67299d90..cf3eae66 100644
--- a/quanta/project/projecturl.h
+++ b/quanta/project/projecturl.h
@@ -17,9 +17,9 @@
#ifndef PROJECT_URL_H
#define PROJECT_URL_H
-#include <qdom.h>
-#include <qdict.h>
-#include <qstring.h>
+#include <tqdom.h>
+#include <tqdict.h>
+#include <tqstring.h>
#include <kurl.h>
@@ -31,10 +31,10 @@
class ProjectURL : public KURL
{
public:
- QString fileDesc;
+ TQString fileDesc;
int uploadStatus; ///< The upload state, see UploadStatus
bool documentFolder;
- QDomElement domElement;
+ TQDomElement domElement;
ProjectURL()
: KURL(), uploadStatus(1), documentFolder(false) {}
@@ -42,10 +42,10 @@ public:
ProjectURL(const KURL& url)
: KURL(url), uploadStatus(1), documentFolder(false) {}
- ProjectURL(const KURL& url, const QString& desc, int status, bool docFolder)
+ ProjectURL(const KURL& url, const TQString& desc, int status, bool docFolder)
: KURL(url), fileDesc(desc), uploadStatus(status), documentFolder(docFolder) {}
- ProjectURL(const KURL& url, const QString& desc, int status, bool docFolder, QDomElement el)
+ ProjectURL(const KURL& url, const TQString& desc, int status, bool docFolder, TQDomElement el)
: KURL(url), fileDesc(desc), uploadStatus(status), documentFolder(docFolder), domElement(el) {}
virtual ~ProjectURL() {}
@@ -59,6 +59,6 @@ public:
};
};
-typedef QDict<ProjectURL> ProjectUrlList;
+typedef TQDict<ProjectURL> ProjectUrlList;
#endif // PROJECT_URL_H
diff --git a/quanta/project/rescanprj.cpp b/quanta/project/rescanprj.cpp
index fe0bb588..1c467c7d 100644
--- a/quanta/project/rescanprj.cpp
+++ b/quanta/project/rescanprj.cpp
@@ -16,10 +16,10 @@
***************************************************************************/
// qt includes
-#include <qlistview.h>
-#include <qpushbutton.h>
-#include <qlayout.h>
-#include <qlabel.h>
+#include <tqlistview.h>
+#include <tqpushbutton.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
// kde includes
#include <kdebug.h>
@@ -39,8 +39,8 @@
#include "projectlist.h"
-RescanPrj::RescanPrj(const ProjectList &p_prjFileList, const KURL& p_baseURL, const QRegExp &p_excludeRx,
- QWidget *parent, const char *name, bool modal )
+RescanPrj::RescanPrj(const ProjectList &p_prjFileList, const KURL& p_baseURL, const TQRegExp &p_excludeRx,
+ TQWidget *parent, const char *name, bool modal )
: RescanPrjDir(parent,name,modal)
{
setCaption(name);
@@ -56,22 +56,22 @@ RescanPrj::RescanPrj(const ProjectList &p_prjFileList, const KURL& p_baseURL, co
KIO::ListJob *job = KIO::listRecursive( baseURL, false );
m_listJobCount = 1;
- connect( job, SIGNAL(entries(KIO::Job *,const KIO::UDSEntryList &)),
- this,SLOT (addEntries(KIO::Job *,const KIO::UDSEntryList &)));
- connect( job, SIGNAL(result(KIO::Job *)),
- this,SLOT (slotListDone(KIO::Job *)));
-
-
- connect( buttonSelect, SIGNAL(clicked()),
- this, SLOT(slotSelect()));
- connect( buttonDeselect, SIGNAL(clicked()),
- this, SLOT(slotDeselect()));
- connect( buttonInvert, SIGNAL(clicked()),
- this, SLOT(slotInvert()));
- connect( buttonExpand, SIGNAL(clicked()),
- this, SLOT(slotExpand()));
- connect( buttonCollapse, SIGNAL(clicked()),
- this, SLOT(slotCollapse()));
+ connect( job, TQT_SIGNAL(entries(KIO::Job *,const KIO::UDSEntryList &)),
+ this,TQT_SLOT (addEntries(KIO::Job *,const KIO::UDSEntryList &)));
+ connect( job, TQT_SIGNAL(result(KIO::Job *)),
+ this,TQT_SLOT (slotListDone(KIO::Job *)));
+
+
+ connect( buttonSelect, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotSelect()));
+ connect( buttonDeselect, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotDeselect()));
+ connect( buttonInvert, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotInvert()));
+ connect( buttonExpand, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotExpand()));
+ connect( buttonCollapse, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotCollapse()));
}
RescanPrj::~RescanPrj()
@@ -88,15 +88,15 @@ void RescanPrj::addEntries(KIO::Job *job,const KIO::UDSEntryList &list)
KURL url = static_cast<KIO::ListJob *>(job)->url();
url.adjustPath(-1);
// avoid creating these QStrings again and again
- static const QString& dot = KGlobal::staticQString(".");
- static const QString& dotdot = KGlobal::staticQString("..");
+ static const TQString& dot = KGlobal::staticQString(".");
+ static const TQString& dotdot = KGlobal::staticQString("..");
KIO::UDSEntryListConstIterator it = list.begin();
KIO::UDSEntryListConstIterator end = list.end();
KURL itemURL;
URLListEntry urlEntry;
- QString name;
- QPtrList<KFileItem> linkItems;
+ TQString name;
+ TQPtrList<KFileItem> linkItems;
linkItems.setAutoDelete(true);
for ( ; it != end; ++it )
{
@@ -104,7 +104,7 @@ void RescanPrj::addEntries(KIO::Job *job,const KIO::UDSEntryList &list)
name = item.name();
if (item.isDir() && item.isLink())
{
- QString linkDest = item.linkDest();
+ TQString linkDest = item.linkDest();
kdDebug(24000) << "Got link: " << name << " Points to:" << linkDest << endl;
KURL u = item.url();
if (linkDest.startsWith("."))
@@ -146,19 +146,19 @@ void RescanPrj::addEntries(KIO::Job *job,const KIO::UDSEntryList &list)
}
}
}
- for (QPtrList<KFileItem>::ConstIterator it = linkItems.constBegin(); it != linkItems.constEnd(); ++it)
+ for (TQPtrList<KFileItem>::ConstIterator it = linkItems.constBegin(); it != linkItems.constEnd(); ++it)
{
KIO::ListJob *ljob = KIO::listRecursive( (*it)->url(), false );
m_listJobCount++;
- connect( ljob, SIGNAL(entries(KIO::Job *,const KIO::UDSEntryList &)),
- this,SLOT (addEntries(KIO::Job *,const KIO::UDSEntryList &)));
- connect( ljob, SIGNAL(result(KIO::Job *)),
- this,SLOT (slotListDone(KIO::Job *)));
+ connect( ljob, TQT_SIGNAL(entries(KIO::Job *,const KIO::UDSEntryList &)),
+ this,TQT_SLOT (addEntries(KIO::Job *,const KIO::UDSEntryList &)));
+ connect( ljob, TQT_SIGNAL(result(KIO::Job *)),
+ this,TQT_SLOT (slotListDone(KIO::Job *)));
}
}
-void RescanPrj::resizeEvent ( QResizeEvent *t )
+void RescanPrj::resizeEvent ( TQResizeEvent *t )
{
RescanPrjDir::resizeEvent(t);
// listView->setColumnWidth(0,listView->width()-listView->columnWidth(1)-20);
@@ -197,8 +197,8 @@ KURL::List RescanPrj::files()
{
KURL::List r;
- QListViewItem *item;
- QListViewItemIterator it(listView);
+ TQListViewItem *item;
+ TQListViewItemIterator it(listView);
for ( ; it.current(); ++it )
{
item = it.current();
diff --git a/quanta/project/rescanprj.h b/quanta/project/rescanprj.h
index 1eb32d50..e1e61f04 100644
--- a/quanta/project/rescanprj.h
+++ b/quanta/project/rescanprj.h
@@ -18,7 +18,7 @@
#ifndef RESCANPRJ_H
#define RESCANPRJ_H
-#include <qregexp.h>
+#include <tqregexp.h>
#include <kio/job.h>
@@ -35,8 +35,8 @@ struct URLListEntry{
class RescanPrj : public RescanPrjDir {
Q_OBJECT
public:
- RescanPrj(const ProjectList &p_prjFileList, const KURL& p_baseURL, const QRegExp &p_excludeRx,
- QWidget *parent=0, const char *name=0, bool modal = true);
+ RescanPrj(const ProjectList &p_prjFileList, const KURL& p_baseURL, const TQRegExp &p_excludeRx,
+ TQWidget *parent=0, const char *name=0, bool modal = true);
~RescanPrj();
public slots:
@@ -46,7 +46,7 @@ public slots:
void slotExpand();
void slotCollapse();
- virtual void resizeEvent( QResizeEvent * );
+ virtual void resizeEvent( TQResizeEvent * );
KURL::List files();
@@ -55,8 +55,8 @@ public slots:
private:
KURL baseURL;
ProjectList prjFileList;
- QRegExp excludeRx;
- QValueList<URLListEntry> urlList;
+ TQRegExp excludeRx;
+ TQValueList<URLListEntry> urlList;
int m_listJobCount;
protected slots: // Protected slots
diff --git a/quanta/project/teammembersdlg.cpp b/quanta/project/teammembersdlg.cpp
index bd159186..ea3e415c 100644
--- a/quanta/project/teammembersdlg.cpp
+++ b/quanta/project/teammembersdlg.cpp
@@ -14,7 +14,7 @@
* *
***************************************************************************/
//qt includes
-#include <qlabel.h>
+#include <tqlabel.h>
//kde includes
#include <kcombobox.h>
@@ -37,12 +37,12 @@
#define SUBPROJECT_COL 5
-extern QString simpleMemberStr;
-extern QString taskLeaderStr;
-extern QString teamLeaderStr;
-extern QString subprojectLeaderStr;
+extern TQString simpleMemberStr;
+extern TQString taskLeaderStr;
+extern TQString teamLeaderStr;
+extern TQString subprojectLeaderStr;
-TeamMembersDlg::TeamMembersDlg(QWidget *parent, const char *name)
+TeamMembersDlg::TeamMembersDlg(TQWidget *parent, const char *name)
: TeamMembersDlgS(parent, name)
{
m_yourself = "";
@@ -63,12 +63,12 @@ void TeamMembersDlg::slotAddMember()
result = addDlg.exec();
if (result)
{
- QString name = memberDlg.nameCombo->currentText();
- QString role = memberDlg.roleCombo->currentText();
- QString task = memberDlg.taskEdit->text();
- QString subProject = memberDlg.subprojectCombo->currentText();
- QString nickName = memberDlg.nicknameEdit->text();
- QString email = memberDlg.emailEdit->text();
+ TQString name = memberDlg.nameCombo->currentText();
+ TQString role = memberDlg.roleCombo->currentText();
+ TQString task = memberDlg.taskEdit->text();
+ TQString subProject = memberDlg.subprojectCombo->currentText();
+ TQString nickName = memberDlg.nicknameEdit->text();
+ TQString email = memberDlg.emailEdit->text();
if (name.isEmpty())
{
KMessageBox::error(this, i18n("The member name cannot be empty."));
@@ -84,7 +84,7 @@ void TeamMembersDlg::slotAddMember()
addDlg.show();
} else
{
- QListViewItem *item = new QListViewItem(membersListView, name, nickName, email, role, task);
+ TQListViewItem *item = new TQListViewItem(membersListView, name, nickName, email, role, task);
if (memberDlg.subprojectCombo->isEnabled())
item->setText(SUBPROJECT_COL, subProject);
result = false;
@@ -95,14 +95,14 @@ void TeamMembersDlg::slotAddMember()
void TeamMembersDlg::slotEditMember()
{
- QListViewItem *item =membersListView->currentItem();
+ TQListViewItem *item =membersListView->currentItem();
if (!item) return;
KDialogBase editDlg(this, "edit_member", true, i18n("Edit Member"), KDialogBase::Ok | KDialogBase::Cancel);
MemberEditDlg memberDlg(&editDlg);
memberDlg.selectMember(item->text(NAME_COL));
memberDlg.nicknameEdit->setText(item->text(NICKNAME_COL));
memberDlg.emailEdit->setText(item->text(EMAIL_COL));
- QString role = item->text(ROLE_COL);
+ TQString role = item->text(ROLE_COL);
for (int i = 0; i < memberDlg.roleCombo->count(); i++)
{
if (memberDlg.roleCombo->text(i) == role)
@@ -115,8 +115,8 @@ void TeamMembersDlg::slotEditMember()
memberDlg.taskEdit->setText(item->text(TASK_COL));
int idx = 0;
int subprojectIdx = 0;
- QValueList<SubProject> *subprojects = Project::ref()->subprojects();
- for (QValueList<SubProject>::ConstIterator it = subprojects->constBegin(); it != subprojects->constEnd(); ++it)
+ TQValueList<SubProject> *subprojects = Project::ref()->subprojects();
+ for (TQValueList<SubProject>::ConstIterator it = subprojects->constBegin(); it != subprojects->constEnd(); ++it)
{
if (item->text(SUBPROJECT_COL) == (*it).name)
{
@@ -133,12 +133,12 @@ void TeamMembersDlg::slotEditMember()
result = editDlg.exec();
if (result)
{
- QString name = memberDlg.nameCombo->currentText();
- QString nickName = memberDlg.nicknameEdit->text();
- QString email = memberDlg.emailEdit->text();
- QString role = memberDlg.roleCombo->currentText();
- QString task = memberDlg.taskEdit->text();
- QString subProject = memberDlg.subprojectCombo->currentText();
+ TQString name = memberDlg.nameCombo->currentText();
+ TQString nickName = memberDlg.nicknameEdit->text();
+ TQString email = memberDlg.emailEdit->text();
+ TQString role = memberDlg.roleCombo->currentText();
+ TQString task = memberDlg.taskEdit->text();
+ TQString subProject = memberDlg.subprojectCombo->currentText();
if (name.isEmpty())
{
KMessageBox::error(this, i18n("The member name cannot be empty."));
@@ -169,11 +169,11 @@ void TeamMembersDlg::slotEditMember()
void TeamMembersDlg::slotDeleteMember()
{
- QListViewItem *item =membersListView->currentItem();
+ TQListViewItem *item =membersListView->currentItem();
if (!item) return;
bool deleteYourself = (item->text(NICKNAME_COL) == m_yourself);
- QListViewItemIterator it(membersListView);
+ TQListViewItemIterator it(membersListView);
while ( it.current() )
{
if (item != it.current() && it.current()->text(NICKNAME_COL) == m_yourself)
@@ -198,11 +198,11 @@ void TeamMembersDlg::slotDeleteMember()
}
}
-bool TeamMembersDlg::checkDuplicates(QListViewItem *item, const QString &name, const QString &nickName, const QString &email, const QString &role, const QString &task, const QString &subProject)
+bool TeamMembersDlg::checkDuplicates(TQListViewItem *item, const TQString &name, const TQString &nickName, const TQString &email, const TQString &role, const TQString &task, const TQString &subProject)
{
- QString s;
- QString nick;
- QListViewItemIterator it(membersListView);
+ TQString s;
+ TQString nick;
+ TQListViewItemIterator it(membersListView);
while ( it.current() )
{
s = it.current()->text(ROLE_COL);
@@ -213,7 +213,7 @@ bool TeamMembersDlg::checkDuplicates(QListViewItem *item, const QString &name, c
(role == i18n(subprojectLeaderStr.utf8()) && it.current()->text(SUBPROJECT_COL) == subProject)
) )
{
- if (KMessageBox::warningYesNo(this, i18n("<qt>The <b>%1</b> role is already assigned to <b>%2</b>. Do you want to reassign it to the current member?</qt>").arg(role).arg(it.current()->text(NAME_COL)), QString::null, i18n("Reassign"), i18n("Do Not Reassign")) == KMessageBox::Yes)
+ if (KMessageBox::warningYesNo(this, i18n("<qt>The <b>%1</b> role is already assigned to <b>%2</b>. Do you want to reassign it to the current member?</qt>").arg(role).arg(it.current()->text(NAME_COL)), TQString::null, i18n("Reassign"), i18n("Do Not Reassign")) == KMessageBox::Yes)
{
it.current()->setText(ROLE_COL, i18n(simpleMemberStr.utf8()));
return true;
@@ -233,13 +233,13 @@ bool TeamMembersDlg::checkDuplicates(QListViewItem *item, const QString &name, c
void TeamMembersDlg::slotSetToYourself()
{
- QListViewItem *item =membersListView->currentItem();
+ TQListViewItem *item =membersListView->currentItem();
if (!item) return;
yourselfLabel->setText(item->text(NAME_COL) + " <" + item->text(EMAIL_COL) + ">");
m_yourself = item->text(NICKNAME_COL);
}
-void TeamMembersDlg::setYourself(const QString &name)
+void TeamMembersDlg::setYourself(const TQString &name)
{
m_yourself = name;
if (name.isEmpty())
@@ -247,7 +247,7 @@ void TeamMembersDlg::setYourself(const QString &name)
yourselfLabel->setText(i18n("Please select your identity from the member list."));
return;
}
- QListViewItemIterator it(membersListView);
+ TQListViewItemIterator it(membersListView);
while ( it.current() )
{
if (it.current()->text(NICKNAME_COL).lower() == name.lower())
diff --git a/quanta/project/teammembersdlg.h b/quanta/project/teammembersdlg.h
index c3281e23..045c0a7c 100644
--- a/quanta/project/teammembersdlg.h
+++ b/quanta/project/teammembersdlg.h
@@ -26,11 +26,11 @@ class TeamMembersDlg : public TeamMembersDlgS
{
Q_OBJECT
public:
- TeamMembersDlg(QWidget *parent = 0, const char *name = 0);
+ TeamMembersDlg(TQWidget *parent = 0, const char *name = 0);
~TeamMembersDlg();
- void setYourself(const QString &name);
- QString yourself() {return m_yourself;}
+ void setYourself(const TQString &name);
+ TQString yourself() {return m_yourself;}
public slots:
void slotAddMember();
@@ -44,9 +44,9 @@ private:
of duplicate entries, it shows a dialog and if the user answer yes, the old
teamleader is set to Simple Member and the new member is set to teamleader
and the method returns true, otherwise it returns false. */
- bool checkDuplicates(QListViewItem *item, const QString &name, const QString &nickName, const QString &email, const QString &role, const QString &task, const QString &subProject);
+ bool checkDuplicates(TQListViewItem *item, const TQString &name, const TQString &nickName, const TQString &email, const TQString &role, const TQString &task, const TQString &subProject);
- QString m_yourself;
+ TQString m_yourself;
};
#endif
diff --git a/quanta/project/uploadprofiles.cpp b/quanta/project/uploadprofiles.cpp
index d32596ed..669971ce 100644
--- a/quanta/project/uploadprofiles.cpp
+++ b/quanta/project/uploadprofiles.cpp
@@ -15,7 +15,7 @@
***************************************************************************/
// qt includes
-#include <qobject.h>
+#include <tqobject.h>
// KDE includes
#include <kiconloader.h>
@@ -34,14 +34,14 @@ UploadProfiles::UploadProfiles() : UploadProfileMap()
}
-void UploadProfiles::readFromXML(const QDomDocument &dom)
+void UploadProfiles::readFromXML(const TQDomDocument &dom)
{
clear(); // empty the list
m_profilesNode = dom.firstChild().firstChild().namedItem("uploadprofiles");
if (m_profilesNode.isNull())
return;
- QDomNodeList profileList = m_profilesNode.toElement().elementsByTagName("profile");
+ TQDomNodeList profileList = m_profilesNode.toElement().elementsByTagName("profile");
UploadProfile newProfile;
for (uint i = 0; i < profileList.count(); i++)
{
@@ -53,13 +53,13 @@ void UploadProfiles::readFromXML(const QDomDocument &dom)
}
-bool UploadProfiles::removeFromMapAndXML(const QString &name)
+bool UploadProfiles::removeFromMapAndXML(const TQString &name)
{
UploadProfiles::Iterator it = find(name);
if ( it == end() )
return false;
// ok now remove
- QDomElement el = (*it).domElement;
+ TQDomElement el = (*it).domElement;
el.parentNode().removeChild(el);
erase(name);
return true;
@@ -79,9 +79,9 @@ void UploadProfiles::clear()
UploadProfileMap::clear();
}
-QWidget * UploadProfiles::createTreeview(const UploadProfile &profile)
+TQWidget * UploadProfiles::createTreeview(const UploadProfile &profile)
{
- QWidget *widget = 0L;
+ TQWidget *widget = 0L;
KURL kurl = url(profile.domElement);
if (kurl.isValid() && ! kurl.isEmpty())
{
@@ -94,26 +94,26 @@ QWidget * UploadProfiles::createTreeview(const UploadProfile &profile)
}
-KURL UploadProfiles::url(const QDomElement &e)
+KURL UploadProfiles::url(const TQDomElement &e)
{
- QString protocol = e.attribute("remote_protocol","ftp") + "://";
- QString s = protocol;
- QString host = e.attribute("remote_host","");
+ TQString protocol = e.attribute("remote_protocol","ftp") + "://";
+ TQString s = protocol;
+ TQString host = e.attribute("remote_host","");
s += host;
- QString port = e.attribute("remote_port","");
+ TQString port = e.attribute("remote_port","");
if (! port.isEmpty()) {
s += ":" + port;
}
s += e.attribute("remote_path","");
KURL url = KURL::fromPathOrURL(s);
- QString user = e.attribute("user","");
+ TQString user = e.attribute("user","");
if (!user.isEmpty()) {
url.setUser(user);
}
// check if we know the password
if ( !user.isEmpty() && Project::ref()->keepPasswd )
{
- QString password = Project::ref()->password(protocol + user + "@" + host);
+ TQString password = Project::ref()->password(protocol + user + "@" + host);
url.setPass(password);
}
return url;
diff --git a/quanta/project/uploadprofiles.h b/quanta/project/uploadprofiles.h
index 20d77b80..b04c376d 100644
--- a/quanta/project/uploadprofiles.h
+++ b/quanta/project/uploadprofiles.h
@@ -14,9 +14,9 @@
#define UPLOADPROFILES_H
// QT includes
-#include <qmap.h>
-#include <qdom.h>
-#include <qguardedptr.h>
+#include <tqmap.h>
+#include <tqdom.h>
+#include <tqguardedptr.h>
// KDE includes
#include <kurl.h>
@@ -32,13 +32,13 @@ class QObject;
struct UploadProfile
{
- QString name; ///< name of profile
- QDomElement domElement; ///< domtree element of this profile
- QGuardedPtr<QWidget> treeview; ///< treeview for this url
+ TQString name; ///< name of profile
+ TQDomElement domElement; ///< domtree element of this profile
+ TQGuardedPtr<TQWidget> treeview; ///< treeview for this url
};
/** a map for the upload profiles */
-typedef QMap<QString, UploadProfile> UploadProfileMap;
+typedef TQMap<TQString, UploadProfile> UploadProfileMap;
class UploadProfiles : public UploadProfileMap
@@ -61,7 +61,7 @@ public:
@param the dom document to parse
*/
- void readFromXML(const QDomDocument &dom);
+ void readFromXML(const TQDomDocument &dom);
/**
removes a profile from the map and the dom tree
@@ -70,7 +70,7 @@ public:
@return true if profile was found and removed
*/
- bool removeFromMapAndXML(const QString &name);
+ bool removeFromMapAndXML(const TQString &name);
/**
clears the map and removes all treeviews
@@ -91,18 +91,18 @@ private:
@return the pointer to the treeview
*/
- QWidget * createTreeview(const UploadProfile &profile);
+ TQWidget * createTreeview(const UploadProfile &profile);
/**
creates a KURL from a QDomElement
- @param e a QDomElement where the path is saved
+ @param e a TQDomElement where the path is saved
@return KURL of the location
*/
- KURL url(const QDomElement &e);
+ KURL url(const TQDomElement &e);
- QDomNode m_profilesNode; ///< under this node the profiles are saved in the dom tree
+ TQDomNode m_profilesNode; ///< under this node the profiles are saved in the dom tree
};
#endif
diff --git a/quanta/src/dcopquanta.cpp b/quanta/src/dcopquanta.cpp
index 55ff068e..149240d6 100644
--- a/quanta/src/dcopquanta.cpp
+++ b/quanta/src/dcopquanta.cpp
@@ -17,7 +17,7 @@
//kde includes
//qt includes
-#include <qregexp.h>
+#include <tqregexp.h>
//app includes
#include "dcopquanta.h"
@@ -29,21 +29,21 @@ DCOPQuanta::DCOPQuanta() : DCOPObject("QuantaIf")
{
}
-QStringList DCOPQuanta::selectors(const QString& tag)
+TQStringList DCOPQuanta::selectors(const TQString& tag)
{
- const QRegExp rx("\\.|\\#|\\:");
- QStringList selectorList;
+ const TQRegExp rx("\\.|\\#|\\:");
+ TQStringList selectorList;
GroupElementMapList::Iterator it;
for ( it = globalGroupMap.begin(); it != globalGroupMap.end(); ++it )
{
- QString key = it.key();
+ TQString key = it.key();
if (key.startsWith("Selectors|"))
{
- QString selectorName = key.mid(10);
+ TQString selectorName = key.mid(10);
int index = selectorName.find(':');
if (index != -1)
selectorName = selectorName.mid(0, index);
- QString tmpStr;
+ TQString tmpStr;
index = selectorName.find(rx);
if (index != -1)
{
@@ -63,17 +63,17 @@ QStringList DCOPQuanta::selectors(const QString& tag)
return selectorList;
}
-QStringList DCOPQuanta::idSelectors()
+TQStringList DCOPQuanta::idSelectors()
{
- QStringList selectorList;
+ TQStringList selectorList;
GroupElementMapList::Iterator it;
for ( it = globalGroupMap.begin(); it != globalGroupMap.end(); ++it )
{
- QString key = it.key();
+ TQString key = it.key();
if (key.startsWith("Selectors|"))
{
- QString selectorName = key.mid(10);
- QString tmpStr;
+ TQString selectorName = key.mid(10);
+ TQString tmpStr;
if (selectorName.startsWith("#"))
{
selectorList << selectorName.mid(1);
@@ -83,20 +83,20 @@ QStringList DCOPQuanta::idSelectors()
return selectorList;
}
-QStringList DCOPQuanta::groupElements(const QString& group)
+TQStringList DCOPQuanta::groupElements(const TQString& group)
{
- QStringList elementList;
+ TQStringList elementList;
GroupElementMapList::Iterator it;
for ( it = globalGroupMap.begin(); it != globalGroupMap.end(); ++it )
{
- QString key = it.key();
+ TQString key = it.key();
if (key.startsWith(group + "|"))
{
- QString name = key.mid(10);
+ TQString name = key.mid(10);
int index = name.find(':');
if (index != -1)
name = name.mid(0, index);
- QString tmpStr;
+ TQString tmpStr;
index = name.find("|");
if (index != -1)
{
diff --git a/quanta/src/dcopquanta.h b/quanta/src/dcopquanta.h
index 5c92f06f..b1dd7c4b 100644
--- a/quanta/src/dcopquanta.h
+++ b/quanta/src/dcopquanta.h
@@ -26,9 +26,9 @@ public:
DCOPQuanta();
~DCOPQuanta() {};
- virtual QStringList selectors(const QString& tag);
- virtual QStringList idSelectors();
- virtual QStringList groupElements(const QString &group);
+ virtual TQStringList selectors(const TQString& tag);
+ virtual TQStringList idSelectors();
+ virtual TQStringList groupElements(const TQString &group);
};
#endif
diff --git a/quanta/src/dcopquantaif.h b/quanta/src/dcopquantaif.h
index f0ec1818..f5ee3a5c 100644
--- a/quanta/src/dcopquantaif.h
+++ b/quanta/src/dcopquantaif.h
@@ -17,7 +17,7 @@
#ifndef DCOPQUANTAIF_H
#define DCOPQUANTAIF_H
#include <dcopobject.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
class DCOPQuantaIf : virtual public DCOPObject
{
@@ -25,9 +25,9 @@ class DCOPQuantaIf : virtual public DCOPObject
k_dcop:
- virtual QStringList selectors(const QString &tag) = 0;
- virtual QStringList idSelectors() = 0;
- virtual QStringList groupElements(const QString &group) = 0;
+ virtual TQStringList selectors(const TQString &tag) = 0;
+ virtual TQStringList idSelectors() = 0;
+ virtual TQStringList groupElements(const TQString &group) = 0;
};
#endif
diff --git a/quanta/src/dcopsettings.cpp b/quanta/src/dcopsettings.cpp
index b47e6c39..504eca84 100644
--- a/quanta/src/dcopsettings.cpp
+++ b/quanta/src/dcopsettings.cpp
@@ -25,16 +25,16 @@ DCOPSettings::DCOPSettings() : DCOPObject("SettingsIf")
{
}
-QString DCOPSettings::encoding()
+TQString DCOPSettings::encoding()
{
- QString encoding = quantaApp->defaultEncoding();
+ TQString encoding = quantaApp->defaultEncoding();
encoding.replace("iso ", "iso-"); //it's said that "iso-8859-x" is the valid format
encoding.replace("utf", "utf-"); //it's said that "utf-x" is the valid format
encoding.replace("cp ", "windows-");
return encoding;
}
-QString DCOPSettings::dtep()
+TQString DCOPSettings::dtep()
{
if (Project::ref()->hasProject())
{
@@ -44,7 +44,7 @@ QString DCOPSettings::dtep()
return DTDs::ref()->getDTDNickNameFromName(qConfig.defaultDocType);
}
-QString DCOPSettings::quotationChar()
+TQString DCOPSettings::quotationChar()
{
return qConfig.attrValueQuotation;
}
diff --git a/quanta/src/dcopsettings.h b/quanta/src/dcopsettings.h
index 62dc52b0..9509e62c 100644
--- a/quanta/src/dcopsettings.h
+++ b/quanta/src/dcopsettings.h
@@ -27,9 +27,9 @@ public:
DCOPSettings();
~DCOPSettings() {};
- virtual QString encoding();
- virtual QString dtep();
- virtual QString quotationChar();
+ virtual TQString encoding();
+ virtual TQString dtep();
+ virtual TQString quotationChar();
};
#endif
diff --git a/quanta/src/dcopsettingsif.h b/quanta/src/dcopsettingsif.h
index 7a811bc2..048117a4 100644
--- a/quanta/src/dcopsettingsif.h
+++ b/quanta/src/dcopsettingsif.h
@@ -17,7 +17,7 @@
#define DCOPSETTINGSIF_H
#include <dcopobject.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
class DCOPSettingsIf : virtual public DCOPObject
{
@@ -25,9 +25,9 @@ class DCOPSettingsIf : virtual public DCOPObject
k_dcop:
- virtual QString encoding() = 0;
- virtual QString dtep() = 0;
- virtual QString quotationChar() = 0;
+ virtual TQString encoding() = 0;
+ virtual TQString dtep() = 0;
+ virtual TQString quotationChar() = 0;
};
#endif
diff --git a/quanta/src/dcopwindowmanagerif.h b/quanta/src/dcopwindowmanagerif.h
index d0f8a908..9030f9e0 100644
--- a/quanta/src/dcopwindowmanagerif.h
+++ b/quanta/src/dcopwindowmanagerif.h
@@ -17,7 +17,7 @@
#define DCOPWINDOWMANAGERIF_H
#include <dcopobject.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
class DCOPWindowManagerIf : virtual public DCOPObject
{
@@ -26,20 +26,20 @@ class DCOPWindowManagerIf : virtual public DCOPObject
k_dcop:
virtual int currentEditorIfNum() const = 0;
- virtual QString currentURL() const = 0;
- virtual QString projectURL() const = 0;
- virtual QStringList openedURLs() const = 0;
- virtual QStringList tagAreas(const QString& tag, bool includeCoordinates, bool skipFoundContent) const = 0;
- virtual void newCursorPosition(const QString &file, int lineNumber, int columnNumber) = 0;
- virtual void newDebuggerPosition(const QString &file, int lineNumber) = 0;
- virtual void openFile(const QString &file, int lineNumber, int columnNumber) = 0;
- virtual QString saveCurrentFile() = 0;
- virtual void setDtep(const QString& dtepName, bool convert) = 0;
- virtual QString documentFolderForURL(const QString &url) = 0;
- virtual QString urlWithPreviewPrefix(const QString &url) = 0;
- virtual void addFileToProject(const QString &url) = 0;
- virtual void addFolderToProject(const QString &url) = 0;
- virtual void uploadURL(const QString &url, const QString& profile, bool markOnly) = 0;
+ virtual TQString currentURL() const = 0;
+ virtual TQString projectURL() const = 0;
+ virtual TQStringList openedURLs() const = 0;
+ virtual TQStringList tagAreas(const TQString& tag, bool includeCoordinates, bool skipFoundContent) const = 0;
+ virtual void newCursorPosition(const TQString &file, int lineNumber, int columnNumber) = 0;
+ virtual void newDebuggerPosition(const TQString &file, int lineNumber) = 0;
+ virtual void openFile(const TQString &file, int lineNumber, int columnNumber) = 0;
+ virtual TQString saveCurrentFile() = 0;
+ virtual void setDtep(const TQString& dtepName, bool convert) = 0;
+ virtual TQString documentFolderForURL(const TQString &url) = 0;
+ virtual TQString urlWithPreviewPrefix(const TQString &url) = 0;
+ virtual void addFileToProject(const TQString &url) = 0;
+ virtual void addFolderToProject(const TQString &url) = 0;
+ virtual void uploadURL(const TQString &url, const TQString& profile, bool markOnly) = 0;
};
#endif
diff --git a/quanta/src/document.cpp b/quanta/src/document.cpp
index 0c3c30ab..c3309a42 100644
--- a/quanta/src/document.cpp
+++ b/quanta/src/document.cpp
@@ -20,16 +20,16 @@
#include <stdlib.h>
//QT includes
-#include <qcheckbox.h>
-#include <qdir.h>
-#include <qeventloop.h>
-#include <qfile.h>
-#include <qfileinfo.h>
-#include <qlineedit.h>
-#include <qtextcodec.h>
-#include <qtextstream.h>
-#include <qregexp.h>
-#include <qradiobutton.h>
+#include <tqcheckbox.h>
+#include <tqdir.h>
+#include <tqeventloop.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
+#include <tqlineedit.h>
+#include <tqtextcodec.h>
+#include <tqtextstream.h>
+#include <tqregexp.h>
+#include <tqradiobutton.h>
// KDE includes
#include <kapplication.h>
@@ -93,8 +93,8 @@
extern GroupElementMapList globalGroupMap;
Document::Document(KTextEditor::Document *doc,
- QWidget *parent, const char *name, WFlags f )
- : QWidget(parent, name, f)
+ TQWidget *parent, const char *name, WFlags f )
+ : TQWidget(parent, name, f)
{
m_dirty = false;
busy = false;
@@ -164,7 +164,7 @@ Document::Document(KTextEditor::Document *doc,
m_encoding = encodingIf->encoding();
if (m_encoding.isEmpty())
m_encoding = "utf8"; //final fallback
- m_codec = QTextCodec::codecForName(m_encoding);
+ m_codec = TQTextCodec::codecForName(m_encoding);
selectionIf = dynamic_cast<KTextEditor::SelectionInterface *>(m_doc);
selectionIfExt = dynamic_cast<KTextEditor::SelectionInterfaceExt *>(m_doc);
@@ -190,7 +190,7 @@ Document::Document(KTextEditor::Document *doc,
}
tempFile = 0;
- m_tempFileName = QString::null;
+ m_tempFileName = TQString::null;
dtdName = Project::ref()->defaultDTD();
reparseEnabled = true;
repaintEnabled = true;
@@ -198,27 +198,27 @@ Document::Document(KTextEditor::Document *doc,
docUndoRedo = new undoRedo(this);
//path of the backup copy file of the document
- m_backupPathValue = QString::null;
+ m_backupPathValue = TQString::null;
- connect( m_doc, SIGNAL(charactersInteractivelyInserted (int ,int ,const QString&)),
- this, SLOT(slotCharactersInserted(int ,int ,const QString&)) );
+ connect( m_doc, TQT_SIGNAL(charactersInteractivelyInserted (int ,int ,const TQString&)),
+ this, TQT_SLOT(slotCharactersInserted(int ,int ,const TQString&)) );
- connect( m_view, SIGNAL(completionAborted()),
- this, SLOT( slotCompletionAborted()) );
+ connect( m_view, TQT_SIGNAL(completionAborted()),
+ this, TQT_SLOT( slotCompletionAborted()) );
- connect( m_view, SIGNAL(completionDone(KTextEditor::CompletionEntry)),
- this, SLOT( slotCompletionDone(KTextEditor::CompletionEntry)) );
+ connect( m_view, TQT_SIGNAL(completionDone(KTextEditor::CompletionEntry)),
+ this, TQT_SLOT( slotCompletionDone(KTextEditor::CompletionEntry)) );
- connect( m_view, SIGNAL(filterInsertString(KTextEditor::CompletionEntry*,QString *)),
- this, SLOT( slotFilterCompletion(KTextEditor::CompletionEntry*,QString *)) );
- connect( m_doc, SIGNAL(textChanged()), SLOT(slotTextChanged()));
+ connect( m_view, TQT_SIGNAL(filterInsertString(KTextEditor::CompletionEntry*,TQString *)),
+ this, TQT_SLOT( slotFilterCompletion(KTextEditor::CompletionEntry*,TQString *)) );
+ connect( m_doc, TQT_SIGNAL(textChanged()), TQT_SLOT(slotTextChanged()));
- connect(m_view, SIGNAL(gotFocus(Kate::View*)), SIGNAL(editorGotFocus()));
+ connect(m_view, TQT_SIGNAL(gotFocus(Kate::View*)), TQT_SIGNAL(editorGotFocus()));
- connect(fileWatcher, SIGNAL(dirty(const QString&)), SLOT(slotFileDirty(const QString&)));
+ connect(fileWatcher, TQT_SIGNAL(dirty(const TQString&)), TQT_SLOT(slotFileDirty(const TQString&)));
-// connect(m_doc, SIGNAL(marksChanged()), this, SLOT(slotMarksChanged()));
- connect(m_doc, SIGNAL(markChanged(KTextEditor::Mark, KTextEditor::MarkInterfaceExtension::MarkChangeAction)), this, SLOT(slotMarkChanged(KTextEditor::Mark, KTextEditor::MarkInterfaceExtension::MarkChangeAction)));
+// connect(m_doc, TQT_SIGNAL(marksChanged()), this, TQT_SLOT(slotMarksChanged()));
+ connect(m_doc, TQT_SIGNAL(markChanged(KTextEditor::Mark, KTextEditor::MarkInterfaceExtension::MarkChangeAction)), this, TQT_SLOT(slotMarkChanged(KTextEditor::Mark, KTextEditor::MarkInterfaceExtension::MarkChangeAction)));
}
@@ -232,7 +232,7 @@ Document::~Document()
delete m_doc;
}
-void Document::setUntitledUrl(const QString &url)
+void Document::setUntitledUrl(const TQString &url)
{
untitledUrl = url;
openURL(KURL());
@@ -250,9 +250,9 @@ KURL Document::url()
// kwrite addons
-void Document::insertTag(const QString &s1, const QString &s2)
+void Document::insertTag(const TQString &s1, const TQString &s2)
{
- QString selection;
+ TQString selection;
if (selectionIf && selectionIf->hasSelection())
{
@@ -267,10 +267,10 @@ void Document::insertTag(const QString &s1, const QString &s2)
/** Change the current tag's attributes with those from dict */
-void Document::changeTag(Tag *tag, QDict<QString> *dict )
+void Document::changeTag(Tag *tag, TQDict<TQString> *dict )
{
tag->modifyAttributes(dict);
- QString tagStr = tag->toString();
+ TQString tagStr = tag->toString();
reparseEnabled = false;
int bLine, bCol, eLine, eCol;
@@ -283,7 +283,7 @@ void Document::changeTag(Tag *tag, QDict<QString> *dict )
/**Change the namespace in a tag. Add if it's not present, or remove if the
namespace argument is empty*/
-void Document::changeTagNamespace(Tag *tag, const QString& nameSpace)
+void Document::changeTagNamespace(Tag *tag, const TQString& nameSpace)
{
int bl, bc;
int nl, nc;
@@ -312,9 +312,9 @@ void Document::changeTagNamespace(Tag *tag, const QString& nameSpace)
}
/**Change the attr value of the called attrName to attrValue*/
-void Document::changeTagAttribute(Tag *tag, const QString& attrName, const QString& attrValue)
+void Document::changeTagAttribute(Tag *tag, const TQString& attrName, const TQString& attrValue)
{
- QString value;
+ TQString value;
int line, col;
int index = tag->attributeIndex(attrName);
if (index != -1)
@@ -329,7 +329,7 @@ void Document::changeTagAttribute(Tag *tag, const QString& attrName, const QStri
if (line == aLine && col == aCol)
{
col += tag->attribute(index).length();
- value = QString("=") + qConfig.attrValueQuotation + attrValue + qConfig.attrValueQuotation;
+ value = TQString("=") + qConfig.attrValueQuotation + attrValue + qConfig.attrValueQuotation;
} else
{
endCol = col + value.length();
@@ -339,7 +339,7 @@ void Document::changeTagAttribute(Tag *tag, const QString& attrName, const QStri
endCol++;
}
reparseEnabled = false;
- QString textLine = editIf->textLine(line);
+ TQString textLine = editIf->textLine(line);
while (col > 1 && textLine[col-1].isSpace())
col--;
@@ -385,7 +385,7 @@ void Document::selectText(int x1, int y1, int x2, int y2 )
}
-void Document::replaceSelected(const QString &s)
+void Document::replaceSelected(const TQString &s)
{
if (selectionIf)
{
@@ -401,7 +401,7 @@ void Document::replaceSelected(const QString &s)
void Document::insertFile(const KURL& url)
{
- QString fileName;
+ TQString fileName;
if (url.isLocalFile())
{
fileName = url.path();
@@ -413,11 +413,11 @@ void Document::insertFile(const KURL& url)
return;
}
}
- QFile file(fileName);
+ TQFile file(fileName);
if (file.open(IO_ReadOnly))
{
- QTextStream stream( &file );
- stream.setEncoding(QTextStream::UnicodeUTF8);
+ TQTextStream stream( &file );
+ stream.setEncoding(TQTextStream::UnicodeUTF8);
insertText(stream.read());
file.close();
} else
@@ -425,9 +425,9 @@ void Document::insertFile(const KURL& url)
}
/** Inserts text at the current cursor position */
-void Document::insertText(const QString &a_text, bool adjustCursor, bool reparse)
+void Document::insertText(const TQString &a_text, bool adjustCursor, bool reparse)
{
- QString text = a_text;
+ TQString text = a_text;
if(text.isEmpty())
return;
@@ -440,7 +440,7 @@ void Document::insertText(const QString &a_text, bool adjustCursor, bool reparse
{
int bLine, bCol;
n->tag->beginPos(bLine, bCol);
- QString s = this->text(bLine, bCol, line, col);
+ TQString s = this->text(bLine, bCol, line, col);
bool insideQuotes = false;
for (int i = 0 ; i < (int)s.length() - 1; i++)
{
@@ -500,7 +500,7 @@ void Document::insertText(const QString &a_text, bool adjustCursor, bool reparse
}
else if(!noWordWrap && !(isspace(ascii[i]))) // new word, see if it wraps
{
- // TOO SLOW int wordLength = (text.mid(i).section(QRegExp("[ \t\r\n]"), 0, 0).length());
+ // TOO SLOW int wordLength = (text.mid(i).section(TQRegExp("[ \t\r\n]"), 0, 0).length());
wordLength = -1;
for(j = i+1;ascii[j];++j) // get word size, ascii is MUCH faster
{
@@ -559,14 +559,14 @@ bool Document::insertChildTags(QTag *tag, QTag *lastTag)
{
return false;
}
- QMap<QString, bool>::Iterator it;
+ TQMap<TQString, bool>::Iterator it;
for (it = tag->childTags.begin(); it != tag->childTags.end(); ++it)
{
if (it.data())
{
childInserted = true;
QTag *childTag = QuantaCommon::tagFromDTD(tag->parentDTD, it.key());
- QString tagStr =QuantaCommon::tagCase(it.key());
+ TQString tagStr =QuantaCommon::tagCase(it.key());
if ( tag->parentDTD->singleTagStyle == "xml" &&
( childTag->isSingle() ||
(childTag->isOptional() && !qConfig.closeOptionalTags)) )
@@ -576,7 +576,7 @@ bool Document::insertChildTags(QTag *tag, QTag *lastTag)
{
insertText("<" +tagStr + ">", true, false);
}
- QString closingStr;
+ TQString closingStr;
if (insertChildTags(childTag, tag))
{
closingStr = "";
@@ -624,16 +624,16 @@ void Document::createTempFile()
closeTempFile();
tempFile = new KTempFile(tmpDir);
tempFile->setAutoDelete(true);
- m_tempFileName = QFileInfo(*(tempFile->file())).filePath();
- QString encoding = quantaApp->defaultEncoding();
+ m_tempFileName = TQFileInfo(*(tempFile->file())).filePath();
+ TQString encoding = quantaApp->defaultEncoding();
if (encodingIf)
encoding = encodingIf->encoding();
if (encoding.isEmpty())
encoding = "utf8"; //final fallback
- tempFile->textStream()->setCodec(QTextCodec::codecForName(encoding));
+ tempFile->textStream()->setCodec(TQTextCodec::codecForName(encoding));
* (tempFile->textStream()) << editIf->text();
- m_tempFileName = QFileInfo(*(tempFile->file())).filePath();
+ m_tempFileName = TQFileInfo(*(tempFile->file())).filePath();
tempFile->close();
// kdDebug(24000) << "Creating tempfile " << m_tempFileName << " for " << url() << endl;
}
@@ -645,13 +645,13 @@ void Document::closeTempFile()
delete tempFile;
tempFile = 0L;
}
- if (QFileInfo(m_tempFileName).exists())
- QFile::remove(m_tempFileName);
+ if (TQFileInfo(m_tempFileName).exists())
+ TQFile::remove(m_tempFileName);
- m_tempFileName = QString::null;
+ m_tempFileName = TQString::null;
}
-QString Document::tempFileName()
+TQString Document::tempFileName()
{
return m_tempFileName;
}
@@ -661,10 +661,10 @@ QString Document::tempFileName()
It will work even if the tag has not been completed yet. An
empty string will be returned if no tag is found.
*/
-QString Document::getTagNameAt(int line, int col )
+TQString Document::getTagNameAt(int line, int col )
{
- QString name = "";
- QString textLine = editIf->textLine(line);
+ TQString name = "";
+ TQString textLine = editIf->textLine(line);
textLine = textLine.left(col);
while (line >= 0)
{
@@ -703,7 +703,7 @@ QString Document::getTagNameAt(int line, int col )
}
/** Show the code completions passed in as an argument */
-void Document::showCodeCompletions( QValueList<KTextEditor::CompletionEntry> *completions ) {
+void Document::showCodeCompletions( TQValueList<KTextEditor::CompletionEntry> *completions ) {
bool reparse = reparseEnabled;
reparseEnabled = false;
codeCompletionIf->showCompletionBox( *completions, false );
@@ -725,7 +725,7 @@ void Document::slotCompletionDone( KTextEditor::CompletionEntry completion )
/* if (completion.type == "charCompletion")
{
m_lastCompletionList = getCharacterCompletions(completion.userdata);
- QTimer::singleShot(0, this, SLOT(slotDelayedShowCodeCompletion()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotDelayedShowCodeCompletion()));
} else*/
if (completion.type == "attribute")
{
@@ -736,7 +736,7 @@ void Document::slotCompletionDone( KTextEditor::CompletionEntry completion )
if (tag)
{
m_lastCompletionList = getAttributeValueCompletions(tag->name(), completion.text);
- QTimer::singleShot(0, this, SLOT(slotDelayedShowCodeCompletion()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotDelayedShowCodeCompletion()));
}
}
} else
@@ -755,7 +755,7 @@ void Document::slotCompletionDone( KTextEditor::CompletionEntry completion )
{
m_lastLine = line;
m_lastCol = col - 1;
- QTimer::singleShot(0, this, SLOT(slotDelayedScriptAutoCompletion()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotDelayedScriptAutoCompletion()));
}
}
}
@@ -774,12 +774,12 @@ void Document::slotDelayedShowCodeCompletion()
can filter this completion to allow more intelligent
code compeltions
*/
-void Document::slotFilterCompletion( KTextEditor::CompletionEntry *completion ,QString *string )
+void Document::slotFilterCompletion( KTextEditor::CompletionEntry *completion ,TQString *string )
{
kdDebug(24000) << *string << endl;
kdDebug(24000) << completion->userdata << endl;
int pos = completion->userdata.find("|");
- QString s = completion->userdata.left(pos);
+ TQString s = completion->userdata.left(pos);
completion->userdata.remove(0,pos+1);
string->remove(0, s.length());
kdDebug(24000) << *string << endl;
@@ -789,7 +789,7 @@ void Document::slotFilterCompletion( KTextEditor::CompletionEntry *completion ,Q
*string = completion->userdata;
uint line, col;
viewCursorIf->cursorPositionReal(&line, &col);
- QString s2 = editIf->textLine(line).left(col);
+ TQString s2 = editIf->textLine(line).left(col);
kdDebug(24000) << s2 << endl;
int pos = s2.findRev('&');
if (pos != -1)
@@ -804,8 +804,8 @@ void Document::slotFilterCompletion( KTextEditor::CompletionEntry *completion ,Q
{
uint line, col;
viewCursorIf->cursorPositionReal(&line, &col);
- QString textLine = editIf->textLine(line);
- QChar tagSeparator = completionDTD->tagSeparator;
+ TQString textLine = editIf->textLine(line);
+ TQChar tagSeparator = completionDTD->tagSeparator;
if (tagSeparator == '\'' || tagSeparator =='"')
tagSeparator = qConfig.attrValueQuotation;
if (textLine[col] != tagSeparator)
@@ -813,13 +813,13 @@ void Document::slotFilterCompletion( KTextEditor::CompletionEntry *completion ,Q
} else
if ( completion->type == "attribute" )
{
- string->append("="+QString(qConfig.attrValueQuotation)+QString(qConfig.attrValueQuotation));
+ string->append("="+TQString(qConfig.attrValueQuotation)+TQString(qConfig.attrValueQuotation));
} else
if (completion->type == "doctypeList")
{
s = *string;
string->remove(0, string->length());
- QString s2 = QString("public \""+DTDs::ref()->getDTDNameFromNickName(s)+"\"");
+ TQString s2 = TQString("public \""+DTDs::ref()->getDTDNameFromNickName(s)+"\"");
const DTDStruct *dtd = DTDs::ref()->find(DTDs::ref()->getDTDNameFromNickName(s));
if (dtd && !dtd->url.isEmpty())
{
@@ -842,24 +842,24 @@ void Document::slotReplaceChar()
/** Called when a user types in a character. From this we can show possibile
completions based on what they are trying to input.
*/
-void Document::slotCharactersInserted(int line, int column, const QString& string)
+void Document::slotCharactersInserted(int line, int column, const TQString& string)
{
if (qConfig.replaceNotInEncoding)
{
if (encodingIf)
{
- QString encoding = encodingIf->encoding();
+ TQString encoding = encodingIf->encoding();
if (encoding != m_encoding)
{
m_encoding = encoding;
- m_codec = QTextCodec::codecForName(encoding);
+ m_codec = TQTextCodec::codecForName(encoding);
}
if (!m_codec->canEncode(string[0]))
{
m_replaceLine = line;
m_replaceCol = column;
m_replaceStr = QuantaCommon::encodedChar(string[0].unicode());
- QTimer::singleShot(0, this, SLOT(slotReplaceChar()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotReplaceChar()));
return;
}
}
@@ -872,7 +872,7 @@ void Document::slotCharactersInserted(int line, int column, const QString& strin
m_replaceLine = line;
m_replaceCol = column;
m_replaceStr = QuantaCommon::encodedChar(c);
- QTimer::singleShot(0, this, SLOT(slotReplaceChar()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotReplaceChar()));
return;
}
}
@@ -934,17 +934,17 @@ void Document::slotCharactersInserted(int line, int column, const QString& strin
/** Called whenever a user inputs text in an XML type document.
Returns true if the code completionw as handled.
*/
-bool Document::xmlAutoCompletion(int line, int column, const QString & string)
+bool Document::xmlAutoCompletion(int line, int column, const TQString & string)
{
QTag *tag;
- QString tagName;
+ TQString tagName;
bool handled = false;
tagName = getTagNameAt(line, column);
tag = QuantaCommon::tagFromDTD(completionDTD, tagName);
if (!tag && !tagName.isEmpty())
tag = userTagList.find(tagName.lower());
- QString s = editIf->textLine(line).left(column + 1);
+ TQString s = editIf->textLine(line).left(column + 1);
bool namespacecompletion = false;
if (!tagName.isEmpty() && string ==":" && s.endsWith("<" + tagName + ":"))
namespacecompletion = true;
@@ -983,7 +983,7 @@ bool Document::xmlAutoCompletion(int line, int column, const QString & string)
node = node->parent;
if (node->tag->type == Tag::XmlTag && (!node->next || !QuantaCommon::closesTag(node->tag, node->next->tag)))
{
- QString name = node->tag->name;
+ TQString name = node->tag->name;
name = name.left(name.find(" | "));
if (!node->tag->nameSpace.isEmpty())
name.prepend(node->tag->nameSpace + ":");
@@ -1041,7 +1041,7 @@ bool Document::xmlAutoCompletion(int line, int column, const QString & string)
}
else if ( string == " " )
{
- QString textLine = editIf->textLine(line);
+ TQString textLine = editIf->textLine(line);
if (!QuantaCommon::insideCommentsOrQuotes(column, textLine, completionDTD))
{
showCodeCompletions(getAttributeCompletions(tagName, ""));
@@ -1051,8 +1051,8 @@ bool Document::xmlAutoCompletion(int line, int column, const QString & string)
else if ( string[0] == qConfig.attrValueQuotation )
{
//we need to find the attribute name
- QString textLine = editIf->textLine(line).left(column-1);
- QString attribute = textLine.mid(textLine.findRev(' ')+1);
+ TQString textLine = editIf->textLine(line).left(column-1);
+ TQString attribute = textLine.mid(textLine.findRev(' ')+1);
if (attribute == "style" && completionDTD->insideDTDs.contains("css"))
{
completionDTD = DTDs::ref()->find("text/css");
@@ -1066,7 +1066,7 @@ bool Document::xmlAutoCompletion(int line, int column, const QString & string)
if (!handled)
{
//check if we are inside a style attribute, and use css autocompletion if we are
- QString textLine = editIf->textLine(line);
+ TQString textLine = editIf->textLine(line);
textLine = textLine.left(column);
int pos = textLine.findRev('"');
if (pos != -1)
@@ -1078,7 +1078,7 @@ bool Document::xmlAutoCompletion(int line, int column, const QString & string)
pos = textLine.find('=');
if (pos != -1)
{
- QString attribute = textLine.left(pos);
+ TQString attribute = textLine.left(pos);
if (attribute == "style" && completionDTD->insideDTDs.contains("css"))
{
completionDTD = DTDs::ref()->find("text/css");
@@ -1088,7 +1088,7 @@ bool Document::xmlAutoCompletion(int line, int column, const QString & string)
}
}
}
- QString s = editIf->textLine(line).left(column + 1);
+ TQString s = editIf->textLine(line).left(column + 1);
pos = s.findRev('&');
if (pos != -1)
{
@@ -1102,20 +1102,20 @@ bool Document::xmlAutoCompletion(int line, int column, const QString & string)
}
/** Return a list of possible variable name completions */
-QValueList<KTextEditor::CompletionEntry>* Document::getGroupCompletions(Node *node, const StructTreeGroup& group, int line, int col)
+TQValueList<KTextEditor::CompletionEntry>* Document::getGroupCompletions(Node *node, const StructTreeGroup& group, int line, int col)
{
- QValueList<KTextEditor::CompletionEntry> *completions = new QValueList<KTextEditor::CompletionEntry>();
+ TQValueList<KTextEditor::CompletionEntry> *completions = new TQValueList<KTextEditor::CompletionEntry>();
KTextEditor::CompletionEntry completion;
completion.type = "variable";
- QString textLine = editIf->textLine(line).left(col);
- QString word = findWordRev(textLine);
+ TQString textLine = editIf->textLine(line).left(col);
+ TQString word = findWordRev(textLine);
if (!group.removeFromAutoCompleteWordRx.pattern().isEmpty())
word.remove(group.removeFromAutoCompleteWordRx);
completion.userdata = word + "|";
GroupElementMapList::Iterator it;
- QString str = group.name;
+ TQString str = group.name;
str.append("|");
str.append(word);
for ( it = globalGroupMap.begin(); it != globalGroupMap.end(); ++it )
@@ -1151,7 +1151,7 @@ QValueList<KTextEditor::CompletionEntry>* Document::getGroupCompletions(Node *no
IncludedGroupElementsMap::Iterator it2;
for ( it2 = elements.begin(); it2 != elements.end(); ++it2 )
{
- QStringList list = it2.data()[group.name].keys();
+ TQStringList list = it2.data()[group.name].keys();
list.sort();
for (uint i = 0; i < list.count(); i++)
{
@@ -1167,12 +1167,12 @@ QValueList<KTextEditor::CompletionEntry>* Document::getGroupCompletions(Node *no
return completions;
}
-bool Document::isDerivatedFrom(const QString& className, const QString &baseClass)
+bool Document::isDerivatedFrom(const TQString& className, const TQString &baseClass)
{
if (className.isEmpty() || !completionDTD->classInheritance.contains(className))
return false;
- QString parentClass = completionDTD->classInheritance[className];
+ TQString parentClass = completionDTD->classInheritance[className];
int result = 0;
do {
if (parentClass == baseClass)
@@ -1191,9 +1191,9 @@ bool Document::isDerivatedFrom(const QString& className, const QString &baseClas
/** Return a list of possible tag name completions */
-QValueList<KTextEditor::CompletionEntry>* Document::getTagCompletions(int line, int col)
+TQValueList<KTextEditor::CompletionEntry>* Document::getTagCompletions(int line, int col)
{
- QValueList<KTextEditor::CompletionEntry> *completions = new QValueList<KTextEditor::CompletionEntry>();
+ TQValueList<KTextEditor::CompletionEntry> *completions = new TQValueList<KTextEditor::CompletionEntry>();
KTextEditor::CompletionEntry completion;
switch (completionDTD->family)
{
@@ -1211,10 +1211,10 @@ QValueList<KTextEditor::CompletionEntry>* Document::getTagCompletions(int line,
QTag *parentQTag= 0L;
if (node && node->parent)
parentQTag = QuantaCommon::tagFromDTD(node->parent);
- QString textLine = editIf->textLine(line).left(col);
- QString word = findWordRev(textLine, completionDTD).upper();
- QString classStr = "";
- QString objStr;
+ TQString textLine = editIf->textLine(line).left(col);
+ TQString word = findWordRev(textLine, completionDTD).upper();
+ TQString classStr = "";
+ TQString objStr;
if (completionDTD->classGroupIndex != -1 && completionDTD->objectGroupIndex != -1)
{
textLine = textLine.left(textLine.length() - word.length());
@@ -1222,14 +1222,14 @@ QValueList<KTextEditor::CompletionEntry>* Document::getTagCompletions(int line,
if (pos != -1)
{
textLine = textLine.left(pos);
- QRegExp *r = &(completionDTD->structTreeGroups[completionDTD->classGroupIndex].usageRx);
+ TQRegExp *r = &(completionDTD->structTreeGroups[completionDTD->classGroupIndex].usageRx);
pos = r->searchRev(textLine);
if (pos != -1)
{
objStr = r->cap(1);
if (objStr == "this")
{
- QString parentGroupStr = "";
+ TQString parentGroupStr = "";
bool classFound = false;
parser->synchParseInDetail();
Node *n = parser->nodeAt(line, col);
@@ -1285,12 +1285,12 @@ QValueList<KTextEditor::CompletionEntry>* Document::getTagCompletions(int line,
return completions;
}
completion.userdata = word + "|";
- QStringList tagNameList;
- QMap<QString, QString> comments;
- //A QMap to hold the completion type (function/string/class/etc)
- QMap<QString, QString> type;
- QString tagName;
- QDictIterator<QTag> it(*(completionDTD->tagsList));
+ TQStringList tagNameList;
+ TQMap<TQString, TQString> comments;
+ //A TQMap to hold the completion type (function/string/class/etc)
+ TQMap<TQString, TQString> type;
+ TQString tagName;
+ TQDictIterator<QTag> it(*(completionDTD->tagsList));
int i = 0;
for( ; it.current(); ++it )
{
@@ -1303,7 +1303,7 @@ QValueList<KTextEditor::CompletionEntry>* Document::getTagCompletions(int line,
{
if (!parentQTag || (parentQTag && parentQTag->isChild(tagName)))
{
- tagName = tag->name() + QString("%1").arg(i, 10);
+ tagName = tag->name() + TQString("%1").arg(i, 10);
tagNameList += tagName;
comments.insert(tagName, tag->comment);
i++;
@@ -1312,14 +1312,14 @@ QValueList<KTextEditor::CompletionEntry>* Document::getTagCompletions(int line,
}
}
- QDictIterator<QTag> it2(userTagList);
+ TQDictIterator<QTag> it2(userTagList);
for( ; it2.current(); ++it2 )
{
QTag *tag = it2.current();
if ((tag->className == classStr ||
isDerivatedFrom(classStr, tag->className)) && tag->name().upper().startsWith(word))
{
- tagName = tag->name() + QString("%1").arg(i, 10);
+ tagName = tag->name() + TQString("%1").arg(i, 10);
tagNameList += tagName;
comments.insert(tagName, tag->comment);
@@ -1350,8 +1350,8 @@ QValueList<KTextEditor::CompletionEntry>* Document::getTagCompletions(int line,
// We only want to do this if we are completing Script DTDs
// We are going to use a couple of iterators to sort the list by Type
// Type Sorting is as follows: 0:Other, 1:Variables, 2: Functions (script)
- QValueList<KTextEditor::CompletionEntry>::Iterator otherIt=completions->begin();
- QValueList<KTextEditor::CompletionEntry>::Iterator variableIt=completions->begin();
+ TQValueList<KTextEditor::CompletionEntry>::Iterator otherIt=completions->begin();
+ TQValueList<KTextEditor::CompletionEntry>::Iterator variableIt=completions->begin();
for (uint i = 0; i < tagNameList.count(); i++)
{
if (completionDTD->family == Xml)
@@ -1400,16 +1400,16 @@ QValueList<KTextEditor::CompletionEntry>* Document::getTagCompletions(int line,
}
/** Return a list of valid attributes for the given tag */
-QValueList<KTextEditor::CompletionEntry>* Document::getAttributeCompletions(const QString& tagName, const QString& a_startsWith )
+TQValueList<KTextEditor::CompletionEntry>* Document::getAttributeCompletions(const TQString& tagName, const TQString& a_startsWith )
{
- QValueList<KTextEditor::CompletionEntry> *completions = new QValueList<KTextEditor::CompletionEntry>();
+ TQValueList<KTextEditor::CompletionEntry> *completions = new TQValueList<KTextEditor::CompletionEntry>();
KTextEditor::CompletionEntry completion;
QTag *tag = QuantaCommon::tagFromDTD(completionDTD, tagName);
if (!tag)
{
tag = userTagList.find(tagName.lower());
}
- QString startsWith = a_startsWith.upper();
+ TQString startsWith = a_startsWith.upper();
if (tag)
{
switch (completionDTD->family)
@@ -1421,11 +1421,11 @@ QValueList<KTextEditor::CompletionEntry>* Document::getAttributeCompletions(cons
//list specified attributes for this tag
AttributeList *list = tag->attributes();
- QValueList<KTextEditor::CompletionEntry> tempCompletions;
- QStringList nameList;
+ TQValueList<KTextEditor::CompletionEntry> tempCompletions;
+ TQStringList nameList;
for (uint i = 0; i < list->count(); i++)
{
- QString item = list->at(i)->name;
+ TQString item = list->at(i)->name;
if (item.upper().startsWith(startsWith))
{
completion.text = QuantaCommon::attrCase(item);
@@ -1436,12 +1436,12 @@ QValueList<KTextEditor::CompletionEntry>* Document::getAttributeCompletions(cons
}
//list common attributes for this tag
- for (QStringList::Iterator it = tag->commonGroups.begin(); it != tag->commonGroups.end(); ++it)
+ for (TQStringList::Iterator it = tag->commonGroups.begin(); it != tag->commonGroups.end(); ++it)
{
AttributeList *attrs = tag->parentDTD->commonAttrs->find(*it);
for (uint j = 0; j < attrs->count(); j++)
{
- QString name = attrs->at(j)->name;
+ TQString name = attrs->at(j)->name;
if (name.upper().startsWith(startsWith))
{
completion.text = QuantaCommon::attrCase(name);
@@ -1454,8 +1454,8 @@ QValueList<KTextEditor::CompletionEntry>* Document::getAttributeCompletions(cons
if (tag->name().contains("!doctype",false)) //special case, list all the known document types
{
- QStringList nickNames = DTDs::ref()->nickNameList(true);
- for ( QStringList::Iterator it = nickNames.begin(); it != nickNames.end(); ++it )
+ TQStringList nickNames = DTDs::ref()->nickNameList(true);
+ for ( TQStringList::Iterator it = nickNames.begin(); it != nickNames.end(); ++it )
{
completion.type = "doctypeList";
completion.text = *it;
@@ -1463,11 +1463,11 @@ QValueList<KTextEditor::CompletionEntry>* Document::getAttributeCompletions(cons
nameList.append(completion.text);
}
}
- //below isn't fast, but enough here. May be better with QMap<QString, KTextEditor::CompletionEntry>
+ //below isn't fast, but enough here. May be better with TQMap<TQString, KTextEditor::CompletionEntry>
nameList.sort();
- for ( QStringList::Iterator it = nameList.begin(); it != nameList.end(); ++it )
+ for ( TQStringList::Iterator it = nameList.begin(); it != nameList.end(); ++it )
{
- for (QValueList<KTextEditor::CompletionEntry>::Iterator compIt = tempCompletions.begin(); compIt != tempCompletions.end(); ++compIt)
+ for (TQValueList<KTextEditor::CompletionEntry>::Iterator compIt = tempCompletions.begin(); compIt != tempCompletions.end(); ++compIt)
{
if ( (*compIt).text == *it)
{
@@ -1485,7 +1485,7 @@ QValueList<KTextEditor::CompletionEntry>* Document::getAttributeCompletions(cons
AttributeList *list = tag->attributes();
for (uint i = 0; i < list->count(); i++)
{
- QString item = list->at(i)->name;
+ TQString item = list->at(i)->name;
completion.text = item;
completion.comment = list->at(i)->type;
completions->append( completion );
@@ -1499,21 +1499,21 @@ QValueList<KTextEditor::CompletionEntry>* Document::getAttributeCompletions(cons
}
/** Return a list of valid attribute values for the given tag and attribute */
-QValueList<KTextEditor::CompletionEntry>* Document::getAttributeValueCompletions(const QString& tagName, const QString& attribute, const QString& startsWith )
+TQValueList<KTextEditor::CompletionEntry>* Document::getAttributeValueCompletions(const TQString& tagName, const TQString& attribute, const TQString& startsWith )
{
- QValueList<KTextEditor::CompletionEntry> *completions = new QValueList<KTextEditor::CompletionEntry>();
+ TQValueList<KTextEditor::CompletionEntry> *completions = new TQValueList<KTextEditor::CompletionEntry>();
KTextEditor::CompletionEntry completion;
completion.type = "attributeValue";
completion.userdata = startsWith+"|"+tagName + "," + attribute;
bool deleteValues;
- QStringList *values = tagAttributeValues(completionDTD->name,tagName, attribute, deleteValues);
+ TQStringList *values = tagAttributeValues(completionDTD->name,tagName, attribute, deleteValues);
if (attribute.lower() == "class")
{
if (!values)
{
- values = new QStringList(quantaApp->selectors(tagName));
+ values = new TQStringList(quantaApp->selectors(tagName));
deleteValues = true;
}
} else
@@ -1521,13 +1521,13 @@ QValueList<KTextEditor::CompletionEntry>* Document::getAttributeValueCompletions
{
if (!values)
{
- values = new QStringList(quantaApp->idSelectors());
+ values = new TQStringList(quantaApp->idSelectors());
deleteValues = true;
}
}
if (values)
{
- for ( QStringList::Iterator it = values->begin(); it != values->end(); ++it )
+ for ( TQStringList::Iterator it = values->begin(); it != values->end(); ++it )
{
completion.text = *it;
if (completion.text.startsWith(startsWith))
@@ -1541,7 +1541,7 @@ QValueList<KTextEditor::CompletionEntry>* Document::getAttributeValueCompletions
int andSignPos = startsWith.find('&');
if (andSignPos != -1)
{
- QValueList<KTextEditor::CompletionEntry> *charCompletions = getCharacterCompletions(startsWith.mid(andSignPos + 1));
+ TQValueList<KTextEditor::CompletionEntry> *charCompletions = getCharacterCompletions(startsWith.mid(andSignPos + 1));
*completions += *charCompletions;
delete charCompletions;
}
@@ -1551,10 +1551,10 @@ QValueList<KTextEditor::CompletionEntry>* Document::getAttributeValueCompletions
}
/** Return a list of character completions (like &nbsp; ...) */
-QValueList<KTextEditor::CompletionEntry>* Document::getCharacterCompletions(const QString& startsWith)
+TQValueList<KTextEditor::CompletionEntry>* Document::getCharacterCompletions(const TQString& startsWith)
{
- QValueList<KTextEditor::CompletionEntry> *completions = 0L;
- QMap<QString, KTextEditor::CompletionEntry> completionMap;
+ TQValueList<KTextEditor::CompletionEntry> *completions = 0L;
+ TQMap<TQString, KTextEditor::CompletionEntry> completionMap;
//first search for entities defined in the document
const DTDStruct *dtdDTD = DTDs::ref()->find("dtd");
@@ -1583,18 +1583,18 @@ QValueList<KTextEditor::CompletionEntry>* Document::getCharacterCompletions(cons
}
if (!completions)
- completions = new QValueList<KTextEditor::CompletionEntry>();
+ completions = new TQValueList<KTextEditor::CompletionEntry>();
KTextEditor::CompletionEntry completion;
completion.type = "charCompletion";
//add the entities from the tag files
- QDictIterator<QTag> it(*(completionDTD->tagsList));
+ TQDictIterator<QTag> it(*(completionDTD->tagsList));
for( ; it.current(); ++it )
{
QTag *tag = it.current();
if (tag->type == "entity")
{
- QString tagName = tag->name(true);
+ TQString tagName = tag->name(true);
if (tagName.upper().startsWith(startsWith.upper()) || startsWith.isEmpty())
{
completion.text = tagName;
@@ -1605,22 +1605,22 @@ QValueList<KTextEditor::CompletionEntry>* Document::getCharacterCompletions(cons
}
}
- QValueList<KTextEditor::CompletionEntry> *completions2 = new QValueList<KTextEditor::CompletionEntry>();
- for (QMap<QString, KTextEditor::CompletionEntry>::ConstIterator it = completionMap.constBegin(); it != completionMap.constEnd(); ++it)
+ TQValueList<KTextEditor::CompletionEntry> *completions2 = new TQValueList<KTextEditor::CompletionEntry>();
+ for (TQMap<TQString, KTextEditor::CompletionEntry>::ConstIterator it = completionMap.constBegin(); it != completionMap.constEnd(); ++it)
{
completions2->append(it.data());
}
delete completions;
completions = completions2;
- for ( QStringList::Iterator it = charList.begin(); it != charList.end(); ++it )
+ for ( TQStringList::Iterator it = charList.begin(); it != charList.end(); ++it )
{
completion.text = *it;
int begin = completion.text.find("(&") + 2;
if (begin == 1)
continue;
int length = completion.text.find(";)") - begin + 1;
- QString s = completion.text.mid(begin, length - 1);
+ TQString s = completion.text.mid(begin, length - 1);
completion.text = s + " : " + completion.text.left(begin -2) + " - " + completion.text.mid(begin + length + 1);
if (s.startsWith(startsWith))
{
@@ -1633,13 +1633,13 @@ QValueList<KTextEditor::CompletionEntry>* Document::getCharacterCompletions(cons
}
/** Returns the DTD identifier for the document */
-QString Document::getDTDIdentifier()
+TQString Document::getDTDIdentifier()
{
return dtdName;
}
/** Sets the DTD identifier */
-void Document::setDTDIdentifier(const QString &id)
+void Document::setDTDIdentifier(const TQString &id)
{
dtdName = id.lower();
m_groupsForDTEPs.clear();
@@ -1669,15 +1669,15 @@ const DTDStruct* Document::defaultDTD() const
}
/** Find the DTD name for a part of the document. */
-QString Document::findDTDName(Tag **tag)
+TQString Document::findDTDName(Tag **tag)
{
//Do some magic to find the document type
int endLine = editIf->numLines();
- QString foundText = "";
+ TQString foundText = "";
int pos = 0;
int i = 0;
int line, startPos;
- QString text;
+ TQString text;
do
{
text = editIf->textLine(i);
@@ -1747,7 +1747,7 @@ QString Document::findDTDName(Tag **tag)
}
/** Called whenever a user inputs text in a script type document. */
-bool Document::scriptAutoCompletion(int line, int column, const QString& insertedString)
+bool Document::scriptAutoCompletion(int line, int column, const TQString& insertedString)
{
bool handled = false;
Node *node = parser->nodeAt(line, column);
@@ -1764,17 +1764,17 @@ bool Document::scriptAutoCompletion(int line, int column, const QString& inserte
int bl, bc;
node->tag->beginPos(bl, bc);
- QString s = text(bl, bc, line, column);
+ TQString s = text(bl, bc, line, column);
if (QuantaCommon::insideCommentsOrQuotes(s.length() -1, s, dtd))
return true; //again, nothing to do
- QString s2 = s;
+ TQString s2 = s;
int i = s.length() - 1;
while (i > 0 && s[i].isSpace())
i--;
while (i > 0 && (s[i].isLetterOrNumber() || s[i] == '_' ||
(completionDTD->minusAllowedInWord && s[i] == '-') ) )
i--;
- QString startStr = s.mid(i + 1).stripWhiteSpace();
+ TQString startStr = s.mid(i + 1).stripWhiteSpace();
s = s.left(i + 1);
if (s[i] == completionDTD->attributeSeparator)
{
@@ -1792,26 +1792,26 @@ bool Document::scriptAutoCompletion(int line, int column, const QString& inserte
if ( s[i] == completionDTD->attrAutoCompleteAfter ||
s[i] == completionDTD->attributeSeparator ) //if we need to list the arguments of a function
{
- QString textLine = s.left(i);
- QString word = findWordRev(textLine, completionDTD);
- QValueList<QTag *> tags;
+ TQString textLine = s.left(i);
+ TQString word = findWordRev(textLine, completionDTD);
+ TQValueList<QTag *> tags;
if (!word.isEmpty())
{
tags.append(userTagList.find(word.lower()));
- QDictIterator<QTag> it(*(completionDTD->tagsList));
+ TQDictIterator<QTag> it(*(completionDTD->tagsList));
for( ; it.current(); ++it )
{
if (it.currentKey() == word)
tags.append(it.current());
}
}
- QStringList argList;
- for (QValueList<QTag*>::ConstIterator it = tags.constBegin(); it != tags.constEnd(); ++it)
+ TQStringList argList;
+ for (TQValueList<QTag*>::ConstIterator it = tags.constBegin(); it != tags.constEnd(); ++it)
{
QTag *tag = *it;
if (!tag)
continue;
- QString arguments;
+ TQString arguments;
if (tag->type != "property")
{
for (int i =0; i < tag->attributeCount(); i++)
@@ -1873,7 +1873,7 @@ bool Document::scriptAutoCompletion(int line, int column, const QString& inserte
/** Retrives the text from the specified rectangle. The KTextEditor::EditInterface::text seems to not
work correctly. */
-QString Document::text(int bLine, int bCol, int eLine, int eCol) const
+TQString Document::text(int bLine, int bCol, int eLine, int eCol) const
{
if (bLine > eLine)
{
@@ -1884,7 +1884,7 @@ QString Document::text(int bLine, int bCol, int eLine, int eCol) const
bCol = eCol;
eCol = tmp;
}
- QString t = editIf->textLine(bLine);
+ TQString t = editIf->textLine(bLine);
if (bLine == eLine)
{
return t.mid(bCol, eCol-bCol +1);
@@ -1902,18 +1902,18 @@ QString Document::text(int bLine, int bCol, int eLine, int eCol) const
//TODO: profile which one is used more often and time critical places and use
//that one as the default and call from that one the other version
-QString Document::text(const AreaStruct &area) const
+TQString Document::text(const AreaStruct &area) const
{
return text(area.bLine, area.bCol, area.eLine, area.eCol);
}
-QString Document::find(const QRegExp& regExp, int sLine, int sCol, int& fbLine, int&fbCol, int &feLine, int&feCol)
+TQString Document::find(const TQRegExp& regExp, int sLine, int sCol, int& fbLine, int&fbCol, int &feLine, int&feCol)
{
- QRegExp rx = regExp;
- QString foundText = "";
+ TQRegExp rx = regExp;
+ TQString foundText = "";
int maxLine = editIf->numLines();
- QString textToSearch = text(sLine, sCol, sLine, editIf->lineLength(sLine));
+ TQString textToSearch = text(sLine, sCol, sLine, editIf->lineLength(sLine));
int pos;
int line = sLine;
do
@@ -1936,7 +1936,7 @@ QString Document::find(const QRegExp& regExp, int sLine, int sCol, int& fbLine,
if (pos != -1)
{
foundText = rx.cap();
- QString s = textToSearch.left(pos);
+ TQString s = textToSearch.left(pos);
int linesUntilFound = s.contains("\n");
fbLine = sLine + linesUntilFound;
fbCol = s.length()-s.findRev("\n")-1;
@@ -1965,13 +1965,13 @@ QString Document::find(const QRegExp& regExp, int sLine, int sCol, int& fbLine,
return foundText;
}
-QString Document::findRev(const QRegExp& regExp, int sLine, int sCol, int& fbLine, int&fbCol, int &feLine, int&feCol)
+TQString Document::findRev(const TQRegExp& regExp, int sLine, int sCol, int& fbLine, int&fbCol, int &feLine, int&feCol)
{
- QRegExp rx = regExp;
- QString foundText = "";
+ TQRegExp rx = regExp;
+ TQString foundText = "";
int pos = -1;
int line = sLine;
- QString textToSearch = text(sLine, 0, sLine, sCol);
+ TQString textToSearch = text(sLine, 0, sLine, sCol);
do
{
pos = rx.searchRev(textToSearch);
@@ -2003,7 +2003,7 @@ QString Document::findRev(const QRegExp& regExp, int sLine, int sCol, int& fbLin
if (fbCol < 0) fbCol = 0;
if (feCol < 0) feCol = 0;
/*
- QString s = text(fbLine, fbCol, feLine, feCol);
+ TQString s = text(fbLine, fbCol, feLine, feCol);
if (s != foundText) //debug, error
{
KMessageBox::error(this,"FindRev\nFound: "+foundText+"\nRead: "+s);
@@ -2046,7 +2046,7 @@ void Document::handleCodeCompletion()
/* if (!handled)
{
completionDTD = defaultDTD();
- QString s = text(line, 0, line, col).stripWhiteSpace();
+ TQString s = text(line, 0, line, col).stripWhiteSpace();
if (s.findRev("<") != -1)
{
//showCodeCompletions(getTagCompletions(line, col + 1));
@@ -2078,7 +2078,7 @@ void Document::codeCompletionHintRequested()
completionDTD = currentDTD();
if (completionDTD->family == Script)
{
-// QString textLine = editIf->textLine(line).left(col);
+// TQString textLine = editIf->textLine(line).left(col);
// int pos = textLine.findRev("(");
// int pos2 = textLine.findRev(")");
//if (pos > pos2 )
@@ -2088,13 +2088,13 @@ void Document::codeCompletionHintRequested()
completionRequested = false;
}
-QString Document::currentWord()
+TQString Document::currentWord()
{
uint line, col;
viewCursorIf->cursorPositionReal(&line, &col);
- QString textLine = editIf->textLine(line);
- int startPos = textLine.findRev(QRegExp("\\W"), col);
- int endPos = textLine.find(QRegExp("\\W"), col);
+ TQString textLine = editIf->textLine(line);
+ int startPos = textLine.findRev(TQRegExp("\\W"), col);
+ int endPos = textLine.find(TQRegExp("\\W"), col);
if (startPos == -1)
startPos = 0;
else
@@ -2105,16 +2105,16 @@ QString Document::currentWord()
}
/** Find the word until the first word boundary backwards */
-QString Document::findWordRev(const QString& textToSearch, const DTDStruct *dtd)
+TQString Document::findWordRev(const TQString& textToSearch, const DTDStruct *dtd)
{
- QString t = textToSearch;
+ TQString t = textToSearch;
while (t.endsWith(" "))
t = t.left(t.length()-1);
int startPos = -1;
int pos;
bool end = false;
do{
- pos = t.findRev(QRegExp("\\W"), startPos);
+ pos = t.findRev(TQRegExp("\\W"), startPos);
if (t[pos] == '_' ||
(dtd && dtd->minusAllowedInWord && t[pos] == '-'))
{
@@ -2139,9 +2139,9 @@ bool Document::xmlCodeCompletion(int line, int col)
Tag *tag = node->tag;
int bLine, bCol;
tag->beginPos(bLine, bCol);
- QString s;
+ TQString s;
int index;
- QString tagName = tag->name.section('|', 0, 0).stripWhiteSpace();
+ TQString tagName = tag->name.section('|', 0, 0).stripWhiteSpace();
int nameCol = bCol + tagName.length() + 1;
if (!tag->nameSpace.isEmpty())
nameCol += 1 + tag->nameSpace.length();
@@ -2189,7 +2189,7 @@ bool Document::xmlCodeCompletion(int line, int col)
}
if (!handled)
{
- QString s = editIf->textLine(line).left(col);
+ TQString s = editIf->textLine(line).left(col);
int pos = s.findRev('&');
if (pos != -1)
{
@@ -2214,7 +2214,7 @@ void Document::slotCompletionAborted()
/** Ask for user confirmation if the file was changed outside. */
void Document::checkDirtyStatus()
{
- QString fileName;
+ TQString fileName;
if (url().isLocalFile())
fileName = url().path();
if (m_dirty)
@@ -2222,7 +2222,7 @@ void Document::checkDirtyStatus()
createTempFile();
if (!fileName.isEmpty())
{
- QDateTime modifTime = QFileInfo(fileName).lastModified();
+ TQDateTime modifTime = TQFileInfo(fileName).lastModified();
if (modifTime == m_modifTime)
m_dirty = false;
}
@@ -2230,7 +2230,7 @@ void Document::checkDirtyStatus()
{
if (m_md5sum.isEmpty())
{
- QFile f(fileName);
+ TQFile f(fileName);
if (f.open(IO_ReadOnly))
{
const char* c = "";
@@ -2245,10 +2245,10 @@ void Document::checkDirtyStatus()
{
//check if the file is changed, also by file content. Might help to reduce
//unwanted warning on NFS
- QFile f(fileName);
+ TQFile f(fileName);
if (f.open(IO_ReadOnly))
{
- QString md5sum;
+ TQString md5sum;
const char* c = "";
KMD5 context(c);
context.reset();
@@ -2268,7 +2268,7 @@ void Document::checkDirtyStatus()
{
DirtyDlg *dlg = new DirtyDlg(url().path(), m_tempFileName, false, this);
DirtyDialog *w = static_cast<DirtyDialog*>(dlg->mainWidget());
- QString kompareStr = KStandardDirs::findExe("kompare");
+ TQString kompareStr = KStandardDirs::findExe("kompare");
if (kompareStr.isEmpty())
{
w->buttonCompare->setEnabled(false);
@@ -2279,7 +2279,7 @@ void Document::checkDirtyStatus()
m_doc->setModified(false);
openURL(url());
}
- m_modifTime = QFileInfo(fileName).lastModified();
+ m_modifTime = TQFileInfo(fileName).lastModified();
delete dlg;
}
closeTempFile();
@@ -2292,13 +2292,13 @@ void Document::save()
{
if (url().isLocalFile())
{
- QString fileName;
+ TQString fileName;
fileName = url().path();
fileWatcher->removeFile(fileName);
// kdDebug(24000) << "removeFile[save]: " << fileName << endl;
m_doc->save();
m_dirty = false;
- m_modifTime = QFileInfo(fileName).lastModified();
+ m_modifTime = TQFileInfo(fileName).lastModified();
fileWatcher->addFile(fileName);
// kdDebug(24000) << "addFile[save]: " << fileName << endl;
} else
@@ -2317,7 +2317,7 @@ bool Document::saveAs(const KURL& url)
m_md5sum = "";
if (url.isLocalFile())
{
- QFile f(url.path());
+ TQFile f(url.path());
if (f.open(IO_ReadOnly))
{
const char* c = "";
@@ -2332,7 +2332,7 @@ bool Document::saveAs(const KURL& url)
return result;
}
-void Document::enableGroupsForDTEP(const QString& dtepName, bool enable)
+void Document::enableGroupsForDTEP(const TQString& dtepName, bool enable)
{
if (m_groupsForDTEPs.isEmpty())
m_groupsForDTEPs = m_DTEPList;
@@ -2352,9 +2352,9 @@ void Document::resetGroupsForDTEPList()
}
/** Returns true if the number of " (excluding \") inside text is even. */
-bool Document::evenQuotes(const QString &text)
+bool Document::evenQuotes(const TQString &text)
{
- int num = text.contains(QRegExp("[^\\\\]\""));
+ int num = text.contains(TQRegExp("[^\\\\]\""));
return (num /2 *2 == num);
}
@@ -2367,7 +2367,7 @@ void Document::slotTextChanged()
{
kdDebug(24000) << "Delayed text changed called." << endl;
//delay the handling, otherwise we may get wrong values for (line,column)
- QTimer::singleShot(0, this, SLOT(slotDelayedTextChanged()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotDelayedTextChanged()));
delayedTextChangedEnabled = false;
}
}
@@ -2378,14 +2378,14 @@ void Document::slotDelayedTextChanged(bool forced)
{
kdDebug(24000) << "Reparsing delayed!" << endl;
parser->setParsingNeeded(true);
- QTimer::singleShot(1000, this, SLOT(slotDelayedTextChanged()));
+ TQTimer::singleShot(1000, this, TQT_SLOT(slotDelayedTextChanged()));
reparseEnabled = false;
delayedTextChangedEnabled = false;
return;
}
uint line, column;
- QString oldNodeName = "";
+ TQString oldNodeName = "";
Node *node;
Node *currentNode = 0L; //holds a copy of the node which is at (line,column)
Node *previousNode = 0L;//holds a copy of the node before currentNode
@@ -2441,7 +2441,7 @@ void Document::slotDelayedTextChanged(bool forced)
if (bl == bl2 && bc == bc2 &&
((node->tag->type == Tag::XmlTag && !node->tag->single) || currentNode->tag->type == Tag::XmlTagEnd))
{
- QString newName = node->tag->name;
+ TQString newName = node->tag->name;
bool updateClosing = (currentNode->tag->type == Tag::XmlTag) && !newName.startsWith("!");
int num = 1;
if (!node->tag->nameSpace.isEmpty())
@@ -2517,14 +2517,14 @@ void Document::slotDelayedTextChanged(bool forced)
}
/** Returns list of values for attribute */
-QStringList* Document::tagAttributeValues(const QString& dtdName, const QString& tag, const QString &attribute, bool &deleteResult)
+TQStringList* Document::tagAttributeValues(const TQString& dtdName, const TQString& tag, const TQString &attribute, bool &deleteResult)
{
- QStringList *values = 0L;
+ TQStringList *values = 0L;
deleteResult = true;
const DTDStruct* dtd = DTDs::ref()->find(dtdName);
if (dtd)
{
- QString searchForAttr = (dtd->caseSensitive) ? attribute : attribute.upper();
+ TQString searchForAttr = (dtd->caseSensitive) ? attribute : attribute.upper();
AttributeList* attrs = QuantaCommon::tagAttributes(dtdName, tag);
if (attrs)
{
@@ -2532,17 +2532,17 @@ QStringList* Document::tagAttributeValues(const QString& dtdName, const QString&
KURL u;
KURL base = url();
base.setPath(base.directory(false,false));
- QString s;
+ TQString s;
for ( attr = attrs->first(); attr; attr = attrs->next() )
{
- QString attrName = (dtd->caseSensitive) ? attr->name : attr->name.upper();
+ TQString attrName = (dtd->caseSensitive) ? attr->name : attr->name.upper();
if (attrName == searchForAttr)
{
if (attr->type == "url") {
Project *project = Project::ref();
if (project->hasProject())
{
- values = new QStringList(project->fileNameList());
+ values = new TQStringList(project->fileNameList());
for (uint i = 0; i < values->count(); i++)
{
u = (*values)[i];
@@ -2553,8 +2553,8 @@ QStringList* Document::tagAttributeValues(const QString& dtdName, const QString&
values->append("mailto:" + project->email());
} else
{
- QDir dir = QDir(url().directory());
- values = new QStringList(dir.entryList());
+ TQDir dir = TQDir(url().directory());
+ values = new TQStringList(dir.entryList());
}
break;
} else {
@@ -2590,11 +2590,11 @@ void Document::paste()
}
/** returns all the areas that are between tag and it's closing pair */
-QStringList Document::tagAreas(const QString& tag, bool includeCoordinates, bool skipFoundContent)
+TQStringList Document::tagAreas(const TQString& tag, bool includeCoordinates, bool skipFoundContent)
{
Node *node = baseNode;
int bl, bc, el, ec;
- QStringList result;
+ TQStringList result;
while (node)
{
@@ -2611,10 +2611,10 @@ QStringList Document::tagAreas(const QString& tag, bool includeCoordinates, bool
el = editIf->numLines()-1;
ec = editIf->lineLength(el);
}
- QString s = text(bl, bc, el, ec);
+ TQString s = text(bl, bc, el, ec);
if (includeCoordinates)
{
- s.prepend(QString("%1,%2,%3,%4\n").arg(bl).arg(bc).arg(el).arg(ec));
+ s.prepend(TQString("%1,%2,%3,%4\n").arg(bl).arg(bc).arg(el).arg(ec));
}
result += s;
if (skipFoundContent)
@@ -2647,7 +2647,7 @@ void Document::clearErrorMarks()
{
if (!markIf)
return;
- QPtrList<KTextEditor::Mark> marks = markIf->marks();
+ TQPtrList<KTextEditor::Mark> marks = markIf->marks();
KTextEditor::Mark* mark;
for (mark = marks.first(); mark; mark = marks.next())
{
@@ -2656,12 +2656,12 @@ void Document::clearErrorMarks()
}
}
-QString Document::backupPathEntryValue()
+TQString Document::backupPathEntryValue()
{
return m_backupPathValue;
}
-void Document::setBackupPathEntryValue(const QString& ev)
+void Document::setBackupPathEntryValue(const TQString& ev)
{
m_backupPathValue = ev;
}
@@ -2678,10 +2678,10 @@ void Document::createBackup(KConfig* config)
{
m_backupPathValue = qConfig.backupDirPath + url().fileName() + "." + hashFilePath(url().url());
}
- QString backupPathValueURL = KURL::fromPathOrURL(m_backupPathValue).url();
+ TQString backupPathValueURL = KURL::fromPathOrURL(m_backupPathValue).url();
//the encoding used for the current document
- QString encoding = quantaApp->defaultEncoding();
+ TQString encoding = quantaApp->defaultEncoding();
if (encodingIf)
encoding = encodingIf->encoding();
if (encoding.isEmpty())
@@ -2689,8 +2689,8 @@ void Document::createBackup(KConfig* config)
//creates an entry string in quantarc if it does not exist yet
config->setGroup("General Options");
- QStringList backedupFilesEntryList = QuantaCommon::readPathListEntry(config, "List of backedup files"); //the files that were backedup
- QStringList autosavedFilesEntryList = QuantaCommon::readPathListEntry(config, "List of autosaved files"); //the list of actual backup files inside $KDEHOME/share/apps/quanta/backups
+ TQStringList backedupFilesEntryList = QuantaCommon::readPathListEntry(config, "List of backedup files"); //the files that were backedup
+ TQStringList autosavedFilesEntryList = QuantaCommon::readPathListEntry(config, "List of autosaved files"); //the list of actual backup files inside $KDEHOME/share/apps/quanta/backups
if (!autosavedFilesEntryList.contains(backupPathValueURL)) //not yet backed up, add an entry for this file
{
autosavedFilesEntryList.append(backupPathValueURL);
@@ -2704,11 +2704,11 @@ void Document::createBackup(KConfig* config)
}
//creates a copy of this specific document
- QFile file(m_backupPathValue);
+ TQFile file(m_backupPathValue);
if (file.open(IO_WriteOnly))
{
- QTextStream stream(&file);
- stream.setCodec(QTextCodec::codecForName(encoding));
+ TQTextStream stream(&file);
+ stream.setCodec(TQTextCodec::codecForName(encoding));
stream << editIf->text();
file.close();
}
@@ -2717,13 +2717,13 @@ void Document::createBackup(KConfig* config)
/** if there is no more need for a backup copy then remove it */
void Document::removeBackup(KConfig *config)
{
- QString backupPathValueURL = KURL::fromPathOrURL(m_backupPathValue).url();
+ TQString backupPathValueURL = KURL::fromPathOrURL(m_backupPathValue).url();
config->reparseConfiguration();
config->setGroup("General Options");
- QStringList backedupFilesEntryList = QuantaCommon::readPathListEntry(config, "List of backedup files");
- QStringList autosavedFilesEntryList = QuantaCommon::readPathListEntry(config, "List of autosaved files");
+ TQStringList backedupFilesEntryList = QuantaCommon::readPathListEntry(config, "List of backedup files");
+ TQStringList autosavedFilesEntryList = QuantaCommon::readPathListEntry(config, "List of autosaved files");
autosavedFilesEntryList.remove(backupPathValueURL);
config->writePathEntry("List of autosaved files", autosavedFilesEntryList);
@@ -2731,22 +2731,22 @@ void Document::removeBackup(KConfig *config)
config->writePathEntry("List of backedup files", backedupFilesEntryList);
config->sync();
- if(QFile::exists(m_backupPathValue))
- QFile::remove(m_backupPathValue);
+ if(TQFile::exists(m_backupPathValue))
+ TQFile::remove(m_backupPathValue);
}
/** creates a string by hashing a bit the path string of this document */
-QString Document::hashFilePath(const QString& p)
+TQString Document::hashFilePath(const TQString& p)
{
switch(p.length())
{
case 1: {
int c = int(p[0]);
- return QString::number(c, 10) + "P" + qConfig.quantaPID;
+ return TQString::number(c, 10) + "P" + qConfig.quantaPID;
}
case 2: {
int c = int(p[1]) * 2;
- return QString::number(c, 10) + "P" + qConfig.quantaPID;
+ return TQString::number(c, 10) + "P" + qConfig.quantaPID;
}
default: {
@@ -2759,9 +2759,9 @@ QString Document::hashFilePath(const QString& p)
sign *= -1;
}
if( sum >= 0 )
- return QString::number(sum, 10) + "P" + qConfig.quantaPID;
+ return TQString::number(sum, 10) + "P" + qConfig.quantaPID;
else
- return QString::number(sum*(-1), 10) + "N" + qConfig.quantaPID;
+ return TQString::number(sum*(-1), 10) + "N" + qConfig.quantaPID;
}
}
}
@@ -2793,7 +2793,7 @@ void Document::convertCase()
progressDlg.setLabel(i18n("Changing tag and attribute case. This may take some time, depending on the document complexity."));
progressDlg.setAllowCancel(false);
progressDlg.show();
- kapp->eventLoop()->processEvents( QEventLoop::ExcludeUserInput | QEventLoop::ExcludeSocketNotifiers);
+ kapp->eventLoop()->processEvents( TQEventLoop::ExcludeUserInput | TQEventLoop::ExcludeSocketNotifiers);
KProgress *pBar = progressDlg.progressBar();
pBar->setValue(0);
pBar->setTotalSteps(nodeNum);
@@ -2826,7 +2826,7 @@ void Document::convertCase()
ec = bc + node->tag->name.length();
editIf->removeText(bl, bc, bl, ec);
viewCursorIf->setCursorPositionReal(bl, bc);
- QString newName = node->tag->name;
+ TQString newName = node->tag->name;
if (tagCase == 1)
newName = newName.lower();
else if (tagCase == 2)
@@ -2837,7 +2837,7 @@ void Document::convertCase()
}
if (attrCase != 0)
{
- QString newName;
+ TQString newName;
for (int i = 0; i < node->tag->attrCount(); i++)
{
if(editIfExt)
@@ -2864,18 +2864,18 @@ void Document::convertCase()
}
}
-void Document::open(const KURL &url, const QString &encoding)
+void Document::open(const KURL &url, const TQString &encoding)
{
if (encodingIf)
{
encodingIf->setEncoding(encoding);
m_encoding = encoding;
- m_codec = QTextCodec::codecForName(m_encoding);
+ m_codec = TQTextCodec::codecForName(m_encoding);
}
- connect(m_doc, SIGNAL(completed()), this, SLOT(slotOpeningCompleted()));
- connect(m_doc, SIGNAL(canceled(const QString&)), this, SLOT(slotOpeningFailed(const QString&)));
+ connect(m_doc, TQT_SIGNAL(completed()), this, TQT_SLOT(slotOpeningCompleted()));
+ connect(m_doc, TQT_SIGNAL(canceled(const TQString&)), this, TQT_SLOT(slotOpeningFailed(const TQString&)));
if (!openURL(url))
- slotOpeningFailed(QString::null);
+ slotOpeningFailed(TQString::null);
if (!url.isLocalFile())
{
QExtFileInfo internalFileInfo;
@@ -2888,38 +2888,38 @@ void Document::slotOpeningCompleted()
KURL u = url();
if (!u.isLocalFile())
{
- m_modifTime = QDateTime();
+ m_modifTime = TQDateTime();
qApp->exit_loop();
}
else
{
fileWatcher->addFile(u.path());
- m_modifTime = QFileInfo(u.path()).lastModified();
+ m_modifTime = TQFileInfo(u.path()).lastModified();
// kdDebug(24000) << "addFile[Document::open]: " << u.path() << endl;
}
- disconnect(m_doc, SIGNAL(completed()), this, SLOT(slotOpeningCompleted()));
- disconnect(m_doc, SIGNAL(canceled(const QString&)), this, SLOT(slotOpeningFailed(const QString&)));
+ disconnect(m_doc, TQT_SIGNAL(completed()), this, TQT_SLOT(slotOpeningCompleted()));
+ disconnect(m_doc, TQT_SIGNAL(canceled(const TQString&)), this, TQT_SLOT(slotOpeningFailed(const TQString&)));
m_dirty = false;
m_view->setFocus();
processDTD();
emit openingCompleted(u);
}
-void Document::slotOpeningFailed(const QString &errorMessage)
+void Document::slotOpeningFailed(const TQString &errorMessage)
{
m_md5sum = "";
Q_UNUSED(errorMessage); //TODO: append the error message to our own error message
if (!url().isLocalFile())
qApp->exit_loop();
- disconnect(m_doc, SIGNAL(completed()), this, SLOT(slotOpeningCompleted()));
- disconnect(m_doc, SIGNAL(canceled(const QString&)), this, SLOT(slotOpeningFailed(const QString&)));
+ disconnect(m_doc, TQT_SIGNAL(completed()), this, TQT_SLOT(slotOpeningCompleted()));
+ disconnect(m_doc, TQT_SIGNAL(canceled(const TQString&)), this, TQT_SLOT(slotOpeningFailed(const TQString&)));
emit openingFailed(url());
}
-void Document::processDTD(const QString& documentType)
+void Document::processDTD(const TQString& documentType)
{
- QString foundName;
- QString projectDTD = Project::ref()->defaultDTD();
+ TQString foundName;
+ TQString projectDTD = Project::ref()->defaultDTD();
setDTDIdentifier(projectDTD);
Tag *tag = 0L;
if (documentType.isEmpty())
@@ -2931,8 +2931,8 @@ void Document::processDTD(const QString& documentType)
KDialogBase dlg(this, 0L, true, i18n("DTD Selector"), KDialogBase::Ok | KDialogBase::Cancel);
DTDSelectDialog *dtdWidget = new DTDSelectDialog(&dlg);
dlg.setMainWidget(dtdWidget);
- QStringList lst = DTDs::ref()->nickNameList(true);
- QString foundNickName = DTDs::ref()->getDTDNickNameFromName(foundName);
+ TQStringList lst = DTDs::ref()->nickNameList(true);
+ TQString foundNickName = DTDs::ref()->getDTDNickNameFromName(foundName);
for (uint i = 0; i < lst.count(); i++)
{
dtdWidget->dtdCombo->insertItem(lst[i]);
@@ -2946,14 +2946,14 @@ void Document::processDTD(const QString& documentType)
if (!DTDs::ref()->find(foundName))
{
//try to find the closest matching DTD
- QString s = foundName.lower();
+ TQString s = foundName.lower();
uint spaceNum = s.contains(' ');
- QStringList dtdList = DTDs::ref()->nameList();
- QStringList lastDtdList;
+ TQStringList dtdList = DTDs::ref()->nameList();
+ TQStringList lastDtdList;
for (uint i = 0; i <= spaceNum && !dtdList.empty(); i++)
{
lastDtdList = dtdList;
- QStringList::Iterator strIt = dtdList.begin();
+ TQStringList::Iterator strIt = dtdList.begin();
while (strIt != dtdList.end())
{
if (!(*strIt).startsWith(s.section(' ', 0, i)))
@@ -2969,7 +2969,7 @@ void Document::processDTD(const QString& documentType)
for (uint i = 0; i <= spaceNum && !dtdList.empty(); i++)
{
lastDtdList = dtdList;
- QStringList::Iterator strIt = dtdList.begin();
+ TQStringList::Iterator strIt = dtdList.begin();
while (strIt != dtdList.end())
{
if (!(*strIt).endsWith(s.section(' ', -(i+1), -1)))
@@ -2990,7 +2990,7 @@ void Document::processDTD(const QString& documentType)
// dlg->dtdCombo->insertItem(i18n("Create New DTD Info"));
dtdWidget->messageLabel->setText(i18n("This DTD is not known for Quanta. Choose a DTD or create a new one."));
dtdWidget->currentDTD->setText(DTDs::ref()->getDTDNickNameFromName(foundName));
- QString projectDTDNickName = DTDs::ref()->getDTDNickNameFromName(projectDTD);
+ TQString projectDTDNickName = DTDs::ref()->getDTDNickNameFromName(projectDTD);
for (int i = 0; i < dtdWidget->dtdCombo->count(); i++)
{
if (dtdWidget->dtdCombo->text(i) == projectDTDNickName)
@@ -3021,7 +3021,7 @@ void Document::processDTD(const QString& documentType)
} else //DOCTYPE not found in file
{
KURL u = url();
- QString dtdId = DTDs::ref()->DTDforURL(u)->name;
+ TQString dtdId = DTDs::ref()->DTDforURL(u)->name;
// if (dtdId == "empty")
{
const DTDStruct * dtd = DTDs::ref()->find(projectDTD);
@@ -3052,7 +3052,7 @@ void Document::processDTD(const QString& documentType)
/** Called when a file on the disk has changed. */
-void Document::slotFileDirty(const QString& fileName)
+void Document::slotFileDirty(const TQString& fileName)
{
if ( url().path() == fileName && !dirty() )
{
@@ -3081,7 +3081,7 @@ void Document::resetDTEPs()
m_DTEPList.append(defaultDTD()->name);
}
-void Document::addDTEP(const QString &dtepName)
+void Document::addDTEP(const TQString &dtepName)
{
if (m_DTEPList.contains(dtepName) == 0)
{
@@ -3089,7 +3089,7 @@ void Document::addDTEP(const QString &dtepName)
}
}
-QStringList Document::groupsForDTEPs()
+TQStringList Document::groupsForDTEPs()
{
if (m_groupsForDTEPs.isEmpty())
return m_DTEPList;
@@ -3097,16 +3097,16 @@ QStringList Document::groupsForDTEPs()
return m_groupsForDTEPs;
}
-QString Document::annotationText(uint line)
+TQString Document::annotationText(uint line)
{
- QMap<uint, QPair<QString, QString> >::Iterator it = m_annotations.find(line);
+ TQMap<uint, QPair<TQString, TQString> >::Iterator it = m_annotations.find(line);
if (it != m_annotations.end())
return it.data().first;
else
- return QString::null;
+ return TQString::null;
}
-void Document::setAnnotationText(uint line, const QString& text)
+void Document::setAnnotationText(uint line, const TQString& text)
{
if (text.isEmpty())
{
@@ -3115,16 +3115,16 @@ void Document::setAnnotationText(uint line, const QString& text)
markIf->removeMark(line, KTextEditor::MarkInterface::markType08);
} else
{
- m_annotations.insert(line, qMakePair(text, QString("")));
+ m_annotations.insert(line, qMakePair(text, TQString("")));
if (markIf)
markIf->setMark(line, KTextEditor::MarkInterface::markType08);
uint line, column;
viewCursorIf->cursorPositionReal(&line, &column);
viewCursorIf->setCursorPositionReal(line, 0);
const DTDStruct *dtd = currentDTD(true);
- QString commentBegin = "";
- QString commentEnd = "";
- for (QMap<QString, QString>::ConstIterator it = dtd->comments.constBegin(); it != dtd->comments.constEnd(); ++it)
+ TQString commentBegin = "";
+ TQString commentEnd = "";
+ for (TQMap<TQString, TQString>::ConstIterator it = dtd->comments.constBegin(); it != dtd->comments.constEnd(); ++it)
{
commentBegin = it.key();
commentEnd = it.data();
@@ -3143,15 +3143,15 @@ void Document::setAnnotationText(uint line, const QString& text)
commentEnd = "*/";
}
}
- QString s = "@annotation: " + text;
+ TQString s = "@annotation: " + text;
s.prepend(commentBegin + " ");
s.append(" " + commentEnd + "\n");
insertText(s, true, true);
- emit showAnnotation(line, "", qMakePair(text, QString("")));
+ emit showAnnotation(line, "", qMakePair(text, TQString("")));
}
}
-void Document::addAnnotation(uint line, const QPair<QString, QString>& annotation)
+void Document::addAnnotation(uint line, const QPair<TQString, TQString>& annotation)
{
m_annotations.insert(line, annotation);
if (markIf)
@@ -3163,7 +3163,7 @@ void Document::clearAnnotations()
{
if (markIf)
{
- QPtrList<KTextEditor::Mark> m = markIf->marks();
+ TQPtrList<KTextEditor::Mark> m = markIf->marks();
for (uint i=0; i < m.count(); i++)
markIf->removeMark( m.at(i)->line, KTextEditor::MarkInterface::markType08 );
}
@@ -3175,7 +3175,7 @@ bool Document::openURL(const KURL& url)
m_md5sum = "";
if (url.isLocalFile())
{
- QFile f(url.path());
+ TQFile f(url.path());
if (f.open(IO_ReadOnly))
{
const char* c = "";
diff --git a/quanta/src/document.h b/quanta/src/document.h
index 7b6ef151..ac5e3f84 100644
--- a/quanta/src/document.h
+++ b/quanta/src/document.h
@@ -19,10 +19,10 @@
#define DOCUMENT_H
//qt includes
-#include <qdatetime.h>
-#include <qdict.h>
-#include <qmap.h>
-#include <qwidget.h>
+#include <tqdatetime.h>
+#include <tqdict.h>
+#include <tqmap.h>
+#include <tqwidget.h>
#include <kurl.h>
#include <ktexteditor/markinterfaceextension.h>
@@ -71,39 +71,39 @@ class Document : public QWidget{
public:
Document(KTextEditor::Document *doc,
- QWidget *parent = 0, const char *name = 0, WFlags f=0);
+ TQWidget *parent = 0, const char *name = 0, WFlags f=0);
~Document();
KURL url();
bool isUntitled();
- void setUntitledUrl(const QString &url);
+ void setUntitledUrl(const TQString &url);
/** Returns tag name at specified position */
- QString getTagNameAt(int line, int col );
+ TQString getTagNameAt(int line, int col );
void selectText(int x1, int y1, int x2, int y2 );
- void replaceSelected(const QString &s);
+ void replaceSelected(const TQString &s);
/** insert tag in document */
- void insertTag(const QString &s1, const QString &s2 = QString::null);
+ void insertTag(const TQString &s1, const TQString &s2 = TQString::null);
/** Change the current tag's attributes with those from dict */
- void changeTag(Tag *tag, QDict<QString> *dict );
+ void changeTag(Tag *tag, TQDict<TQString> *dict );
/**Change the attr value of the called attrName to attrValue*/
- void changeTagAttribute(Tag *tag, const QString& attrName, const QString&attrValue);
+ void changeTagAttribute(Tag *tag, const TQString& attrName, const TQString&attrValue);
/**Change the namespace in a tag. Add if it's not present, or remove if the
namespace argument is empty*/
- void changeTagNamespace(Tag *tag, const QString& nameSpace);
+ void changeTagNamespace(Tag *tag, const TQString& nameSpace);
/** Insert the content of the url into the document. */
void insertFile(const KURL& url);
/** Inserts text at the current cursor position */
- void insertText(const QString &text, bool adjustCursor = true, bool reparse = true);
+ void insertText(const TQString &text, bool adjustCursor = true, bool reparse = true);
/** Recursively insert the mandatory childs of tag. Returns true if a child was
inserted.*/
bool insertChildTags(QTag *tag, QTag* lastTag = 0L);
- QPoint getGlobalCursorPos();
- QString find(const QRegExp& rx, int sLine, int sCol, int& fbLine, int&fbCol, int &feLine, int&feCol);
- QString findRev(const QRegExp& rx, int sLine, int sCol, int& fbLine, int&fbCol, int &feLine, int&feCol);
+ TQPoint getGlobalCursorPos();
+ TQString find(const TQRegExp& rx, int sLine, int sCol, int& fbLine, int&fbCol, int &feLine, int&feCol);
+ TQString findRev(const TQRegExp& rx, int sLine, int sCol, int& fbLine, int&fbCol, int &feLine, int&feCol);
/** Get the view of the document */
KTextEditor::View* view();
/** Get the KTextEditor::Document of the document */
@@ -118,24 +118,24 @@ public:
void createTempFile();
/** Closes and removes the temporary file. */
void closeTempFile();
- /** Returns the name of the temporary file, QString::null if no temporary file exists. */
- QString tempFileName();
+ /** Returns the name of the temporary file, TQString::null if no temporary file exists. */
+ TQString tempFileName();
/** Returns the DTD identifier for the document */
- QString getDTDIdentifier();
+ TQString getDTDIdentifier();
/** Sets the DTD identifier */
- void setDTDIdentifier(const QString &id);
+ void setDTDIdentifier(const TQString &id);
/** Get a pointer to the current active DTD. If fallback is true, this always gives back a valid and known DTD pointer: the active, the document specified and in last case the application default document type. */
const DTDStruct* currentDTD(bool fallback = true);
/** Get a pointer to the default DTD (document, or app). */
const DTDStruct* defaultDTD() const;
/** Find the DTD name for a part of the document. */
- QString findDTDName(Tag **tag);
+ TQString findDTDName(Tag **tag);
/** Retrives the text from the specified rectangle. The KTextEditor::EditInterface::text seems to not
work correctly. */
- QString text(int bLine, int bCol, int eLine, int eCol) const;
+ TQString text(int bLine, int bCol, int eLine, int eCol) const;
/** Same as the above, but using AreaStruct as an argument */
- QString text(const AreaStruct &area) const;
+ TQString text(const AreaStruct &area) const;
/** Code completion was requested by the user. */
void codeCompletionRequested();
/** Bring up the code completion tooltip. */
@@ -150,11 +150,11 @@ work correctly. */
/** Save the document under a new name and calculate the new md5sum. */
bool saveAs(const KURL& url);
/** Enable or disable the visibility of groups for a DTEP.*/
- void enableGroupsForDTEP(const QString& dtepName, bool enable = true);
+ void enableGroupsForDTEP(const TQString& dtepName, bool enable = true);
/** Clears the selected DTEP list */
void resetGroupsForDTEPList();
/** Find the word until the first word boundary backwards */
- QString findWordRev(const QString& textToSearch, const DTDStruct *dtd = 0L);
+ TQString findWordRev(const TQString& textToSearch, const DTDStruct *dtd = 0L);
/** Returns the changed status since the last query. Resets changed.*/
bool hasChanged();
/** Sets the changed status.*/
@@ -167,7 +167,7 @@ work correctly. */
bool parserActivated() {return reparseEnabled;}
/** returns all the areas that are between tag and it's closing pair */
- QStringList tagAreas(const QString &tag, bool includeCoordinates, bool skipFoundContent);
+ TQStringList tagAreas(const TQString &tag, bool includeCoordinates, bool skipFoundContent);
/** disable/enable the repaint of the Kate view */
void activateRepaintView(bool activation);
@@ -178,25 +178,25 @@ work correctly. */
void convertCase();
/** returns the word under the cursor */
- QString currentWord();
+ TQString currentWord();
/** Opens the url. The url must be valid and the file pointed to it must exists. */
- void open(const KURL &url, const QString &encoding);
+ void open(const KURL &url, const TQString &encoding);
/**
* Opens a file in the editor part.
* @param url
*/
bool openURL(const KURL& url);
/** Reads the DTD info from the file, tries to find the correct DTD and builds the tag/attribute list from the DTD file. */
- void processDTD(const QString& documentType = QString::null);
+ void processDTD(const TQString& documentType = TQString::null);
/** Resets the list of DTEPs found in the document */
void resetDTEPs();
/** Adds a DTEP to the list of DTEPs present in the document */
- void addDTEP(const QString &dtepName);
+ void addDTEP(const TQString &dtepName);
/** Returns the list of DTEPs that should appear in the structure tree. By default
this is the list of DTEPs present in the document, but the user can turn on/
off them with the help of RMB->Show Groups For in the structure tree */
- QStringList groupsForDTEPs();
+ TQStringList groupsForDTEPs();
bool busy;
@@ -219,17 +219,17 @@ work correctly. */
/** Creates an automatic backup copy for the crash recovering mechanism */
void createBackup(KConfig* config);
/** No descriptions */
- QString backupPathEntryValue();
+ TQString backupPathEntryValue();
/** No descriptions */
- void setBackupPathEntryValue(const QString& ev);
+ void setBackupPathEntryValue(const TQString& ev);
/** Removes automatic backup copies */
void removeBackup(KConfig *config);
/** create a string using document path string */
- static QString hashFilePath(const QString& p);
- QString annotationText(uint line);
- void setAnnotationText(uint line, const QString& text);
- QMap<uint, QPair<QString, QString> > annotations() {return m_annotations;}
- void addAnnotation(uint line, const QPair<QString, QString>& annotation);
+ static TQString hashFilePath(const TQString& p);
+ TQString annotationText(uint line);
+ void setAnnotationText(uint line, const TQString& text);
+ TQMap<uint, QPair<TQString, TQString> > annotations() {return m_annotations;}
+ void addAnnotation(uint line, const QPair<TQString, TQString>& annotation);
void clearAnnotations();
public slots:
@@ -237,9 +237,9 @@ public slots:
/** Called after a completion is inserted */
void slotCompletionDone( KTextEditor::CompletionEntry completion );
/** Called when a user selects a completion, we then can modify it */
- void slotFilterCompletion(KTextEditor::CompletionEntry*,QString *);
+ void slotFilterCompletion(KTextEditor::CompletionEntry*,TQString *);
/** Called whenever a user inputs text */
- void slotCharactersInserted(int ,int ,const QString&);
+ void slotCharactersInserted(int ,int ,const TQString&);
/** Called when the code completion is aborted.*/
void slotCompletionAborted();
/** Called whenever the text in the document is changed. */
@@ -259,44 +259,44 @@ signals:
void breakpointMarked(Document*, int);
void breakpointUnmarked(Document*, int);
- void showAnnotation(uint, const QString&, const QPair<QString, QString>&);
+ void showAnnotation(uint, const TQString&, const QPair<TQString, TQString>&);
private slots:
void slotReplaceChar();
void slotOpeningCompleted();
- void slotOpeningFailed(const QString &errorMessage);
+ void slotOpeningFailed(const TQString &errorMessage);
/** Called when a file on the disk has changed. */
- void slotFileDirty(const QString& fileName);
+ void slotFileDirty(const TQString& fileName);
void slotMarkChanged(KTextEditor::Mark mark, KTextEditor::MarkInterfaceExtension::MarkChangeAction action);
private:
/**
* Finds the beginning of a tag in the document, starting from a position.
* @param position start to look from this position backwards
- * @return the position of the starting character or an empty QPoint if not found
+ * @return the position of the starting character or an empty TQPoint if not found
*/
- QPoint findTagBeginning(const QPoint& position);
- QPoint findTagEnd(const QPoint& position);
+ TQPoint findTagBeginning(const TQPoint& position);
+ TQPoint findTagEnd(const TQPoint& position);
- QMap<uint, QPair<QString, QString> > m_annotations;
- QString untitledUrl;
+ TQMap<uint, QPair<TQString, TQString> > m_annotations;
+ TQString untitledUrl;
int m_replaceLine;
int m_replaceCol;
- QString m_replaceStr;
+ TQString m_replaceStr;
KTextEditor::Document *m_doc;
KTextEditor::View *m_view;
KTempFile *tempFile;
- QString m_tempFileName;
- QDateTime m_modifTime;
+ TQString m_tempFileName;
+ TQDateTime m_modifTime;
/* path of the backup copy file of the document */
- QString m_backupPathValue;
- QString dtdName;
- QString m_encoding;
- QTextCodec *m_codec;
+ TQString m_backupPathValue;
+ TQString dtdName;
+ TQString m_encoding;
+ TQTextCodec *m_codec;
/*The DTD valid in the place where the completion was invoked.*/
const DTDStruct *completionDTD;
@@ -310,42 +310,42 @@ private:
bool delayedTextChangedEnabled;
/** True if the document is dirty (has been modified outside). */
bool m_dirty;
- QString m_md5sum;
+ TQString m_md5sum;
Project *m_project;
/** Parse the document according to this DTD. */
- QStringList m_groupsForDTEPs; ///< The list of the DTEPs for which the groups should appear in the structure tree
- QStringList m_DTEPList; ///< The list of all DTEPs found in the document
+ TQStringList m_groupsForDTEPs; ///< The list of the DTEPs for which the groups should appear in the structure tree
+ TQStringList m_DTEPList; ///< The list of all DTEPs found in the document
//stores the data after an autocompletion. Used when bringing up the
//autocompletion box delayed with the singleshot timer (workaround for
//a bug: the box is not showing up if it is called from slotCompletionDone)
int m_lastLine, m_lastCol;
- QValueList<KTextEditor::CompletionEntry>* m_lastCompletionList;
+ TQValueList<KTextEditor::CompletionEntry>* m_lastCompletionList;
/** Get list of possibile variable name completions */
- QValueList<KTextEditor::CompletionEntry>* getGroupCompletions(Node *node, const StructTreeGroup& groupName, int line, int col);
+ TQValueList<KTextEditor::CompletionEntry>* getGroupCompletions(Node *node, const StructTreeGroup& groupName, int line, int col);
/** Get list of possibile tag name completions */
- QValueList<KTextEditor::CompletionEntry>* getTagCompletions(int line, int col);
+ TQValueList<KTextEditor::CompletionEntry>* getTagCompletions(int line, int col);
/** Get list of possibile tag attribute completions */
- QValueList<KTextEditor::CompletionEntry>* getAttributeCompletions(const QString& tagName,const QString& startsWith=QString::null);
+ TQValueList<KTextEditor::CompletionEntry>* getAttributeCompletions(const TQString& tagName,const TQString& startsWith=TQString::null);
/** Get list of possibile tag attribute value completions */
- QValueList<KTextEditor::CompletionEntry>* getAttributeValueCompletions(const QString& tagName, const QString& attribute, const QString& startsWith=QString::null);
+ TQValueList<KTextEditor::CompletionEntry>* getAttributeValueCompletions(const TQString& tagName, const TQString& attribute, const TQString& startsWith=TQString::null);
/** Get list of possibile completions in normal text input (nt creating a tag) */
- QValueList<KTextEditor::CompletionEntry>* getCharacterCompletions(const QString& starstWith=QString::null);
+ TQValueList<KTextEditor::CompletionEntry>* getCharacterCompletions(const TQString& starstWith=TQString::null);
/** Invoke code completion dialog for XML like tags according to the position (line, col), using DTD dtd. */
bool xmlCodeCompletion(int line, int col);
/** Returns list of values for attribute. If deleteResult is true after the call,
the caller must delete the returned list. */
- QStringList* tagAttributeValues(const QString& dtdName, const QString& tag, const QString& attribute, bool &deleteResult);
+ TQStringList* tagAttributeValues(const TQString& dtdName, const TQString& tag, const TQString& attribute, bool &deleteResult);
/** Brings up list of code completions */
- void showCodeCompletions( QValueList<KTextEditor::CompletionEntry> *completions );
+ void showCodeCompletions( TQValueList<KTextEditor::CompletionEntry> *completions );
/** Called whenever a user inputs text in an XML type document. */
- bool xmlAutoCompletion(int , int , const QString & );
+ bool xmlAutoCompletion(int , int , const TQString & );
/** Called whenever a user inputs text in a script type document. */
- bool scriptAutoCompletion(int line, int col, const QString &insertedString);
+ bool scriptAutoCompletion(int line, int col, const TQString &insertedString);
/** Returns true if the number of " (excluding \") inside text is even. */
- bool evenQuotes(const QString &text);
+ bool evenQuotes(const TQString &text);
void handleCodeCompletion();
- bool isDerivatedFrom(const QString& className, const QString &baseClass);
+ bool isDerivatedFrom(const TQString& className, const TQString &baseClass);
};
#endif
diff --git a/quanta/src/dtds.cpp b/quanta/src/dtds.cpp
index 44fba0ab..9943904a 100644
--- a/quanta/src/dtds.cpp
+++ b/quanta/src/dtds.cpp
@@ -19,11 +19,11 @@
***************************************************************************/
//qt includes
-#include <qfile.h>
+#include <tqfile.h>
#include <qextfileinfo.h>
-#include <qdom.h>
-#include <qcursor.h>
-#include <qtimer.h>
+#include <tqdom.h>
+#include <tqcursor.h>
+#include <tqtimer.h>
// include files for KDE
#include <kapplication.h>
@@ -50,36 +50,36 @@
#include "dtds.h"
/** filename for the desciption of the dtd */
-const QString m_rcFilename("description.rc");
+const TQString m_rcFilename("description.rc");
/**
This constructor reads the dictionary of known dtd's, the attributes and tags will be loaded
on the first access to one dtd.
*/
-DTDs::DTDs(QObject *parent)
- :QObject(parent)
+DTDs::DTDs(TQObject *parent)
+ :TQObject(parent)
{
- connect(this, SIGNAL(hideSplash()), parent, SLOT(slotHideSplash()));
- connect(this, SIGNAL(enableIdleTimer(bool)), parent, SLOT(slotEnableIdleTimer(bool)));
- connect(this, SIGNAL(loadToolbarForDTD(const QString&)), parent, SLOT(slotLoadToolbarForDTD(const QString&)));
+ connect(this, TQT_SIGNAL(hideSplash()), parent, TQT_SLOT(slotHideSplash()));
+ connect(this, TQT_SIGNAL(enableIdleTimer(bool)), parent, TQT_SLOT(slotEnableIdleTimer(bool)));
+ connect(this, TQT_SIGNAL(loadToolbarForDTD(const TQString&)), parent, TQT_SLOT(slotLoadToolbarForDTD(const TQString&)));
// kdDebug(24000) << "dtds::dtds" << endl;
- m_dict = new QDict<DTDStruct>(119, false); //optimized for max 119 DTD. This should be enough.
+ m_dict = new TQDict<DTDStruct>(119, false); //optimized for max 119 DTD. This should be enough.
m_dict->setAutoDelete(true);
- m_doc = new QDomDocument();
+ m_doc = new TQDomDocument();
- QString localKDEdir = KGlobal::instance()->dirs()->localkdedir();
- QStringList tagsResourceDirs = KGlobal::instance()->dirs()->findDirs("appdata", "dtep");
- QStringList tagsDirs;
- QStringList::ConstIterator end = tagsResourceDirs.constEnd();
- for ( QStringList::ConstIterator it = tagsResourceDirs.constBegin(); it != end; ++it )
+ TQString localKDEdir = KGlobal::instance()->dirs()->localkdedir();
+ TQStringList tagsResourceDirs = KGlobal::instance()->dirs()->findDirs("appdata", "dtep");
+ TQStringList tagsDirs;
+ TQStringList::ConstIterator end = tagsResourceDirs.constEnd();
+ for ( TQStringList::ConstIterator it = tagsResourceDirs.constBegin(); it != end; ++it )
{
if ((*it).startsWith(localKDEdir))
{
- QDir dir(*it);
- dir.setFilter(QDir::Dirs);
- QStringList subDirs = dir.entryList();
- QStringList::ConstIterator subitEnd = subDirs.constEnd();
- for ( QStringList::ConstIterator subit = subDirs.constBegin(); subit != subitEnd; ++subit )
+ TQDir dir(*it);
+ dir.setFilter(TQDir::Dirs);
+ TQStringList subDirs = dir.entryList();
+ TQStringList::ConstIterator subitEnd = subDirs.constEnd();
+ for ( TQStringList::ConstIterator subit = subDirs.constBegin(); subit != subitEnd; ++subit )
{
// kdDebug(24000) << "dtds::dtds add:" << *it + *subit+"/" << endl;
if ((*subit != ".") && (*subit != ".."))
@@ -87,15 +87,15 @@ DTDs::DTDs(QObject *parent)
}
}
}
- for ( QStringList::ConstIterator it = tagsResourceDirs.constBegin(); it != end; ++it )
+ for ( TQStringList::ConstIterator it = tagsResourceDirs.constBegin(); it != end; ++it )
{
if (!(*it).startsWith(localKDEdir))
{
- QDir dir(*it);
- dir.setFilter(QDir::Dirs);
- QStringList subDirs = dir.entryList();
- QStringList::ConstIterator subitEnd = subDirs.constEnd();
- for ( QStringList::ConstIterator subit = subDirs.constBegin(); subit != subitEnd; ++subit )
+ TQDir dir(*it);
+ dir.setFilter(TQDir::Dirs);
+ TQStringList subDirs = dir.entryList();
+ TQStringList::ConstIterator subitEnd = subDirs.constEnd();
+ for ( TQStringList::ConstIterator subit = subDirs.constBegin(); subit != subitEnd; ++subit )
{
// kdDebug(24000) << "dtds::dtds add2:" << *it + *subit+"/" << endl;
if ((*subit != ".") && (*subit != ".."))
@@ -104,17 +104,17 @@ DTDs::DTDs(QObject *parent)
}
}
// kdDebug(24000) << tagsDirs.count() << " folders found." << endl;
- QTime t;
+ TQTime t;
t.start();
- QStringList::ConstIterator tagsDirsEnd = tagsDirs.constEnd();
- for ( QStringList::ConstIterator it = tagsDirs.constBegin(); it != tagsDirsEnd; ++it )
+ TQStringList::ConstIterator tagsDirsEnd = tagsDirs.constEnd();
+ for ( TQStringList::ConstIterator it = tagsDirs.constBegin(); it != tagsDirsEnd; ++it )
{
// kdDebug(24000) << "read:" << *it << endl;
readTagDir(*it, false); // read all tags, but only short form
}
kdDebug(24000) << "DTD reading: " << t.elapsed() << endl;
//load the mimetypes from the insideDTDs
- QDictIterator<DTDStruct> it(*m_dict);
+ TQDictIterator<DTDStruct> it(*m_dict);
for( ; it.current(); ++it )
{
DTDStruct * dtd = it.current();
@@ -133,7 +133,7 @@ DTDs::DTDs(QObject *parent)
DTDs::~DTDs()
{
- QDictIterator<DTDStruct> it(*m_dict);
+ TQDictIterator<DTDStruct> it(*m_dict);
for( ; it.current(); ++it )
{
removeDTD (it.current());
@@ -159,15 +159,15 @@ void DTDs::removeDTD(DTDStruct *dtd)
/** Reads the tag files and the description.rc from tagDir in order to
build up the internal DTD and tag structures. */
-bool DTDs::readTagDir(const QString &dirName, bool loadAll)
+bool DTDs::readTagDir(const TQString &dirName, bool loadAll)
{
// kdDebug(24000) << "dtds::readTagDir:" << dirName << " all:" << loadAll << endl;
- QString tmpStr = dirName + m_rcFilename;
- if (!QFile::exists(tmpStr))
+ TQString tmpStr = dirName + m_rcFilename;
+ if (!TQFile::exists(tmpStr))
return false;
KConfig *dtdConfig = new KConfig(tmpStr, true);
dtdConfig->setGroup("General");
- QString dtdName = dtdConfig->readEntry("Name", "Unknown");
+ TQString dtdName = dtdConfig->readEntry("Name", "Unknown");
if (m_dict->find(dtdName.lower()))
{
delete dtdConfig;
@@ -194,14 +194,14 @@ bool DTDs::readTagDir(const QString &dirName, bool loadAll)
//Read the areas that define the areas
dtdConfig->setGroup("Parsing rules");
- QStringList definitionAreaBorders = dtdConfig->readListEntry("AreaBorders");
+ TQStringList definitionAreaBorders = dtdConfig->readListEntry("AreaBorders");
for (uint i = 0; i < definitionAreaBorders.count(); i++)
{
- QStringList tmpStrList = QStringList::split(" ", definitionAreaBorders[i].stripWhiteSpace());
+ TQStringList tmpStrList = TQStringList::split(" ", definitionAreaBorders[i].stripWhiteSpace());
dtd->definitionAreas[tmpStrList[0].stripWhiteSpace()] = tmpStrList[1].stripWhiteSpace();
}
//Read the tags that define this DTD
- QStringList tmpStrList = dtdConfig->readListEntry("Tags");
+ TQStringList tmpStrList = dtdConfig->readListEntry("Tags");
for (uint i = 0; i < tmpStrList.count(); i++)
{
tmpStr = tmpStrList[i].stripWhiteSpace();
@@ -237,9 +237,9 @@ bool DTDs::readTagDir2(DTDStruct *dtd)
{
// kdDebug(24000) << "dtds::readTagDir2:" << dtd->name << " at " << dtd->fileName << endl;
- if (!QFile::exists(dtd->fileName)) return false;
+ if (!TQFile::exists(dtd->fileName)) return false;
- kapp->setOverrideCursor( QCursor(Qt::WaitCursor) );
+ kapp->setOverrideCursor( TQCursor(Qt::WaitCursor) );
KConfig *dtdConfig = new KConfig(dtd->fileName, true);
@@ -269,15 +269,15 @@ bool DTDs::readTagDir2(DTDStruct *dtd)
//read all the tag files
KURL dirURL(dtd->fileName);
dirURL.setFileName("");
- QString dirName = dirURL.path(1);
- if (QFile::exists(dirName + "common.tag"))
+ TQString dirName = dirURL.path(1);
+ if (TQFile::exists(dirName + "common.tag"))
readTagFile(dirName + "common.tag", dtd, 0L);
//bool idleTimerStatus = quantaApp->slotEnableIdleTimer(false);
emit enableIdleTimer(false);
KURL::List files = QExtFileInfo::allFilesRelative(dirURL, "*.tag", 0L);
//quantaApp->slotEnableIdleTimer(idleTimerStatus);
emit enableIdleTimer(true);
- QString tmpStr;
+ TQString tmpStr;
KURL::List::ConstIterator end_f = files.constEnd();
for ( KURL::List::ConstIterator it_f = files.constBegin(); it_f != end_f; ++it_f )
{
@@ -306,15 +306,15 @@ bool DTDs::readTagDir2(DTDStruct *dtd)
//read the extra tags and their attributes
dtdConfig->setGroup("Extra tags");
dtd->defaultAttrType = dtdConfig->readEntry("DefaultAttrType","input");
- QStrList extraTagsList;
+ TQStrList extraTagsList;
dtdConfig->readListEntry("List",extraTagsList);
- QString option;
- QStrList optionsList;
- QStrList attrList;
+ TQString option;
+ TQStrList optionsList;
+ TQStrList attrList;
for (uint i = 0 ; i < extraTagsList.count(); i++)
{
QTag *tag = new QTag();
- tag->setName(QString(extraTagsList.at(i)).stripWhiteSpace());
+ tag->setName(TQString(extraTagsList.at(i)).stripWhiteSpace());
tmpStr = (dtd->caseSensitive) ? tag->name() : tag->name().upper();
if (tagList->find(tmpStr)) //the tag is already defined in a .tag file
@@ -324,11 +324,11 @@ bool DTDs::readTagDir2(DTDStruct *dtd)
}
tag->parentDTD = dtd;
//read the possible stopping tags
- QStrList stoppingTags;
+ TQStrList stoppingTags;
dtdConfig->readListEntry(tag->name() + "_stoppingtags",stoppingTags);
for (uint j = 0; j < stoppingTags.count(); j++)
{
- QString stopTag = QString(stoppingTags.at(j)).stripWhiteSpace();
+ TQString stopTag = TQString(stoppingTags.at(j)).stripWhiteSpace();
if (!dtd->caseSensitive) stopTag = stopTag.upper();
tag->stoppingTags.append(stopTag);
}
@@ -337,14 +337,14 @@ bool DTDs::readTagDir2(DTDStruct *dtd)
dtdConfig->readListEntry(tag->name() + "_options",optionsList);
for (uint j = 0; j < optionsList.count(); j++)
{
- option = QString(optionsList.at(j)).stripWhiteSpace();
- QDictIterator<AttributeList> it(*(dtd->commonAttrs));
+ option = TQString(optionsList.at(j)).stripWhiteSpace();
+ TQDictIterator<AttributeList> it(*(dtd->commonAttrs));
for( ; it.current(); ++it )
{
- tmpStr = "has" + QString(it.currentKey()).stripWhiteSpace();
+ tmpStr = "has" + TQString(it.currentKey()).stripWhiteSpace();
if (option == tmpStr)
{
- tag->commonGroups += QString(it.currentKey()).stripWhiteSpace();
+ tag->commonGroups += TQString(it.currentKey()).stripWhiteSpace();
}
}
if (option == "single")
@@ -361,7 +361,7 @@ bool DTDs::readTagDir2(DTDStruct *dtd)
for (uint j = 0; j < attrList.count(); j++)
{
Attribute* attr = new Attribute;
- attr->name = QString(attrList.at(j)).stripWhiteSpace();
+ attr->name = TQString(attrList.at(j)).stripWhiteSpace();
attr->type = dtd->defaultAttrType;
tag->addAttribute(attr);
delete attr;
@@ -383,7 +383,7 @@ bool DTDs::readTagDir2(DTDStruct *dtd)
dtdConfig->setGroup("Parsing rules");
bool appendCommonRules = dtdConfig->readBoolEntry("AppendCommonSpecialAreas", true);
//Read the special areas and area names
- QString rxStr = "";
+ TQString rxStr = "";
if (dtd->family == Xml && appendCommonRules)
{
dtd->specialAreas["<?xml"] = "?>";
@@ -396,14 +396,14 @@ bool DTDs::readTagDir2(DTDStruct *dtd)
tmpStr = "(<?xml)|(<!--)|(<!)|";
rxStr = QuantaCommon::makeRxCompatible(tmpStr);
}
- QStringList specialAreasList = dtdConfig->readListEntry("SpecialAreas");
- QStringList specialAreaNameList = dtdConfig->readListEntry("SpecialAreaNames");
- QStringList tmpStrList;
+ TQStringList specialAreasList = dtdConfig->readListEntry("SpecialAreas");
+ TQStringList specialAreaNameList = dtdConfig->readListEntry("SpecialAreaNames");
+ TQStringList tmpStrList;
for (uint i = 0; i < specialAreasList.count(); i++)
{
if (!specialAreasList[i].stripWhiteSpace().isEmpty())
{
- tmpStrList = QStringList::split(" ",specialAreasList[i].stripWhiteSpace());
+ tmpStrList = TQStringList::split(" ",specialAreasList[i].stripWhiteSpace());
tmpStr = tmpStrList[0].stripWhiteSpace();
rxStr.append(QuantaCommon::makeRxCompatible(tmpStr)+"|");
dtd->specialAreas[tmpStr] = tmpStrList[1].stripWhiteSpace();
@@ -426,15 +426,15 @@ bool DTDs::readTagDir2(DTDStruct *dtd)
dtd->specialTags[tmpStr.left(pos).stripWhiteSpace()] = tmpStr.mid(pos+1, tmpStr.findRev(')')-pos-1).stripWhiteSpace();
}
- //static const QString quotationStr = "\\\\\"|\\\\'";
+ //static const TQString quotationStr = "\\\\\"|\\\\'";
rxStr = "\\\\\"|\\\\'|";
- QStringList commentsList = dtdConfig->readListEntry("Comments");
+ TQStringList commentsList = dtdConfig->readListEntry("Comments");
if (dtd->family == Xml && appendCommonRules)
commentsList.append("<!-- -->");
- QString tmpStr2;
+ TQString tmpStr2;
for (uint i = 0; i < commentsList.count(); i++)
{
- tmpStrList = QStringList::split(" ",commentsList[i].stripWhiteSpace());
+ tmpStrList = TQStringList::split(" ",commentsList[i].stripWhiteSpace());
tmpStr = tmpStrList[0].stripWhiteSpace();
rxStr += QuantaCommon::makeRxCompatible(tmpStr);
rxStr += "|";
@@ -448,7 +448,7 @@ bool DTDs::readTagDir2(DTDStruct *dtd)
/**** End of code for the new parser *****/
//read the definition of a structure, and the structure keywords
- QStringList structKeywords = dtdConfig->readListEntry("StructKeywords",',');
+ TQStringList structKeywords = dtdConfig->readListEntry("StructKeywords",',');
if (structKeywords.count() !=0 )
{
tmpStr = "\\b(";
@@ -529,11 +529,11 @@ bool DTDs::readTagDir2(DTDStruct *dtd)
if (dtd->family == Script)
{
StructTreeGroup group;
- QRegExp attrRx("\\([^\\)]*\\)");
- QString tagStr;
+ TQRegExp attrRx("\\([^\\)]*\\)");
+ TQString tagStr;
for (uint index = 1; index <= structGroupsCount; index++)
{
- dtdConfig->setGroup(QString("StructGroup_%1").arg(index));
+ dtdConfig->setGroup(TQString("StructGroup_%1").arg(index));
//new code
group.name = dtdConfig->readEntry("Name").stripWhiteSpace();
group.noName = dtdConfig->readEntry("No_Name").stripWhiteSpace();
@@ -579,22 +579,22 @@ bool DTDs::readTagDir2(DTDStruct *dtd)
} else
{
XMLStructGroup group;
- QRegExp attrRx("\\([^\\)]*\\)");
- QString tagName;
+ TQRegExp attrRx("\\([^\\)]*\\)");
+ TQString tagName;
for (uint index = 1; index <= structGroupsCount; index++)
{
- dtdConfig->setGroup(QString("StructGroup_%1").arg(index));
+ dtdConfig->setGroup(TQString("StructGroup_%1").arg(index));
group.name = dtdConfig->readEntry("Name").stripWhiteSpace();
group.noName = dtdConfig->readEntry("No_Name").stripWhiteSpace();
group.icon = dtdConfig->readEntry("Icon").stripWhiteSpace();
group.appendToTags = dtdConfig->readBoolEntry("AppendToTags", false);
group.parentGroup = dtdConfig->readEntry("ParentGroup").stripWhiteSpace();
- QString tagStr = dtdConfig->readEntry("Tag").stripWhiteSpace();
+ TQString tagStr = dtdConfig->readEntry("Tag").stripWhiteSpace();
if (!tagStr.isEmpty())
{
attrRx.search(tagStr);
tmpStr = attrRx.cap();
- tmpStrList = QStringList::split(',', tmpStr.mid(1, tmpStr.length()-2));
+ tmpStrList = TQStringList::split(',', tmpStr.mid(1, tmpStr.length()-2));
tagName = tagStr.left(tagStr.find('(')).lower();
group.attributes.clear();
for (uint i = 0; i < tmpStrList.count(); i++)
@@ -621,11 +621,11 @@ void DTDs::resolveInherited (DTDStruct *dtd)
if (!dtd->inheritsTagsFrom.isEmpty())
{
DTDStruct *parent = (DTDStruct *) find(dtd->inheritsTagsFrom); // this loads the dtd, if not present in memory
- QDictIterator<QTag> tag_it(*(parent->tagsList));
+ TQDictIterator<QTag> tag_it(*(parent->tagsList));
for ( ; tag_it.current(); ++tag_it)
{
QTag *tag = tag_it.current();
- QString searchForTag = (dtd->caseSensitive) ? tag->name() : tag->name().upper();
+ TQString searchForTag = (dtd->caseSensitive) ? tag->name() : tag->name().upper();
if (!dtd->tagsList->find(searchForTag))
{
QTag *newTag = new QTag(*tag);
@@ -636,8 +636,8 @@ void DTDs::resolveInherited (DTDStruct *dtd)
//Read the pseudo DTD area definition strings (special area/tag string)
//from the DTD's which may be present in the DTD (May_Contain setting)
- QMap<QString, QString>::ConstIterator mapIt;
- QString specialAreaStartRxStr = dtd->specialAreaStartRx.pattern();
+ TQMap<TQString, TQString>::ConstIterator mapIt;
+ TQString specialAreaStartRxStr = dtd->specialAreaStartRx.pattern();
if (!specialAreaStartRxStr.isEmpty())
specialAreaStartRxStr += "|";
for (uint i = 0; i < dtd->insideDTDs.count(); i++)
@@ -649,7 +649,7 @@ void DTDs::resolveInherited (DTDStruct *dtd)
{
for (mapIt = insideDTD->definitionAreas.begin(); mapIt != insideDTD->definitionAreas.end(); ++mapIt)
{
- QString tmpStr = mapIt.key();
+ TQString tmpStr = mapIt.key();
dtd->specialAreas[tmpStr] = mapIt.data();
dtd->specialAreaNames[tmpStr] = dtd->insideDTDs[i];
specialAreaStartRxStr.append("(?:" + QuantaCommon::makeRxCompatible(tmpStr) + ")|");
@@ -667,10 +667,10 @@ void DTDs::resolveInherited (DTDStruct *dtd)
/** Reads the tags for the tag files. Returns the number of read tags. */
-uint DTDs::readTagFile(const QString& fileName, DTDStruct* parentDTD, QTagList *tagList)
+uint DTDs::readTagFile(const TQString& fileName, DTDStruct* parentDTD, QTagList *tagList)
{
// kdDebug(24000) << "dtds::readTagFile:" << fileName << endl;
- QFile f(fileName);
+ TQFile f(fileName);
if (! f.exists())
kdError() << "dtds::readTagFile file does not exist:" << fileName << endl;
else
@@ -680,7 +680,7 @@ uint DTDs::readTagFile(const QString& fileName, DTDStruct* parentDTD, QTagList *
kdError() << "dtds::readTagFile unable to open:" << fileName
<< " Status: " << f.status() << endl;
}
- QString errorMsg;
+ TQString errorMsg;
int errorLine, errorCol;
if (!m_doc->setContent( &f, &errorMsg, &errorLine, &errorCol ))
{
@@ -691,16 +691,16 @@ uint DTDs::readTagFile(const QString& fileName, DTDStruct* parentDTD, QTagList *
}
f.close();
- QDomNodeList nodeList = m_doc->elementsByTagName("tag");
+ TQDomNodeList nodeList = m_doc->elementsByTagName("tag");
uint numOfTags = nodeList.count();
for (uint i = 0; i < numOfTags; i++)
{
- QDomNode n = nodeList.item(i);
- QDomElement e = n.toElement();
+ TQDomNode n = nodeList.item(i);
+ TQDomElement e = n.toElement();
if (e.attribute("type") == "class")
{
- QString extends = e.attribute("extends");
- QString name = e.attribute("name");
+ TQString extends = e.attribute("extends");
+ TQString name = e.attribute("name");
if (!name.isEmpty() && !extends.isEmpty())
parentDTD->classInheritance[name] = extends;
continue;
@@ -713,7 +713,7 @@ uint DTDs::readTagFile(const QString& fileName, DTDStruct* parentDTD, QTagList *
setAttributes(&n, tag, common);
if (common)
{
- QString groupName = e.attribute("name");
+ TQString groupName = e.attribute("name");
AttributeList *attrs = tag->attributes();
attrs->setAutoDelete(false);
AttributeList *commonAttrList = new AttributeList; //no need to delete it
@@ -739,27 +739,27 @@ uint DTDs::readTagFile(const QString& fileName, DTDStruct* parentDTD, QTagList *
/**
Parse the dom document and retrieve the tag attributes
*/
-void DTDs::setAttributes(QDomNode *dom, QTag* tag, bool &common)
+void DTDs::setAttributes(TQDomNode *dom, QTag* tag, bool &common)
{
common = false;
Attribute *attr;
- QDomElement el = dom->toElement();
- QString tmpStr;
+ TQDomElement el = dom->toElement();
+ TQString tmpStr;
tmpStr = el.attribute("common");
if ((tmpStr != "1" && tmpStr != "yes")) //in case of common tags, we are not interested in these options
{
if (tag->parentDTD->commonAttrs)
{
- QDictIterator<AttributeList> it(*(tag->parentDTD->commonAttrs));
+ TQDictIterator<AttributeList> it(*(tag->parentDTD->commonAttrs));
for( ; it.current(); ++it )
{
- QString lookForAttr = "has" + QString(it.currentKey()).stripWhiteSpace();
+ TQString lookForAttr = "has" + TQString(it.currentKey()).stripWhiteSpace();
tmpStr = el.attribute(lookForAttr);
if (tmpStr == "1" || tmpStr == "yes")
{
- tag->commonGroups += QString(it.currentKey()).stripWhiteSpace();
+ tag->commonGroups += TQString(it.currentKey()).stripWhiteSpace();
}
}
}
@@ -790,20 +790,20 @@ void DTDs::setAttributes(QDomNode *dom, QTag* tag, bool &common)
{
common = true;
}
- QString attrList;
- for ( QDomNode n = dom->firstChild(); !n.isNull(); n = n.nextSibling() )
+ TQString attrList;
+ for ( TQDomNode n = dom->firstChild(); !n.isNull(); n = n.nextSibling() )
{
tmpStr = n.nodeName();
if (tmpStr == "children")
{
- QDomElement el = n.toElement();
- QDomElement item = el.firstChild().toElement();
+ TQDomElement el = n.toElement();
+ TQDomElement item = el.firstChild().toElement();
while ( !item.isNull() )
{
tmpStr = item.tagName();
if (tmpStr == "child")
{
- QString childTag = item.attribute("name");
+ TQString childTag = item.attribute("name");
if (!tag->parentDTD->caseSensitive)
childTag = childTag.upper();
tag->childTags.insert(childTag, item.attribute("usage") == "required");
@@ -813,13 +813,13 @@ void DTDs::setAttributes(QDomNode *dom, QTag* tag, bool &common)
} else
if (tmpStr == "stoppingtags") //read what tag can act as closing tag
{
- QDomElement el = n.toElement();
- QDomElement item = el.firstChild().toElement();
+ TQDomElement el = n.toElement();
+ TQDomElement item = el.firstChild().toElement();
while ( !item.isNull() )
{
if (item.tagName() == "stoppingtag")
{
- QString stopTag = item.attribute("name");
+ TQString stopTag = item.attribute("name");
if (!tag->parentDTD->caseSensitive)
stopTag = stopTag.upper();
tag->stoppingTags.append(stopTag);
@@ -829,7 +829,7 @@ void DTDs::setAttributes(QDomNode *dom, QTag* tag, bool &common)
} else
if (tmpStr == "attr") //an attribute
{
- QDomElement el = n.toElement();
+ TQDomElement el = n.toElement();
attr = new Attribute;
attr->name = el.attribute("name");
attr->source = el.attribute("source");
@@ -842,9 +842,9 @@ void DTDs::setAttributes(QDomNode *dom, QTag* tag, bool &common)
attr->status = el.attribute("status");
if ( attr->type == "list" ) {
- for ( QDomElement attrEl = el.firstChild().toElement(); !attrEl.isNull(); attrEl = attrEl.nextSibling().toElement() ) {
+ for ( TQDomElement attrEl = el.firstChild().toElement(); !attrEl.isNull(); attrEl = attrEl.nextSibling().toElement() ) {
if ( attrEl.tagName() == "items" ) {
- QDomElement item = attrEl.firstChild().toElement();
+ TQDomElement item = attrEl.firstChild().toElement();
while ( !item.isNull() ) {
attr->values.append( item.text() );
item = item.nextSibling().toElement();
@@ -907,21 +907,21 @@ void DTDs::slotLoadDTD()
DTDParser dtdParser(url, KGlobal::dirs()->saveLocation("data") + resourceDir + "dtep");
if (dtdParser.parse())
{
- QString dirName = dtdParser.dirName();
+ TQString dirName = dtdParser.dirName();
KConfig dtdcfg(dirName + m_rcFilename, true);
dtdcfg.setGroup("General");
- QString dtdName = dtdcfg.readEntry("Name");
- QString nickName = dtdcfg.readEntry("NickName", dtdName);
+ TQString dtdName = dtdcfg.readEntry("Name");
+ TQString nickName = dtdcfg.readEntry("NickName", dtdName);
DTDStruct * dtd = m_dict->find(dtdName) ;
if (dtd &&
- KMessageBox::warningYesNo(0L, i18n("<qt>Do you want to replace the existing <b>%1</b> DTD?</qt>").arg(nickName), QString::null, i18n("Replace"), i18n("Do Not Replace")) == KMessageBox::No)
+ KMessageBox::warningYesNo(0L, i18n("<qt>Do you want to replace the existing <b>%1</b> DTD?</qt>").arg(nickName), TQString::null, i18n("Replace"), i18n("Do Not Replace")) == KMessageBox::No)
{
return;
}
removeDTD(dtd);
if (readTagDir(dirName))
{
- QString family = dtdcfg.readEntry("Family", "1");
+ TQString family = dtdcfg.readEntry("Family", "1");
Document *w = ViewManager::ref()->activeDocument();
if (family == "1" && w &&
KMessageBox::questionYesNo(0L, i18n("<qt>Use the newly loaded <b>%1</b> DTD for the current document?</qt>").arg(nickName), i18n("Change DTD"), i18n("Use"), i18n("Do Not Use")) == KMessageBox::Yes)
@@ -935,18 +935,18 @@ void DTDs::slotLoadDTD()
}
}
-void DTDs::slotLoadDTEP(const QString &_dirName, bool askForAutoload)
+void DTDs::slotLoadDTEP(const TQString &_dirName, bool askForAutoload)
{
- QString dirName = _dirName;
+ TQString dirName = _dirName;
if (!dirName.endsWith("/"))
dirName += "/";
KConfig dtdcfg(dirName + m_rcFilename, true);
dtdcfg.setGroup("General");
- QString dtdName = dtdcfg.readEntry("Name");
- QString nickName = dtdcfg.readEntry("NickName", dtdName);
+ TQString dtdName = dtdcfg.readEntry("Name");
+ TQString nickName = dtdcfg.readEntry("NickName", dtdName);
DTDStruct * dtd = m_dict->find(dtdName) ;
if ( dtd &&
- KMessageBox::warningYesNo(0L, i18n("<qt>Do you want to replace the existing <b>%1</b> DTD?</qt>").arg(nickName), QString::null, i18n("Replace"), i18n("Do Not Replace")) == KMessageBox::No)
+ KMessageBox::warningYesNo(0L, i18n("<qt>Do you want to replace the existing <b>%1</b> DTD?</qt>").arg(nickName), TQString::null, i18n("Replace"), i18n("Do Not Replace")) == KMessageBox::No)
{
return;
}
@@ -956,13 +956,13 @@ void DTDs::slotLoadDTEP(const QString &_dirName, bool askForAutoload)
KMessageBox::error(0L, i18n("<qt>Cannot read the DTEP from <b>%1</b>. Check that the folder contains a valid DTEP (<i>description.rc and *.tag files</i>).</qt>").arg(dirName), i18n("Error Loading DTEP"));
} else
{
- QString family = dtdcfg.readEntry("Family", "1");
- if (askForAutoload && KMessageBox::questionYesNo(0L, i18n("<qt>Autoload the <b>%1</b> DTD in the future?</qt>").arg(nickName), QString::null, i18n("Load"), i18n("Do Not Load")) == KMessageBox::Yes)
+ TQString family = dtdcfg.readEntry("Family", "1");
+ if (askForAutoload && KMessageBox::questionYesNo(0L, i18n("<qt>Autoload the <b>%1</b> DTD in the future?</qt>").arg(nickName), TQString::null, i18n("Load"), i18n("Do Not Load")) == KMessageBox::Yes)
{
KURL src;
src.setPath(dirName);
KURL target;
- QString destDir = KGlobal::dirs()->saveLocation("data") + resourceDir + "dtep/";
+ TQString destDir = KGlobal::dirs()->saveLocation("data") + resourceDir + "dtep/";
target.setPath(destDir + src.fileName());
KIO::copy( src, target, false); //don't care about the result
}
@@ -981,12 +981,12 @@ void DTDs::slotLoadEntities()
{
KDialogBase dlg(0L, "loadentities", true, i18n("Load DTD Entities Into DTEP"), KDialogBase::Ok | KDialogBase::Cancel);
LoadEntityDlgS entitiesWidget(&dlg);
- QStringList lst(DTDs::ref()->nickNameList(true));
+ TQStringList lst(DTDs::ref()->nickNameList(true));
entitiesWidget.targetDTEPCombo->insertStringList(lst);
Document *w = ViewManager::ref()->activeDocument();
if (w)
{
- QString nickName = DTDs::ref()->getDTDNickNameFromName(w->getDTDIdentifier());
+ TQString nickName = DTDs::ref()->getDTDNickNameFromName(w->getDTDIdentifier());
entitiesWidget.targetDTEPCombo->setCurrentItem(lst.findIndex(nickName));
}
dlg.setMainWidget(&entitiesWidget);
@@ -994,7 +994,7 @@ void DTDs::slotLoadEntities()
{
DTDStruct * dtd = m_dict->find(getDTDNameFromNickName(entitiesWidget.targetDTEPCombo->currentText()));
DTDParser dtdParser(KURL::fromPathOrURL(entitiesWidget.sourceDTDRequester->url()), KGlobal::dirs()->saveLocation("data") + resourceDir + "dtep");
- QString dtdDir = QFileInfo(dtd->fileName).dirPath();
+ TQString dtdDir = TQFileInfo(dtd->fileName).dirPath();
if (dtdParser.parse(dtdDir, true))
{
readTagFile(dtdDir + "/entities.tag", dtd, dtd->tagsList);
@@ -1004,9 +1004,9 @@ void DTDs::slotLoadEntities()
/** Returns the DTD name (identifier) corresponding to the DTD's nickname */
-QString DTDs::getDTDNameFromNickName(const QString& nickName)
+TQString DTDs::getDTDNameFromNickName(const TQString& nickName)
{
- QDictIterator<DTDStruct> it(*m_dict);
+ TQDictIterator<DTDStruct> it(*m_dict);
for( ; it.current(); ++it )
{
if (it.current()->nickName.lower() == nickName.lower())
@@ -1018,10 +1018,10 @@ QString DTDs::getDTDNameFromNickName(const QString& nickName)
}
/** returns the known nick names */
-QStringList DTDs::nickNameList(bool topLevelOnly)
+TQStringList DTDs::nickNameList(bool topLevelOnly)
{
- QStringList nickList;
- QDictIterator<DTDStruct> it(*m_dict);
+ TQStringList nickList;
+ TQDictIterator<DTDStruct> it(*m_dict);
for( ; it.current(); ++it )
{
if (!topLevelOnly || it.current()->toplevel)
@@ -1035,10 +1035,10 @@ QStringList DTDs::nickNameList(bool topLevelOnly)
/** returns the known names */
-QStringList DTDs::nameList(bool topLevelOnly)
+TQStringList DTDs::nameList(bool topLevelOnly)
{
- QStringList nameList;
- QDictIterator<DTDStruct> it(*m_dict);
+ TQStringList nameList;
+ TQDictIterator<DTDStruct> it(*m_dict);
for( ; it.current(); ++it )
{
if (!topLevelOnly || it.current()->toplevel)
@@ -1050,10 +1050,10 @@ QStringList DTDs::nameList(bool topLevelOnly)
return nameList;
}
-QStringList DTDs::fileNameList(bool topLevelOnly)
+TQStringList DTDs::fileNameList(bool topLevelOnly)
{
- QStringList nameList;
- QDictIterator<DTDStruct> it(*m_dict);
+ TQStringList nameList;
+ TQDictIterator<DTDStruct> it(*m_dict);
for( ; it.current(); ++it )
{
if (!topLevelOnly || it.current()->toplevel)
@@ -1067,8 +1067,8 @@ QStringList DTDs::fileNameList(bool topLevelOnly)
const DTDStruct * DTDs::DTDforURL(const KURL &url)
{
- QValueList<DTDStruct*> foundList;
- QDictIterator<DTDStruct> it(*m_dict);
+ TQValueList<DTDStruct*> foundList;
+ TQDictIterator<DTDStruct> it(*m_dict);
for( ; it.current(); ++it )
{
if (it.current()->toplevel && canHandle(it.current(), url))
@@ -1080,7 +1080,7 @@ const DTDStruct * DTDs::DTDforURL(const KURL &url)
return find("empty");
else
{
- QString path = url.path();
+ TQString path = url.path();
for (uint i = 0; i < foundList.count(); i++)
{
if (path.endsWith('.' + foundList[i]->defaultExtension))
@@ -1092,7 +1092,7 @@ const DTDStruct * DTDs::DTDforURL(const KURL &url)
bool DTDs::canHandle(const DTDStruct *dtd, const KURL &url)
{
- QString mimetype = KMimeType::findByURL(url)->name();
+ TQString mimetype = KMimeType::findByURL(url)->name();
if (dtd->mimeTypes.contains(mimetype))
return true;
if (url.path().endsWith('.' + dtd->defaultExtension))
diff --git a/quanta/src/dtds.h b/quanta/src/dtds.h
index 1e26f712..a56da5b1 100644
--- a/quanta/src/dtds.h
+++ b/quanta/src/dtds.h
@@ -22,11 +22,11 @@
// application specific includes
#include "qtag.h"
-#include "qobject.h"
-#include "qfile.h"
+#include "tqobject.h"
+#include "tqfile.h"
//qt includes
-#include <qdict.h>
+#include <tqdict.h>
//kde includes
#include <kdebug.h>
@@ -56,7 +56,7 @@ public:
* since this class is a singleton you must use this function to access it
* @return the class pointer
*/
- static DTDs* ref(QObject *parent = 0L)
+ static DTDs* ref(TQObject *parent = 0L)
{
static DTDs *m_ref;
if (!m_ref) m_ref = new DTDs(parent);
@@ -72,7 +72,7 @@ public:
* @param dtdName name of the dtd, will be converted to lowercase inside
* @return the found dtd structure
*/
- const DTDStruct * find (const QString &dtdName)
+ const DTDStruct * find (const TQString &dtdName)
{
// kdDebug(24000) << "dtds::find " << dtdName << endl;
DTDStruct *dtd = m_dict->find(dtdName.lower()) ;
@@ -84,13 +84,13 @@ public:
* @return the name (identifier) to the nickname. If the DTD is not found you get
* nickName back!
*/
- QString getDTDNameFromNickName(const QString& nickName);
+ TQString getDTDNameFromNickName(const TQString& nickName);
/**
* @param name name of the DTD
* @return the nickname to the name. If the DTD is not found you get
* name back!
*/
- QString getDTDNickNameFromName(const QString& name)
+ TQString getDTDNickNameFromName(const TQString& name)
{
DTDStruct *dtd = m_dict->find(name);
if ( dtd )
@@ -106,7 +106,7 @@ public:
* are included
* @return all known nick names
*/
- QStringList nickNameList (bool topLevelOnly=false);
+ TQStringList nickNameList (bool topLevelOnly=false);
/**
* creates a list of all available names
@@ -115,7 +115,7 @@ public:
* are included
* @return all known names
*/
- QStringList nameList (bool topLevelOnly=false);
+ TQStringList nameList (bool topLevelOnly=false);
/**
* creates a list with the path to the description.rc of all available DTEPs
*
@@ -124,7 +124,7 @@ public:
* @return a list with the name and the path to the description.rc of all available DTEPs in form of
* DTEPName | path to description.rc
*/
- QStringList fileNameList (bool topLevelOnly=false);
+ TQStringList fileNameList (bool topLevelOnly=false);
/** finds a dtd for a given url
@@ -153,7 +153,7 @@ public slots:
* the DTEP will be copied to the local resource directory and will be autoloaded on
* startup
*/
- void slotLoadDTEP(const QString& dirName, bool askForAutoLoad);
+ void slotLoadDTEP(const TQString& dirName, bool askForAutoLoad);
/**
* Loads (replaces) the entities for a DTEP.
@@ -170,7 +170,7 @@ signals:
/** Enable/disbale the idle timer*/
void enableIdleTimer(bool);
- void loadToolbarForDTD(const QString&);
+ void loadToolbarForDTD(const TQString&);
private:
@@ -178,7 +178,7 @@ private:
* If you need the class use DTDs::ref() for
* construction and reference
*/
- DTDs(QObject *parent);
+ DTDs(TQObject *parent);
/** Reads the tag files and the description.rc from tagDir in order to
@@ -188,7 +188,7 @@ private:
* @param loadAll true = all information and tags will be loaded now (@ref readTagDir2 will be called)
* @return true = no error
*/
- bool readTagDir(const QString &dirName, bool loadAll=true);
+ bool readTagDir(const TQString &dirName, bool loadAll=true);
/** Reads the tag files and the description.rc from tagDir in order to
* build up the internal DTD and tag structures.
@@ -212,7 +212,7 @@ private:
* @param tagList the list where the tags are inserted
* @return the number of read tags.
*/
- uint readTagFile(const QString& fileName, DTDStruct* parentDTD, QTagList *tagList);
+ uint readTagFile(const TQString& fileName, DTDStruct* parentDTD, QTagList *tagList);
/** Parses the dom document and retrieve the tag attributes
*
@@ -220,7 +220,7 @@ private:
* @param tag the QTag object that will be initialized by using the information in dom
* @param common will be true, if the tag is a just a list of common group attributes
*/
- void setAttributes(QDomNode *dom, QTag* tag, bool &common);
+ void setAttributes(TQDomNode *dom, QTag* tag, bool &common);
/** removes dtd from dictonary and deletes all components
*
* @param dtd the dtd to delete
@@ -228,10 +228,10 @@ private:
void removeDTD(DTDStruct *dtd);
/** helper to read the tag files */
- QDomDocument *m_doc;
+ TQDomDocument *m_doc;
/** dictonary with references to all DTD's in memory */
- QDict<DTDStruct> *m_dict;
+ TQDict<DTDStruct> *m_dict;
};
diff --git a/quanta/src/kqapp.cpp b/quanta/src/kqapp.cpp
index 6e7f02df..1bf2055d 100644
--- a/quanta/src/kqapp.cpp
+++ b/quanta/src/kqapp.cpp
@@ -16,7 +16,7 @@
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, US
*/
-#include <qtimer.h>
+#include <tqtimer.h>
#include <kconfig.h>
#include <kdebug.h>
@@ -41,13 +41,13 @@ QuantaApp *quantaApp = 0L; //global pointer to the main application object
#define SPLASH_PICTURE "quantalogo"
KSplash::KSplash()
- : QFrame( 0L, QString("Quanta")+QUANTA_VERSION,
- QWidget::WStyle_NoBorder | QWidget::WStyle_Customize | WX11BypassWM)
+ : TQFrame( 0L, TQString("Quanta")+QUANTA_VERSION,
+ TQWidget::WStyle_NoBorder | TQWidget::WStyle_Customize | WX11BypassWM)
{
- QPixmap pm( UserIcon(SPLASH_PICTURE) );
+ TQPixmap pm( UserIcon(SPLASH_PICTURE) );
setBackgroundPixmap(pm);
- QRect desk = KGlobalSettings::splashScreenDesktopGeometry();
+ TQRect desk = KGlobalSettings::splashScreenDesktopGeometry();
setGeometry( desk.center().x()-225, desk.center().y()-150, 450, 300 );
setLineWidth(0);
show();
@@ -80,7 +80,7 @@ KQApplication::KQApplication()
KConfig *config = kapp->config();
config->setGroup("General Options");
int mdiMode = config->readNumEntry("MDI mode", KMdi::IDEAlMode);
- QString layout = config->readEntry("Window layout", "Default");
+ TQString layout = config->readEntry("Window layout", "Default");
if (layout == "Default" || args->isSet("resetlayout"))
{
mdiMode = KMdi::IDEAlMode;
@@ -93,8 +93,8 @@ KQApplication::KQApplication()
{
sp = new KSplashScreen(UserIcon(SPLASH_PICTURE));
sp->show();
- connect(quantaApp, SIGNAL(showSplash(bool)), sp, SLOT(setShown(bool)));
- QTimer::singleShot(10*1000, this, SLOT(slotSplashTimeout()));
+ connect(quantaApp, TQT_SIGNAL(showSplash(bool)), sp, TQT_SLOT(setShown(bool)));
+ TQTimer::singleShot(10*1000, this, TQT_SLOT(slotSplashTimeout()));
}
setMainWidget(quantaApp);
slotInit();
@@ -151,7 +151,7 @@ int KQUniqueApplication::newInstance()
KConfig *config = kapp->config();
config->setGroup("General Options");
int mdiMode = config->readNumEntry("MDI mode", KMdi::IDEAlMode);
- QString layout = config->readEntry("Window layout", "Default");
+ TQString layout = config->readEntry("Window layout", "Default");
if (layout == "Default" || args->isSet("resetlayout"))
{
mdiMode = KMdi::IDEAlMode;
@@ -164,8 +164,8 @@ int KQUniqueApplication::newInstance()
{
sp = new KSplashScreen(UserIcon(SPLASH_PICTURE));
sp->show();
- connect(quantaApp, SIGNAL(showSplash(bool)), sp, SLOT(setShown(bool)));
- QTimer::singleShot(10*1000, this, SLOT(slotSplashTimeout()));
+ connect(quantaApp, TQT_SIGNAL(showSplash(bool)), sp, TQT_SLOT(setShown(bool)));
+ TQTimer::singleShot(10*1000, this, TQT_SLOT(slotSplashTimeout()));
}
setMainWidget(quantaApp);
slotInit();
@@ -197,13 +197,13 @@ void KQApplicationPrivate::init()
quantaApp->m_quantaInit->initQuanta();
quantaApp->show();
- QString initialProject;
- QStringList initialFiles;
+ TQString initialProject;
+ TQStringList initialFiles;
for (int i = 0; i < args->count(); i++ )
{
- QString arg = args->url(i).url();
+ TQString arg = args->url(i).url();
- if(arg.findRev(QRegExp(".+\\.webprj")) != -1)
+ if(arg.findRev(TQRegExp(".+\\.webprj")) != -1)
initialProject = arg;
else
initialFiles += arg;
@@ -212,7 +212,7 @@ void KQApplicationPrivate::init()
//recoverCrashed manages the autosaved copies
quantaApp->m_quantaInit->recoverCrashed(initialFiles);
- for(QStringList::Iterator it = initialFiles.begin();it != initialFiles.end();++it)
+ for(TQStringList::Iterator it = initialFiles.begin();it != initialFiles.end();++it)
{
KURL url;
QuantaCommon::setUrl(url, (*it));
diff --git a/quanta/src/kqapp.h b/quanta/src/kqapp.h
index 592d7cbc..1ecda501 100644
--- a/quanta/src/kqapp.h
+++ b/quanta/src/kqapp.h
@@ -19,7 +19,7 @@
#ifndef KQAPPLICATION_H
#define KQAPPLICATION_H
-#include <qframe.h>
+#include <tqframe.h>
#include <kuniqueapplication.h>
class KCmdLineArgs;
diff --git a/quanta/src/main.cpp b/quanta/src/main.cpp
index 39672048..527c9956 100644
--- a/quanta/src/main.cpp
+++ b/quanta/src/main.cpp
@@ -28,11 +28,11 @@
#include <dcopref.h>
// qt includes
-#include <qpixmap.h>
-#include <qnetwork.h>
-#include <qdom.h>
-#include <qfile.h>
-#include <qfileinfo.h>
+#include <tqpixmap.h>
+#include <tqnetwork.h>
+#include <tqdom.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
// app includes
#include "kqapp.h"
@@ -202,8 +202,8 @@ int main(int argc, char *argv[])
KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
for (int i = 0; i < args->count(); i++)
{
- QString s = args->url(i).url();
- DCOPRef("quanta", "WindowManagerIf").call("openFile(QString, int, int)", s, 1, 1); // Activate it
+ TQString s = args->url(i).url();
+ DCOPRef("quanta", "WindowManagerIf").call("openFile(TQString, int, int)", s, 1, 1); // Activate it
}
DCOPRef("quanta", QUANTA_PACKAGE).call("newInstance()");
exit(0);
diff --git a/quanta/src/quanta.cpp b/quanta/src/quanta.cpp
index 596dc7e3..55be7e18 100644
--- a/quanta/src/quanta.cpp
+++ b/quanta/src/quanta.cpp
@@ -18,34 +18,34 @@
#include <time.h>
// include files for QT
-#include <qaction.h>
-#include <qdragobject.h>
-#include <qdir.h>
-#include <qprinter.h>
-#include <qpainter.h>
-#include <qwidgetstack.h>
-#include <qtabwidget.h>
-#include <qfile.h>
-#include <qlineedit.h>
-#include <qcheckbox.h>
-#include <qtabbar.h>
-#include <qradiobutton.h>
-#include <qimage.h>
-#include <qtimer.h>
-#include <qtextcodec.h>
-#include <qtextstream.h>
-#include <qtextedit.h>
-#include <qiodevice.h>
-#include <qcombobox.h>
-#include <qdockarea.h>
-#include <qdom.h>
-#include <qspinbox.h>
-#include <qeventloop.h>
-#include <qfontmetrics.h>
-#include <qclipboard.h>
-#include <qptrlist.h>
-#include <qbuffer.h>
-#include <qdatetime.h>
+#include <tqaction.h>
+#include <tqdragobject.h>
+#include <tqdir.h>
+#include <tqprinter.h>
+#include <tqpainter.h>
+#include <tqwidgetstack.h>
+#include <tqtabwidget.h>
+#include <tqfile.h>
+#include <tqlineedit.h>
+#include <tqcheckbox.h>
+#include <tqtabbar.h>
+#include <tqradiobutton.h>
+#include <tqimage.h>
+#include <tqtimer.h>
+#include <tqtextcodec.h>
+#include <tqtextstream.h>
+#include <tqtextedit.h>
+#include <tqiodevice.h>
+#include <tqcombobox.h>
+#include <tqdockarea.h>
+#include <tqdom.h>
+#include <tqspinbox.h>
+#include <tqeventloop.h>
+#include <tqfontmetrics.h>
+#include <tqclipboard.h>
+#include <tqptrlist.h>
+#include <tqbuffer.h>
+#include <tqdatetime.h>
// include files for KDE
@@ -193,7 +193,7 @@
extern int NN;
-const QString resourceDir = QString(QUANTA_PACKAGE) + "/";
+const TQString resourceDir = TQString(QUANTA_PACKAGE) + "/";
// from kfiledialog.cpp - avoid qt warning in STDERR (~/.xsessionerrors)
static void silenceQToolBar(QtMsgType, const char *){}
@@ -212,10 +212,10 @@ QuantaApp::QuantaApp(int mdiMode) : DCOPObject("WindowManagerIf"), KMdiMainFrm(
m_toolbarList.setAutoDelete(true);
userToolbarsCount = 0;
baseNode = 0L;
- currentToolbarDTD = QString::null;
+ currentToolbarDTD = TQString::null;
m_config=kapp->config();
- idleTimer = new QTimer(this);
- connect(idleTimer, SIGNAL(timeout()), SLOT(slotIdleTimerExpired()));
+ idleTimer = new TQTimer(this);
+ connect(idleTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotIdleTimerExpired()));
m_idleTimerEnabled = true;
qConfig.globalDataDir = KGlobal::dirs()->findResourceDir("data",resourceDir + "toolbar/quantalogo.png");
@@ -226,23 +226,23 @@ QuantaApp::QuantaApp(int mdiMode) : DCOPObject("WindowManagerIf"), KMdiMainFrm(
kdWarning() << i18n("Quanta data files were not found.") << endl;
kdWarning() << i18n("You may have forgotten to run \"make install\", or your KDEDIR, KDEDIRS or PATH are not set correctly.") << endl;
kdWarning() << "***************************************************************************" << endl;
- QTimer::singleShot(20, kapp, SLOT(quit()));
+ TQTimer::singleShot(20, kapp, TQT_SLOT(quit()));
return;
}
qConfig.enableDTDToolbar = true;
// connect up signals from KXXsldbgPart
- connectDCOPSignal(0, 0, "debuggerPositionChangedQString,int)", "newDebuggerPosition(QString,int)", false );
- connectDCOPSignal(0, 0, "editorPositionChanged(QString,int,int)", "newCursorPosition(QString,int,int)", false );
- connectDCOPSignal(0, 0, "openFile(QString,int,int)", "openFile(QString,int,int)", false);
+ connectDCOPSignal(0, 0, "debuggerPositionChangedQString,int)", "newDebuggerPosition(TQString,int)", false );
+ connectDCOPSignal(0, 0, "editorPositionChanged(TQString,int,int)", "newCursorPosition(TQString,int,int)", false );
+ connectDCOPSignal(0, 0, "openFile(TQString,int,int)", "openFile(TQString,int,int)", false);
m_partManager = new KParts::PartManager(this);
// When the manager says the active part changes,
// the builder updates (recreates) the GUI
- connect(m_partManager, SIGNAL(activePartChanged(KParts::Part * )),
- this, SLOT(slotActivePartChanged(KParts::Part * )));
- connect(this, SIGNAL(dockWidgetHasUndocked(KDockWidget *)), this, SLOT(slotDockWidgetHasUndocked(KDockWidget *)));
- connect(tabWidget(), SIGNAL(initiateDrag(QWidget *)), this, SLOT(slotTabDragged(QWidget*)));
+ connect(m_partManager, TQT_SIGNAL(activePartChanged(KParts::Part * )),
+ this, TQT_SLOT(slotActivePartChanged(KParts::Part * )));
+ connect(this, TQT_SIGNAL(dockWidgetHasUndocked(KDockWidget *)), this, TQT_SLOT(slotDockWidgetHasUndocked(KDockWidget *)));
+ connect(tabWidget(), TQT_SIGNAL(initiateDrag(TQWidget *)), this, TQT_SLOT(slotTabDragged(TQWidget*)));
m_oldKTextEditor = 0L;
m_previewToolView = 0L;
@@ -258,7 +258,7 @@ QuantaApp::QuantaApp(int mdiMode) : DCOPObject("WindowManagerIf"), KMdiMainFrm(
m_parserEnabled = true;
cursorLine = 0;
cursorCol = 0;
- emit eventHappened("quanta_start", QDateTime::currentDateTime().toString(Qt::ISODate), QString::null);
+ emit eventHappened("quanta_start", TQDateTime::currentDateTime().toString(Qt::ISODate), TQString::null);
setAcceptDrops(true);
tabWidget()->installEventFilter(this);
}
@@ -276,9 +276,9 @@ QuantaApp::~QuantaApp()
m_newScriptStuff = 0L;
delete m_newDTEPStuff;
m_newDocStuff = 0L;
- // disconnect(m_htmlPart, SIGNAL(destroyed(QObject *)));
- // disconnect(m_htmlPartDoc, SIGNAL(destroyed(QObject *)));
- disconnect(this, SIGNAL(lastChildViewClosed()), ViewManager::ref(), SLOT(slotLastViewClosed()));
+ // disconnect(m_htmlPart, TQT_SIGNAL(destroyed(TQObject *)));
+ // disconnect(m_htmlPartDoc, TQT_SIGNAL(destroyed(TQObject *)));
+ disconnect(this, TQT_SIGNAL(lastChildViewClosed()), ViewManager::ref(), TQT_SLOT(slotLastViewClosed()));
//kdDebug(24000) << "QuantaApp::~QuantaApp" << endl;
#ifdef ENABLE_CVSSERVICE
delete CVSService::ref();
@@ -305,7 +305,7 @@ QuantaApp::~QuantaApp()
KIO::NetAccess::del(KURL().fromPathOrURL(tempDirList.at(i)->name()), this);
}
tempDirList.clear();
- QDictIterator<ToolbarEntry> iter(m_toolbarList);
+ TQDictIterator<ToolbarEntry> iter(m_toolbarList);
ToolbarEntry *p_toolbar;
for( ; iter.current(); ++iter )
{
@@ -316,17 +316,17 @@ QuantaApp::~QuantaApp()
}
m_toolbarList.clear();
- QStringList tmpDirs = KGlobal::dirs()->resourceDirs("tmp");
+ TQStringList tmpDirs = KGlobal::dirs()->resourceDirs("tmp");
tmpDir = tmpDirs[0];
for (uint i = 0; i < tmpDirs.count(); i++)
{
if (tmpDirs[i].contains("kde-"))
tmpDir = tmpDirs[i];
}
- QString infoCss = tmpDir;
+ TQString infoCss = tmpDir;
infoCss += "quanta/info.css";
- QFile::remove(infoCss);
- QDir dir;
+ TQFile::remove(infoCss);
+ TQDir dir;
dir.rmdir(tmpDir + "quanta");
delete dcopSettings;
@@ -336,9 +336,9 @@ QuantaApp::~QuantaApp()
kdDebug(24000) << "Undeleted node objects :" << NN << endl;
}
-void QuantaApp::setTitle(const QString& title)
+void QuantaApp::setTitle(const TQString& title)
{
- QString s = title;
+ TQString s = title;
if (Project::ref()->hasProject())
{
s = Project::ref()->projectName() + " : " + s;
@@ -353,8 +353,8 @@ void QuantaApp::slotFileNew()
void QuantaApp::slotFileOpen()
{
- QString myEncoding = defaultEncoding();
- QString startDir;
+ TQString myEncoding = defaultEncoding();
+ TQString startDir;
Document *w = ViewManager::ref()->activeDocument();
if (w && !w->isUntitled())
startDir = w->url().url();
@@ -367,7 +367,7 @@ void QuantaApp::slotFileOpen()
slotFileOpen(data.URLs, data.encoding);
}
-void QuantaApp::slotFileOpen(const KURL::List &urls, const QString& encoding)
+void QuantaApp::slotFileOpen(const KURL::List &urls, const TQString& encoding)
{
m_doc->blockSignals(true);
m_parserEnabled = false;
@@ -397,12 +397,12 @@ void QuantaApp::slotFileOpen(const KURL &url)
slotFileOpen(url, defaultEncoding());
}
-void QuantaApp::slotFileOpen(const KURL &url, const QString& encoding)
+void QuantaApp::slotFileOpen(const KURL &url, const TQString& encoding)
{
m_doc->openDocument(url, encoding);
}
-void QuantaApp::slotFileOpen(const KURL &url, const QString& encoding, bool readOnly)
+void QuantaApp::slotFileOpen(const KURL &url, const TQString& encoding, bool readOnly)
{
m_doc->openDocument(url, encoding, true, readOnly);
}
@@ -412,7 +412,7 @@ void QuantaApp::slotFileOpenRecent(const KURL &url)
if (!QExtFileInfo::exists(url, true, this))
{
if (KMessageBox::questionYesNo(this,
- i18n("The file %1 does not exist.\n Do you want to remove it from the list?").arg(url.prettyURL(0, KURL::StripFileProtocol)), QString::null, KStdGuiItem::del(), i18n("Keep"))
+ i18n("The file %1 does not exist.\n Do you want to remove it from the list?").arg(url.prettyURL(0, KURL::StripFileProtocol)), TQString::null, KStdGuiItem::del(), i18n("Keep"))
== KMessageBox::Yes)
{
fileRecent->removeURL(url);
@@ -465,7 +465,7 @@ bool QuantaApp::slotFileSaveAs(QuantaView *viewToSave)
}
//FIXME: in katepart changing encoding saves the original file if it was modified, so it's useless in saveas...
-// QString myEncoding = dynamic_cast<KTextEditor::EncodingInterface*>(w->doc())->encoding();
+// TQString myEncoding = dynamic_cast<KTextEditor::EncodingInterface*>(w->doc())->encoding();
bool gotPath = false;
@@ -511,7 +511,7 @@ bool QuantaApp::slotFileSaveAs(QuantaView *viewToSave)
"all/allfiles text/html text/xml application/x-php text/plain", this, i18n("Save File"));
KURL saveUrl = data.URLs[0];
bool found;
- QString encoding = KGlobal::charsets()->codecForName(data.encoding, found)->name();
+ TQString encoding = KGlobal::charsets()->codecForName(data.encoding, found)->name();
KTextEditor::EncodingInterface* encodingIf = dynamic_cast<KTextEditor::EncodingInterface*>(w->doc());
if (encodingIf && encodingIf->encoding() != encoding)
encodingIf->setEncoding(encoding);
@@ -523,12 +523,12 @@ bool QuantaApp::slotFileSaveAs(QuantaView *viewToSave)
{
oldURL = saveUrl;
if (Project::ref()->hasProject() && !Project::ref()->contains(saveUrl) &&
- KMessageBox::Yes == KMessageBox::questionYesNo(0,i18n("<qt>Do you want to add the<br><b>%1</b><br>file to project?</qt>").arg(saveUrl.prettyURL(0, KURL::StripFileProtocol)), QString::null, KStdGuiItem::add(), i18n("Do Not Add"))
+ KMessageBox::Yes == KMessageBox::questionYesNo(0,i18n("<qt>Do you want to add the<br><b>%1</b><br>file to project?</qt>").arg(saveUrl.prettyURL(0, KURL::StripFileProtocol)), TQString::null, KStdGuiItem::add(), i18n("Do Not Add"))
)
{
if (saveUrl.isLocalFile())
{
- QDir dir(saveUrl.path());
+ TQDir dir(saveUrl.path());
saveUrl.setPath(dir.canonicalPath());
}
Project::ref()->insertFile(saveUrl, true);
@@ -558,17 +558,17 @@ void QuantaApp::saveAsTemplate(bool projectTemplate, bool selectionOnly)
int query;
KURL projectTemplateURL;
w->checkDirtyStatus();
- QString localTemplateDir = locateLocal("data", resourceDir + "templates/");
+ TQString localTemplateDir = locateLocal("data", resourceDir + "templates/");
do {
query = KMessageBox::Yes;
if (projectTemplate)
{
- url = KFileDialog::getSaveURL(Project::ref()->templateURL().url(), QString::null, this);
+ url = KFileDialog::getSaveURL(Project::ref()->templateURL().url(), TQString::null, this);
} else
{
- url = KFileDialog::getSaveURL(locateLocal("data", resourceDir + "templates/"), QString::null, this);
+ url = KFileDialog::getSaveURL(locateLocal("data", resourceDir + "templates/"), TQString::null, this);
}
if (url.isEmpty()) return;
@@ -595,10 +595,10 @@ void QuantaApp::saveAsTemplate(bool projectTemplate, bool selectionOnly)
{
KTempFile *tempFile = new KTempFile(tmpDir);
tempFile->setAutoDelete(true);
- QString content;
+ TQString content;
content = w->selectionIf->selection();
- QTextStream stream(tempFile->file());
- stream.setEncoding(QTextStream::UnicodeUTF8);
+ TQTextStream stream(tempFile->file());
+ stream.setEncoding(TQTextStream::UnicodeUTF8);
stream << content;
tempFile->file()->flush();
tempFile->close();
@@ -703,15 +703,15 @@ void QuantaApp::slotEditFindInFiles()
void QuantaApp::slotHelpTip()
{
- KTipDialog::showTip(this, QString::null, true);
+ KTipDialog::showTip(this, TQString::null, true);
}
-void QuantaApp::slotStatusMsg(const QString &msg)
+void QuantaApp::slotStatusMsg(const TQString &msg)
{
statusbarTimer->stop();
statusBar()->changeItem(" " + KStringHandler::cPixelSqueeze(msg, statusBar()->fontMetrics(), progressBar->x() - 20), IDS_STATUS);
statusBar()->repaint();
- kapp->processEvents(QEventLoop::ExcludeUserInput | QEventLoop::ExcludeSocketNotifiers);
+ kapp->processEvents(TQEventLoop::ExcludeUserInput | TQEventLoop::ExcludeSocketNotifiers);
statusbarTimer->start(10000, true);
}
@@ -733,14 +733,14 @@ void QuantaApp::slotRepaintPreview()
KParts::BrowserExtension *browserExtension = KParts::BrowserExtension::childObject(m_htmlPart);
KParts::URLArgs args(true, browserExtension->xOffset(), browserExtension->yOffset());
browserExtension->setURLArgs( args );
- QString encoding = defaultEncoding();
+ TQString encoding = defaultEncoding();
KTextEditor::EncodingInterface* encodingIf = dynamic_cast<KTextEditor::EncodingInterface*>(w->doc());
if (encodingIf)
encoding = encodingIf->encoding();
KURL url;
m_htmlPart->setEncoding(encoding, true);
- QStringList list;
+ TQStringList list;
if (m_noFramesPreview)
{
list = w->tagAreas("frameset", true, true);
@@ -749,19 +749,19 @@ void QuantaApp::slotRepaintPreview()
else
{
m_htmlPart->closeURL();
- QStringList noframearea = w->tagAreas("noframes", false, true);
+ TQStringList noframearea = w->tagAreas("noframes", false, true);
//find the frameset area
int bl, bc, el, ec;
- QStringList l = QStringList::split('\n', list[0], true);
- QStringList coordList = QStringList::split(',', l[0], true);
+ TQStringList l = TQStringList::split('\n', list[0], true);
+ TQStringList coordList = TQStringList::split(',', l[0], true);
bl = coordList[0].toInt();
bc = coordList[1].toInt();
el = coordList[2].toInt();
ec = coordList[3].toInt();
- QString noFramesText = w->text(0,0, bl, bc - 1);
+ TQString noFramesText = w->text(0,0, bl, bc - 1);
noFramesText += noframearea[0];
noFramesText += w->text(el, ec + 1, w->editIf->numLines() - 1, w->editIf->lineLength(w->editIf->numLines() - 1));
- noFramesText.replace(QRegExp("</?noframes[^>]*>", false), "");
+ noFramesText.replace(TQRegExp("</?noframes[^>]*>", false), "");
//kdDebug(24000) << "NOFRAMES: " << noFramesText << endl;
if (w->isUntitled())
m_htmlPart->begin(Project::ref()->projectBaseURL(), xOffset, yOffset);
@@ -779,7 +779,7 @@ void QuantaApp::slotRepaintPreview()
if (!m_noFramesPreview)
{
m_htmlPart->closeURL();
- QString text = w->editIf->text();
+ TQString text = w->editIf->text();
if (text.isEmpty())
{
text = i18n("<center><h3>The current document is empty...</h3></center>");
@@ -798,15 +798,15 @@ void QuantaApp::slotRepaintPreview()
previewURL.setFileName("preview-" + previewURL.fileName());
//save the content to disk, so preview with prefix works
KTempFile *tmpFile = new KTempFile(tmpDir);
- QString tempFileName = QFileInfo(*(tmpFile->file())).filePath();
+ TQString tempFileName = TQFileInfo(*(tmpFile->file())).filePath();
tmpFile->setAutoDelete(true);
- QString encoding = quantaApp->defaultEncoding();
+ TQString encoding = quantaApp->defaultEncoding();
KTextEditor::EncodingInterface* encodingIf = dynamic_cast<KTextEditor::EncodingInterface*>(w->doc());
if (encodingIf)
encoding = encodingIf->encoding();
if (encoding.isEmpty())
encoding = "utf8"; //final fallback
- tmpFile->textStream()->setCodec(QTextCodec::codecForName(encoding));
+ tmpFile->textStream()->setCodec(TQTextCodec::codecForName(encoding));
*(tmpFile->textStream()) << w->editIf->text();
tmpFile->close();
if (!QExtFileInfo::copy(KURL::fromPathOrURL(tempFileName), previewURL, -1, true)) {
@@ -835,7 +835,7 @@ void QuantaApp::slotImageOpen(const KURL& url)
{
slotShowPreviewWidget(true);
WHTMLPart *part = m_htmlPart;
- QString text = "<html>\n<body>\n<div align=\"center\">\n<img src=\"";
+ TQString text = "<html>\n<body>\n<div align=\"center\">\n<img src=\"";
text += url.fileName(); //TODO
text += "\">\n</div>\n</body>\n</html>\n";
part->closeURL();
@@ -865,7 +865,7 @@ void QuantaApp::slotInsertTag(const KURL& url, DirInfo dirInfo)
baseURL.setFileName("");
}
KURL relURL = QExtFileInfo::toRelative(url, baseURL);
- QString urlStr = relURL.url();
+ TQString urlStr = relURL.url();
if (relURL.protocol() == baseURL.protocol())
urlStr = relURL.path();
bool isImage = false;
@@ -875,18 +875,18 @@ void QuantaApp::slotInsertTag(const KURL& url, DirInfo dirInfo)
w->insertTag(dirInfo.preText+urlStr+dirInfo.postText);
} else
{
- QString mimetype = KMimeType::findByURL(url)->name();
+ TQString mimetype = KMimeType::findByURL(url)->name();
if (mimetype.contains("image"))
{
- QString imgFileName;
+ TQString imgFileName;
KIO::NetAccess::download(url, imgFileName, this);
- QImage img(imgFileName);
+ TQImage img(imgFileName);
if (!img.isNull())
{
- QString width,height;
+ TQString width,height;
width.setNum(img.width());
height.setNum(img.height());
- QString imgTag = QuantaCommon::tagCase("<img ");
+ TQString imgTag = QuantaCommon::tagCase("<img ");
imgTag += QuantaCommon::attrCase("src=");
imgTag += QuantaCommon::quoteAttributeValue(urlStr);
imgTag += QuantaCommon::attrCase(" width=");
@@ -904,7 +904,7 @@ void QuantaApp::slotInsertTag(const KURL& url, DirInfo dirInfo)
}
if (!isImage)
{
- QString tag = QuantaCommon::tagCase("<a ");
+ TQString tag = QuantaCommon::tagCase("<a ");
tag += QuantaCommon::attrCase("href=");
tag += QuantaCommon::quoteAttributeValue(urlStr);
tag += ">";
@@ -955,14 +955,14 @@ void QuantaApp::slotOptionsConfigureKeys()
{
Document *w = ViewManager::ref()->activeDocument();
KKeyDialog dlg( false, this );
- QPtrList<KXMLGUIClient> toolbarGuiClients;
- QDictIterator<ToolbarEntry> iter(m_toolbarList);
+ TQPtrList<KXMLGUIClient> toolbarGuiClients;
+ TQDictIterator<ToolbarEntry> iter(m_toolbarList);
for( ; iter.current(); ++iter )
{
toolbarGuiClients.append(iter.current()->guiClient);
}
- QPtrList<KXMLGUIClient> clients = guiFactory()->clients();
- for( QPtrListIterator<KXMLGUIClient> it( clients );
+ TQPtrList<KXMLGUIClient> clients = guiFactory()->clients();
+ for( TQPtrListIterator<KXMLGUIClient> it( clients );
it.current(); ++it )
{
if (toolbarGuiClients.contains(*it) <= 0) //no need to insert the collections of the toolbars as they are present in the main actionCollection
@@ -972,9 +972,9 @@ void QuantaApp::slotOptionsConfigureKeys()
{
// this is needed for when we have multiple embedded kateparts and change one of them.
// it also needs to be done to their views, as they too have actioncollections to update
- if (const QPtrList<KParts::Part> * partlist = m_partManager->parts())
+ if (const TQPtrList<KParts::Part> * partlist = m_partManager->parts())
{
- QPtrListIterator<KParts::Part> it(*partlist);
+ TQPtrListIterator<KParts::Part> it(*partlist);
while (KParts::Part* part = it.current())
{
if (KTextEditor::Document *doc = dynamic_cast<KTextEditor::Document*>(part))
@@ -990,8 +990,8 @@ void QuantaApp::slotOptionsConfigureKeys()
}
doc->reloadXML();
- QPtrList<KTextEditor::View> const & list = doc->views();
- QPtrListIterator<KTextEditor::View> itt( list );
+ TQPtrList<KTextEditor::View> const & list = doc->views();
+ TQPtrListIterator<KTextEditor::View> itt( list );
while (KTextEditor::View * view = itt.current())
{
if (!w || w->view() != view)
@@ -1010,10 +1010,10 @@ void QuantaApp::slotOptionsConfigureKeys()
}
}
- QDomDocument doc;
+ TQDomDocument doc;
doc.setContent(KXMLGUIFactory::readConfigFile(xmlFile(), instance()));
- QDomNodeList nodeList = doc.elementsByTagName("ActionProperties");
- QDomNode node = nodeList.item(0).firstChild();
+ TQDomNodeList nodeList = doc.elementsByTagName("ActionProperties");
+ TQDomNode node = nodeList.item(0).firstChild();
while (!node.isNull())
{
if (node.nodeName() == "Action")
@@ -1022,7 +1022,7 @@ void QuantaApp::slotOptionsConfigureKeys()
if (action)
{
action->setModified(true);
- QDomElement el = action->data();
+ TQDomElement el = action->data();
el.setAttribute("shortcut", action->shortcut().toString());
el = node.toElement();
node = node.nextSibling();
@@ -1036,10 +1036,10 @@ void QuantaApp::slotOptionsConfigureKeys()
}
}
-void QuantaApp::slotConfigureToolbars(const QString& defaultToolbar)
+void QuantaApp::slotConfigureToolbars(const TQString& defaultToolbar)
{
currentPageIndex = ToolbarTabWidget::ref()->currentPageIndex();
- QDomNodeList nodeList;
+ TQDomNodeList nodeList;
ToolbarEntry *p_toolbar = 0L;
saveMainWindowSettings(KGlobal::config(), autoSaveGroup());
@@ -1065,7 +1065,7 @@ void QuantaApp::slotConfigureToolbars(const QString& defaultToolbar)
}
}
ToolbarTabWidget *tb = ToolbarTabWidget::ref();
- QString toolbarId;
+ TQString toolbarId;
for (int i = 0; i < tb->count(); i++)
{
toolbarId = tb->id(i);
@@ -1077,12 +1077,12 @@ void QuantaApp::slotConfigureToolbars(const QString& defaultToolbar)
}
}
- connect(dlg, SIGNAL(newToolbarConfig()), SLOT(slotNewToolbarConfig()));
+ connect(dlg, TQT_SIGNAL(newToolbarConfig()), TQT_SLOT(slotNewToolbarConfig()));
dlg->exec();
delete dlg;
- QPopupMenu *menu = 0L;
- m_tagsMenu = static_cast<QPopupMenu*>(factory()->container("tags", this));
- QString toolbarName;
+ TQPopupMenu *menu = 0L;
+ m_tagsMenu = static_cast<TQPopupMenu*>(factory()->container("tags", this));
+ TQString toolbarName;
for (int i = 0; i < tb->count(); i++)
{
toolbarName = tb->label(i);
@@ -1090,7 +1090,7 @@ void QuantaApp::slotConfigureToolbars(const QString& defaultToolbar)
p_toolbar = quantaApp->m_toolbarList[toolbarId];
if (p_toolbar)
{
- menu = new QPopupMenu(m_tagsMenu);
+ menu = new TQPopupMenu(m_tagsMenu);
nodeList = p_toolbar->guiClient->domDocument().elementsByTagName("Action");
for (uint i = 0; i < nodeList.count(); i++)
{
@@ -1105,7 +1105,7 @@ void QuantaApp::slotConfigureToolbars(const QString& defaultToolbar)
}
//add back the menus
- m_pluginInterface->setPluginMenu(static_cast<QPopupMenu*>(factory()->container("plugins", this)));
+ m_pluginInterface->setPluginMenu(static_cast<TQPopupMenu*>(factory()->container("plugins", this)));
m_pluginInterface->buildPluginMenu();
for (uint i = 0 ; i < mb->count(); i++)
{
@@ -1161,8 +1161,8 @@ void QuantaApp::slotOptions()
KDialogBase::Ok, this, "tabdialog");
// Tag Style options
- QVBox *page=kd->addVBoxPage(i18n("Tag Style"), QString::null, BarIcon("kwrite", KIcon::SizeMedium));
- StyleOptionsS *styleOptionsS = new StyleOptionsS( (QWidget *)page);
+ TQVBox *page=kd->addVBoxPage(i18n("Tag Style"), TQString::null, BarIcon("kwrite", KIcon::SizeMedium));
+ StyleOptionsS *styleOptionsS = new StyleOptionsS( (TQWidget *)page);
styleOptionsS->tagCase->setCurrentItem( qConfig.tagCase);
styleOptionsS->attributeCase->setCurrentItem( qConfig.attrCase);
@@ -1175,8 +1175,8 @@ void QuantaApp::slotOptions()
// Environment options
//TODO FileMasks name is not good anymore
- page=kd->addVBoxPage(i18n("Environment"), QString::null, UserIcon("files", KIcon::SizeMedium ) );
- FileMasks *fileMasks = new FileMasks((QWidget *)page);
+ page=kd->addVBoxPage(i18n("Environment"), TQString::null, UserIcon("files", KIcon::SizeMedium ) );
+ FileMasks *fileMasks = new FileMasks((TQWidget *)page);
fileMasks->lineMarkup->setText( qConfig.markupMimeTypes );
fileMasks->lineScript->setText( qConfig.scriptMimeTypes );
@@ -1191,9 +1191,9 @@ void QuantaApp::slotOptions()
fileMasks->sbAutoSave->setValue(m_config->readNumEntry("Autosave interval"));
//else default value 15
- QStringList availableEncodingNames(KGlobal::charsets()->availableEncodingNames());
+ TQStringList availableEncodingNames(KGlobal::charsets()->availableEncodingNames());
fileMasks->encodingCombo->insertStringList( availableEncodingNames );
- QStringList::ConstIterator iter;
+ TQStringList::ConstIterator iter;
int iIndex = -1;
for (iter = availableEncodingNames.begin(); iter != availableEncodingNames.end(); ++iter)
{
@@ -1204,7 +1204,7 @@ void QuantaApp::slotOptions()
break;
}
}
- QStringList lst = DTDs::ref()->nickNameList(true);
+ TQStringList lst = DTDs::ref()->nickNameList(true);
uint pos = 0;
for (uint i = 0; i < lst.count(); i++)
{
@@ -1215,8 +1215,8 @@ void QuantaApp::slotOptions()
fileMasks->defaultDTDCombo->setCurrentItem(pos);
// Preview options
- page=kd->addVBoxPage(i18n("User Interface"), QString::null, BarIcon("view_choose", KIcon::SizeMedium ) );
- PreviewOptions *uiOptions = new PreviewOptions( (QWidget *)page );
+ page=kd->addVBoxPage(i18n("User Interface"), TQString::null, BarIcon("view_choose", KIcon::SizeMedium ) );
+ PreviewOptions *uiOptions = new PreviewOptions( (TQWidget *)page );
uiOptions->setPosition(qConfig.previewPosition);
uiOptions->setDocPosition(qConfig.docPosition);
@@ -1238,11 +1238,11 @@ void QuantaApp::slotOptions()
uiOptions->warnEventActions->setChecked(true);
}
//kafka options
- page = kd->addVBoxPage(i18n("VPL View"), QString::null, UserIcon("vpl_text", KIcon::SizeMedium));
- KafkaSyncOptions *kafkaOptions = new KafkaSyncOptions( m_config, (QWidget *)page );
+ page = kd->addVBoxPage(i18n("VPL View"), TQString::null, UserIcon("vpl_text", KIcon::SizeMedium));
+ KafkaSyncOptions *kafkaOptions = new KafkaSyncOptions( m_config, (TQWidget *)page );
- page=kd->addVBoxPage(i18n("Parser"), QString::null, BarIcon("kcmsystem", KIcon::SizeMedium ) );
- ParserOptions *parserOptions = new ParserOptions( m_config, (QWidget *)page );
+ page=kd->addVBoxPage(i18n("Parser"), TQString::null, BarIcon("kcmsystem", KIcon::SizeMedium ) );
+ ParserOptions *parserOptions = new ParserOptions( m_config, (TQWidget *)page );
parserOptions->refreshFrequency->setValue(qConfig.refreshFrequency);
parserOptions->instantUpdate->setChecked(qConfig.instantUpdate);
@@ -1250,8 +1250,8 @@ void QuantaApp::slotOptions()
parserOptions->showClosingTags->setChecked(qConfig.showClosingTags);
parserOptions->spinExpand->setValue(qConfig.expandLevel);
- page = kd->addVBoxPage(i18n("Abbreviations"), QString::null, BarIcon("fontsizeup", KIcon::SizeMedium));
- AbbreviationDlg *abbreviationOptions = new AbbreviationDlg((QWidget*)(page));
+ page = kd->addVBoxPage(i18n("Abbreviations"), TQString::null, BarIcon("fontsizeup", KIcon::SizeMedium));
+ AbbreviationDlg *abbreviationOptions = new AbbreviationDlg((TQWidget*)(page));
bool reloadTrees = false;
kd->adjustSize();
@@ -1282,7 +1282,7 @@ void QuantaApp::slotOptions()
m_config->writeEntry("Reload Files", fileMasks->reloadFiles->isChecked());
qConfig.defaultEncoding = fileMasks->encodingCombo->currentText();
- QString tmpStr = uiOptions->closeButtons();
+ TQString tmpStr = uiOptions->closeButtons();
if (tmpStr != qConfig.showCloseButtons)
uiRebuildNeeded = true;
qConfig.showCloseButtons = tmpStr;
@@ -1379,14 +1379,14 @@ void QuantaApp::slotShowPreviewWidget(bool show)
{
delete m_previewToolView;
m_previewToolView = 0L;
- view->addCustomWidget(m_htmlPart->view(), QString::null);
+ view->addCustomWidget(m_htmlPart->view(), TQString::null);
} else
{
if (!m_previewToolView)
{
m_previewToolView= addToolWindow(m_htmlPart->view(), prevDockPosition(m_htmlPart->view(), KDockWidget::DockBottom), getMainDockWidget());
- connect(m_previewToolView->wrapperWidget(), SIGNAL(iMBeingClosed
-()), this, SLOT(slotPreviewBeingClosed()));
+ connect(m_previewToolView->wrapperWidget(), TQT_SIGNAL(iMBeingClosed
+()), this, TQT_SLOT(slotPreviewBeingClosed()));
}
m_htmlPart->view()->show();
m_previewToolView->show();
@@ -1397,12 +1397,12 @@ void QuantaApp::slotShowPreviewWidget(bool show)
{
m_noFramesPreview = false;
m_previewVisible = false;
- m_htmlPart->view()->reparent(this, 0, QPoint(), false);
+ m_htmlPart->view()->reparent(this, 0, TQPoint(), false);
m_htmlPart->view()->resize(0, 0);
m_htmlPart->view()->hide();
if (qConfig.previewPosition == "Editor")
{
- view->addCustomWidget(0L, QString::null);
+ view->addCustomWidget(0L, TQString::null);
delete m_previewToolView;
m_previewToolView = 0L;
} else
@@ -1504,25 +1504,25 @@ void QuantaApp::slotShowNoFramesPreview()
}
-void QuantaApp::newCursorPosition(const QString &file, int lineNumber, int columnNumber)
+void QuantaApp::newCursorPosition(const TQString &file, int lineNumber, int columnNumber)
{
Q_UNUSED(file);
typingInProgress = true;
startIdleTimer();
// updateTreeViews();
- QString linenumber;
+ TQString linenumber;
linenumber = i18n("Line: %1 Col: %2").arg(lineNumber).arg(columnNumber);
statusBar()->changeItem(linenumber, IDS_STATUS_CLM);
statusBar()->changeItem(i18n(" R/O "),IDS_INS_OVR);
statusBar()->changeItem("",IDS_MODIFIED);
}
-void QuantaApp::newDebuggerPosition(const QString &file, int lineNumber)
+void QuantaApp::newDebuggerPosition(const TQString &file, int lineNumber)
{
newCursorPosition(file, lineNumber, 0);
}
-void QuantaApp::openFile(const QString &file, int lineNumber, int columnNumber)
+void QuantaApp::openFile(const TQString &file, int lineNumber, int columnNumber)
{
gotoFileAndLine(file, lineNumber, columnNumber);
slotNewStatus();
@@ -1533,7 +1533,7 @@ void QuantaApp::slotNewLineColumn()
typingInProgress = true;
startIdleTimer();
// updateTreeViews();
- QString linenumber;
+ TQString linenumber;
oldCursorLine = cursorLine;
oldCursorCol = cursorCol;
Document *w = ViewManager::ref()->activeDocument();
@@ -1648,7 +1648,7 @@ void QuantaApp::setCursorPosition( int row, int col )
}
}
-void QuantaApp::gotoFileAndLine(const QString& filename, int line, int column)
+void QuantaApp::gotoFileAndLine(const TQString& filename, int line, int column)
{
// First, check if we're already showing this file
Document *w = ViewManager::ref()->activeDocument();
@@ -1707,7 +1707,7 @@ void QuantaApp::selectArea(int line1, int col1, int line2, int col2)
}
}
-void QuantaApp::openDoc(const QString& url)
+void QuantaApp::openDoc(const TQString& url)
{
if (qConfig.docPosition == "Tab")
{
@@ -1727,7 +1727,7 @@ void QuantaApp::openDoc(const QString& url)
}
m_htmlPartDoc->view()->setFocus(); // activates the part
- QString urlStr = url;
+ TQString urlStr = url;
if (urlStr.startsWith("/"))
urlStr.prepend("file:");
KURL u(urlStr);
@@ -1745,7 +1745,7 @@ void QuantaApp::slotContextHelp()
Document *w = ViewManager::ref()->activeDocument();
if (w)
{
- QString currentWord = "";
+ TQString currentWord = "";
parser->setSAParserEnabled(false);
reparse(true);
parser->setSAParserEnabled(true);
@@ -1760,7 +1760,7 @@ void QuantaApp::slotContextHelp()
currentWord = w->currentWord();
}
const DTDStruct *dtd = w->currentDTD(true);
- QString *url = dTab->contextHelp(dtd->documentation + "|" + currentWord);
+ TQString *url = dTab->contextHelp(dtd->documentation + "|" + currentWord);
if (url)
openDoc(*url);
}
@@ -1781,26 +1781,26 @@ void QuantaApp::slotShowAnnotationView()
makeDockVisible(dynamic_cast<KDockWidget*>(m_annotationOutputView->wrapperWidget()));
}
-QWidget* QuantaApp::createContainer( QWidget *parent, int index, const QDomElement &element, int &id )
+TQWidget* QuantaApp::createContainer( TQWidget *parent, int index, const TQDomElement &element, int &id )
{
- QString tabname = element.attribute( "i18ntabname", "" );
- QString idStr = element.attribute( "id", "" );
+ TQString tabname = element.attribute( "i18ntabname", "" );
+ TQString idStr = element.attribute( "id", "" );
if ( element.tagName().lower() == "toolbar" && !tabname.isEmpty())
{
-//avoid QToolBar warning in the log
+//avoid TQToolBar warning in the log
QtMsgHandler oldHandler = qInstallMsgHandler( silenceQToolBar );
ToolbarTabWidget *toolbarTab = ToolbarTabWidget::ref();
- QWidget *w = new QWidget(toolbarTab, "ToolbarHoldingWidget" + element.attribute("name"));
+ TQWidget *w = new TQWidget(toolbarTab, "ToolbarHoldingWidget" + element.attribute("name"));
QuantaToolBar *tb = new QuantaToolBar(w, element.attribute("name"), true, true);
tb->loadState(element);
- tb->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Minimum);
+ tb->setSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Minimum);
//kdDebug(24000) << "tb->iconSize() " << tb->iconSize() << endl;
if (toolbarTab->iconText() == KToolBar::IconTextBottom)
{
- tb->setGeometry(0,0, toolbarTab->width(), tb->iconSize() + QFontMetrics(KGlobalSettings::toolBarFont()).height() + 10);
+ tb->setGeometry(0,0, toolbarTab->width(), tb->iconSize() + TQFontMetrics(KGlobalSettings::toolBarFont()).height() + 10);
toolbarTab->setFixedHeight(toolbarTab->tabHeight() + tb->height() + 3);
} else
{
@@ -1815,10 +1815,10 @@ QWidget* QuantaApp::createContainer( QWidget *parent, int index, const QDomEleme
toolbarTab->insertTab(tb, tabname, idStr);
qInstallMsgHandler( oldHandler );
- connect(tb, SIGNAL(removeAction(const QString&, const QString&)),
- SLOT(slotRemoveAction(const QString&, const QString&)));
- connect(tb, SIGNAL(editAction(const QString&)),
- SLOT(slotEditAction(const QString&)));
+ connect(tb, TQT_SIGNAL(removeAction(const TQString&, const TQString&)),
+ TQT_SLOT(slotRemoveAction(const TQString&, const TQString&)));
+ connect(tb, TQT_SIGNAL(editAction(const TQString&)),
+ TQT_SLOT(slotEditAction(const TQString&)));
return tb;
}
@@ -1826,7 +1826,7 @@ QWidget* QuantaApp::createContainer( QWidget *parent, int index, const QDomEleme
}
-void QuantaApp::removeContainer( QWidget *container, QWidget *parent, QDomElement &element, int id )
+void QuantaApp::removeContainer( TQWidget *container, TQWidget *parent, TQDomElement &element, int id )
{
if (dynamic_cast<QuantaToolBar*>(container))
{
@@ -1880,11 +1880,11 @@ void QuantaApp::slotContextMenuAboutToShow()
Document *w = ViewManager::ref()->activeDocument();
if (w)
{
- QPopupMenu *popup = static_cast<QPopupMenu*>(factory()->container("popup_editor",this));
- QString name;
+ TQPopupMenu *popup = static_cast<TQPopupMenu*>(factory()->container("popup_editor",this));
+ TQString name;
uint line, col;
int bl, bc, el, ec;
- QString tagStr;
+ TQString tagStr;
w->viewCursorIf->cursorPositionReal(&line, &col);
Node *node = parser->nodeAt(line, col, false);
if (node)
@@ -1907,10 +1907,10 @@ void QuantaApp::slotContextMenuAboutToShow()
pos = group.definitionRx.search(node->tag->cleanStr, pos);
if (pos != -1)
{
- QString cleanName = node->tag->cleanStr.mid(pos, group.definitionRx.matchedLength());
+ TQString cleanName = node->tag->cleanStr.mid(pos, group.definitionRx.matchedLength());
name = tagStr.mid(pos, group.definitionRx.matchedLength());
node->tag->beginPos(bl, bc);
- QString tmpStr = tagStr.left(pos);
+ TQString tmpStr = tagStr.left(pos);
int newLines = tmpStr.contains('\n');
bl += newLines;
int l = tmpStr.findRev('\n'); //the last EOL
@@ -1942,7 +1942,7 @@ void QuantaApp::slotContextMenuAboutToShow()
}
} else
{
- QMap<QString, XMLStructGroup>::ConstIterator it = node->tag->dtd()->xmlStructTreeGroups.find(node->tag->name.lower());
+ TQMap<TQString, XMLStructGroup>::ConstIterator it = node->tag->dtd()->xmlStructTreeGroups.find(node->tag->name.lower());
if (it != node->tag->dtd()->xmlStructTreeGroups.constEnd())
{
@@ -1986,7 +1986,7 @@ void QuantaApp::slotContextMenuAboutToShow()
if(debugger() && debugger()->hasClient())
{
int startpos;
- QString word;
+ TQString word;
// If we have a selection made, thats what we want to use for watching, setting etc
if (w->selectionIf && w->selectionIf->hasSelection())
@@ -1997,13 +1997,13 @@ void QuantaApp::slotContextMenuAboutToShow()
{
// Otherwise, find the word under the cursor
word = w->editIf->textLine(w->viewCursorIf->cursorLine());
- startpos = word.findRev(QRegExp("$|[^a-zA-Z0-9_]"), w->viewCursorIf->cursorColumn());
+ startpos = word.findRev(TQRegExp("$|[^a-zA-Z0-9_]"), w->viewCursorIf->cursorColumn());
word.remove(0, startpos);
if(word.left(1) != "$")
word.remove(0, 1);
- word = word.left(word.find(QRegExp("[^a-zA-Z0-9_]"), 1));
+ word = word.left(word.find(TQRegExp("[^a-zA-Z0-9_]"), 1));
}
// If we have a linebreak, take everything before the break
startpos = word.find("\n");
@@ -2095,7 +2095,7 @@ void QuantaApp::slotOpenFileUnderCursor()
/** Load an user toolbar file from the disk. */
void QuantaApp::slotLoadToolbarFile(const KURL& url)
{
- QDictIterator<ToolbarEntry> it(m_toolbarList);
+ TQDictIterator<ToolbarEntry> it(m_toolbarList);
ToolbarEntry *p_toolbar;
while (it.current())
{
@@ -2104,31 +2104,31 @@ void QuantaApp::slotLoadToolbarFile(const KURL& url)
if (url == p_toolbar->url)
return;
}
- QDomDocument actionDom;
+ TQDomDocument actionDom;
- QTextStream str;
- str.setEncoding(QTextStream::UnicodeUTF8);
- QString fileName = url.path();
+ TQTextStream str;
+ str.setEncoding(TQTextStream::UnicodeUTF8);
+ TQString fileName = url.path();
if ( url.fileName().endsWith(toolbarExtension) )
{
- QDomDocument *toolbarDom = new QDomDocument();
+ TQDomDocument *toolbarDom = new TQDomDocument();
//extract the files from the archives
KTar tar(fileName);
if (tar.open(IO_ReadOnly))
{
- QString base = QFileInfo(fileName).baseName();
+ TQString base = TQFileInfo(fileName).baseName();
KArchiveFile* file = (KArchiveFile *) tar.directory()->entry(base+".toolbar");
if (file)
{
- QIODevice *device = file->device();
+ TQIODevice *device = file->device();
toolbarDom->setContent(device);
delete device;
}
file = (KArchiveFile *) tar.directory()->entry(base+".actions");
if (file)
{
- QIODevice *device = file->device();
+ TQIODevice *device = file->device();
actionDom.setContent(device);
delete device;
}
@@ -2142,14 +2142,14 @@ void QuantaApp::slotLoadToolbarFile(const KURL& url)
return;
}
- QDomNodeList nodeList = toolbarDom->elementsByTagName("ToolBar");
- QString name = nodeList.item(0).cloneNode().toElement().attribute("tabname");
+ TQDomNodeList nodeList = toolbarDom->elementsByTagName("ToolBar");
+ TQString name = nodeList.item(0).cloneNode().toElement().attribute("tabname");
//search for another toolbar with the same name
- QPtrList<KXMLGUIClient> xml_clients = guiFactory()->clients();
- QString newName = name;
- QString i18nName = i18n(name.utf8());
- QString origName = name;
+ TQPtrList<KXMLGUIClient> xml_clients = guiFactory()->clients();
+ TQString newName = name;
+ TQString i18nName = i18n(name.utf8());
+ TQString origName = name;
bool found = false;
bool nameModified = false;
int count = 2;
@@ -2166,8 +2166,8 @@ void QuantaApp::slotLoadToolbarFile(const KURL& url)
{
if ((nodeList.item(i).cloneNode().toElement().attribute("name").lower() ) == name.lower())
{
- newName = origName + QString(" (%1)").arg(count);
- i18nName = i18n(origName.utf8()) + QString(" (%1)").arg(count);
+ newName = origName + TQString(" (%1)").arg(count);
+ i18nName = i18n(origName.utf8()) + TQString(" (%1)").arg(count);
nameModified = true;
count++;
found = true;
@@ -2187,19 +2187,19 @@ void QuantaApp::slotLoadToolbarFile(const KURL& url)
p_toolbar = new ToolbarEntry;
- QDomDocument *dom = new QDomDocument();
+ TQDomDocument *dom = new TQDomDocument();
dom->setContent(toolbarDom->toString());
p_toolbar->dom = dom;
p_toolbar->nameModified = nameModified;
- QString s = i18nName.lower();
- QString toolbarId = s;
- QRegExp rx("\\s|\\.");
+ TQString s = i18nName.lower();
+ TQString toolbarId = s;
+ TQRegExp rx("\\s|\\.");
toolbarId.replace(rx, "_");
int n = 1;
while (m_toolbarList.find(toolbarId) != 0L)
{
- toolbarId = s + QString("%1").arg(n);
+ toolbarId = s + TQString("%1").arg(n);
toolbarId.replace(rx, "_");
n++;
}
@@ -2212,14 +2212,14 @@ void QuantaApp::slotLoadToolbarFile(const KURL& url)
tempFile->setAutoDelete(true);
nodeList = toolbarDom->elementsByTagName("ToolBar");
- QDomElement el = nodeList.item(0).toElement();
+ TQDomElement el = nodeList.item(0).toElement();
el.setAttribute("name", name.lower());
el.setAttribute("tabname", name);
el.setAttribute("i18ntabname", i18nName);
el.setAttribute("id", toolbarId);
nodeList = toolbarDom->elementsByTagName("text");
el.firstChild().setNodeValue(name);
- tempFile->textStream()->setEncoding(QTextStream::UnicodeUTF8);
+ tempFile->textStream()->setEncoding(TQTextStream::UnicodeUTF8);
* (tempFile->textStream()) << toolbarDom->toString();
tempFile->close();
@@ -2230,9 +2230,9 @@ void QuantaApp::slotLoadToolbarFile(const KURL& url)
nodeList = actionDom.elementsByTagName("action");
for (uint i = 0; i < nodeList.count(); i++)
{
- QDomNode node = nodeList.item(i).cloneNode();
+ TQDomNode node = nodeList.item(i).cloneNode();
el = node.toElement();
- QString actionName = el.attribute("name");
+ TQString actionName = el.attribute("name");
//if there is no such action yet, add to the available actions
if (!actionCollection()->action(actionName))
{
@@ -2241,7 +2241,7 @@ void QuantaApp::slotLoadToolbarFile(const KURL& url)
m_tagActions.append(tagAction);
//add the actions to every toolbar xmlguiclient
- QDictIterator<ToolbarEntry> it(m_toolbarList);
+ TQDictIterator<ToolbarEntry> it(m_toolbarList);
while (it.current())
{
it.current()->guiClient->actionCollection()->insert(tagAction);
@@ -2272,7 +2272,7 @@ void QuantaApp::slotLoadToolbarFile(const KURL& url)
guiFactory()->addClient(toolbarGUI);
//Plug in the actions & build the menu
- QPopupMenu *menu = new QPopupMenu;
+ TQPopupMenu *menu = new QPopupMenu;
KAction *action;
nodeList = toolbarGUI->domDocument().elementsByTagName("Action");
for (uint i = 0; i < nodeList.count(); i++)
@@ -2317,8 +2317,8 @@ void QuantaApp::showToolbarFile(const KURL &url)
}
} else
{
- QDomNodeList nodeList;
- QPopupMenu *menu = new QPopupMenu;
+ TQDomNodeList nodeList;
+ TQPopupMenu *menu = new QPopupMenu;
KAction *action;
KActionCollection *ac = actionCollection();
nodeList = p_toolbar->guiClient->domDocument().elementsByTagName("Action");
@@ -2360,7 +2360,7 @@ void QuantaApp::slotLoadGlobalToolbar()
}
}
-KURL QuantaApp::saveToolbarToFile(const QString& toolbarName, const KURL& destFile)
+KURL QuantaApp::saveToolbarToFile(const TQString& toolbarName, const KURL& destFile)
{
KURL tarFile = destFile;
@@ -2369,24 +2369,24 @@ KURL QuantaApp::saveToolbarToFile(const QString& toolbarName, const KURL& destFi
tarFile.setFileName(destFile.fileName() + toolbarExtension);
}
- QBuffer buffer;
+ TQBuffer buffer;
buffer.open(IO_ReadWrite);
- QString toolStr;
- QTextStream toolStream(&toolStr, IO_ReadWrite);
- toolStream.setEncoding(QTextStream::UnicodeUTF8);
+ TQString toolStr;
+ TQTextStream toolStream(&toolStr, IO_ReadWrite);
+ toolStream.setEncoding(TQTextStream::UnicodeUTF8);
- QBuffer buffer2;
+ TQBuffer buffer2;
buffer2.open(IO_WriteOnly);
- QTextStream actStr(&buffer2);
- actStr.setEncoding(QTextStream::UnicodeUTF8);
+ TQTextStream actStr(&buffer2);
+ actStr.setEncoding(TQTextStream::UnicodeUTF8);
- QDomNodeList nodeList, nodeList2;
+ TQDomNodeList nodeList, nodeList2;
toolStream << "<!DOCTYPE kpartgui SYSTEM \"kpartgui.dtd\">\n<kpartgui name=\"quanta\" version=\"2\">\n";
- actStr << QString("<!DOCTYPE actionsconfig>\n<actions>\n");
+ actStr << TQString("<!DOCTYPE actionsconfig>\n<actions>\n");
//look up the clients
- QPtrList<KXMLGUIClient> xml_clients = factory()->clients();
+ TQPtrList<KXMLGUIClient> xml_clients = factory()->clients();
for (uint index = 0; index < xml_clients.count(); index++)
{
nodeList = xml_clients.at(index)->domDocument().elementsByTagName("ToolBar");
@@ -2397,10 +2397,10 @@ KURL QuantaApp::saveToolbarToFile(const QString& toolbarName, const KURL& destFi
{
//find the actions registered to the toolbar
- QDomNode n = nodeList.item(i).firstChild();
+ TQDomNode n = nodeList.item(i).firstChild();
while (! n.isNull())
{
- QDomElement e = n.toElement();
+ TQDomElement e = n.toElement();
if (e.tagName() == "Action")
{
TagAction *action = dynamic_cast<TagAction*>(actionCollection()->action(e.attribute("name")));
@@ -2416,9 +2416,9 @@ KURL QuantaApp::saveToolbarToFile(const QString& toolbarName, const KURL& destFi
}
n = n.nextSibling();
}
- QDomElement e = nodeList.item(0).toElement();
- QString i18nName = e.attribute("i18ntabname");
- QString id = e.attribute("id");
+ TQDomElement e = nodeList.item(0).toElement();
+ TQString i18nName = e.attribute("i18ntabname");
+ TQString id = e.attribute("id");
e.removeAttribute("i18ntabname");
e.removeAttribute("id");
nodeList.item(i).save(toolStream,2);
@@ -2427,22 +2427,22 @@ KURL QuantaApp::saveToolbarToFile(const QString& toolbarName, const KURL& destFi
}
}
}
- toolStream << QString("\n</kpartgui>");
- actStr << QString("\n</actions>");
+ toolStream << TQString("\n</kpartgui>");
+ actStr << TQString("\n</actions>");
//buffer.flush();
ToolbarEntry *p_toolbar = m_toolbarList[toolbarName];
- QDomDocument *oldDom = p_toolbar->dom;
- QDomDocument *dom = new QDomDocument();
- QString s = toolStr;
- QString error;
+ TQDomDocument *oldDom = p_toolbar->dom;
+ TQDomDocument *dom = new TQDomDocument();
+ TQString s = toolStr;
+ TQString error;
int el, ec;
if (!dom->setContent(s, &error, &el, &ec))
- kdError(24000) << QString("Error %1 at (%2, %3)").arg(error).arg(el).arg(ec)<<endl;
+ kdError(24000) << TQString("Error %1 at (%2, %3)").arg(error).arg(el).arg(ec)<<endl;
p_toolbar->dom = dom;
- QTextStream bufferStr(&buffer);
- bufferStr.setEncoding(QTextStream::UnicodeUTF8);
+ TQTextStream bufferStr(&buffer);
+ bufferStr.setEncoding(TQTextStream::UnicodeUTF8);
bufferStr << toolStr;
buffer.close();
buffer2.close();
@@ -2453,9 +2453,9 @@ KURL QuantaApp::saveToolbarToFile(const QString& toolbarName, const KURL& destFi
KTar tar(tempFile->name(), "application/x-gzip");
if (!tar.open(IO_WriteOnly))
return KURL();
- if (!tar.writeFile(QFileInfo(tarFile.path()).baseName()+".toolbar", "user", "group", buffer.buffer().size(), buffer.buffer().data()))
+ if (!tar.writeFile(TQFileInfo(tarFile.path()).baseName()+".toolbar", "user", "group", buffer.buffer().size(), buffer.buffer().data()))
return KURL();
- if (!tar.writeFile(QFileInfo(tarFile.path()).baseName()+".actions", "user", "group", buffer2.buffer().size(), buffer2.buffer().data()))
+ if (!tar.writeFile(TQFileInfo(tarFile.path()).baseName()+".actions", "user", "group", buffer2.buffer().size(), buffer2.buffer().data()))
return KURL();
tar.close();
if (!QExtFileInfo::copy(KURL::fromPathOrURL(tempFile->name()), tarFile, -1, true, false, this))
@@ -2472,20 +2472,20 @@ KURL QuantaApp::saveToolbarToFile(const QString& toolbarName, const KURL& destFi
}
/** Saves a toolbar as local or project specific. */
-bool QuantaApp::saveToolbar(bool localToolbar, const QString& toolbarToSave, const KURL& destURL)
+bool QuantaApp::saveToolbar(bool localToolbar, const TQString& toolbarToSave, const KURL& destURL)
{
int query;
KURL url;
KURL projectToolbarsURL;
- QString toolbarName;
- QString localToolbarsDir = locateLocal("data",resourceDir + "toolbars/");
+ TQString toolbarName;
+ TQString localToolbarsDir = locateLocal("data",resourceDir + "toolbars/");
if (toolbarToSave.isEmpty())
{
ToolbarTabWidget *tb = ToolbarTabWidget::ref();
- QStringList lst;
- QStringList idLst;
+ TQStringList lst;
+ TQStringList idLst;
int current=0;
for (int i = 0; i < tb->count(); i++)
{
@@ -2495,7 +2495,7 @@ bool QuantaApp::saveToolbar(bool localToolbar, const QString& toolbarToSave, con
}
bool ok = false;
- QString res = KInputDialog::getItem(
+ TQString res = KInputDialog::getItem(
i18n( "Save Toolbar" ),
i18n( "Please select a toolbar:" ), lst, current, false, &ok, this );
if ( !ok )
@@ -2514,8 +2514,8 @@ bool QuantaApp::saveToolbar(bool localToolbar, const QString& toolbarToSave, con
toolbarName = toolbarToSave;
}
ToolbarEntry *p_toolbar = m_toolbarList[toolbarName];
- QString toolbarFileName = p_toolbar->url.fileName(false);
- QString toolbarRelPath = p_toolbar->url.url();
+ TQString toolbarFileName = p_toolbar->url.fileName(false);
+ TQString toolbarRelPath = p_toolbar->url.url();
if (toolbarRelPath.startsWith("file://" + qConfig.globalDataDir))
{
toolbarRelPath.remove("file://" + qConfig.globalDataDir + resourceDir + "toolbars/");
@@ -2591,24 +2591,24 @@ void QuantaApp::slotSaveProjectToolbar()
void QuantaApp::slotAddToolbar()
{
bool ok;
- QString name = KInputDialog::getText(i18n("New Toolbar"), i18n("Enter toolbar name:"), i18n("User_%1").arg(userToolbarsCount), &ok, this);
+ TQString name = KInputDialog::getText(i18n("New Toolbar"), i18n("Enter toolbar name:"), i18n("User_%1").arg(userToolbarsCount), &ok, this);
if (ok)
{
userToolbarsCount++;
- QString toolbarId = name;
+ TQString toolbarId = name;
int n = 1;
while (m_toolbarList.find(toolbarId) != 0L)
{
- toolbarId = name + QString("%1").arg(n);
+ toolbarId = name + TQString("%1").arg(n);
n++;
}
toolbarId = toolbarId.lower();
KTempFile* tempFile = new KTempFile(tmpDir);
tempFile->setAutoDelete(true);
- tempFile->textStream()->setEncoding(QTextStream::UnicodeUTF8);
- * (tempFile->textStream()) << QString("<!DOCTYPE kpartgui SYSTEM \"kpartgui.dtd\">\n<kpartgui name=\"quanta\" version=\"2\">\n<ToolBar name=\"%1\" tabname=\"%2\" i18ntabname=\"%3\" id=\"%4\">\n<text>%5</text>\n</ToolBar>\n</kpartgui>\n")
+ tempFile->textStream()->setEncoding(TQTextStream::UnicodeUTF8);
+ * (tempFile->textStream()) << TQString("<!DOCTYPE kpartgui SYSTEM \"kpartgui.dtd\">\n<kpartgui name=\"quanta\" version=\"2\">\n<ToolBar name=\"%1\" tabname=\"%2\" i18ntabname=\"%3\" id=\"%4\">\n<text>%5</text>\n</ToolBar>\n</kpartgui>\n")
.arg(name.lower()).arg(name).arg(name).arg(toolbarId).arg(name);
tempFile->close();
@@ -2624,7 +2624,7 @@ void QuantaApp::slotAddToolbar()
ToolbarEntry *p_toolbar = new ToolbarEntry;
p_toolbar->guiClient = toolbarGUI;
- QDomDocument *dom = new QDomDocument(toolbarGUI->domDocument());
+ TQDomDocument *dom = new TQDomDocument(toolbarGUI->domDocument());
p_toolbar->dom = dom;
p_toolbar->name = name;
@@ -2647,8 +2647,8 @@ bool QuantaApp::slotRemoveToolbar()
ToolbarTabWidget *tb = ToolbarTabWidget::ref();
int i;
- QStringList lst;
- QStringList idLst;
+ TQStringList lst;
+ TQStringList idLst;
int current=0, j =0;
for (i = 0; i < tb->count(); i++)
{
@@ -2659,13 +2659,13 @@ bool QuantaApp::slotRemoveToolbar()
}
bool ok = false;
- QString res = KInputDialog::getItem(
+ TQString res = KInputDialog::getItem(
i18n( "Remove Toolbar" ),
i18n( "Please select a toolbar:" ), lst, current, false, &ok, this );
if (ok)
{
- QString id = res;
+ TQString id = res;
for (uint i = 0; i < lst.count(); i++)
{
if (lst[i] == res)
@@ -2680,12 +2680,12 @@ bool QuantaApp::slotRemoveToolbar()
}
-QString QuantaApp::createToolbarTarball()
+TQString QuantaApp::createToolbarTarball()
{
ToolbarTabWidget *tb = ToolbarTabWidget::ref();
- QStringList lst;
- QStringList idLst;
+ TQStringList lst;
+ TQStringList idLst;
int current = 0;
for (int i = 0; i < tb->count(); i++)
{
@@ -2695,14 +2695,14 @@ QString QuantaApp::createToolbarTarball()
}
bool ok = false;
- QString res = KInputDialog::getItem(
+ TQString res = KInputDialog::getItem(
i18n( "Send Toolbar" ),
i18n( "Please select a toolbar:" ), lst, current, false, &ok, this );
if (!ok)
- return QString::null;
+ return TQString::null;
- QString toolbarName = res;
+ TQString toolbarName = res;
for (uint i = 0; i < lst.count(); i++)
{
if (lst[i] == toolbarName)
@@ -2711,11 +2711,11 @@ QString QuantaApp::createToolbarTarball()
break;
}
}
- QString prefix="quanta";
+ TQString prefix="quanta";
KTempDir* tempDir = new KTempDir(tmpDir);
tempDir->setAutoDelete(true);
tempDirList.append(tempDir);
- QString tempFileName=tempDir->name() + toolbarName;
+ TQString tempFileName=tempDir->name() + toolbarName;
KURL tempURL;
tempURL.setPath(tempFileName);
@@ -2728,23 +2728,23 @@ QString QuantaApp::createToolbarTarball()
void QuantaApp::slotSendToolbar()
{
- QString tempFileName = createToolbarTarball();
+ TQString tempFileName = createToolbarTarball();
if (tempFileName.isNull())
return;
- QStringList toolbarFile;
+ TQStringList toolbarFile;
toolbarFile += tempFileName;
TagMailDlg *mailDlg = new TagMailDlg( this, i18n("Send toolbar in email"));
- QString toStr;
- QString message = i18n("Hi,\n This is a Quanta Plus [http://quanta.kdewebdev.org] toolbar.\n\nHave fun.\n");
- QString titleStr;
- QString subjectStr;
+ TQString toStr;
+ TQString message = i18n("Hi,\n This is a Quanta Plus [http://quanta.kdewebdev.org] toolbar.\n\nHave fun.\n");
+ TQString titleStr;
+ TQString subjectStr;
mailDlg->TitleLabel->setText(i18n("Content:"));
/* mailDlg->titleEdit->setFixedHeight(60);
- mailDlg->titleEdit->setVScrollBarMode(QTextEdit::Auto);
- mailDlg->titleEdit->setHScrollBarMode(QTextEdit::Auto);*/
+ mailDlg->titleEdit->setVScrollBarMode(TQTextEdit::Auto);
+ mailDlg->titleEdit->setHScrollBarMode(TQTextEdit::Auto);*/
if ( mailDlg->exec() ) {
if ( !mailDlg->lineEmail->text().isEmpty())
{
@@ -2759,7 +2759,7 @@ void QuantaApp::slotSendToolbar()
return;
}
- kapp->invokeMailer(toStr, QString::null, QString::null, subjectStr, message, QString::null, toolbarFile);
+ kapp->invokeMailer(toStr, TQString::null, TQString::null, subjectStr, message, TQString::null, toolbarFile);
}
delete mailDlg;
}
@@ -2773,7 +2773,7 @@ void QuantaApp::slotDownloadToolbar()
void QuantaApp::slotUploadToolbar()
{
- QString tempFileName = createToolbarTarball();
+ TQString tempFileName = createToolbarTarball();
if (tempFileName.isNull())
return;
if (!m_newToolbarStuff)
@@ -2786,8 +2786,8 @@ void QuantaApp::slotRenameToolbar()
{
ToolbarTabWidget *tb = ToolbarTabWidget::ref();
- QStringList lst;
- QStringList idLst;
+ TQStringList lst;
+ TQStringList idLst;
int current = 0;
for (int i = 0; i < tb->count(); i++)
{
@@ -2797,12 +2797,12 @@ void QuantaApp::slotRenameToolbar()
}
bool ok = false;
- QString res = KInputDialog::getItem(
+ TQString res = KInputDialog::getItem(
i18n( "Rename Toolbar" ),
i18n( "Please select a toolbar:" ), lst, current, false, &ok, this );
if (ok)
{
- QString id = res;
+ TQString id = res;
for (uint i = 0; i < lst.count(); i++)
{
if (lst[i] == res)
@@ -2815,22 +2815,22 @@ void QuantaApp::slotRenameToolbar()
}
}
-void QuantaApp::slotRenameToolbar(const QString& name)
+void QuantaApp::slotRenameToolbar(const TQString& name)
{
ToolbarEntry *p_toolbar = quantaApp->m_toolbarList[name];
if (p_toolbar)
{
bool ok;
- QString newName = KInputDialog::getText(i18n("Rename Toolbar"), i18n("Enter the new name:"), p_toolbar->name, &ok, this);
+ TQString newName = KInputDialog::getText(i18n("Rename Toolbar"), i18n("Enter the new name:"), p_toolbar->name, &ok, this);
if (ok && newName != p_toolbar->name)
{
m_toolbarList.take(name);
p_toolbar->name = newName;
- QDomElement el = p_toolbar->guiClient->domDocument().firstChild().firstChild().toElement();
+ TQDomElement el = p_toolbar->guiClient->domDocument().firstChild().firstChild().toElement();
el.setAttribute("tabname", p_toolbar->name);
el.removeAttribute("i18ntabname");
el.setAttribute("name", p_toolbar->name.lower());
- QDomNodeList nodeList = p_toolbar->guiClient->domDocument().elementsByTagName("text");
+ TQDomNodeList nodeList = p_toolbar->guiClient->domDocument().elementsByTagName("text");
nodeList.item(0).firstChild().setNodeValue(p_toolbar->name);
//Rename the _Separator_ tags back to Separator, so they are not treated
//as changes
@@ -2859,19 +2859,19 @@ void QuantaApp::slotRenameToolbar(const QString& name)
/** Ask for save all the modified user toolbars. */
bool QuantaApp::removeToolbars()
{
- QStringList names;
- QDictIterator<ToolbarEntry> it(m_toolbarList);
+ TQStringList names;
+ TQDictIterator<ToolbarEntry> it(m_toolbarList);
for (;it.current();++it)
{
names += it.currentKey();
}
- for (QStringList::ConstIterator iter = names.constBegin(); iter != names.constEnd(); ++iter)
+ for (TQStringList::ConstIterator iter = names.constBegin(); iter != names.constEnd(); ++iter)
{
if (!slotRemoveToolbar(*iter))
return false;
}
- QString s = "<!DOCTYPE actionsconfig>\n<actions>\n</actions>\n";
+ TQString s = "<!DOCTYPE actionsconfig>\n<actions>\n</actions>\n";
m_actions->setContent(s);
TagAction *action;
for (uint i = 0; i < actionCollection()->count(); i++)
@@ -2879,18 +2879,18 @@ bool QuantaApp::removeToolbars()
action = dynamic_cast<TagAction *>(actionCollection()->action(i));
if (action)
{
- QDomElement el = action->data();
+ TQDomElement el = action->data();
m_actions->firstChild().appendChild(el);
}
}
- QFile f(KGlobal::instance()->dirs()->saveLocation("data")+resourceDir + "actions.rc" );
+ TQFile f(KGlobal::instance()->dirs()->saveLocation("data")+resourceDir + "actions.rc" );
if (f.open( IO_ReadWrite | IO_Truncate ))
{
if (!m_actions->firstChild().firstChild().isNull())
{
- QTextStream qts(&f);
- qts.setEncoding(QTextStream::UnicodeUTF8);
+ TQTextStream qts(&f);
+ qts.setEncoding(TQTextStream::UnicodeUTF8);
m_actions->save(qts,0);
f.close();
} else
@@ -2903,13 +2903,13 @@ bool QuantaApp::removeToolbars()
void QuantaApp::slotDeleteAction(KAction *action)
{
//remove all references to this action
- QDomElement el = static_cast<TagAction*>(action)->data();
- QString text = el.attribute("text");
- QString actionName = action->name();
+ TQDomElement el = static_cast<TagAction*>(action)->data();
+ TQString text = el.attribute("text");
+ TQString actionName = action->name();
- QPtrList<KXMLGUIClient> guiClients = factory()->clients();
+ TQPtrList<KXMLGUIClient> guiClients = factory()->clients();
KXMLGUIClient *guiClient = 0;
- QDomNodeList nodeList;
+ TQDomNodeList nodeList;
for (uint i = 0; i < guiClients.count(); i++)
{
guiClient = guiClients.at(i);
@@ -2932,14 +2932,14 @@ void QuantaApp::slotDeleteAction(KAction *action)
action = 0L;
}
-void QuantaApp::slotRemoveAction(const QString& toolbarName, const QString& a_actionName)
+void QuantaApp::slotRemoveAction(const TQString& toolbarName, const TQString& a_actionName)
{
KAction *action = 0L;
- QString actionName = a_actionName;
+ TQString actionName = a_actionName;
actionName.replace('&',"&&");
KActionCollection *ac = actionCollection();
uint actionCount = ac->count();
- QString str;
+ TQString str;
for (uint i = 0; i < actionCount; i++)
{
str = ac->action(i)->text();
@@ -2968,7 +2968,7 @@ void QuantaApp::slotRemoveAction(const QString& toolbarName, const QString& a_ac
ToolbarEntry *p_toolbar = quantaApp->m_toolbarList[toolbarName];
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" &&
@@ -2986,7 +2986,7 @@ void QuantaApp::slotRemoveAction(const QString& toolbarName, const QString& a_ac
}
}
-void QuantaApp::slotEditAction(const QString& actionName)
+void QuantaApp::slotEditAction(const TQString& actionName)
{
ActionConfigDialog dlg(m_toolbarList, this, "actions_config_dlg", true, 0, actionName);
dlg.exec();
@@ -2999,21 +2999,21 @@ void QuantaApp::slotNewAction()
dlg.exec();
}
-void QuantaApp::slotAssignActionToScript(const KURL& a_scriptURL, const QString& a_interpreter)
+void QuantaApp::slotAssignActionToScript(const KURL& a_scriptURL, const TQString& a_interpreter)
{
ActionConfigDialog dlg(m_toolbarList, this, "actions_config_dlg");
- QString name = a_scriptURL.fileName();
- name.truncate(name.length() - QFileInfo(name).extension().length() - 1);
+ TQString name = a_scriptURL.fileName();
+ name.truncate(name.length() - TQFileInfo(name).extension().length() - 1);
dlg.createScriptAction(name, a_interpreter + " " + a_scriptURL.path());
dlg.exec();
}
-void QuantaApp::setDtep(const QString& dtepName, bool convert)
+void QuantaApp::setDtep(const TQString& dtepName, bool convert)
{
Document *w = ViewManager::ref()->activeDocument();
if (w)
{
- QString dtep = DTDs::ref()->getDTDNameFromNickName(dtepName);
+ TQString dtep = DTDs::ref()->getDTDNameFromNickName(dtepName);
if (!DTDs::ref()->find(dtep))
return;
w->setDTDIdentifier(dtep);
@@ -3057,12 +3057,12 @@ void QuantaApp::slotChangeDTD()
int pos = -1;
int defaultIndex = 0;
- QString oldDtdName = w->getDTDIdentifier();
- QString defaultDocType = Project::ref()->defaultDTD();
- QStringList lst = DTDs::ref()->nickNameList(true);
+ TQString oldDtdName = w->getDTDIdentifier();
+ TQString defaultDocType = Project::ref()->defaultDTD();
+ TQStringList lst = DTDs::ref()->nickNameList(true);
- QString oldDtdNickName = DTDs::ref()->getDTDNickNameFromName(oldDtdName);
- QString defaultDtdNickName = DTDs::ref()->getDTDNickNameFromName(defaultDocType);
+ TQString oldDtdNickName = DTDs::ref()->getDTDNickNameFromName(oldDtdName);
+ TQString defaultDtdNickName = DTDs::ref()->getDTDNickNameFromName(defaultDocType);
for(uint i = 0; i < lst.count(); i++)
{
dtdWidget->dtdCombo->insertItem(lst[i]);
@@ -3091,19 +3091,19 @@ void QuantaApp::slotEditDTD()
Document *w = ViewManager::ref()->activeDocument();
if (w)
{
- QStringList lst(DTDs::ref()->nickNameList());
- QString nickName = DTDs::ref()->getDTDNickNameFromName(w->getDTDIdentifier());
+ TQStringList lst(DTDs::ref()->nickNameList());
+ TQString nickName = DTDs::ref()->getDTDNickNameFromName(w->getDTDIdentifier());
bool ok = false;
- QString res = KInputDialog::getItem(
+ TQString res = KInputDialog::getItem(
i18n( "Edit DTD" ),
i18n( "Please select a DTD:" ), lst, lst.findIndex(nickName), false, &ok, this );
- QString s = i18n("Create a new DTEP description");
+ TQString s = i18n("Create a new DTEP description");
s = i18n("Load DTEP description from disk");
if (!ok)
return;
- QString dtdName = DTDs::ref()->getDTDNameFromNickName(res);
+ TQString dtdName = DTDs::ref()->getDTDNameFromNickName(res);
KDialogBase editDlg(this, "edit_dtep", true, i18n("Configure DTEP"), KDialogBase::Ok | KDialogBase::Cancel);
DTEPEditDlg dtepDlg(DTDs::ref()->find(dtdName)->fileName, &editDlg);
@@ -3115,7 +3115,7 @@ void QuantaApp::slotEditDTD()
}
}
-void QuantaApp::focusInEvent(QFocusEvent* e)
+void QuantaApp::focusInEvent(TQFocusEvent* e)
{
KDockMainWindow::focusInEvent(e);
Document *w = ViewManager::ref()->activeDocument();
@@ -3144,7 +3144,7 @@ void QuantaApp::slotMakeDonation()
{
DonationDialog *dlg = new DonationDialog(this);
dlg->closeButton->setIconSet(SmallIconSet("fileclose"));
- connect(dlg->closeButton, SIGNAL(clicked()), dlg, SLOT(accept()));
+ connect(dlg->closeButton, TQT_SIGNAL(clicked()), dlg, TQT_SLOT(accept()));
dlg->exec();
delete dlg;
}
@@ -3160,7 +3160,7 @@ void QuantaApp::slotHelpUserList()
}
/** Loads the toolbars for dtd named dtdName and unload the ones belonging to oldDtdName. */
-void QuantaApp::slotLoadToolbarForDTD(const QString& dtdName)
+void QuantaApp::slotLoadToolbarForDTD(const TQString& dtdName)
{
const DTDStruct *oldDtd = 0L;
@@ -3170,7 +3170,7 @@ void QuantaApp::slotLoadToolbarForDTD(const QString& dtdName)
if (!oldDtd)
oldDtd = DTDs::ref()->find(Project::ref()->defaultDTD());
}
- QString fileName;
+ TQString fileName;
const DTDStruct *newDtd = DTDs::ref()->find(dtdName);
if (!newDtd)
{
@@ -3220,14 +3220,14 @@ void QuantaApp::slotLoadToolbarForDTD(const QString& dtdName)
for (uint i = 0; i < oldDtd->toolbars.count(); i++)
{
KURL url;
- QString fileName = qConfig.globalDataDir + resourceDir + "toolbars/"+oldDtd->toolbars[i];
+ TQString fileName = qConfig.globalDataDir + resourceDir + "toolbars/"+oldDtd->toolbars[i];
QuantaCommon::setUrl(url, fileName);
KURL urlLocal;
fileName = locateLocal("data", resourceDir + "toolbars/"+oldDtd->toolbars[i]);
QuantaCommon::setUrl(urlLocal, fileName);
if (newToolbars.contains(url) == 0)
{
- QDictIterator<ToolbarEntry> iter(m_toolbarList);
+ TQDictIterator<ToolbarEntry> iter(m_toolbarList);
for( ; iter.current(); ++iter )
{
p_toolbar = iter.current();
@@ -3260,12 +3260,12 @@ void QuantaApp::slotLoadToolbarForDTD(const QString& dtdName)
}
/** Remove the toolbar named "name". */
-bool QuantaApp::slotRemoveToolbar(const QString& a_name)
+bool QuantaApp::slotRemoveToolbar(const TQString& a_name)
{
- QString name = a_name; // increase reference counter for this string
+ TQString name = a_name; // increase reference counter for this string
ToolbarEntry *p_toolbar = m_toolbarList[name];
- QRegExp i18ntabnameRx("\\si18ntabname=\"[^\"]*\"");
- QRegExp idRx("\\sid=\"[^\"]*\"");
+ TQRegExp i18ntabnameRx("\\si18ntabname=\"[^\"]*\"");
+ TQRegExp idRx("\\sid=\"[^\"]*\"");
if (p_toolbar)
{
KXMLGUIClient* toolbarGUI = p_toolbar->guiClient;
@@ -3275,7 +3275,7 @@ bool QuantaApp::slotRemoveToolbar(const QString& a_name)
KAction *action;
//Rename the _Separator_ tags back to Separator, so they are not treated
//as changes
- QDomNodeList nodeList = toolbarGUI->domDocument().elementsByTagName("_Separator_");
+ TQDomNodeList nodeList = toolbarGUI->domDocument().elementsByTagName("_Separator_");
for (uint i = 0; i < nodeList.count(); i++)
{
nodeList.item(i).toElement().setTagName("Separator");
@@ -3295,20 +3295,20 @@ bool QuantaApp::slotRemoveToolbar(const QString& a_name)
}
//check if the toolbar's XML GUI was modified or not
- QString s1 = p_toolbar->dom->toString();
- QString s2 = toolbarGUI->domDocument().toString();
+ TQString s1 = p_toolbar->dom->toString();
+ TQString s2 = toolbarGUI->domDocument().toString();
s1.remove(i18ntabnameRx);
s2.remove(i18ntabnameRx);
s1.remove(idRx);
s2.remove(idRx);
if (p_toolbar->nameModified)
{
- QRegExp tabnameRx("\\stabname=\"[^\"]*\"");
+ TQRegExp tabnameRx("\\stabname=\"[^\"]*\"");
tabnameRx.search(s2);
- QString name1 = tabnameRx.cap();
+ TQString name1 = tabnameRx.cap();
name1.remove(" tab");
- QString name2 = name1;
- name2.remove(QRegExp("[\\s]\\([0-9]+\\)"));
+ TQString name2 = name1;
+ name2.remove(TQRegExp("[\\s]\\([0-9]+\\)"));
s2.replace(name1, name2);
s2.replace(name1.lower(), name2.lower());
}
@@ -3385,7 +3385,7 @@ bool QuantaApp::slotRemoveToolbar(const QString& a_name)
{
//take out the action from every toolbar's xmlguiclient
//this avoid a crash when removing a toolbar
- QDictIterator<ToolbarEntry> it(m_toolbarList);
+ TQDictIterator<ToolbarEntry> it(m_toolbarList);
while (it.current())
{
it.current()->guiClient->actionCollection()->take(action);
@@ -3430,7 +3430,7 @@ void QuantaApp::slotRefreshActiveWindow()
}
-void QuantaApp::slotShowGroupsForDTEP(const QString& dtepName, bool show)
+void QuantaApp::slotShowGroupsForDTEP(const TQString& dtepName, bool show)
{
Document *w = ViewManager::ref()->activeDocument();
if (w)
@@ -3475,9 +3475,9 @@ void QuantaApp::slotBuildPrjToolbarsMenu()
}
/** Returns the project (if there is one loaded) or global default encoding. */
-QString QuantaApp::defaultEncoding()
+TQString QuantaApp::defaultEncoding()
{
- QString encoding = qConfig.defaultEncoding;
+ TQString encoding = qConfig.defaultEncoding;
if (Project::ref()->hasProject())
{
encoding = Project::ref()->defaultEncoding();
@@ -3488,7 +3488,7 @@ QString QuantaApp::defaultEncoding()
void QuantaApp::slotGetUserToolbarFiles(KURL::List *list)
{
ToolbarEntry *p_toolbar;
- QDictIterator<ToolbarEntry> iter(m_toolbarList);
+ TQDictIterator<ToolbarEntry> iter(m_toolbarList);
for( ; iter.current(); ++iter )
{
p_toolbar = iter.current();
@@ -3502,7 +3502,7 @@ void QuantaApp::slotGetUserToolbarFiles(KURL::List *list)
ToolbarEntry *QuantaApp::toolbarByURL(const KURL& url)
{
ToolbarEntry *p_toolbar = 0L;
- QDictIterator<ToolbarEntry> iter(m_toolbarList);
+ TQDictIterator<ToolbarEntry> iter(m_toolbarList);
for( ; iter.current(); ++iter )
{
p_toolbar = iter.current();
@@ -3522,7 +3522,7 @@ bool QuantaApp::allToolbarsHidden() const
bool result = true;
showDTDToolbar->setEnabled(false);
ToolbarEntry *p_toolbar = 0L;
- QDictIterator<ToolbarEntry> iter(m_toolbarList);
+ TQDictIterator<ToolbarEntry> iter(m_toolbarList);
for( ; iter.current(); ++iter )
{
p_toolbar = iter.current();
@@ -3542,35 +3542,35 @@ bool QuantaApp::allToolbarsHidden() const
void QuantaApp::slotLoadDTEP()
{
- QString dirName = KFileDialog::getExistingDirectory(QString::null, 0, i18n("Select DTEP Directory"));
+ TQString dirName = KFileDialog::getExistingDirectory(TQString::null, 0, i18n("Select DTEP Directory"));
if (!dirName.isEmpty())
{
DTDs::ref()->slotLoadDTEP(dirName, true);
}
}
-QString QuantaApp::createDTEPTarball()
+TQString QuantaApp::createDTEPTarball()
{
Document *w = ViewManager::ref()->activeDocument();
if (w)
{
- QStringList lst(DTDs::ref()->nickNameList());
- QString nickName = DTDs::ref()->getDTDNickNameFromName(w->getDTDIdentifier());
+ TQStringList lst(DTDs::ref()->nickNameList());
+ TQString nickName = DTDs::ref()->getDTDNickNameFromName(w->getDTDIdentifier());
bool ok = false;
- QString res = KInputDialog::getItem(
+ TQString res = KInputDialog::getItem(
i18n( "Send DTD" ),
i18n( "Please select a DTD:" ), lst, lst.findIndex(nickName), false, &ok, this );
if (!ok)
- return QString::null;
+ return TQString::null;
- QString dtdName = DTDs::ref()->getDTDNameFromNickName(res);
+ TQString dtdName = DTDs::ref()->getDTDNameFromNickName(res);
- QString prefix="quanta";
+ TQString prefix="quanta";
KTempDir* tempDir = new KTempDir(tmpDir);
tempDir->setAutoDelete(true);
tempDirList.append(tempDir);
- QString tempFileName=tempDir->name() +"/"+ DTDs::ref()->getDTDNickNameFromName(dtdName).replace(QRegExp("\\s|\\."), "_") + ".tgz";
+ TQString tempFileName=tempDir->name() +"/"+ DTDs::ref()->getDTDNickNameFromName(dtdName).replace(TQRegExp("\\s|\\."), "_") + ".tgz";
//pack the .tag files and the description.rc into a .tgz file
KTar tar(tempFileName, "application/x-gzip");
@@ -3583,11 +3583,11 @@ QString QuantaApp::createDTEPTarball()
KURL::List files = QExtFileInfo::allFilesRelative(dirURL, "*", this);
for ( KURL::List::Iterator it_f = files.begin(); it_f != files.end(); ++it_f )
{
- QString name = (*it_f).fileName();
+ TQString name = (*it_f).fileName();
- QFile file(dirURL.path()+name);
+ TQFile file(dirURL.path()+name);
file.open(IO_ReadOnly);
- QByteArray bArray = file.readAll();
+ TQByteArray bArray = file.readAll();
tar.writeFile(dirURL.fileName()+"/"+name, "user", "group", bArray.size(), bArray.data());
file.close();
@@ -3595,7 +3595,7 @@ QString QuantaApp::createDTEPTarball()
tar.close();
return tempFileName;
}
- return QString::null;
+ return TQString::null;
}
void QuantaApp::slotEmailDTEP()
@@ -3603,22 +3603,22 @@ void QuantaApp::slotEmailDTEP()
Document *w = ViewManager::ref()->activeDocument();
if (w)
{
- QString tempFileName = createDTEPTarball();
+ TQString tempFileName = createDTEPTarball();
if (tempFileName.isNull())
return;
- QStringList dtdFile;
+ TQStringList dtdFile;
dtdFile += tempFileName;
TagMailDlg *mailDlg = new TagMailDlg( this, i18n("Send DTEP in Email"));
- QString toStr;
- QString message = i18n("Hi,\n This is a Quanta Plus [http://quanta.kdewebdev.org] DTEP definition tarball.\n\nHave fun.\n");
- QString titleStr;
- QString subjectStr;
+ TQString toStr;
+ TQString message = i18n("Hi,\n This is a Quanta Plus [http://quanta.kdewebdev.org] DTEP definition tarball.\n\nHave fun.\n");
+ TQString titleStr;
+ TQString subjectStr;
mailDlg->TitleLabel->setText(i18n("Content:"));
/* mailDlg->titleEdit->setFixedHeight(60);
- mailDlg->titleEdit->setVScrollBarMode(QTextEdit::Auto);
- mailDlg->titleEdit->setHScrollBarMode(QTextEdit::Auto);*/
+ mailDlg->titleEdit->setVScrollBarMode(TQTextEdit::Auto);
+ mailDlg->titleEdit->setHScrollBarMode(TQTextEdit::Auto);*/
if ( mailDlg->exec() )
{
if ( !mailDlg->lineEmail->text().isEmpty())
@@ -3634,7 +3634,7 @@ void QuantaApp::slotEmailDTEP()
return;
}
- kapp->invokeMailer(toStr, QString::null, QString::null, subjectStr, message, QString::null, dtdFile);
+ kapp->invokeMailer(toStr, TQString::null, TQString::null, subjectStr, message, TQString::null, dtdFile);
}
delete mailDlg;
}
@@ -3649,7 +3649,7 @@ void QuantaApp::slotDownloadDTEP()
void QuantaApp::slotUploadDTEP()
{
- QString tempFileName = createDTEPTarball();
+ TQString tempFileName = createDTEPTarball();
if (tempFileName.isNull())
return;
if (!m_newDTEPStuff)
@@ -3681,7 +3681,7 @@ void QuantaApp::slotDownloadTemplate()
m_newTemplateStuff->downloadResource();
}
-void QuantaApp::slotUploadTemplate(const QString &fileName)
+void QuantaApp::slotUploadTemplate(const TQString &fileName)
{
if (!m_newTemplateStuff)
m_newTemplateStuff = new QNewTemplateStuff("quanta/template", this);
@@ -3696,7 +3696,7 @@ void QuantaApp::slotDownloadScript()
m_newScriptStuff->downloadResource();
}
-void QuantaApp::slotUploadScript(const QString &fileName)
+void QuantaApp::slotUploadScript(const TQString &fileName)
{
if (!m_newScriptStuff)
m_newScriptStuff = new QNewScriptStuff("quanta/script", this);
@@ -3709,7 +3709,7 @@ void QuantaApp::slotDownloadDoc()
if (!m_newDocStuff)
{
m_newDocStuff = new QNewDocStuff("quanta/documentation", this);
- connect(m_newDocStuff, SIGNAL(installFinished()), dTab, SLOT(slotRefreshTree()));
+ connect(m_newDocStuff, TQT_SIGNAL(installFinished()), dTab, TQT_SLOT(slotRefreshTree()));
}
m_newDocStuff->downloadResource();
}
@@ -3764,15 +3764,15 @@ int QuantaApp::currentEditorIfNum() const
}
}
-QString QuantaApp::projectURL() const
+TQString QuantaApp::projectURL() const
{
return Project::ref()->projectBaseURL().url();
}
-QStringList QuantaApp::openedURLs() const
+TQStringList QuantaApp::openedURLs() const
{
- QStringList list;
- QPtrListIterator<KMdiChildView> childIt(*m_pDocumentViews);
+ TQStringList list;
+ TQPtrListIterator<KMdiChildView> childIt(*m_pDocumentViews);
KMdiChildView *view;
QuantaView *qView;
while ( (view = childIt.current()) != 0 )
@@ -3784,7 +3784,7 @@ QStringList QuantaApp::openedURLs() const
Document *w = qView->document();
if ( w )
{
- list.prepend( QString("%1:%2").arg(w->editIf->editInterfaceNumber()).arg(w->url().url()));
+ list.prepend( TQString("%1:%2").arg(w->editIf->editInterfaceNumber()).arg(w->url().url()));
}
}
}
@@ -3800,17 +3800,17 @@ void QuantaApp::slotExpandAbbreviation()
const DTDStruct *dtd = w->currentDTD();
uint line, col;
w->viewCursorIf->cursorPositionReal(&line, &col);
- QString text = w->text(line, 0, line, col - 1);
+ TQString text = w->text(line, 0, line, col - 1);
text = w->findWordRev(text) + " ";
- QString textToInsert;
- QMap<QString, Abbreviation>::ConstIterator it;
+ TQString textToInsert;
+ TQMap<TQString, Abbreviation>::ConstIterator it;
for (it = qConfig.abbreviations.constBegin(); it != qConfig.abbreviations.constEnd(); ++it)
{
bool found = false;
Abbreviation abbrev = it.data();
if (abbrev.dteps.contains(dtd->name))
{
- QMap<QString, QString>::ConstIterator it2;
+ TQMap<TQString, TQString>::ConstIterator it2;
for (it2 = abbrev.abbreviations.constBegin(); it2 != abbrev.abbreviations.constEnd(); ++it2)
{
if (it2.key().startsWith(text))
@@ -3886,28 +3886,28 @@ bool QuantaApp::structTreeVisible() const
return StructTreeView::ref()->isVisible();
}
-QStringList QuantaApp::tagAreas(const QString &tag, bool includeCoordinates, bool skipFoundContent) const
+TQStringList QuantaApp::tagAreas(const TQString &tag, bool includeCoordinates, bool skipFoundContent) const
{
Document *w = ViewManager::ref()->activeDocument();
if (w)
return w->tagAreas(tag, includeCoordinates, skipFoundContent);
else
- return QStringList();
+ return TQStringList();
}
-QString QuantaApp::documentFolderForURL(const QString &url)
+TQString QuantaApp::documentFolderForURL(const TQString &url)
{
KURL u = KURL::fromPathOrURL(url);
return Project::ref()->documentFolderForURL(u).url();
}
-QString QuantaApp::urlWithPreviewPrefix(const QString &url)
+TQString QuantaApp::urlWithPreviewPrefix(const TQString &url)
{
KURL u = KURL::fromPathOrURL(url);
return Project::ref()->urlWithPrefix(u).url();
}
-void QuantaApp::addFileToProject(const QString &url)
+void QuantaApp::addFileToProject(const TQString &url)
{
if (Project::ref()->hasProject())
{
@@ -3915,7 +3915,7 @@ void QuantaApp::addFileToProject(const QString &url)
}
}
-void QuantaApp::addFolderToProject(const QString &url)
+void QuantaApp::addFolderToProject(const TQString &url)
{
if (Project::ref()->hasProject())
{
@@ -3923,7 +3923,7 @@ void QuantaApp::addFolderToProject(const QString &url)
}
}
-void QuantaApp::uploadURL(const QString &url, const QString& profile, bool markOnly)
+void QuantaApp::uploadURL(const TQString &url, const TQString& profile, bool markOnly)
{
if (Project::ref()->hasProject())
{
@@ -3934,7 +3934,7 @@ void QuantaApp::uploadURL(const QString &url, const QString& profile, bool markO
void QuantaApp::slotAutosaveTimer()
{
m_config->reparseConfiguration();
- QPtrListIterator<KMdiChildView> childIt(*m_pDocumentViews);
+ TQPtrListIterator<KMdiChildView> childIt(*m_pDocumentViews);
KMdiChildView *view;
QuantaView *qView;
while ( (view = childIt.current()) != 0 )
@@ -3956,9 +3956,9 @@ void QuantaApp::slotAutosaveTimer()
/** Get script output */
void QuantaApp::slotGetScriptOutput(KProcess* ,char* buf,int buflen)
{
- QCString tmp( buf, buflen + 1 );
- m_scriptOutput = QString::null;
- m_scriptOutput = QString::fromLocal8Bit(tmp).remove(" ");
+ TQCString tmp( buf, buflen + 1 );
+ m_scriptOutput = TQString::null;
+ m_scriptOutput = TQString::fromLocal8Bit(tmp).remove(" ");
}
/** Get script error*/
@@ -3993,7 +3993,7 @@ void QuantaApp::slotActivePartChanged(KParts::Part * part)
m_oldKTextEditor = 0L;
}
createGUI(part);
- QWidget * activeWid = m_partManager->activeWidget();
+ TQWidget * activeWid = m_partManager->activeWidget();
if ( activeWid && activeWid->inherits("KTextEditor::View"))
{
m_oldKTextEditor = dynamic_cast<KTextEditor::View *>(activeWid);
@@ -4039,12 +4039,12 @@ void QuantaApp::slotReloadStructTreeView(bool groupOnly)
n = node->child;
}
Tag *commentTag = n->tag;
- QString text = commentTag->tagStr();
+ TQString text = commentTag->tagStr();
int pos = text.find("@annotation");
if (pos != -1)
{
pos += 11;
- QString receiver;
+ TQString receiver;
if (text[pos] == '(')
{
int p = pos;
@@ -4070,11 +4070,11 @@ void QuantaApp::slotReloadStructTreeView(bool groupOnly)
}
}
-QString QuantaApp::saveCurrentFile()
+TQString QuantaApp::saveCurrentFile()
{
Document *w = ViewManager::ref()->activeDocument();
if (!w)
- return QString::null;
+ return TQString::null;
if (w->isModified())
{
if ( KMessageBox::questionYesNo(this,
@@ -4094,7 +4094,7 @@ QString QuantaApp::saveCurrentFile()
}
} else
{
- return QString::null;
+ return TQString::null;
}
}
KURL url = Project::ref()->urlWithPrefix(w->url());
@@ -4122,7 +4122,7 @@ bool QuantaApp::queryClose()
if (quantaStarted)
{
m_config->setGroup("General Options");
- QStringList urlStrList;
+ TQStringList urlStrList;
KURL::List urlList = ViewManager::ref()->openedFiles();
KURL u;
for (KURL::List::Iterator it = urlList.begin(); it != urlList.end(); ++it)
@@ -4132,13 +4132,13 @@ bool QuantaApp::queryClose()
urlStrList += u.url();
}
m_config->writePathEntry("List of opened files", urlStrList);
- QStringList encodings;
- QValueList<Document*> documents = ViewManager::ref()->openedDocuments();
- for (QValueList<Document*>::ConstIterator it = documents.constBegin(); it != documents.constEnd(); ++it)
+ TQStringList encodings;
+ TQValueList<Document*> documents = ViewManager::ref()->openedDocuments();
+ for (TQValueList<Document*>::ConstIterator it = documents.constBegin(); it != documents.constEnd(); ++it)
{
if (!(*it)->isUntitled())
{
- QString encoding = defaultEncoding();
+ TQString encoding = defaultEncoding();
KTextEditor::EncodingInterface* encodingIf = dynamic_cast<KTextEditor::EncodingInterface*>((*it)->doc());
if (encodingIf)
encoding = encodingIf->encoding();
@@ -4160,7 +4160,7 @@ bool QuantaApp::queryClose()
{
saveOptions();
// kdDebug(24000) << "Quanta will exit" << endl;
- emit eventHappened("quanta_exit", QDateTime::currentDateTime().toString(Qt::ISODate), QString::null);
+ emit eventHappened("quanta_exit", TQDateTime::currentDateTime().toString(Qt::ISODate), TQString::null);
} else
slotFileNew();
return canExit;
@@ -4205,7 +4205,7 @@ void QuantaApp::saveOptions()
//If user choose the timer interval, it needs to restart the timer too
m_config->writeEntry("Autosave interval", qConfig.autosaveInterval);
m_config->writePathEntry("Top folders", fTab->topURLList.toStringList());
- QStringList aliasList;
+ TQStringList aliasList;
for (KURL::List::Iterator it2 = fTab->topURLList.begin(); it2 != fTab->topURLList.end(); ++it2)
{
aliasList.append(fTab->topURLAliases[(*it2).url()]);
@@ -4248,12 +4248,12 @@ void QuantaApp::statusBarTimeout()
statusBar()->changeItem("", IDS_STATUS);
}
-QStringList QuantaApp::selectors(const QString &tag)
+TQStringList QuantaApp::selectors(const TQString &tag)
{
return dcopQuanta->selectors(tag);
}
-QStringList QuantaApp::idSelectors()
+TQStringList QuantaApp::idSelectors()
{
return dcopQuanta->idSelectors();
}
@@ -4271,7 +4271,7 @@ void QuantaApp::slotEditCurrentTag()
w->viewCursorIf->cursorPositionReal(&line, &col);
Node *node = parser->nodeAt(line, col, false);
bool isUnknown = true;
- QString tagName;
+ TQString tagName;
if (node && node->tag)
{
Tag *tag = new Tag(*node->tag); //create a copy, as a reparse might happen meantime and that would make node (and node->tag) invalid
@@ -4279,7 +4279,7 @@ void QuantaApp::slotEditCurrentTag()
if ( QuantaCommon::isKnownTag(tag->dtd()->name,tagName) )
{
isUnknown = false;
- QString selection;
+ TQString selection;
if (w->selectionIf)
selection = w->selectionIf->selection();
TagDialog *dlg = new TagDialog( QuantaCommon::tagFromDTD(tag->dtd(),tagName), tag, selection, ViewManager::ref()->activeView()->baseURL() );
@@ -4296,7 +4296,7 @@ void QuantaApp::slotEditCurrentTag()
const DTDStruct *dtd = w->defaultDTD();
if (dtd->family == Xml)
{
- QString currentLine = w->editIf->textLine(line);
+ TQString currentLine = w->editIf->textLine(line);
int sPos = currentLine.findRev('<', col);
if (sPos != -1)
{
@@ -4308,7 +4308,7 @@ void QuantaApp::slotEditCurrentTag()
if ( QuantaCommon::isKnownTag(dtd->name, tag->name) )
{
isUnknown = false;
- QString selection;
+ TQString selection;
if (w->selectionIf)
selection = w->selectionIf->selection();
TagDialog *dlg = new TagDialog( QuantaCommon::tagFromDTD(dtd, tag->name), tag, selection, ViewManager::ref()->activeView()->baseURL() );
@@ -4327,7 +4327,7 @@ void QuantaApp::slotEditCurrentTag()
slotEnableIdleTimer(true);
if (isUnknown)
{
- QString message = i18n("Unknown tag: %1").arg(tagName);
+ TQString message = i18n("Unknown tag: %1").arg(tagName);
slotStatusMsg( message );
}
}
@@ -4378,17 +4378,17 @@ void QuantaApp::slotFrameWizard()
Document *w = ViewManager::ref()->activeDocument();
if (!w)
return;
- QStringList list = w->tagAreas("frameset", true, true);
+ TQStringList list = w->tagAreas("frameset", true, true);
bool framesetExists = !list.isEmpty();
int bl, bc, el, ec;
bl = bc = el = ec = 0;
- QStringList l;
- QStringList l2;
+ TQStringList l;
+ TQStringList l2;
QuantaCommon::normalizeStructure(list[0],l2);
if (framesetExists)
{
- l = QStringList::split('\n',list[0],true);
- QStringList coordList = QStringList::split(',', l[0], true);
+ l = TQStringList::split('\n',list[0],true);
+ TQStringList coordList = TQStringList::split(',', l[0], true);
bl = coordList[0].toInt();
bc = coordList[1].toInt();
el = coordList[2].toInt();
@@ -4407,8 +4407,8 @@ void QuantaApp::slotFrameWizard()
if ( dlg.exec() )
{
- QString tag =
-QString("\n")+dlg.generateFramesetStructure()+QString("\n");
+ TQString tag =
+TQString("\n")+dlg.generateFramesetStructure()+TQString("\n");
if (framesetExists)
{
w->activateParser(false);
@@ -4452,7 +4452,7 @@ void QuantaApp::slotInsertCSS()
while (parentNode && parentNode->parent &&
parentNode->tag->type != Tag::XmlTag)
parentNode = parentNode->parent;
- QString fullDocument = w->editIf->text().stripWhiteSpace();
+ TQString fullDocument = w->editIf->text().stripWhiteSpace();
if (styleNode->tag->name.lower() == "comment block" && styleNode->parent) {
if (styleNode->parent->tag->name.lower() == "style") {
@@ -4463,17 +4463,17 @@ void QuantaApp::slotInsertCSS()
if (styleNode && styleNode->tag->name.lower() == "style" && styleNode->next) //inside <style> invoke the selector editor
{
styleNode->tag->endPos(bLine, bCol);
- QString header(w->text(0, 0, bLine, bCol));// beginning part of the file
+ TQString header(w->text(0, 0, bLine, bCol));// beginning part of the file
styleNode->next->tag->endPos(eLine, eCol);
- QString footer("</style>" + w->text(eLine, eCol+1, lastLine, lastCol)); // ending part of the file
+ TQString footer("</style>" + w->text(eLine, eCol+1, lastLine, lastCol)); // ending part of the file
styleNode->next->tag->beginPos(eLine, eCol);
- QString styleTagContent(w->text(bLine, bCol+1, eLine, eCol-1).remove("<!--").remove("-->"));// <style></style> block content
+ TQString styleTagContent(w->text(bLine, bCol+1, eLine, eCol-1).remove("<!--").remove("-->"));// <style></style> block content
kdDebug(24000) << "Style tag contains: " << endl << styleTagContent << endl;
CSSSelector *dlg = new CSSSelector;
dlg->setCallingFrom("XHTML");
- QFileInfo fi(ViewManager::ref()->currentURL());
+ TQFileInfo fi(ViewManager::ref()->currentURL());
dlg->setFileToPreview(projectBaseURL().path() + fi.baseName());
@@ -4517,7 +4517,7 @@ void QuantaApp::slotInsertCSS()
{
kdDebug(24000) << "[CSS editor] We will add a style attribute to: " << parentNode->tag->name << endl;
CSSEditor *dlg = new CSSEditor(this);
- QFileInfo fi(ViewManager::ref()->currentURL());
+ TQFileInfo fi(ViewManager::ref()->currentURL());
dlg->setFileToPreview(projectBaseURL().path() + fi.baseName(),false);
@@ -4525,7 +4525,7 @@ void QuantaApp::slotInsertCSS()
parentNode->tag->endPos(eLine, eCol);
dlg->setFooter(">" + w->text(eLine, eCol + 1, lastLine, lastCol));
- QString temp;
+ TQString temp;
if (parentNode->tag->hasAttribute("style"))
{
dlg->setInlineStyleContent(parentNode->tag->attributeValue("style"));
@@ -4534,10 +4534,10 @@ void QuantaApp::slotInsertCSS()
temp = tempTag.toString();
} else {
- dlg->setInlineStyleContent(QString::null);
+ dlg->setInlineStyleContent(TQString::null);
temp = parentNode->tag->toString();
}
- //using QString::mid sometimes generates strange results; maybe this is due to a (random) blank in temp
+ //using TQString::mid sometimes generates strange results; maybe this is due to a (random) blank in temp
temp = temp.left(temp.length()-1);//remove >
temp = temp.right(temp.length()-1);//remove <
dlg->setHeader(w->text(0, 0, bLine, bCol) + temp);
@@ -4561,19 +4561,19 @@ void QuantaApp::slotTagMail()
TagMailDlg *mailDlg = new TagMailDlg( this, i18n("Email Link (mailto)"));
if ( mailDlg->exec() ) {
- QString tag = QString(QuantaCommon::tagCase("<a"));
+ TQString tag = TQString(QuantaCommon::tagCase("<a"));
- if ( !QString(mailDlg->lineEmail->text()).isEmpty())
+ if ( !TQString(mailDlg->lineEmail->text()).isEmpty())
{
tag += QuantaCommon::attrCase(" href=")+qConfig.attrValueQuotation+"mailto:"+mailDlg->lineEmail->text();
- if ( !QString(mailDlg->lineSubject->text()).isEmpty())
+ if ( !TQString(mailDlg->lineSubject->text()).isEmpty())
tag += "?subject="+KURL::encode_string(mailDlg->lineSubject->text());
tag += qConfig.attrValueQuotation;
}
- if ( !QString(mailDlg->titleEdit->text()).isEmpty())
+ if ( !TQString(mailDlg->titleEdit->text()).isEmpty())
tag += QuantaCommon::attrCase(" title=")+qConfig.attrValueQuotation+mailDlg->titleEdit->text()+qConfig.attrValueQuotation;
- tag += QString(">");
+ tag += TQString(">");
w->insertTag(tag,QuantaCommon::tagCase("</a>"));
}
delete mailDlg;
@@ -4586,14 +4586,14 @@ void QuantaApp::slotTagMisc()
Document *w = ViewManager::ref()->activeDocument();
if (!w) return;
- static QString element = "";
+ static TQString element = "";
static bool addClosingTag = true;
TagMiscDlg * miscDlg = new TagMiscDlg( this, 0L, addClosingTag, element );
if ( miscDlg->exec() )
{
- QString tag;
+ TQString tag;
element = miscDlg->elementTagName();
element.remove('<');
element.remove('>');
@@ -4616,7 +4616,7 @@ void QuantaApp::slotTagMisc()
/** do quick list */
void QuantaApp::slotTagQuickList()
{
- QString space =" " ;
+ TQString space =" " ;
Document *w = ViewManager::ref()->activeDocument();
if (!w) return;
@@ -4625,20 +4625,20 @@ void QuantaApp::slotTagQuickList()
int i;
int n = listDlg->spinBoxRows->value();
- QString tag;
+ TQString tag;
if ( listDlg->radioOrdered->isChecked())
- tag = QString("<ol>\n")+space;
- else tag = QString("<ul>\n")+space;
+ tag = TQString("<ol>\n")+space;
+ else tag = TQString("<ul>\n")+space;
for ( i=0;i<n;i++)
if ( qConfig.closeTags )
- tag += QString(" <li> </li>\n")+space;
+ tag += TQString(" <li> </li>\n")+space;
else
- tag += QString(" <li> \n")+space;
+ tag += TQString(" <li> \n")+space;
if ( listDlg->radioOrdered->isChecked())
- tag += QString("</ol>");
- else tag += QString("</ul>");
+ tag += TQString("</ol>");
+ else tag += TQString("</ul>");
w->insertTag( QuantaCommon::tagCase(tag));
}
@@ -4650,20 +4650,20 @@ void QuantaApp::slotTagEditTable()
Document *w = ViewManager::ref()->activeDocument();
if (!w) return;
baseNode = parser->rebuild(w);
- QStringList list = w->tagAreas("table", true, false);
+ TQStringList list = w->tagAreas("table", true, false);
bool tableExists = false;
uint line, col;
w->viewCursorIf->cursorPositionReal(&line, &col);
int bl, bc, el, ec;
int bLine, bCol, eLine, eCol;
bLine = bCol = eLine = eCol = 0;
- QStringList l;
- QStringList l2;
- for (QStringList::Iterator it = list.begin(); it != list.end(); ++it)
+ TQStringList l;
+ TQStringList l2;
+ for (TQStringList::Iterator it = list.begin(); it != list.end(); ++it)
{
QuantaCommon::normalizeStructure(*it, l2);
- l = QStringList::split('\n', *it, true);
- QStringList coordList = QStringList::split(',', l[0], true);
+ l = TQStringList::split('\n', *it, true);
+ TQStringList coordList = TQStringList::split(',', l[0], true);
bl = coordList[0].toInt();
bc = coordList[1].toInt();
el = coordList[2].toInt();
@@ -4703,7 +4703,7 @@ void QuantaApp::slotTagEditTable()
}
if (tableRead && editor.exec())
{
- QString tableString = editor.readModifiedTable();
+ TQString tableString = editor.readModifiedTable();
w->activateParser(false);
//#ifdef BUILD_KAFKAPART
// if(w->editIfExt)
@@ -4727,13 +4727,13 @@ void QuantaApp::slotTagColor()
{
Document *w = ViewManager::ref()->activeDocument();
if (!w) return;
- QColor color;
+ TQColor color;
if (KColorDialog::getColor( color )) {
char c[8];
sprintf(c,"#%2X%2X%2X",color.red(),color.green(),color.blue());
for (int i=0;i<7;i++) if (c[i] == ' ') c[i] = '0';
- QString scolor = (char *)c;
+ TQString scolor = (char *)c;
w->insertTag(scolor);
}
}
@@ -4745,7 +4745,7 @@ void QuantaApp::slotTagDate()
if (!w) return;
time_t tektime;
time( &tektime);
- QString stime = ctime( &tektime);
+ TQString stime = ctime( &tektime);
w->insertTag( stime);
}
@@ -4841,7 +4841,7 @@ void QuantaApp::slotPasteHTMLQuoted()
if (w)
{
QClipboard *cb = qApp->clipboard();
- QString text = cb->text();
+ TQString text = cb->text();
if ( ( !text.isNull() ) && (!text.isEmpty() ) )
{
@@ -4851,15 +4851,15 @@ void QuantaApp::slotPasteHTMLQuoted()
text.replace( ">", "&gt;" );
//TODO: Replace only the chars not present in the current encoding.
- QString encoding = defaultEncoding();
+ TQString encoding = defaultEncoding();
KTextEditor::EncodingInterface* encodingIf = dynamic_cast<KTextEditor::EncodingInterface*>(w->doc());
if (encodingIf)
encoding = encodingIf->encoding();
if (encoding != "UTF-8" && encoding != "UTF-16" && encoding != "ISO-10646-UCS-2")
{
- for ( QStringList::Iterator it = charList.begin(); it != charList.end(); ++it )
+ for ( TQStringList::Iterator it = charList.begin(); it != charList.end(); ++it )
{
- QString s = *it;
+ TQString s = *it;
int begin = s.find("(&#") + 3;
if (begin == 1)
continue;
@@ -4869,7 +4869,7 @@ void QuantaApp::slotPasteHTMLQuoted()
int code = s.toInt(&ok);
if (!ok || code < 191)
continue;
- text.replace(QChar(code), QString("&#%1;").arg(s));
+ text.replace(TQChar(code), TQString("&#%1;").arg(s));
}
}
unsigned int line, col;
@@ -4886,7 +4886,7 @@ void QuantaApp::slotPasteURLEncoded()
if (w)
{
QClipboard *cb = qApp->clipboard();
- QString text = cb->text();
+ TQString text = cb->text();
if ( ( !text.isNull() ) && (!text.isEmpty() ) )
{
@@ -4907,7 +4907,7 @@ void QuantaApp::slotUndo ()
if(ViewManager::ref()->activeView()->hadLastFocus() == QuantaView::VPLFocus && w)
{
/**MessageBox::information(this, i18n("VPL does not support this functionality yet."),
- QString::null, "show undo unavailable");*/
+ TQString::null, "show undo unavailable");*/
w->docUndoRedo->undo();
return;
}
@@ -4932,7 +4932,7 @@ void QuantaApp::slotRedo ()
if(ViewManager::ref()->activeView()->hadLastFocus() == QuantaView::VPLFocus)
{
/**KMessageBox::information(this, i18n("VPL does not support this functionality yet."),
- QString::null, "show redo unavailable");*/
+ TQString::null, "show redo unavailable");*/
w->docUndoRedo->redo();
return;
}
@@ -4971,7 +4971,7 @@ void QuantaApp::slotCut()
{
/*
KMessageBox::information(this, i18n("Sorry, VPL does not support this functionality yet."),
- QString::null, "show cut unavailable");
+ TQString::null, "show cut unavailable");
*/
KafkaDocument::ref()->slotCut();
return;
@@ -4991,7 +4991,7 @@ void QuantaApp::slotCopy()
if(view && view->hadLastFocus() == QuantaView::VPLFocus)
{
//KMessageBox::information(this, i18n("Sorry, VPL does not support this functionality yet."),
- //QString::null, "show copy unavailable");
+ //TQString::null, "show copy unavailable");
KafkaDocument::ref()->slotCopy();
return;
}
@@ -5003,15 +5003,15 @@ void QuantaApp::slotCopy()
}
if (m_htmlPart->view()->hasFocus())
{
- QString selection = m_htmlPart->selectedText();
- QClipboard *cb = QApplication::clipboard();
+ TQString selection = m_htmlPart->selectedText();
+ QClipboard *cb = TQApplication::clipboard();
cb->setText(selection, QClipboard::Clipboard);
}
else
if (m_htmlPartDoc->view()->hasFocus())
{
- QString selection = m_htmlPartDoc->selectedText();
- QClipboard *cb = QApplication::clipboard();
+ TQString selection = m_htmlPartDoc->selectedText();
+ QClipboard *cb = TQApplication::clipboard();
cb->setText(selection, QClipboard::Clipboard);
}
@@ -5024,7 +5024,7 @@ void QuantaApp::slotPaste()
if(view && view->hadLastFocus() == QuantaView::VPLFocus)
{
//KMessageBox::information(this, i18n("Sorry, VPL does not support this functionality yet."),
- //QString::null, "show paste unavailable");
+ //TQString::null, "show paste unavailable");
KafkaDocument::ref()->slotPaste();
return;
}
@@ -5036,7 +5036,7 @@ void QuantaApp::slotPaste()
}
}
-Node *QuantaApp::showTagDialogAndReturnNode(const QString &tag, const QString &attr)
+Node *QuantaApp::showTagDialogAndReturnNode(const TQString &tag, const TQString &attr)
{
Node *n = 0L;
QuantaView *view = ViewManager::ref()->activeView();
@@ -5044,7 +5044,7 @@ Node *QuantaApp::showTagDialogAndReturnNode(const QString &tag, const QString &a
{
Document *w = view->document();
- QString selection;
+ TQString selection;
if(view->hadLastFocus() == QuantaView::VPLFocus)
selection = KafkaDocument::ref()->getKafkaWidget()->selectedText();
@@ -5106,9 +5106,9 @@ void QuantaApp::initTabWidget(bool closeButtonsOnly)
if (!closeButtonsOnly)
{
tab->setTabReorderingEnabled(true);
- tab->setTabPosition(QTabWidget::Bottom);
- connect(tab, SIGNAL( contextMenu( QWidget *, const QPoint & ) ), ViewManager::ref(), SLOT(slotTabContextMenu( QWidget *, const QPoint & ) ) );
- connect(tab, SIGNAL(initiateTabMove(int, int)), this, SLOT(slotTabAboutToMove(int, int))); connect(tab, SIGNAL(movedTab(int, int)), this, SLOT(slotTabMoved(int, int))); setTabWidgetVisibility(KMdi::AlwaysShowTabs);
+ tab->setTabPosition(TQTabWidget::Bottom);
+ connect(tab, TQT_SIGNAL( contextMenu( TQWidget *, const TQPoint & ) ), ViewManager::ref(), TQT_SLOT(slotTabContextMenu( TQWidget *, const TQPoint & ) ) );
+ connect(tab, TQT_SIGNAL(initiateTabMove(int, int)), this, TQT_SLOT(slotTabAboutToMove(int, int))); connect(tab, TQT_SIGNAL(movedTab(int, int)), this, TQT_SLOT(slotTabMoved(int, int))); setTabWidgetVisibility(KMdi::AlwaysShowTabs);
}
}
if (!closeButtonsOnly)
@@ -5128,15 +5128,15 @@ void QuantaApp::slotFileClosed(Document *w)
}
}
-void QuantaApp::slotCVSCommandExecuted(const QString& command, const QStringList& files)
+void QuantaApp::slotCVSCommandExecuted(const TQString& command, const TQStringList& files)
{
- QString file;
+ TQString file;
for (uint i = 0; i < files.count(); i++)
{
file = files[i];
if (Project::ref()->contains(KURL::fromPathOrURL(file)))
{
- emit eventHappened("after_" + command, file, QString::null);
+ emit eventHappened("after_" + command, file, TQString::null);
}
}
}
@@ -5154,8 +5154,8 @@ void QuantaApp::closeAllViews()
void QuantaApp::resetDockLayout()
{
- QStringList groupList = m_config->groupList();
- for (QStringList::Iterator it = groupList.begin(); it != groupList.end(); ++it)
+ TQStringList groupList = m_config->groupList();
+ for (TQStringList::Iterator it = groupList.begin(); it != groupList.end(); ++it)
{
if ((*it).startsWith("dock_setting_default"))
{
@@ -5163,7 +5163,7 @@ void QuantaApp::resetDockLayout()
}
}
m_config->sync();
- QWidget *mainDockWidget = getMainDockWidget();
+ TQWidget *mainDockWidget = getMainDockWidget();
addToolWindow(fTab, KDockWidget::DockLeft, mainDockWidget);
addToolWindow(ProjectTreeView::ref(), KDockWidget::DockLeft, mainDockWidget);
addToolWindow(TemplatesTreeView::ref(), KDockWidget::DockLeft, mainDockWidget);
@@ -5178,9 +5178,9 @@ void QuantaApp::resetDockLayout()
m_previewToolView = addToolWindow(m_htmlPart->view(), KDockWidget::DockBottom, mainDockWidget);
if (m_documentationToolView)
m_documentationToolView= addToolWindow(m_htmlPartDoc->view(), KDockWidget::DockBottom, mainDockWidget);
- for (QMap<QWidget*,KMdiToolViewAccessor*>::Iterator it = m_pToolViews->begin(); it != m_pToolViews->end(); ++it)
+ for (TQMap<TQWidget*,KMdiToolViewAccessor*>::Iterator it = m_pToolViews->begin(); it != m_pToolViews->end(); ++it)
{
- QWidget *widget = it.key();
+ TQWidget *widget = it.key();
if (dynamic_cast<ServerTreeView*>(widget))
addToolWindow(widget, KDockWidget::DockRight, mainDockWidget);
if (dynamic_cast<VariablesListView*>(widget))
@@ -5190,11 +5190,11 @@ void QuantaApp::resetDockLayout()
}
}
-KDockWidget::DockPosition QuantaApp::prevDockPosition(QWidget* widget, KDockWidget::DockPosition def)
+KDockWidget::DockPosition QuantaApp::prevDockPosition(TQWidget* widget, KDockWidget::DockPosition def)
{
- QMap<KDockWidget::DockPosition,QString> maps;
- QMap<QString,QString> map;
- QString dock = widget->name();
+ TQMap<KDockWidget::DockPosition,TQString> maps;
+ TQMap<TQString,TQString> map;
+ TQString dock = widget->name();
// Which groups to search through
maps[KDockWidget::DockTop] = "dock_setting_default::KMdiDock::topDock";
@@ -5203,11 +5203,11 @@ KDockWidget::DockPosition QuantaApp::prevDockPosition(QWidget* widget, KDockWidg
maps[KDockWidget::DockRight] = "dock_setting_default::KMdiDock::rightDock";
// Loop the groups
- for(QMap<KDockWidget::DockPosition,QString>::Iterator itmaps = maps.begin(); itmaps != maps.end(); ++itmaps )
+ for(TQMap<KDockWidget::DockPosition,TQString>::Iterator itmaps = maps.begin(); itmaps != maps.end(); ++itmaps )
{
// Loop the items in the group
map = quantaApp->config()->entryMap(itmaps.data());
- for(QMap<QString,QString>::Iterator it = map.begin(); it != map.end(); ++it )
+ for(TQMap<TQString,TQString>::Iterator it = map.begin(); it != map.end(); ++it )
{
// If we found it, return the key of the group
if(it.data() == dock)
@@ -5258,18 +5258,18 @@ void QuantaApp::slotDockWidgetHasUndocked(KDockWidget *widget)
slotPreviewBeingClosed();
}
-void QuantaApp::slotTabDragged(QWidget *widget)
+void QuantaApp::slotTabDragged(TQWidget *widget)
{
QuantaView *view = dynamic_cast<QuantaView*>(widget);
if (view && view->document())
{
- QString url = view->document()->url().url();
- QDragObject *d = new QTextDrag( url, this );
+ TQString url = view->document()->url().url();
+ TQDragObject *d = new TQTextDrag( url, this );
d->dragCopy();
}
}
-void QuantaApp::setTabToolTip(QWidget *w, const QString &toolTipStr)
+void QuantaApp::setTabToolTip(TQWidget *w, const TQString &toolTipStr)
{
if (tabWidget())
tabWidget()->setTabToolTip(w, toolTipStr);
@@ -5282,10 +5282,10 @@ void QuantaApp::createPreviewPart()
m_htmlPart->view()->setIcon(UserIcon("preview"));
m_htmlPart->view()->setCaption(i18n("Preview"));
slotNewPart(m_htmlPart, false);
- connect(m_htmlPart, SIGNAL(previewHasFocus(bool)), this, SLOT(slotPreviewHasFocus(bool)));
- connect(m_htmlPart, SIGNAL(destroyed(QObject *)), this, SLOT(slotHTMLPartDeleted(QObject *)));
- connect(m_htmlPart, SIGNAL(openFile(const KURL&, const QString&, bool)), this, SLOT(slotFileOpen(const KURL&, const QString&, bool)));
- connect(m_htmlPart, SIGNAL(showPreview(bool)), this, SLOT(slotShowPreviewWidget(bool)));
+ connect(m_htmlPart, TQT_SIGNAL(previewHasFocus(bool)), this, TQT_SLOT(slotPreviewHasFocus(bool)));
+ connect(m_htmlPart, TQT_SIGNAL(destroyed(TQObject *)), this, TQT_SLOT(slotHTMLPartDeleted(TQObject *)));
+ connect(m_htmlPart, TQT_SIGNAL(openFile(const KURL&, const TQString&, bool)), this, TQT_SLOT(slotFileOpen(const KURL&, const TQString&, bool)));
+ connect(m_htmlPart, TQT_SIGNAL(showPreview(bool)), this, TQT_SLOT(slotShowPreviewWidget(bool)));
}
@@ -5296,21 +5296,21 @@ void QuantaApp::createDocPart()
m_htmlPartDoc->view()->setIcon(SmallIcon("contents"));
m_htmlPartDoc->view()->setCaption(i18n("Documentation"));
slotNewPart(m_htmlPartDoc, false);
- connect(m_htmlPartDoc, SIGNAL(destroyed(QObject *)), this, SLOT(slotHTMLPartDeleted(QObject *)));
+ connect(m_htmlPartDoc, TQT_SIGNAL(destroyed(TQObject *)), this, TQT_SLOT(slotHTMLPartDeleted(TQObject *)));
}
-void QuantaApp::insertTagActionPoolItem(QString const& action_item)
+void QuantaApp::insertTagActionPoolItem(TQString const& action_item)
{
- for(QStringList::Iterator it = m_tagActionPool.begin(); it != m_tagActionPool.end(); ++it)
+ for(TQStringList::Iterator it = m_tagActionPool.begin(); it != m_tagActionPool.end(); ++it)
if(action_item == *it)
return;
m_tagActionPool += action_item;
}
-void QuantaApp::removeTagActionPoolItem(QString const& action_item)
+void QuantaApp::removeTagActionPoolItem(TQString const& action_item)
{
- for(QStringList::Iterator it = m_tagActionPool.begin(); it != m_tagActionPool.end(); ++it)
+ for(TQStringList::Iterator it = m_tagActionPool.begin(); it != m_tagActionPool.end(); ++it)
{
if(action_item == *it)
{
@@ -5320,7 +5320,7 @@ void QuantaApp::removeTagActionPoolItem(QString const& action_item)
}
}
-void QuantaApp::slotHTMLPartDeleted(QObject *object)
+void QuantaApp::slotHTMLPartDeleted(TQObject *object)
{
if (object == m_htmlPart)
{
@@ -5335,17 +5335,17 @@ void QuantaApp::slotTabMoved(int from, int to)
KMdiChildView *view = m_pDocumentViews->at(from);
m_pDocumentViews->remove(from);
m_pDocumentViews->insert(to, view);
- connect(this, SIGNAL(viewActivated (KMdiChildView *)), ViewManager::ref(), SLOT(slotViewActivated(KMdiChildView*)));
+ connect(this, TQT_SIGNAL(viewActivated (KMdiChildView *)), ViewManager::ref(), TQT_SLOT(slotViewActivated(KMdiChildView*)));
}
void QuantaApp::slotTabAboutToMove(int from, int to)
{
Q_UNUSED(from);
Q_UNUSED(to);
- disconnect(this, SIGNAL(viewActivated (KMdiChildView *)), ViewManager::ref(), SLOT(slotViewActivated(KMdiChildView*)));
+ disconnect(this, TQT_SIGNAL(viewActivated (KMdiChildView *)), ViewManager::ref(), TQT_SLOT(slotViewActivated(KMdiChildView*)));
}
-QString QuantaApp::currentURL() const
+TQString QuantaApp::currentURL() const
{
return ViewManager::ref()->currentURL();
}
@@ -5368,7 +5368,7 @@ void QuantaApp::slotAnnotate()
}
}
-void QuantaApp::dropEvent(QDropEvent* event)
+void QuantaApp::dropEvent(TQDropEvent* event)
{
if (KURLDrag::canDecode(event))
{
@@ -5382,7 +5382,7 @@ void QuantaApp::dropEvent(QDropEvent* event)
}
}
-void QuantaApp::dragEnterEvent( QDragEnterEvent *e)
+void QuantaApp::dragEnterEvent( TQDragEnterEvent *e)
{
e->accept();
}
diff --git a/quanta/src/quanta.h b/quanta/src/quanta.h
index 5cee4c1f..a29ba1f4 100644
--- a/quanta/src/quanta.h
+++ b/quanta/src/quanta.h
@@ -31,11 +31,11 @@
#define IDS_DEFAULT "Ready."
// include files for Qt
-#include <qmap.h>
-#include <qdict.h>
-#include <qvaluelist.h>
-#include <qstrlist.h>
-#include <qptrlist.h>
+#include <tqmap.h>
+#include <tqdict.h>
+#include <tqvaluelist.h>
+#include <tqstrlist.h>
+#include <tqptrlist.h>
// include files for KDE
#include <kdeversion.h>
@@ -122,7 +122,7 @@ public:
~QuantaApp();
QuantaDoc *doc() const {return m_doc; }
- QPopupMenu *tagsMenu() const {return m_tagsMenu;}
+ TQPopupMenu *tagsMenu() const {return m_tagsMenu;}
KConfig *config() const {return m_config;}
//TODO: check if we really need these "get" methods (and get rid o get)
@@ -133,39 +133,39 @@ public:
DebuggerManager *debugger() const {return m_debugger;}
KParts::PartManager *partManager() {return m_partManager;}
- QWidget* createContainer(QWidget *parent, int index, const QDomElement &element, int &id );
- void removeContainer(QWidget *container, QWidget *parent, QDomElement &element, int id );
+ TQWidget* createContainer(TQWidget *parent, int index, const TQDomElement &element, int &id );
+ void removeContainer(TQWidget *container, TQWidget *parent, TQDomElement &element, int id );
/** Returns the project's base URL if it exists, the HOME dir if there is no project and no opened document (or the current opened document was not saved yet), and the base URL of the opened document, if it is saved somewhere.
maps to the same function in Project*/
KURL projectBaseURL() const;
/** Returns the project (if there is one loaded) or global default encoding. */
- QString defaultEncoding();
+ TQString defaultEncoding();
/** Returns the interface number for the currently active editor. */
int currentEditorIfNum() const;
/** Return the URL of the currently active document */
- QString currentURL() const;
+ TQString currentURL() const;
/** Return the URL of the currently project */
- QString projectURL() const;
+ TQString projectURL() const;
/** Return the list of opened URLs and their editor interface numbers*/
- QStringList openedURLs() const;
- QString saveCurrentFile();
+ TQStringList openedURLs() const;
+ TQString saveCurrentFile();
/**
* Sets the DTEP for the current document.
* @param dtepName the name (nickname or full name) of the DTEP
* @param convert if true, converts the !DOCTYPE line to the new DTEP
*/
- void setDtep(const QString& dtepName, bool convert);
- QStringList tagAreas(const QString& name, bool includeCoordinates, bool skipFoundContent) const;
- QString documentFolderForURL(const QString &url);
- QString urlWithPreviewPrefix(const QString &url);
- void addFileToProject(const QString &url);
- void addFolderToProject(const QString &url);
- void uploadURL(const QString &url, const QString& profile, bool markOnly); /** Capture DCOP signals from KXsldbgPart or similar plugin */
- void newCursorPosition(const QString &file, int lineNumber, int columnNumber);
- void newDebuggerPosition(const QString &file, int lineNumber);
- void openFile(const QString &file, int lineNumber, int columnNumber);
+ void setDtep(const TQString& dtepName, bool convert);
+ TQStringList tagAreas(const TQString& name, bool includeCoordinates, bool skipFoundContent) const;
+ TQString documentFolderForURL(const TQString &url);
+ TQString urlWithPreviewPrefix(const TQString &url);
+ void addFileToProject(const TQString &url);
+ void addFolderToProject(const TQString &url);
+ void uploadURL(const TQString &url, const TQString& profile, bool markOnly); /** Capture DCOP signals from KXsldbgPart or similar plugin */
+ void newCursorPosition(const TQString &file, int lineNumber, int columnNumber);
+ void newDebuggerPosition(const TQString &file, int lineNumber);
+ void openFile(const TQString &file, int lineNumber, int columnNumber);
/** reparse current document and initialize node. */
void reparse(bool force);
@@ -176,8 +176,8 @@ public:
//return the old Cursor position
void oldCursorPos(uint &line, uint &col) {line = oldCursorLine; col = oldCursorCol;}
- QStringList selectors(const QString& tag);
- QStringList idSelectors();
+ TQStringList selectors(const TQString& tag);
+ TQStringList idSelectors();
WHTMLPart *documentationPart() {return m_htmlPartDoc;}
/** Show the toolbar which is in url. If it was not loaded yet, it loads the
toolbar from the file */
@@ -195,7 +195,7 @@ public:
* @param attr The string containing the attrs of the new Node to create.
* @return Returns a new Node created according to the contents of the TagDialog.
*/
- Node *showTagDialogAndReturnNode(const QString &tag, const QString &attr = QString::null);
+ Node *showTagDialogAndReturnNode(const TQString &tag, const TQString &attr = TQString::null);
/** Returns the baseURL of the document. */
KURL baseURL();
@@ -203,7 +203,7 @@ public:
/** Called when a document was closed. Resets some variables. */
void slotFileClosed(Document *w);
- void setTabToolTip(QWidget *w, const QString& toolTipStr);
+ void setTabToolTip(TQWidget *w, const TQString& toolTipStr);
void createPreviewPart();
void createDocPart();
@@ -214,18 +214,18 @@ public:
* If the user presses a key right away the character is inserted inside the tags for the queued actions.
* If the user changes the place of the cursor, the actions waiting for being inserted are removed.
*/
- QStringList const& tagActionPool() const {return m_tagActionPool;}
- void insertTagActionPoolItem(QString const& action_item);
- void removeTagActionPoolItem(QString const& action_item);
+ TQStringList const& tagActionPool() const {return m_tagActionPool;}
+ void insertTagActionPoolItem(TQString const& action_item);
+ void removeTagActionPoolItem(TQString const& action_item);
void removeAllTagActionPoolItems() {m_tagActionPool.clear();}
/** Updates the structure and attribute treeview. */
void updateTreeViews();
- void setTitle(const QString&);
+ void setTitle(const TQString&);
- QPtrList<TagAction> const& tagActions() const {return m_tagActions;}
+ TQPtrList<TagAction> const& tagActions() const {return m_tagActions;}
/** Clicked word or selected text for context sensitive menu in editor */
- QString popupWord;
+ TQString popupWord;
signals: // Signals
/** signal used to hide the splash screen */
@@ -234,20 +234,20 @@ signals: // Signals
void reloadAllTrees();
/** Emitted when some kind of event that can have associated actions has happened. */
- void eventHappened(const QString&, const QString&, const QString& );
+ void eventHappened(const TQString&, const TQString&, const TQString& );
- void toolbarRemoved(const QString&);
+ void toolbarRemoved(const TQString&);
- void showMessage(const QString&, bool);
+ void showMessage(const TQString&, bool);
void clearMessages();
public slots:
void slotFileNew();
void slotFileOpen();
void slotFileOpen(const KURL &url);
- void slotFileOpen(const KURL &url, const QString &encoding);
- void slotFileOpen(const KURL &url, const QString &encoding, bool readOnly);
- void slotFileOpen(const KURL::List &urls, const QString& encoding);
+ void slotFileOpen(const KURL &url, const TQString &encoding);
+ void slotFileOpen(const KURL &url, const TQString &encoding, bool readOnly);
+ void slotFileOpen(const KURL::List &urls, const TQString& encoding);
void slotFileSave();
bool slotFileSaveAs(QuantaView *viewToSave = 0L);
void slotFileSaveAsLocalTemplate();
@@ -269,7 +269,7 @@ public slots:
void slotEditFindInFiles();
/// open url in documentation window
- void openDoc(const QString& url);
+ void openDoc(const TQString& url);
void slotContextHelp();
@@ -281,11 +281,11 @@ public slots:
WARNING: Don't use in place where nothing should happen until the function
exits (like in startup code, DTD reading, etc.) as it calls processEvents() and
unexpected things may happen. */
- void slotStatusMsg(const QString &text);
+ void slotStatusMsg(const TQString &text);
void slotNewStatus();
void slotNewLineColumn();
-// void slotUpdateStatus(QWidget*);FIXME:
+// void slotUpdateStatus(TQWidget*);FIXME:
/** repaint preview */
void slotRepaintPreview();
@@ -317,11 +317,11 @@ public slots:
void slotOptionsConfigureToolbars();
void slotNewToolbarConfig();
/** Configure toolbars, show defaultToolbar by default */
- void slotConfigureToolbars(const QString& defaultToolbar = QString::null);
+ void slotConfigureToolbars(const TQString& defaultToolbar = TQString::null);
void slotOptionsConfigureActions();
void setCursorPosition(int row, int col );
- void gotoFileAndLine(const QString& filename, int line, int column);
+ void gotoFileAndLine(const TQString& filename, int line, int column);
void selectArea(int line1, int col1, int line2, int col2);
@@ -338,7 +338,7 @@ public slots:
/** Saves a toolbar as project specific. */
void slotSaveProjectToolbar();
/** Loads the toolbars for dtd named dtdName and unload the ones belonging to oldDtdName. */
- void slotLoadToolbarForDTD(const QString& dtdName);
+ void slotLoadToolbarForDTD(const TQString& dtdName);
/** Load an user toolbar from the disk. */
void slotLoadToolbarFile(const KURL& url);
/** Load an user toolbar from the disk. */
@@ -346,22 +346,22 @@ public slots:
/** Load a global toolbar from the disk. */
void slotLoadGlobalToolbar();
/** Remove the toolbar named "name". */
- bool slotRemoveToolbar(const QString& name);
+ bool slotRemoveToolbar(const TQString& name);
/** Rename the toolbar named "name". */
- void slotRenameToolbar(const QString& name);
+ void slotRenameToolbar(const TQString& name);
/** Rename the toolbar. */
void slotRenameToolbar();
/** Delete an action */
void slotDeleteAction(KAction *action);
/** Remove the action from toolbar*/
- void slotRemoveAction(const QString&, const QString& actionName);
+ void slotRemoveAction(const TQString&, const TQString& actionName);
/** Edit the action */
- void slotEditAction(const QString&);
+ void slotEditAction(const TQString&);
/** Creates a new, empty action */
void slotNewAction();
/** Creates a script action for a_scriptURL using the a_interpreter as the script
interpreter application */
- void slotAssignActionToScript(const KURL&a_scriptURL, const QString& a_interpreter);
+ void slotAssignActionToScript(const KURL&a_scriptURL, const TQString& a_interpreter);
/** Change the DTD/DTEP of the current document. */
void slotChangeDTD();
@@ -374,7 +374,7 @@ public slots:
/** Show or hide the groups for dtepName in the structure tree.
The special value of "clear" for dtepName means show groups
for all DTEPs found in the document.*/
- void slotShowGroupsForDTEP(const QString& dtepName, bool show);
+ void slotShowGroupsForDTEP(const TQString& dtepName, bool show);
/** Build the project specific toolbar menu. */
void slotBuildPrjToolbarsMenu();
@@ -410,10 +410,10 @@ public slots:
void slotDeleteFile(QuantaView *view=0L);
/** Called when the CVS command working on files was executed successfully. */
- void slotCVSCommandExecuted(const QString &command, const QStringList &files);
+ void slotCVSCommandExecuted(const TQString &command, const TQStringList &files);
/** Called when the preview or documentation part is deleted. */
- void slotHTMLPartDeleted(QObject *object);
+ void slotHTMLPartDeleted(TQObject *object);
void slotRefreshActiveWindow();
@@ -430,7 +430,7 @@ public slots:
void slotGetUserToolbarFiles(KURL::List *list);
// Get saved position of dock
- KDockWidget::DockPosition prevDockPosition(QWidget* dock, KDockWidget::DockPosition def);
+ KDockWidget::DockPosition prevDockPosition(TQWidget* dock, KDockWidget::DockPosition def);
protected slots:
void slotDockWidgetHasUndocked(KDockWidget *widget);
@@ -458,11 +458,11 @@ protected slots:
/** Downloads a template from the main server */
void slotDownloadTemplate();
/** Uploads a template to the main server */
- void slotUploadTemplate(const QString &fileName);
+ void slotUploadTemplate(const TQString &fileName);
/** Downloads a script from the main server */
void slotDownloadScript();
/** Uploads a script to the main server */
- void slotUploadScript(const QString &fileName);
+ void slotUploadScript(const TQString &fileName);
/** Downloads a documentation from the main server */
void slotDownloadDoc();
/** Shows tip of the day */
@@ -518,42 +518,42 @@ protected slots:
void slotShowSourceEditor();
void slotShowVPLAndSourceEditor();
void slotShowVPLOnly();
- void slotTabDragged(QWidget *widget);
+ void slotTabDragged(TQWidget *widget);
void slotTabMoved(int from, int to);
void slotTabAboutToMove(int from, int to);
void slotAnnotate();
protected:
/** Create a DTEP tarball which can be uploaded or sent in email. Returns
- * the name of the created file or QString::null if creation has failed.
+ * the name of the created file or TQString::null if creation has failed.
*/
- QString createDTEPTarball();
+ TQString createDTEPTarball();
/** Create a toolbar tarball which can be uploaded or sent in email. Returns
- * the name of the created file or QString::null if creation has failed.
+ * the name of the created file or TQString::null if creation has failed.
*/
- QString createToolbarTarball();
+ TQString createToolbarTarball();
/** Ask for save all the modified user toolbars. */
bool removeToolbars();
/** Returns true if all toolbars are hidden, false otherwise. */
bool allToolbarsHidden() const;
/** No descriptions */
- virtual void focusInEvent(QFocusEvent*);
+ virtual void focusInEvent(TQFocusEvent*);
void saveOptions();
virtual bool queryClose();
void saveAsTemplate (bool projectTemplate, bool selectionOnly = false);
/** Saves a toolbar as local or project specific. */
- bool saveToolbar(bool localToolbar = true, const QString& toolbarToSave = QString::null, const KURL& destURL = KURL());
+ bool saveToolbar(bool localToolbar = true, const TQString& toolbarToSave = TQString::null, const KURL& destURL = KURL());
/** Saves the toolbar and the actions. Returns the name of the actions file*/
- KURL saveToolbarToFile(const QString& toolbarName,const KURL& destFile);
+ KURL saveToolbarToFile(const TQString& toolbarName,const KURL& destFile);
/** Makes the tabwidget look and behave like we want. If closeButtonsOnly is true,
only the close button behavior is changed. */
void initTabWidget(bool closeButtonsOnly = false);
- void dropEvent(QDropEvent *ev);
- void dragEnterEvent ( QDragEnterEvent * );
+ void dropEvent(TQDropEvent *ev);
+ void dragEnterEvent ( TQDragEnterEvent * );
void resetDockLayout();
@@ -578,7 +578,7 @@ private:
QuantaPluginInterface *m_pluginInterface;
- QPopupMenu *m_tagsMenu;
+ TQPopupMenu *m_tagsMenu;
// config
KConfig *m_config;
@@ -591,7 +591,7 @@ private:
QuantaDoc *m_doc;
/** parsered tree of document */
- QTimer *statusbarTimer;
+ TQTimer *statusbarTimer;
// ACTIONS
KRecentFilesAction *projectToolbarFiles;
@@ -603,9 +603,9 @@ private:
KAction *editTagAction, *selectTagAreaAction;
- QDomDocument* m_actions;
+ TQDomDocument* m_actions;
- QPtrList<KTextEditor::Mark> markList;
+ TQPtrList<KTextEditor::Mark> markList;
int currentPageIndex;
uint userToolbarsCount;
@@ -620,37 +620,37 @@ private:
bool m_noFramesPreview;
bool m_parserEnabled; ///< enables/disables reparsing. If false, even a forced reparse is ignored (used when opening multiple files)
- QString m_scriptOutput;
+ TQString m_scriptOutput;
- QStringList m_tagActionPool;
- QPtrList<TagAction> m_tagActions;
+ TQStringList m_tagActionPool;
+ TQPtrList<TagAction> m_tagActions;
protected: // Protected attributes
/** Timer to refresh the structure tree. */
- QTimer *refreshTimer;
+ TQTimer *refreshTimer;
/** Timer to detect idle periods. Every time the cursor moves the timer is
restarted.*/
- QTimer *idleTimer;
+ TQTimer *idleTimer;
/** The toolbars for this DTD are currently shown to the user. */
- QString currentToolbarDTD;
+ TQString currentToolbarDTD;
KDockWidget *m_oldTreeViewWidget;
/** The ids of the widgets visible before doing the preview/documentation browsing */
- QValueList<int> previousWidgetList;
+ TQValueList<int> previousWidgetList;
/* Store the old shortcuts from the local quantaui.rc */
- QMap<QString, QString> oldShortcuts;
+ TQMap<TQString, TQString> oldShortcuts;
KURL urlUnderCursor;
- QTimer *autosaveTimer;
+ TQTimer *autosaveTimer;
DCOPSettings *dcopSettings;
DCOPQuanta *dcopQuanta;
KParts::PartManager *m_partManager; ///< the pointer to the part manager
- QGuardedPtr<KTextEditor::View> m_oldKTextEditor; ///< remembers the last activated GUI
+ TQGuardedPtr<KTextEditor::View> m_oldKTextEditor; ///< remembers the last activated GUI
QNewDTEPStuff *m_newDTEPStuff;
QNewToolbarStuff *m_newToolbarStuff;
QNewTemplateStuff *m_newTemplateStuff;
QNewScriptStuff *m_newScriptStuff;
QNewDocStuff *m_newDocStuff;
- QDict<ToolbarEntry> m_toolbarList;
+ TQDict<ToolbarEntry> m_toolbarList;
public: //TODO: check if it's worth to make a read method for them
KRecentFilesAction *fileRecent;
diff --git a/quanta/src/quanta_init.cpp b/quanta/src/quanta_init.cpp
index 91f9f043..3a752299 100644
--- a/quanta/src/quanta_init.cpp
+++ b/quanta/src/quanta_init.cpp
@@ -17,21 +17,21 @@
***************************************************************************/
// include files for QT
-#include <qdir.h>
-#include <qprinter.h>
-#include <qpainter.h>
-#include <qtabwidget.h>
-#include <qwidgetstack.h>
-#include <qlayout.h>
-#include <qeventloop.h>
-#include <qtimer.h>
-#include <qdom.h>
-#include <qfile.h>
-#include <qfileinfo.h>
-#include <qtextcodec.h>
-#include <qpopupmenu.h>
-#include <qdatetime.h>
-#include <qradiobutton.h>
+#include <tqdir.h>
+#include <tqprinter.h>
+#include <tqpainter.h>
+#include <tqtabwidget.h>
+#include <tqwidgetstack.h>
+#include <tqlayout.h>
+#include <tqeventloop.h>
+#include <tqtimer.h>
+#include <tqdom.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
+#include <tqtextcodec.h>
+#include <tqpopupmenu.h>
+#include <tqdatetime.h>
+#include <tqradiobutton.h>
// include files for KDE
#include <dcopclient.h>
@@ -113,13 +113,13 @@
#include "tagactionmanager.h"
#include "tagactionset.h"
-extern QMap<int, QString> replacementMap;
+extern TQMap<int, TQString> replacementMap;
QuantaInit::QuantaInit(QuantaApp * quantaApp)
- : QObject()
+ : TQObject()
{
m_quanta = quantaApp;
- connect(this, SIGNAL(hideSplash()), m_quanta, SLOT(slotHideSplash()));
+ connect(this, TQT_SIGNAL(hideSplash()), m_quanta, TQT_SLOT(slotHideSplash()));
}
QuantaInit::~QuantaInit()
@@ -133,8 +133,8 @@ void QuantaInit::initQuanta()
m_config = quantaApp->m_config;
parser = new Parser();
- QStringList tmpDirs = KGlobal::dirs()->resourceDirs("tmp");
- QDir dir;
+ TQStringList tmpDirs = KGlobal::dirs()->resourceDirs("tmp");
+ TQDir dir;
tmpDir = tmpDirs[0];
for (uint i = 0; i < tmpDirs.count(); i++)
{
@@ -171,13 +171,13 @@ void QuantaInit::initQuanta()
// Initialize debugger
m_quanta->m_debugger = new DebuggerManager(m_quanta);
- connect(Project::ref(), SIGNAL(newProjectLoaded(const QString &, const KURL &, const KURL &)),
- m_quanta->m_debugger, SLOT(slotNewProjectLoaded(const QString &, const KURL &, const KURL &)));
- connect(Project::ref(), SIGNAL(eventHappened(const QString &, const QString &, const QString &)),
- m_quanta->m_debugger, SLOT(slotHandleEvent(const QString &, const QString &, const QString &)));
- connect(m_quanta->m_debugger, SIGNAL(hideSplash()), m_quanta, SLOT(slotHideSplash()));
+ connect(Project::ref(), TQT_SIGNAL(newProjectLoaded(const TQString &, const KURL &, const KURL &)),
+ m_quanta->m_debugger, TQT_SLOT(slotNewProjectLoaded(const TQString &, const KURL &, const KURL &)));
+ connect(Project::ref(), TQT_SIGNAL(eventHappened(const TQString &, const TQString &, const TQString &)),
+ m_quanta->m_debugger, TQT_SLOT(slotHandleEvent(const TQString &, const TQString &, const TQString &)));
+ connect(m_quanta->m_debugger, TQT_SIGNAL(hideSplash()), m_quanta, TQT_SLOT(slotHideSplash()));
- //m_quanta->KDockMainWindow::createGUI( QString::null, false /* conserveMemory */ );
+ //m_quanta->KDockMainWindow::createGUI( TQString::null, false /* conserveMemory */ );
m_quanta->createShellGUI(true);
addToolTreeView(m_quanta->fTab, i18n("Files"), UserIcon("ftab"), KDockWidget::DockLeft);
@@ -193,7 +193,7 @@ void QuantaInit::initQuanta()
// Restore the dock layout
m_config->setGroup ("General Options");
- QString layout = m_config->readEntry("Window layout", "Default");
+ TQString layout = m_config->readEntry("Window layout", "Default");
int mdiMode = m_config->readNumEntry("MDI mode", -1);
if (mdiMode != -1 && layout != "Default")
{
@@ -209,24 +209,24 @@ void QuantaInit::initQuanta()
if (mdiMode == KMdi::ToplevelMode)
{
m_quanta->switchToChildframeMode();
- QTimer::singleShot(0, m_quanta, SLOT(switchToToplevelMode()));
+ TQTimer::singleShot(0, m_quanta, TQT_SLOT(switchToToplevelMode()));
}
// Always hide debugger toolbar at this point
m_quanta->toolBar("debugger_toolbar")->hide();
- m_quanta->m_pluginInterface->setPluginMenu(static_cast<QPopupMenu*>(m_quanta->factory()->container("plugins", m_quanta)));
+ m_quanta->m_pluginInterface->setPluginMenu(static_cast<TQPopupMenu*>(m_quanta->factory()->container("plugins", m_quanta)));
m_quanta->m_pluginInterface->buildPluginMenu();
//TODO: Remove after upgrade from 3.1 is not supported
- QDomDocument doc;
+ TQDomDocument doc;
doc.setContent(KXMLGUIFactory::readConfigFile(m_quanta->xmlFile(), m_quanta->instance()));
- QDomNodeList nodeList = doc.elementsByTagName("ActionProperties");
- QDomNode node = nodeList.item(0).firstChild();
+ TQDomNodeList nodeList = doc.elementsByTagName("ActionProperties");
+ TQDomNode node = nodeList.item(0).firstChild();
while (!node.isNull())
{
if (node.nodeName() == "Action")
{
- QDomElement el = node.toElement();
+ TQDomElement el = node.toElement();
m_quanta->oldShortcuts.insert(el.attribute("name"), el.attribute("shortcut"));
node = node.nextSibling();
el.parentNode().removeChild(el);
@@ -238,7 +238,7 @@ void QuantaInit::initQuanta()
m_quanta->applyMainWindowSettings(m_config);
- m_quanta->m_tagsMenu = static_cast<QPopupMenu*>(m_quanta->factory()->container("tags", m_quanta));
+ m_quanta->m_tagsMenu = static_cast<TQPopupMenu*>(m_quanta->factory()->container("tags", m_quanta));
KMenuBar *mb = m_quanta->menuBar();
for (uint i = 0 ; i < mb->count(); i++)
{
@@ -252,20 +252,20 @@ void QuantaInit::initQuanta()
if (toolviewMenu)
toolviewMenu->plug(m_quanta->windowMenu());
- QPopupMenu *toolbarsMenu = (QPopupMenu*)(m_quanta->guiFactory())->container("toolbars_load", m_quanta);
- connect(toolbarsMenu, SIGNAL(aboutToShow()), m_quanta, SLOT(slotBuildPrjToolbarsMenu()));
+ TQPopupMenu *toolbarsMenu = (TQPopupMenu*)(m_quanta->guiFactory())->container("toolbars_load", m_quanta);
+ connect(toolbarsMenu, TQT_SIGNAL(aboutToShow()), m_quanta, TQT_SLOT(slotBuildPrjToolbarsMenu()));
- QPopupMenu *contextMenu = (QPopupMenu*)(m_quanta->guiFactory())->container("popup_editor", m_quanta);
- connect(contextMenu, SIGNAL(aboutToShow()), m_quanta, SLOT(slotContextMenuAboutToShow()));
+ TQPopupMenu *contextMenu = (TQPopupMenu*)(m_quanta->guiFactory())->container("popup_editor", m_quanta);
+ connect(contextMenu, TQT_SIGNAL(aboutToShow()), m_quanta, TQT_SLOT(slotContextMenuAboutToShow()));
- connect(m_quanta->m_messageOutput, SIGNAL(clicked(const QString&, int, int)),
- m_quanta, SLOT(gotoFileAndLine(const QString&, int, int)));
- connect(m_quanta->m_problemOutput, SIGNAL(clicked(const QString&, int, int)),
- m_quanta, SLOT(gotoFileAndLine(const QString&, int, int)));
- connect(m_quanta->m_annotationOutput->currentFileAnnotations(), SIGNAL(clicked(const QString&, int, int)),
- m_quanta, SLOT(gotoFileAndLine(const QString&, int, int)));
- connect(m_quanta->m_annotationOutput, SIGNAL(clicked(const QString&, int, int)),
- m_quanta, SLOT(gotoFileAndLine(const QString&, int, int)));
+ connect(m_quanta->m_messageOutput, TQT_SIGNAL(clicked(const TQString&, int, int)),
+ m_quanta, TQT_SLOT(gotoFileAndLine(const TQString&, int, int)));
+ connect(m_quanta->m_problemOutput, TQT_SIGNAL(clicked(const TQString&, int, int)),
+ m_quanta, TQT_SLOT(gotoFileAndLine(const TQString&, int, int)));
+ connect(m_quanta->m_annotationOutput->currentFileAnnotations(), TQT_SIGNAL(clicked(const TQString&, int, int)),
+ m_quanta, TQT_SLOT(gotoFileAndLine(const TQString&, int, int)));
+ connect(m_quanta->m_annotationOutput, TQT_SIGNAL(clicked(const TQString&, int, int)),
+ m_quanta, TQT_SLOT(gotoFileAndLine(const TQString&, int, int)));
m_quanta->slotFileNew();
m_quanta->slotNewStatus();
@@ -275,23 +275,23 @@ void QuantaInit::initQuanta()
KTipDialog::showTip(m_quanta);
//get the PID of this running instance
- qConfig.quantaPID = QString::number(int(getpid()), 10);
+ qConfig.quantaPID = TQString::number(int(getpid()), 10);
qConfig.backupDirPath = KGlobal::instance()->dirs()->saveLocation("data", resourceDir + "backups/");
- m_quanta->autosaveTimer = new QTimer(m_quanta);
- connect(m_quanta->autosaveTimer, SIGNAL(timeout()), m_quanta, SLOT(slotAutosaveTimer()));
+ m_quanta->autosaveTimer = new TQTimer(m_quanta);
+ connect(m_quanta->autosaveTimer, TQT_SIGNAL(timeout()), m_quanta, TQT_SLOT(slotAutosaveTimer()));
m_quanta->autosaveTimer->start(qConfig.autosaveInterval * 60000, false);
- connect(m_quanta->m_doc, SIGNAL(hideSplash()), m_quanta, SLOT(slotHideSplash()));
- connect(parser, SIGNAL(rebuildStructureTree(bool)),
- m_quanta, SLOT(slotReloadStructTreeView(bool)));
+ connect(m_quanta->m_doc, TQT_SIGNAL(hideSplash()), m_quanta, TQT_SLOT(slotHideSplash()));
+ connect(parser, TQT_SIGNAL(rebuildStructureTree(bool)),
+ m_quanta, TQT_SLOT(slotReloadStructTreeView(bool)));
// Read list of characters
- QFile file(locate("appdata","chars"));
+ TQFile file(locate("appdata","chars"));
if ( file.open(IO_ReadOnly) ) { // file opened successfully
- QTextStream t( &file ); // use a text stream
- t.setEncoding(QTextStream::UnicodeUTF8);
- QString s;
+ TQTextStream t( &file ); // use a text stream
+ t.setEncoding(TQTextStream::UnicodeUTF8);
+ TQString s;
while (!t.eof())
{
s = t.readLine();
@@ -300,22 +300,22 @@ void QuantaInit::initQuanta()
if (begin == 1)
continue;
int length = s.find(";)") - begin + 1;
- QString s2 = s.mid(begin, length - 1);
+ TQString s2 = s.mid(begin, length - 1);
replacementMap[s[0].unicode()] = s2;
}
file.close();
}
- QString infoCss = tmpDir;
- infoCss.replace(QRegExp("/quanta$"),"");
+ TQString infoCss = tmpDir;
+ infoCss.replace(TQRegExp("/quanta$"),"");
infoCss += "/info.css";
QExtFileInfo::copy(KURL().fromPathOrURL(qConfig.globalDataDir + resourceDir + "scripts/info.css"), KURL().fromPathOrURL(infoCss));
checkRuntimeDependencies();
ViewManager::ref()->activeDocument()->view()->setFocus();
- m_quanta->refreshTimer = new QTimer(m_quanta);
- connect(m_quanta->refreshTimer, SIGNAL(timeout()), m_quanta, SLOT(slotReparse()));
+ m_quanta->refreshTimer = new TQTimer(m_quanta);
+ connect(m_quanta->refreshTimer, TQT_SIGNAL(timeout()), m_quanta, TQT_SLOT(slotReparse()));
m_quanta->refreshTimer->start( qConfig.refreshFrequency*1000, false ); //update the structure tree every 5 seconds
if (qConfig.instantUpdate || qConfig.refreshFrequency == 0)
{
@@ -332,9 +332,9 @@ void QuantaInit::initToolBars()
void QuantaInit::initStatusBar()
{
- m_quanta->statusbarTimer = new QTimer(m_quanta);
- connect(m_quanta->statusbarTimer,SIGNAL(timeout()),
- m_quanta, SLOT(statusBarTimeout()));
+ m_quanta->statusbarTimer = new TQTimer(m_quanta);
+ connect(m_quanta->statusbarTimer,TQT_SIGNAL(timeout()),
+ m_quanta, TQT_SLOT(statusBarTimeout()));
progressBar = new KProgress(m_quanta->statusBar());
progressBar->setTextEnabled(false);
@@ -356,111 +356,111 @@ void QuantaInit::initStatusBar()
void QuantaInit::initDocument()
{
m_quanta->m_doc = new QuantaDoc(0L);
- connect(m_quanta->m_doc, SIGNAL(newStatus()),
- m_quanta, SLOT(slotNewStatus()));
+ connect(m_quanta->m_doc, TQT_SIGNAL(newStatus()),
+ m_quanta, TQT_SLOT(slotNewStatus()));
}
void QuantaInit::initProject()
{
Project *m_project = Project::ref(m_quanta);
- connect(m_project, SIGNAL(getTreeStatus(QStringList *)),
- pTab, SLOT(slotGetTreeStatus(QStringList *)));
- connect(m_project, SIGNAL(loadToolbarFile(const KURL &)),
- m_quanta, SLOT(slotLoadToolbarFile(const KURL &)));
- connect(m_project, SIGNAL(getUserToolbarFiles(KURL::List *)),
- m_quanta, SLOT(slotGetUserToolbarFiles(KURL::List *)));
- connect(m_project, SIGNAL(openFiles(const KURL::List &, const QString&)),
- m_quanta, SLOT(slotFileOpen(const KURL::List &, const QString&)));
- connect(m_project, SIGNAL(openFile(const KURL &, const QString&)),
- m_quanta, SLOT(slotFileOpen(const KURL &, const QString&)));
- connect(m_project, SIGNAL(closeFile(const KURL &)),
- m_quanta, SLOT(slotFileClose(const KURL &)));
- connect(m_project, SIGNAL(reloadTree(ProjectList *, bool, const QStringList &)),
- pTab, SLOT(slotReloadTree(ProjectList *, bool, const QStringList &)));
- connect(m_project, SIGNAL(closeFiles()), ViewManager::ref(), SLOT(closeAll()));
- connect(m_project, SIGNAL(eventHappened(const QString&, const QString&, const QString& )), QPEvents::ref(m_quanta), SLOT(slotEventHappened(const QString&, const QString&, const QString& )));
-
- connect(m_quanta->fTab, SIGNAL(insertDirInProject(const KURL&)),
- m_project, SLOT(slotAddDirectory(const KURL&)));
-
- connect(m_quanta->fTab, SIGNAL(insertFileInProject(const KURL&)),
- m_project, SLOT(slotInsertFile(const KURL&)));
-
- connect(TemplatesTreeView::ref(), SIGNAL(insertDirInProject(const KURL&)),
- m_project, SLOT(slotAddDirectory(const KURL&)));
-
- connect(TemplatesTreeView::ref(), SIGNAL(insertFileInProject(const KURL&)),
- m_project, SLOT(slotInsertFile(const KURL&)));
- connect(TemplatesTreeView::ref(), SIGNAL(downloadTemplate()),
- m_quanta, SLOT(slotDownloadTemplate()));
- connect(TemplatesTreeView::ref(), SIGNAL(uploadTemplate(const QString&)), m_quanta, SLOT(slotUploadTemplate(const QString&)));
+ connect(m_project, TQT_SIGNAL(getTreeStatus(TQStringList *)),
+ pTab, TQT_SLOT(slotGetTreeStatus(TQStringList *)));
+ connect(m_project, TQT_SIGNAL(loadToolbarFile(const KURL &)),
+ m_quanta, TQT_SLOT(slotLoadToolbarFile(const KURL &)));
+ connect(m_project, TQT_SIGNAL(getUserToolbarFiles(KURL::List *)),
+ m_quanta, TQT_SLOT(slotGetUserToolbarFiles(KURL::List *)));
+ connect(m_project, TQT_SIGNAL(openFiles(const KURL::List &, const TQString&)),
+ m_quanta, TQT_SLOT(slotFileOpen(const KURL::List &, const TQString&)));
+ connect(m_project, TQT_SIGNAL(openFile(const KURL &, const TQString&)),
+ m_quanta, TQT_SLOT(slotFileOpen(const KURL &, const TQString&)));
+ connect(m_project, TQT_SIGNAL(closeFile(const KURL &)),
+ m_quanta, TQT_SLOT(slotFileClose(const KURL &)));
+ connect(m_project, TQT_SIGNAL(reloadTree(ProjectList *, bool, const TQStringList &)),
+ pTab, TQT_SLOT(slotReloadTree(ProjectList *, bool, const TQStringList &)));
+ connect(m_project, TQT_SIGNAL(closeFiles()), ViewManager::ref(), TQT_SLOT(closeAll()));
+ connect(m_project, TQT_SIGNAL(eventHappened(const TQString&, const TQString&, const TQString& )), QPEvents::ref(m_quanta), TQT_SLOT(slotEventHappened(const TQString&, const TQString&, const TQString& )));
+
+ connect(m_quanta->fTab, TQT_SIGNAL(insertDirInProject(const KURL&)),
+ m_project, TQT_SLOT(slotAddDirectory(const KURL&)));
+
+ connect(m_quanta->fTab, TQT_SIGNAL(insertFileInProject(const KURL&)),
+ m_project, TQT_SLOT(slotInsertFile(const KURL&)));
+
+ connect(TemplatesTreeView::ref(), TQT_SIGNAL(insertDirInProject(const KURL&)),
+ m_project, TQT_SLOT(slotAddDirectory(const KURL&)));
+
+ connect(TemplatesTreeView::ref(), TQT_SIGNAL(insertFileInProject(const KURL&)),
+ m_project, TQT_SLOT(slotInsertFile(const KURL&)));
+ connect(TemplatesTreeView::ref(), TQT_SIGNAL(downloadTemplate()),
+ m_quanta, TQT_SLOT(slotDownloadTemplate()));
+ connect(TemplatesTreeView::ref(), TQT_SIGNAL(uploadTemplate(const TQString&)), m_quanta, TQT_SLOT(slotUploadTemplate(const TQString&)));
// inform project if something was renamed
- connect(pTab, SIGNAL(renamed(const KURL&, const KURL&)),
- m_project, SLOT(slotRenamed(const KURL&, const KURL&)));
- connect(m_quanta->fTab, SIGNAL(renamed(const KURL&, const KURL&)),
- m_project, SLOT(slotRenamed(const KURL&, const KURL&)));
- connect(tTab, SIGNAL(renamed(const KURL&, const KURL&)),
- m_project, SLOT(slotRenamed(const KURL&, const KURL&)));
-
- connect(pTab, SIGNAL(insertToProject(const KURL&)),
- m_project, SLOT(slotInsertFile(const KURL&)));
- connect(pTab, SIGNAL(removeFromProject(const KURL&)),
- m_project, SLOT(slotRemove(const KURL&)));
- connect(pTab, SIGNAL(uploadSingleURL(const KURL&, const QString&, bool, bool)),
- m_project, SLOT(slotUploadURL(const KURL&, const QString&, bool, bool)));
- connect(pTab, SIGNAL(rescanProjectDir()), m_project, SLOT(slotRescanPrjDir()));
- connect(pTab, SIGNAL(showProjectOptions()), m_project, SLOT(slotOptions()));
- connect(pTab, SIGNAL(uploadProject()), m_project, SLOT(slotUpload()));
-
- connect(m_quanta->dTab, SIGNAL(reloadProjectDocs()), m_project, SLOT(slotReloadProjectDocs()));
- connect(m_project, SIGNAL(reloadProjectDocs()), m_quanta->dTab, SLOT(slotReloadProjectDocs()));
- connect(m_project, SIGNAL(addProjectDoc(const KURL&)), m_quanta->dTab, SLOT(slotAddProjectDoc(const KURL&)));
-
- connect(m_project, SIGNAL(enableMessageWidget()),
- m_quanta, SLOT(slotShowMessagesView()));
-
- connect(m_project, SIGNAL(messages(const QString&)),
- m_quanta->m_messageOutput, SLOT(showMessage(const QString&)));
-
- connect(m_project, SIGNAL(newStatus()),
- m_quanta, SLOT(slotNewStatus()));
-
- connect(m_project, SIGNAL(newProjectLoaded(const QString &, const KURL &, const KURL &)),
- TemplatesTreeView::ref(), SLOT(slotNewProjectLoaded(const QString &, const KURL &, const KURL &)));
- connect(m_project, SIGNAL(newProjectLoaded(const QString &, const KURL &, const KURL &)),
- pTab, SLOT(slotNewProjectLoaded(const QString &, const KURL &, const KURL &)));
- connect(m_project, SIGNAL(newProjectLoaded(const QString &, const KURL &, const KURL &)),
- m_quanta->fTab, SLOT(slotNewProjectLoaded(const QString &, const KURL &, const KURL &)));
- connect(m_project, SIGNAL(newProjectLoaded(const QString &, const KURL &, const KURL &)),
- m_quanta->annotationOutput(), SLOT(updateAnnotations()));
-
- connect(pTab, SIGNAL(changeFileDescription(const KURL&, const QString&)),
- m_project, SLOT(slotFileDescChanged(const KURL&, const QString&)));
- connect(pTab, SIGNAL(changeUploadStatus(const KURL&, int)),
- m_project, SLOT(slotUploadStatusChanged(const KURL&, int)));
- connect(pTab, SIGNAL(changeDocumentFolderStatus(const KURL&, bool)),
- m_project, SLOT(slotChangeDocumentFolderStatus(const KURL&, bool)));
-
- connect(m_project, SIGNAL(hideSplash()), m_quanta, SLOT(slotHideSplash()));
-
- connect(m_project, SIGNAL(statusMsg(const QString &)),
- m_quanta, SLOT(slotStatusMsg(const QString & )));
+ connect(pTab, TQT_SIGNAL(renamed(const KURL&, const KURL&)),
+ m_project, TQT_SLOT(slotRenamed(const KURL&, const KURL&)));
+ connect(m_quanta->fTab, TQT_SIGNAL(renamed(const KURL&, const KURL&)),
+ m_project, TQT_SLOT(slotRenamed(const KURL&, const KURL&)));
+ connect(tTab, TQT_SIGNAL(renamed(const KURL&, const KURL&)),
+ m_project, TQT_SLOT(slotRenamed(const KURL&, const KURL&)));
+
+ connect(pTab, TQT_SIGNAL(insertToProject(const KURL&)),
+ m_project, TQT_SLOT(slotInsertFile(const KURL&)));
+ connect(pTab, TQT_SIGNAL(removeFromProject(const KURL&)),
+ m_project, TQT_SLOT(slotRemove(const KURL&)));
+ connect(pTab, TQT_SIGNAL(uploadSingleURL(const KURL&, const TQString&, bool, bool)),
+ m_project, TQT_SLOT(slotUploadURL(const KURL&, const TQString&, bool, bool)));
+ connect(pTab, TQT_SIGNAL(rescanProjectDir()), m_project, TQT_SLOT(slotRescanPrjDir()));
+ connect(pTab, TQT_SIGNAL(showProjectOptions()), m_project, TQT_SLOT(slotOptions()));
+ connect(pTab, TQT_SIGNAL(uploadProject()), m_project, TQT_SLOT(slotUpload()));
+
+ connect(m_quanta->dTab, TQT_SIGNAL(reloadProjectDocs()), m_project, TQT_SLOT(slotReloadProjectDocs()));
+ connect(m_project, TQT_SIGNAL(reloadProjectDocs()), m_quanta->dTab, TQT_SLOT(slotReloadProjectDocs()));
+ connect(m_project, TQT_SIGNAL(addProjectDoc(const KURL&)), m_quanta->dTab, TQT_SLOT(slotAddProjectDoc(const KURL&)));
+
+ connect(m_project, TQT_SIGNAL(enableMessageWidget()),
+ m_quanta, TQT_SLOT(slotShowMessagesView()));
+
+ connect(m_project, TQT_SIGNAL(messages(const TQString&)),
+ m_quanta->m_messageOutput, TQT_SLOT(showMessage(const TQString&)));
+
+ connect(m_project, TQT_SIGNAL(newStatus()),
+ m_quanta, TQT_SLOT(slotNewStatus()));
+
+ connect(m_project, TQT_SIGNAL(newProjectLoaded(const TQString &, const KURL &, const KURL &)),
+ TemplatesTreeView::ref(), TQT_SLOT(slotNewProjectLoaded(const TQString &, const KURL &, const KURL &)));
+ connect(m_project, TQT_SIGNAL(newProjectLoaded(const TQString &, const KURL &, const KURL &)),
+ pTab, TQT_SLOT(slotNewProjectLoaded(const TQString &, const KURL &, const KURL &)));
+ connect(m_project, TQT_SIGNAL(newProjectLoaded(const TQString &, const KURL &, const KURL &)),
+ m_quanta->fTab, TQT_SLOT(slotNewProjectLoaded(const TQString &, const KURL &, const KURL &)));
+ connect(m_project, TQT_SIGNAL(newProjectLoaded(const TQString &, const KURL &, const KURL &)),
+ m_quanta->annotationOutput(), TQT_SLOT(updateAnnotations()));
+
+ connect(pTab, TQT_SIGNAL(changeFileDescription(const KURL&, const TQString&)),
+ m_project, TQT_SLOT(slotFileDescChanged(const KURL&, const TQString&)));
+ connect(pTab, TQT_SIGNAL(changeUploadStatus(const KURL&, int)),
+ m_project, TQT_SLOT(slotUploadStatusChanged(const KURL&, int)));
+ connect(pTab, TQT_SIGNAL(changeDocumentFolderStatus(const KURL&, bool)),
+ m_project, TQT_SLOT(slotChangeDocumentFolderStatus(const KURL&, bool)));
+
+ connect(m_project, TQT_SIGNAL(hideSplash()), m_quanta, TQT_SLOT(slotHideSplash()));
+
+ connect(m_project, TQT_SIGNAL(statusMsg(const TQString &)),
+ m_quanta, TQT_SLOT(slotStatusMsg(const TQString & )));
}
void QuantaInit::initView()
{
ViewManager *m_viewManager = ViewManager::ref(m_quanta);
- connect(m_quanta, SIGNAL(viewActivated (KMdiChildView *)), m_viewManager, SLOT(slotViewActivated(KMdiChildView*)));
- connect(m_quanta, SIGNAL(lastChildViewClosed()), m_viewManager, SLOT(slotLastViewClosed()));
-// connect(m_quanta, SIGNAL(viewDeactivated(KMdiChildView *)), m_viewManager, SLOT(slotViewDeactivated(KMdiChildView*)));
+ connect(m_quanta, TQT_SIGNAL(viewActivated (KMdiChildView *)), m_viewManager, TQT_SLOT(slotViewActivated(KMdiChildView*)));
+ connect(m_quanta, TQT_SIGNAL(lastChildViewClosed()), m_viewManager, TQT_SLOT(slotLastViewClosed()));
+// connect(m_quanta, TQT_SIGNAL(viewDeactivated(KMdiChildView *)), m_viewManager, TQT_SLOT(slotViewDeactivated(KMdiChildView*)));
KafkaDocument *m_kafkaDocument = KafkaDocument::ref(0, 0, "KafkaPart");
m_kafkaDocument->getKafkaWidget()->view()->setMinimumHeight(50);
m_kafkaDocument->readConfig(quantaApp->config());
loadVPLConfig();
ToolbarTabWidget *toolBarTab = ToolbarTabWidget::ref(quantaApp);
- connect(toolBarTab, SIGNAL(iconTextModeChanged()), quantaApp, SLOT(slotRefreshActiveWindow()));
+ connect(toolBarTab, TQT_SIGNAL(iconTextModeChanged()), quantaApp, TQT_SLOT(slotRefreshActiveWindow()));
//set the toolview and close button style before the GUI is created
m_config->setGroup("General Options");
@@ -481,77 +481,77 @@ void QuantaInit::initView()
m_quanta->scriptTab = new ScriptTreeView(m_quanta, "Scripts");
m_quanta->m_messageOutput = new MessageOutput(m_quanta, "Messages");
- m_quanta->m_messageOutput->setFocusPolicy(QWidget::NoFocus);
+ m_quanta->m_messageOutput->setFocusPolicy(TQWidget::NoFocus);
m_quanta->m_messageOutput->showMessage(i18n("Message Window..."));
- connect(m_quanta, SIGNAL(showMessage(const QString&, bool)), m_quanta->m_messageOutput, SLOT(showMessage(const QString&, bool)));
- connect(m_quanta, SIGNAL(clearMessages()), m_quanta->m_messageOutput, SLOT(clear()));
+ connect(m_quanta, TQT_SIGNAL(showMessage(const TQString&, bool)), m_quanta->m_messageOutput, TQT_SLOT(showMessage(const TQString&, bool)));
+ connect(m_quanta, TQT_SIGNAL(clearMessages()), m_quanta->m_messageOutput, TQT_SLOT(clear()));
m_quanta->m_problemOutput = new MessageOutput(m_quanta, "Problems");
- m_quanta->m_problemOutput->setFocusPolicy(QWidget::NoFocus);
+ m_quanta->m_problemOutput->setFocusPolicy(TQWidget::NoFocus);
m_quanta->m_annotationOutput = new AnnotationOutput(m_quanta, "Annotations");
- m_quanta->m_annotationOutput->setFocusPolicy(QWidget::NoFocus);
+ m_quanta->m_annotationOutput->setFocusPolicy(TQWidget::NoFocus);
m_quanta->createPreviewPart();
m_quanta->createDocPart();
- connect(m_quanta, SIGNAL(reloadAllTrees()),
- m_quanta->fTab, SLOT(slotReloadAllTrees()));
-
- connect(pTab, SIGNAL(loadToolbarFile (const KURL&)),
- m_quanta, SLOT(slotLoadToolbarFile(const KURL&)));
- connect(m_viewManager, SIGNAL(viewActivated(const KURL&)),
- pTab, SLOT(slotViewActivated(const KURL&)));
-
- connect(m_viewManager, SIGNAL(documentClosed(const KURL&)),
- pTab, SLOT(slotDocumentClosed(const KURL&)));
- connect(m_viewManager, SIGNAL(documentClosed(const KURL&)),
- tTab, SLOT(slotDocumentClosed(const KURL&)));
- connect(m_viewManager, SIGNAL(documentClosed(const KURL&)),
- m_quanta->scriptTab, SLOT(slotDocumentClosed(const KURL&)));
- connect(m_viewManager, SIGNAL(documentClosed(const KURL&)),
- m_quanta->fTab, SLOT(slotDocumentClosed(const KURL&)));
-
- connect(tTab, SIGNAL(insertFile (const KURL &)),
- m_quanta, SLOT(slotInsertFile(const KURL &)));
-
- connect(m_quanta->scriptTab, SIGNAL(openFileInPreview(const KURL &)),
- m_quanta, SLOT(slotOpenFileInPreview(const KURL &)));
- connect(m_quanta->scriptTab, SIGNAL(showPreviewWidget(bool)),
- m_quanta, SLOT(slotShowPreviewWidget(bool)));
- connect(m_quanta->scriptTab, SIGNAL(assignActionToScript(const KURL &, const QString&)),
- m_quanta, SLOT(slotAssignActionToScript(const KURL &, const QString&)));
- connect(m_quanta->scriptTab, SIGNAL(downloadScript()), m_quanta, SLOT(slotDownloadScript()));
- connect(m_quanta->scriptTab, SIGNAL(uploadScript(const QString&)), m_quanta, SLOT(slotUploadScript(const QString&)));
- connect(m_quanta->dTab, SIGNAL(downloadDoc()), m_quanta, SLOT(slotDownloadDoc()));
-
- connect(m_quanta->m_htmlPart, SIGNAL(onURL(const QString&)),
- m_quanta, SLOT(slotStatusMsg(const QString&)));
- connect(m_quanta->m_htmlPartDoc, SIGNAL(onURL(const QString&)),
- m_quanta, SLOT(slotStatusMsg(const QString&)));
-
- connect(sTab, SIGNAL(newCursorPosition(int,int)), m_quanta, SLOT(setCursorPosition(int,int)));
- connect(sTab, SIGNAL(selectArea(int,int,int,int)), m_quanta, SLOT( selectArea(int,int,int,int)));
- connect(sTab, SIGNAL(selectTagArea(Node*)), m_quanta, SLOT(slotSelectTagArea(Node*)));
- connect(sTab, SIGNAL(needReparse()), m_quanta, SLOT(slotForceReparse()));
- connect(sTab, SIGNAL(showGroupsForDTEP(const QString&, bool)), m_quanta, SLOT(slotShowGroupsForDTEP(const QString&, bool)));
- connect(sTab, SIGNAL(openFile(const KURL &)),
- m_quanta, SLOT (slotFileOpen(const KURL &)));
- connect(sTab, SIGNAL(openImage (const KURL&)),
- m_quanta, SLOT(slotImageOpen(const KURL&)));
- connect(sTab, SIGNAL(showProblemMessage(const QString&)),
- m_quanta->m_problemOutput, SLOT(showMessage(const QString&)));
- connect(sTab, SIGNAL(clearProblemOutput()),
- m_quanta->m_problemOutput, SLOT(clear()));
- connect(parser, SIGNAL(nodeTreeChanged()), sTab, SLOT(slotNodeTreeChanged()));
-
- connect(m_quanta->dTab, SIGNAL(openURL(const QString&)), m_quanta, SLOT(openDoc(const QString&)));
-
- connect(m_viewManager, SIGNAL(dragInsert(QDropEvent *)), tTab, SLOT(slotDragInsert(QDropEvent *)));
+ connect(m_quanta, TQT_SIGNAL(reloadAllTrees()),
+ m_quanta->fTab, TQT_SLOT(slotReloadAllTrees()));
+
+ connect(pTab, TQT_SIGNAL(loadToolbarFile (const KURL&)),
+ m_quanta, TQT_SLOT(slotLoadToolbarFile(const KURL&)));
+ connect(m_viewManager, TQT_SIGNAL(viewActivated(const KURL&)),
+ pTab, TQT_SLOT(slotViewActivated(const KURL&)));
+
+ connect(m_viewManager, TQT_SIGNAL(documentClosed(const KURL&)),
+ pTab, TQT_SLOT(slotDocumentClosed(const KURL&)));
+ connect(m_viewManager, TQT_SIGNAL(documentClosed(const KURL&)),
+ tTab, TQT_SLOT(slotDocumentClosed(const KURL&)));
+ connect(m_viewManager, TQT_SIGNAL(documentClosed(const KURL&)),
+ m_quanta->scriptTab, TQT_SLOT(slotDocumentClosed(const KURL&)));
+ connect(m_viewManager, TQT_SIGNAL(documentClosed(const KURL&)),
+ m_quanta->fTab, TQT_SLOT(slotDocumentClosed(const KURL&)));
+
+ connect(tTab, TQT_SIGNAL(insertFile (const KURL &)),
+ m_quanta, TQT_SLOT(slotInsertFile(const KURL &)));
+
+ connect(m_quanta->scriptTab, TQT_SIGNAL(openFileInPreview(const KURL &)),
+ m_quanta, TQT_SLOT(slotOpenFileInPreview(const KURL &)));
+ connect(m_quanta->scriptTab, TQT_SIGNAL(showPreviewWidget(bool)),
+ m_quanta, TQT_SLOT(slotShowPreviewWidget(bool)));
+ connect(m_quanta->scriptTab, TQT_SIGNAL(assignActionToScript(const KURL &, const TQString&)),
+ m_quanta, TQT_SLOT(slotAssignActionToScript(const KURL &, const TQString&)));
+ connect(m_quanta->scriptTab, TQT_SIGNAL(downloadScript()), m_quanta, TQT_SLOT(slotDownloadScript()));
+ connect(m_quanta->scriptTab, TQT_SIGNAL(uploadScript(const TQString&)), m_quanta, TQT_SLOT(slotUploadScript(const TQString&)));
+ connect(m_quanta->dTab, TQT_SIGNAL(downloadDoc()), m_quanta, TQT_SLOT(slotDownloadDoc()));
+
+ connect(m_quanta->m_htmlPart, TQT_SIGNAL(onURL(const TQString&)),
+ m_quanta, TQT_SLOT(slotStatusMsg(const TQString&)));
+ connect(m_quanta->m_htmlPartDoc, TQT_SIGNAL(onURL(const TQString&)),
+ m_quanta, TQT_SLOT(slotStatusMsg(const TQString&)));
+
+ connect(sTab, TQT_SIGNAL(newCursorPosition(int,int)), m_quanta, TQT_SLOT(setCursorPosition(int,int)));
+ connect(sTab, TQT_SIGNAL(selectArea(int,int,int,int)), m_quanta, TQT_SLOT( selectArea(int,int,int,int)));
+ connect(sTab, TQT_SIGNAL(selectTagArea(Node*)), m_quanta, TQT_SLOT(slotSelectTagArea(Node*)));
+ connect(sTab, TQT_SIGNAL(needReparse()), m_quanta, TQT_SLOT(slotForceReparse()));
+ connect(sTab, TQT_SIGNAL(showGroupsForDTEP(const TQString&, bool)), m_quanta, TQT_SLOT(slotShowGroupsForDTEP(const TQString&, bool)));
+ connect(sTab, TQT_SIGNAL(openFile(const KURL &)),
+ m_quanta, TQT_SLOT (slotFileOpen(const KURL &)));
+ connect(sTab, TQT_SIGNAL(openImage (const KURL&)),
+ m_quanta, TQT_SLOT(slotImageOpen(const KURL&)));
+ connect(sTab, TQT_SIGNAL(showProblemMessage(const TQString&)),
+ m_quanta->m_problemOutput, TQT_SLOT(showMessage(const TQString&)));
+ connect(sTab, TQT_SIGNAL(clearProblemOutput()),
+ m_quanta->m_problemOutput, TQT_SLOT(clear()));
+ connect(parser, TQT_SIGNAL(nodeTreeChanged()), sTab, TQT_SLOT(slotNodeTreeChanged()));
+
+ connect(m_quanta->dTab, TQT_SIGNAL(openURL(const TQString&)), m_quanta, TQT_SLOT(openDoc(const TQString&)));
+
+ connect(m_viewManager, TQT_SIGNAL(dragInsert(TQDropEvent *)), tTab, TQT_SLOT(slotDragInsert(TQDropEvent *)));
qConfig.windowLayout = "Default";
}
-KMdiToolViewAccessor* QuantaInit::addToolTreeView(QWidget *widget, const QString &name, const QPixmap &icon, KDockWidget::DockPosition position)
+KMdiToolViewAccessor* QuantaInit::addToolTreeView(TQWidget *widget, const TQString &name, const TQPixmap &icon, KDockWidget::DockPosition position)
{
widget->setIcon(icon);
widget->setCaption(name);
@@ -589,7 +589,7 @@ void QuantaInit::readOptions()
KAction *action = quantaApp->actionCollection()->action("smart_tag_insertion");
(static_cast<KToggleAction* >(action))->setChecked(qConfig.smartTagInsertion);
- QSize s(800,580);
+ TQSize s(800,580);
m_quanta->resize( m_config->readSizeEntry("Geometry", &s));
qConfig.autosaveInterval = m_config->readNumEntry("Autosave interval", 1);
@@ -619,7 +619,7 @@ void QuantaInit::readOptions()
//KNewStuff config
m_config->setGroup("KNewStuff");
- QString str = m_config->readEntry("ProvidersUrl");
+ TQString str = m_config->readEntry("ProvidersUrl");
if (str.isEmpty())
{
m_config->writeEntry( "ProvidersUrl", "http://quanta.kdewebdev.org/newstuff/providers.xml" );
@@ -645,7 +645,7 @@ void QuantaInit::openLastFiles()
// because project now can be
// in load stage ( remote prj )
m_config->setGroup("Projects");
- QString pu = QuantaCommon::readPathEntry(m_config, "Last Project");
+ TQString pu = QuantaCommon::readPathEntry(m_config, "Last Project");
KURL u;
QuantaCommon::setUrl(u, pu);
@@ -657,12 +657,12 @@ void QuantaInit::openLastFiles()
m_config->setGroup("General Options");
- QStringList urls = QuantaCommon::readPathListEntry(m_config, "List of opened files");
- QStringList encodings = QuantaCommon::readPathListEntry(m_config, "Encoding of opened files");
+ TQStringList urls = QuantaCommon::readPathListEntry(m_config, "List of opened files");
+ TQStringList encodings = QuantaCommon::readPathListEntry(m_config, "Encoding of opened files");
m_quanta->m_doc->blockSignals(true);
m_quanta->setParserEnabled(false);
uint i = 0;
- for ( QStringList::Iterator it = urls.begin(); it != urls.end(); ++it )
+ for ( TQStringList::Iterator it = urls.begin(); it != urls.end(); ++it )
{
KURL fu;
QuantaCommon::setUrl(fu, *it);
@@ -684,7 +684,7 @@ void QuantaInit::openLastFiles()
}
/** Loads the initial project */
-void QuantaInit::loadInitialProject(const QString& url)
+void QuantaInit::loadInitialProject(const TQString& url)
{
if(url.isNull())
{
@@ -706,74 +706,74 @@ void QuantaInit::loadInitialProject(const QString& url)
void QuantaInit::initActions()
{
KActionCollection *ac = m_quanta->actionCollection();
- new KAction(i18n("Annotate..."), 0, m_quanta, SLOT(slotAnnotate()),ac, "annotate");
+ new KAction(i18n("Annotate..."), 0, m_quanta, TQT_SLOT(slotAnnotate()),ac, "annotate");
m_quanta->editTagAction = new KAction( i18n( "&Edit Current Tag..." ), CTRL+Key_E,
- m_quanta, SLOT( slotEditCurrentTag() ),
+ m_quanta, TQT_SLOT( slotEditCurrentTag() ),
ac, "edit_current_tag" );
m_quanta->selectTagAreaAction = new KAction( i18n( "&Select Current Tag Area" ), 0,
- m_quanta, SLOT( slotSelectTagArea() ),
+ m_quanta, TQT_SLOT( slotSelectTagArea() ),
ac, "select_tag_area" );
new KAction( i18n( "E&xpand Abbreviation" ), CTRL+SHIFT+Key_J,
- m_quanta, SLOT( slotExpandAbbreviation() ),
+ m_quanta, TQT_SLOT( slotExpandAbbreviation() ),
ac, "expand_abbreviation" );
- new KAction(i18n("&Report Bug..."), 0, m_quanta, SLOT(slotReportBug()), ac, "help_reportbug"); //needed, because quanta_be bugs should be reported for quanta
+ new KAction(i18n("&Report Bug..."), 0, m_quanta, TQT_SLOT(slotReportBug()), ac, "help_reportbug"); //needed, because quanta_be bugs should be reported for quanta
//Kate actions
//Edit menu
- KStdAction::undo(m_quanta, SLOT(slotUndo()), ac);
- KStdAction::redo(m_quanta, SLOT(slotRedo()), ac);
- KStdAction::cut(m_quanta, SLOT(slotCut()), ac);
- KStdAction::copy(m_quanta, SLOT(slotCopy()), ac) ;
- KStdAction::pasteText(m_quanta, SLOT(slotPaste()), ac);
+ KStdAction::undo(m_quanta, TQT_SLOT(slotUndo()), ac);
+ KStdAction::redo(m_quanta, TQT_SLOT(slotRedo()), ac);
+ KStdAction::cut(m_quanta, TQT_SLOT(slotCut()), ac);
+ KStdAction::copy(m_quanta, TQT_SLOT(slotCopy()), ac) ;
+ KStdAction::pasteText(m_quanta, TQT_SLOT(slotPaste()), ac);
//help
(void) new KAction(i18n("Ti&p of the Day"), "idea", "", m_quanta,
- SLOT(slotHelpTip()), ac, "help_tip");
+ TQT_SLOT(slotHelpTip()), ac, "help_tip");
// File actions
//
- KStdAction::openNew( m_quanta, SLOT( slotFileNew() ), ac);
- KStdAction::open ( m_quanta, SLOT( slotFileOpen() ), ac, "file_open");
- (void) new KAction(i18n("Close Other Tabs"), 0, ViewManager::ref(), SLOT(slotCloseOtherTabs()), ac, "close_other_tabs");
+ KStdAction::openNew( m_quanta, TQT_SLOT( slotFileNew() ), ac);
+ KStdAction::open ( m_quanta, TQT_SLOT( slotFileOpen() ), ac, "file_open");
+ (void) new KAction(i18n("Close Other Tabs"), 0, ViewManager::ref(), TQT_SLOT(slotCloseOtherTabs()), ac, "close_other_tabs");
- m_quanta->fileRecent = KStdAction::openRecent(m_quanta, SLOT(slotFileOpenRecent(const KURL&)),
+ m_quanta->fileRecent = KStdAction::openRecent(m_quanta, TQT_SLOT(slotFileOpenRecent(const KURL&)),
ac, "file_open_recent");
m_quanta->fileRecent->setToolTip(i18n("Open / Open Recent"));
- connect(m_quanta->fileRecent, SIGNAL(activated()), m_quanta, SLOT(slotFileOpen()));
+ connect(m_quanta->fileRecent, TQT_SIGNAL(activated()), m_quanta, TQT_SLOT(slotFileOpen()));
(void) new KAction( i18n( "Close All" ), 0, m_quanta,
- SLOT( slotFileCloseAll() ),
+ TQT_SLOT( slotFileCloseAll() ),
ac, "file_close_all" );
- m_quanta->saveAction = KStdAction::save(m_quanta, SLOT( slotFileSave() ), ac);
+ m_quanta->saveAction = KStdAction::save(m_quanta, TQT_SLOT( slotFileSave() ), ac);
- KStdAction::saveAs( m_quanta, SLOT( slotFileSaveAs() ), ac );
+ KStdAction::saveAs( m_quanta, TQT_SLOT( slotFileSaveAs() ), ac );
m_quanta->saveAllAction = new KAction( i18n( "Save All..." ), "save_all", SHIFT+KStdAccel::shortcut(KStdAccel::Save).keyCodeQt(),
- m_quanta, SLOT( slotFileSaveAll() ),
+ m_quanta, TQT_SLOT( slotFileSaveAll() ),
ac, "file_save_all" );
(void) new KAction(i18n("Reloa&d"), "revert", SHIFT+Key_F5, m_quanta,
- SLOT(slotFileReload()), ac, "file_reload");
+ TQT_SLOT(slotFileReload()), ac, "file_reload");
// (void) new KAction(i18n("Reload All "), 0, 0, m_quanta,
-// SLOT(slotFileReloadAll()), ac, "file_reload_all");
+// TQT_SLOT(slotFileReloadAll()), ac, "file_reload_all");
(void) new KAction( i18n( "Save as Local Template..." ), 0,
- m_quanta, SLOT( slotFileSaveAsLocalTemplate() ),
+ m_quanta, TQT_SLOT( slotFileSaveAsLocalTemplate() ),
ac, "save_local_template" );
(void) new KAction( i18n( "Save Selection to Local Template File..." ), 0,
- m_quanta, SLOT( slotFileSaveSelectionAsLocalTemplate() ),
+ m_quanta, TQT_SLOT( slotFileSaveSelectionAsLocalTemplate() ),
ac, "save_selection_local_template" );
- KStdAction::quit( m_quanta, SLOT( slotFileQuit() ), ac );
+ KStdAction::quit( m_quanta, TQT_SLOT( slotFileQuit() ), ac );
// Edit actions
(void) new KAction( i18n( "Find in Files..." ),
SmallIcon("filefind"), CTRL+ALT+Key_F,
- m_quanta, SLOT( slotEditFindInFiles() ),
+ m_quanta, TQT_SLOT( slotEditFindInFiles() ),
ac, "find_in_files" );
KAction* aux = TagActionManager::self()->actionCollection()->action("apply_source_indentation");
@@ -783,69 +783,69 @@ void QuantaInit::initActions()
// Tool actions
(void) new KAction( i18n( "&Context Help..." ), CTRL+Key_H,
- m_quanta, SLOT( slotContextHelp() ),
+ m_quanta, TQT_SLOT( slotContextHelp() ),
ac, "context_help" );
(void) new KAction( i18n( "&Quanta Homepage" ), 0,
- m_quanta, SLOT( slotHelpHomepage() ),
+ m_quanta, TQT_SLOT( slotHelpHomepage() ),
ac, "help_homepage" );
(void) new KAction( i18n( "&User Mailing List" ), 0,
- m_quanta, SLOT( slotHelpUserList() ),
+ m_quanta, TQT_SLOT( slotHelpUserList() ),
ac, "help_userlist" );
(void) new KAction( i18n( "Make &Donation" ), 0,
- m_quanta, SLOT( slotMakeDonation() ),
+ m_quanta, TQT_SLOT( slotMakeDonation() ),
ac, "help_donation" );
(void) new KAction( i18n( "Tag &Attributes..." ), ALT+Key_Down,
- m_quanta->m_doc, SLOT( slotAttribPopup() ),
+ m_quanta->m_doc, TQT_SLOT( slotAttribPopup() ),
ac, "tag_attributes" );
(void) new KAction( i18n( "&Change the DTD..." ), 0,
- m_quanta, SLOT( slotChangeDTD() ),
+ m_quanta, TQT_SLOT( slotChangeDTD() ),
ac, "change_dtd" );
(void) new KAction( i18n( "&Edit DTD Settings..." ), 0,
- m_quanta, SLOT( slotEditDTD() ),
+ m_quanta, TQT_SLOT( slotEditDTD() ),
ac, "edit_dtd" );
(void) new KAction( i18n( "&Load && Convert DTD..." ), 0,
- DTDs::ref(), SLOT( slotLoadDTD() ),
+ DTDs::ref(), TQT_SLOT( slotLoadDTD() ),
ac, "load_dtd" );
(void) new KAction( i18n( "Load DTD E&ntities..." ), 0,
- DTDs::ref(), SLOT( slotLoadEntities() ),
+ DTDs::ref(), TQT_SLOT( slotLoadEntities() ),
ac, "load_entities" );
(void) new KAction( i18n( "Load DTD &Package (DTEP)..." ), 0,
- m_quanta, SLOT( slotLoadDTEP() ),
+ m_quanta, TQT_SLOT( slotLoadDTEP() ),
ac, "load_dtep" );
(void) new KAction( i18n( "Send DTD Package (DTEP) in E&mail..." ), "mail_send", 0,
- m_quanta, SLOT( slotEmailDTEP() ),
+ m_quanta, TQT_SLOT( slotEmailDTEP() ),
ac, "send_dtep" );
(void) new KAction( i18n( "&Download DTD Package (DTEP)..." ), "network", 0,
- m_quanta, SLOT( slotDownloadDTEP() ),
+ m_quanta, TQT_SLOT( slotDownloadDTEP() ),
ac, "download_dtep" );
(void) new KAction( i18n( "&Upload DTD Package (DTEP)..." ), "network", 0,
- m_quanta, SLOT( slotUploadDTEP() ),
+ m_quanta, TQT_SLOT( slotUploadDTEP() ),
ac, "upload_dtep" );
/*
(void) new KAction( i18n( "&Upload DTD Package (DTEP)..." ), 0,
- m_quanta, SLOT( slotUploadDTEP() ),
+ m_quanta, TQT_SLOT( slotUploadDTEP() ),
ac, "send_dtep" );
*/
(void) new KAction( i18n( "&Document Properties" ), 0,
- m_quanta, SLOT( slotDocumentProperties() ),
+ m_quanta, TQT_SLOT( slotDocumentProperties() ),
ac, "tools_document_properties" );
(void) new KAction ( i18n ("F&ormat XML Code"), 0,
- m_quanta, SLOT( slotCodeFormatting() ),
+ m_quanta, TQT_SLOT( slotCodeFormatting() ),
ac, "tools_code_formatting");
(void) new KAction( i18n( "&Convert Tag && Attribute Case..."), 0,
- m_quanta, SLOT(slotConvertCase()),
+ m_quanta, TQT_SLOT(slotConvertCase()),
ac, "tools_change_case");
// View actions
@@ -853,109 +853,109 @@ void QuantaInit::initActions()
m_quanta->showSourceAction =
new KToggleAction( i18n( "&Source Editor"), UserIcon ("view_text"), ALT+Key_F9,
- m_quanta, SLOT( slotShowSourceEditor()),
+ m_quanta, TQT_SLOT( slotShowSourceEditor()),
ac, "show_quanta_editor");
m_quanta->showSourceAction->setExclusiveGroup("view");
m_quanta->showVPLAction =
new KToggleAction( i18n( "&VPL Editor"), UserIcon ("vpl"), CTRL+SHIFT+Key_F9,
- m_quanta, SLOT( slotShowVPLOnly() ),
+ m_quanta, TQT_SLOT( slotShowVPLOnly() ),
ac, "show_kafka_view");
m_quanta->showVPLAction->setExclusiveGroup("view");
m_quanta->showVPLSourceAction =
new KToggleAction( i18n("VPL && So&urce Editors"), UserIcon ("vpl_text"), Key_F9,
- m_quanta, SLOT( slotShowVPLAndSourceEditor() ),
+ m_quanta, TQT_SLOT( slotShowVPLAndSourceEditor() ),
ac, "show_kafka_and_quanta");
m_quanta->showVPLSourceAction->setExclusiveGroup("view");
/**kafkaSelectAction = new KSelectAction(i18n("Main &View"), 0, ac,"show_kafka");
- QStringList list2;
+ TQStringList list2;
list2.append(i18n("&Source Editor"));
list2.append(i18n("&VPL Editor (experimental)"));
list2.append(i18n("&Both Editors"));
kafkaSelectAction->setItems(list2);
- connect(kafkaSelectAction, SIGNAL(activated(int)), m_quanta, SLOT(slotShowKafkaPartl(int)));*/
+ connect(kafkaSelectAction, TQT_SIGNAL(activated(int)), m_quanta, TQT_SLOT(slotShowKafkaPartl(int)));*/
(void) new KAction( i18n( "&Reload Preview" ), "reload",
KStdAccel::shortcut(KStdAccel::Reload).keyCodeQt(),
- m_quanta, SLOT(slotRepaintPreview()),
+ m_quanta, TQT_SLOT(slotRepaintPreview()),
ac, "reload" );
(void) new KAction( i18n( "&Previous File" ), "1leftarrow", KStdAccel::back(),
- m_quanta, SLOT( slotBack() ),
+ m_quanta, TQT_SLOT( slotBack() ),
ac, "previous_file" );
(void) new KAction( i18n( "&Next File" ), "1rightarrow", KStdAccel::forward(),
- m_quanta, SLOT( slotForward() ),
+ m_quanta, TQT_SLOT( slotForward() ),
ac, "next_file" );
// Options actions
//
(void) new KAction( i18n( "Configure &Actions..." ), UserIcon("ball"),0,
- m_quanta, SLOT( slotOptionsConfigureActions() ),
+ m_quanta, TQT_SLOT( slotOptionsConfigureActions() ),
ac, "configure_actions" );
- KStdAction::showMenubar(m_quanta, SLOT(slotShowMenuBar()), ac, "options_show_menubar");
- KStdAction::keyBindings(m_quanta, SLOT( slotOptionsConfigureKeys() ), ac, "configure_shortcuts");
- KStdAction::configureToolbars( m_quanta, SLOT( slotOptionsConfigureToolbars() ), ac, "options_configure_toolbars");
- KStdAction::preferences(m_quanta, SLOT( slotOptions() ), ac, "general_options");
- new KAction(i18n("Configure Pre&view..."), SmallIcon("konqueror"), 0, m_quanta, SLOT(slotPreviewOptions()), ac, "preview_options");
+ KStdAction::showMenubar(m_quanta, TQT_SLOT(slotShowMenuBar()), ac, "options_show_menubar");
+ KStdAction::keyBindings(m_quanta, TQT_SLOT( slotOptionsConfigureKeys() ), ac, "configure_shortcuts");
+ KStdAction::configureToolbars( m_quanta, TQT_SLOT( slotOptionsConfigureToolbars() ), ac, "options_configure_toolbars");
+ KStdAction::preferences(m_quanta, TQT_SLOT( slotOptions() ), ac, "general_options");
+ new KAction(i18n("Configure Pre&view..."), SmallIcon("konqueror"), 0, m_quanta, TQT_SLOT(slotPreviewOptions()), ac, "preview_options");
// Toolbars actions
m_quanta->projectToolbarFiles = new KRecentFilesAction(i18n("Load &Project Toolbar"),0,
- m_quanta, SLOT(slotLoadToolbarFile(const KURL&)),
+ m_quanta, TQT_SLOT(slotLoadToolbarFile(const KURL&)),
ac, "toolbars_load_project");
- new KAction(i18n("Load &Global Toolbar..."), 0, m_quanta, SLOT(slotLoadGlobalToolbar()), ac, "toolbars_load_global");
- new KAction(i18n("Load &Local Toolbar..."), 0, m_quanta, SLOT(slotLoadToolbar()), ac, "toolbars_load_user");
- new KAction(i18n("Save as &Local Toolbar..."), 0, m_quanta, SLOT(slotSaveLocalToolbar()), ac, "toolbars_save_local");
- new KAction(i18n("Save as &Project Toolbar..."), 0, m_quanta, SLOT(slotSaveProjectToolbar()), ac, "toolbars_save_project");
- new KAction(i18n("&New User Toolbar..."), 0, m_quanta, SLOT(slotAddToolbar()), ac, "toolbars_add");
- new KAction(i18n("&Remove User Toolbar..."), 0, m_quanta, SLOT(slotRemoveToolbar()), ac, "toolbars_remove");
- new KAction(i18n("Re&name User Toolbar..."), 0, m_quanta, SLOT(slotRenameToolbar()), ac, "toolbars_rename");
- new KAction(i18n("Send Toolbar in E&mail..."), "mail_send", 0, m_quanta, SLOT(slotSendToolbar()), ac, "toolbars_send");
- new KAction(i18n("&Upload Toolbar..." ), "network", 0, m_quanta, SLOT(slotUploadToolbar()), ac, "toolbars_upload" );
- new KAction(i18n("&Download Toolbar..." ), "network", 0, m_quanta, SLOT(slotDownloadToolbar()), ac, "toolbars_download" );
+ new KAction(i18n("Load &Global Toolbar..."), 0, m_quanta, TQT_SLOT(slotLoadGlobalToolbar()), ac, "toolbars_load_global");
+ new KAction(i18n("Load &Local Toolbar..."), 0, m_quanta, TQT_SLOT(slotLoadToolbar()), ac, "toolbars_load_user");
+ new KAction(i18n("Save as &Local Toolbar..."), 0, m_quanta, TQT_SLOT(slotSaveLocalToolbar()), ac, "toolbars_save_local");
+ new KAction(i18n("Save as &Project Toolbar..."), 0, m_quanta, TQT_SLOT(slotSaveProjectToolbar()), ac, "toolbars_save_project");
+ new KAction(i18n("&New User Toolbar..."), 0, m_quanta, TQT_SLOT(slotAddToolbar()), ac, "toolbars_add");
+ new KAction(i18n("&Remove User Toolbar..."), 0, m_quanta, TQT_SLOT(slotRemoveToolbar()), ac, "toolbars_remove");
+ new KAction(i18n("Re&name User Toolbar..."), 0, m_quanta, TQT_SLOT(slotRenameToolbar()), ac, "toolbars_rename");
+ new KAction(i18n("Send Toolbar in E&mail..."), "mail_send", 0, m_quanta, TQT_SLOT(slotSendToolbar()), ac, "toolbars_send");
+ new KAction(i18n("&Upload Toolbar..." ), "network", 0, m_quanta, TQT_SLOT(slotUploadToolbar()), ac, "toolbars_upload" );
+ new KAction(i18n("&Download Toolbar..." ), "network", 0, m_quanta, TQT_SLOT(slotDownloadToolbar()), ac, "toolbars_download" );
KToggleAction *toggle = new KToggleAction( i18n("Smart Tag Insertion"), 0, ac, "smart_tag_insertion");
- connect(toggle, SIGNAL(toggled(bool)), m_quanta, SLOT(slotSmartTagInsertion()));
+ connect(toggle, TQT_SIGNAL(toggled(bool)), m_quanta, TQT_SLOT(slotSmartTagInsertion()));
m_quanta->showDTDToolbar=new KToggleAction(i18n("Show DTD Toolbar"), 0, ac, "view_dtd_toolbar");
- connect(m_quanta->showDTDToolbar, SIGNAL(toggled(bool)), m_quanta, SLOT(slotToggleDTDToolbar(bool)));
+ connect(m_quanta->showDTDToolbar, TQT_SIGNAL(toggled(bool)), m_quanta, TQT_SLOT(slotToggleDTDToolbar(bool)));
m_quanta->showDTDToolbar->setCheckedState(i18n("Hide DTD Toolbar"));
new KAction(i18n("Complete Text"), CTRL+Key_Space,
- m_quanta, SLOT(slotShowCompletion()), ac,"show_completion");
+ m_quanta, TQT_SLOT(slotShowCompletion()), ac,"show_completion");
new KAction(i18n("Completion Hints"), CTRL+SHIFT+Key_Space,
- m_quanta, SLOT(slotShowCompletionHint()), ac,"show_completion_hint");
+ m_quanta, TQT_SLOT(slotShowCompletionHint()), ac,"show_completion_hint");
- KStdAction::back(m_quanta, SLOT( slotBack() ), ac, "w_back");
- KStdAction::forward(m_quanta, SLOT( slotForward() ), ac, "w_forward");
+ KStdAction::back(m_quanta, TQT_SLOT( slotBack() ), ac, "w_back");
+ KStdAction::forward(m_quanta, TQT_SLOT( slotForward() ), ac, "w_forward");
- new KAction(i18n("Open File: none"), 0, m_quanta, SLOT(slotOpenFileUnderCursor()), ac, "open_file_under_cursor");
- new KAction(i18n("Upload..."), 0, m_quanta, SLOT(slotUploadFile()), ac, "upload_file");
- new KAction(i18n("Delete File"), 0, m_quanta, SLOT(slotDeleteFile()), ac, "delete_file");
+ new KAction(i18n("Open File: none"), 0, m_quanta, TQT_SLOT(slotOpenFileUnderCursor()), ac, "open_file_under_cursor");
+ new KAction(i18n("Upload..."), 0, m_quanta, TQT_SLOT(slotUploadFile()), ac, "upload_file");
+ new KAction(i18n("Delete File"), 0, m_quanta, TQT_SLOT(slotDeleteFile()), ac, "delete_file");
- QString ss = i18n("Upload Opened Project Files...");
-/* new KAction(i18n("Upload Opened Project Files"), 0, m_quanta, SLOT(slotUploadOpenedFiles()), ac, "upload_opened_files"); */
+ TQString ss = i18n("Upload Opened Project Files...");
+/* new KAction(i18n("Upload Opened Project Files"), 0, m_quanta, TQT_SLOT(slotUploadOpenedFiles()), ac, "upload_opened_files"); */
- QString error;
+ TQString error;
int el, ec;
- m_quanta->m_actions = new QDomDocument();
+ m_quanta->m_actions = new TQDomDocument();
//load the global actions
- QFile f(qConfig.globalDataDir + resourceDir + "actions.rc");
+ TQFile f(qConfig.globalDataDir + resourceDir + "actions.rc");
if ( f.open( IO_ReadOnly ))
{
if (m_quanta->m_actions->setContent(&f, &error, &el, &ec))
{
- QDomElement docElem = m_quanta->m_actions->documentElement();
+ TQDomElement docElem = m_quanta->m_actions->documentElement();
- QDomNode n = docElem.firstChild();
+ TQDomNode n = docElem.firstChild();
while( !n.isNull() ) {
- QDomElement e = n.toElement(); // try to convert the node to an element.
+ TQDomElement e = n.toElement(); // try to convert the node to an element.
if( !e.isNull() ) { // the node was really an element.
bool toggable = (e.attribute("toggable", "") == "true");
new TagAction(&e, m_quanta, toggable);
@@ -963,12 +963,12 @@ void QuantaInit::initActions()
n = n.nextSibling();
}
} else
- kdError(24000) << QString("Error %1 at (%2, %3) in %4").arg(error).arg(el).arg(ec).arg(f.name()) << endl;
+ kdError(24000) << TQString("Error %1 at (%2, %3) in %4").arg(error).arg(el).arg(ec).arg(f.name()) << endl;
f.close();
}
m_quanta->m_actions->clear();
//read the user defined actions
- QString s = locateLocal("appdata","actions.rc");
+ TQString s = locateLocal("appdata","actions.rc");
if (!s.isEmpty())
{
f.setName(s);
@@ -976,11 +976,11 @@ void QuantaInit::initActions()
{
if (m_quanta->m_actions->setContent(&f, &error, &el, &ec))
{
- QDomElement docElem = m_quanta->m_actions->documentElement();
+ TQDomElement docElem = m_quanta->m_actions->documentElement();
- QDomNode n = docElem.firstChild();
+ TQDomNode n = docElem.firstChild();
while( !n.isNull() ) {
- QDomElement e = n.toElement(); // try to convert the node to an element.
+ TQDomElement e = n.toElement(); // try to convert the node to an element.
if( !e.isNull())
{ // the node was really an element.
delete ac->action(e.attribute("name"));
@@ -990,7 +990,7 @@ void QuantaInit::initActions()
n = n.nextSibling();
}
} else
- kdError(24000) << QString("Error %1 at (%2, %3) in %4").arg(error).arg(el).arg(ec).arg(f.name()) << endl;
+ kdError(24000) << TQString("Error %1 at (%2, %3) in %4").arg(error).arg(el).arg(ec).arg(f.name()) << endl;
f.close();
}
} else
@@ -1001,16 +1001,16 @@ void QuantaInit::initActions()
// create the preview action
m_quanta->showPreviewAction =
new KToolBarPopupAction( i18n( "&Preview" ), "preview", Key_F6,
- m_quanta, SLOT( slotToggleShowPreview() ),
+ m_quanta, TQT_SLOT( slotToggleShowPreview() ),
ac, "show_preview" );
KAction *act = new KAction( i18n( "Preview Without Frames" ), "", 0,
- m_quanta, SLOT(slotShowNoFramesPreview()),
+ m_quanta, TQT_SLOT(slotShowNoFramesPreview()),
ac, "show_preview_no_frames" );
act->plug(m_quanta->showPreviewAction->popupMenu());
act = new KAction( i18n( "View with &Konqueror" ), "konqueror", Key_F12,
- m_quanta, SLOT( slotViewInKFM() ),
+ m_quanta, TQT_SLOT( slotViewInKFM() ),
ac, "view_with_konqueror" );
act->plug(m_quanta->showPreviewAction->popupMenu());
@@ -1032,62 +1032,62 @@ void QuantaInit::initActions()
act->plug(m_quanta->showPreviewAction->popupMenu());
act = new KAction( i18n( "View with L&ynx" ), "terminal", 0,
- m_quanta, SLOT( slotViewInLynx() ),
+ m_quanta, TQT_SLOT( slotViewInLynx() ),
ac, "view_with_lynx" );
act->plug(m_quanta->showPreviewAction->popupMenu());
(void) new KAction( i18n( "Table Editor..." ), "quick_table", 0,
- m_quanta, SLOT( slotTagEditTable() ),
+ m_quanta, TQT_SLOT( slotTagEditTable() ),
ac, "tag_edit_table" );
(void) new KAction( i18n( "Quick List..." ), "quick_list", 0,
- m_quanta, SLOT( slotTagQuickList() ),
+ m_quanta, TQT_SLOT( slotTagQuickList() ),
ac, "tag_quick_list" );
(void) new KAction( i18n( "Color..." ), "colorize", CTRL+SHIFT+Key_C,
- m_quanta, SLOT( slotTagColor() ),
+ m_quanta, TQT_SLOT( slotTagColor() ),
ac, "tag_color" );
(void) new KAction( i18n( "Email..." ), "tag_mail", 0,
- m_quanta, SLOT( slotTagMail() ),
+ m_quanta, TQT_SLOT( slotTagMail() ),
ac, "tag_mail" );
(void) new KAction( i18n( "Misc. Tag..." ), "tag_misc", CTRL+SHIFT+Key_T,
- m_quanta, SLOT( slotTagMisc() ),
+ m_quanta, TQT_SLOT( slotTagMisc() ),
ac, "tag_misc" );
(void) new KAction( i18n( "Frame Wizard..." ), "frame", 0,
- m_quanta, SLOT( slotFrameWizard() ),
+ m_quanta, TQT_SLOT( slotFrameWizard() ),
ac, "tag_frame_wizard" );
(void) new KAction( i18n( "Paste &HTML Quoted" ), "editpaste", 0,
- m_quanta, SLOT( slotPasteHTMLQuoted() ),
+ m_quanta, TQT_SLOT( slotPasteHTMLQuoted() ),
ac, "edit_paste_html_quoted" );
(void) new KAction( i18n( "Paste &URL Encoded" ), "editpaste", 0,
- m_quanta, SLOT( slotPasteURLEncoded() ),
+ m_quanta, TQT_SLOT( slotPasteURLEncoded() ),
ac, "edit_paste_url_encoded" );
(void) new KAction( i18n( "Insert CSS..." ),"css", 0,
- m_quanta, SLOT( slotInsertCSS() ),
+ m_quanta, TQT_SLOT( slotInsertCSS() ),
ac, "insert_css" );
// special-character combo
KAction* char_action = new KAction(
i18n( "Insert Special Character" ), "charset", 0,
ac, "insert_char" );
- connect( char_action, SIGNAL(activated()),
- m_quanta, SLOT(slotInsertChar()) );
+ connect( char_action, TQT_SIGNAL(activated()),
+ m_quanta, TQT_SLOT(slotInsertChar()) );
- connect(m_quanta, SIGNAL(eventHappened(const QString&, const QString&, const QString& )), QPEvents::ref(m_quanta), SLOT(slotEventHappened(const QString&, const QString&, const QString& )));
- connect(m_quanta->doc(), SIGNAL(eventHappened(const QString&, const QString&, const QString& )), QPEvents::ref(m_quanta), SLOT(slotEventHappened(const QString&, const QString&, const QString& )));
- connect(ViewManager::ref(), SIGNAL(eventHappened(const QString&, const QString&, const QString& )), QPEvents::ref(m_quanta), SLOT(slotEventHappened(const QString&, const QString&, const QString& )));
+ connect(m_quanta, TQT_SIGNAL(eventHappened(const TQString&, const TQString&, const TQString& )), QPEvents::ref(m_quanta), TQT_SLOT(slotEventHappened(const TQString&, const TQString&, const TQString& )));
+ connect(m_quanta->doc(), TQT_SIGNAL(eventHappened(const TQString&, const TQString&, const TQString& )), QPEvents::ref(m_quanta), TQT_SLOT(slotEventHappened(const TQString&, const TQString&, const TQString& )));
+ connect(ViewManager::ref(), TQT_SIGNAL(eventHappened(const TQString&, const TQString&, const TQString& )), QPEvents::ref(m_quanta), TQT_SLOT(slotEventHappened(const TQString&, const TQString&, const TQString& )));
QuantaBookmarks *m_bookmarks = new QuantaBookmarks(ViewManager::ref(m_quanta));
m_bookmarks->createActions(ac);
- connect(m_bookmarks, SIGNAL(gotoFileAndLine(const QString&, int, int)), m_quanta, SLOT(gotoFileAndLine(const QString&, int, int)));
+ connect(m_bookmarks, TQT_SIGNAL(gotoFileAndLine(const TQString&, int, int)), m_quanta, TQT_SLOT(gotoFileAndLine(const TQString&, int, int)));
}
/** Initialize the plugin architecture. */
@@ -1097,10 +1097,10 @@ void QuantaInit::initPlugins()
m_quanta->m_pluginInterface = QuantaPluginInterface::ref(m_quanta);
- connect(m_quanta->m_pluginInterface, SIGNAL(hideSplash()),
- m_quanta, SLOT(slotHideSplash()));
- connect(m_quanta->m_pluginInterface, SIGNAL(statusMsg(const QString &)),
- m_quanta, SLOT(slotStatusMsg(const QString & )));
+ connect(m_quanta->m_pluginInterface, TQT_SIGNAL(hideSplash()),
+ m_quanta, TQT_SLOT(slotHideSplash()));
+ connect(m_quanta->m_pluginInterface, TQT_SIGNAL(statusMsg(const TQString &)),
+ m_quanta, TQT_SLOT(slotStatusMsg(const TQString & )));
m_quanta->m_pluginInterface->readConfig();
if (!m_quanta->m_pluginInterface->pluginAvailable("KFileReplace"))
@@ -1110,15 +1110,15 @@ void QuantaInit::initPlugins()
}
-void QuantaInit::recoverCrashed(QStringList& recoveredFileNameList)
+void QuantaInit::recoverCrashed(TQStringList& recoveredFileNameList)
{
m_quanta->m_doc->blockSignals(true);
execCommandPS("ps -C quanta -C quanta_be -o pid --no-headers");
- m_PIDlist = QStringList::split("\n", m_quanta->m_scriptOutput);
+ m_PIDlist = TQStringList::split("\n", m_quanta->m_scriptOutput);
m_config->setGroup("Projects");
- QString pu = QuantaCommon::readPathEntry(m_config, "Last Project");
+ TQString pu = QuantaCommon::readPathEntry(m_config, "Last Project");
KURL u;
QuantaCommon::setUrl(u, pu);
@@ -1131,18 +1131,18 @@ void QuantaInit::recoverCrashed(QStringList& recoveredFileNameList)
m_config->reparseConfiguration();
m_config->setGroup("General Options");
- QStringList backedUpUrlsList = QuantaCommon::readPathListEntry(m_config, "List of backedup files");
- QStringList autosavedUrlsList = QuantaCommon::readPathListEntry(m_config, "List of autosaved files");
+ TQStringList backedUpUrlsList = QuantaCommon::readPathListEntry(m_config, "List of backedup files");
+ TQStringList autosavedUrlsList = QuantaCommon::readPathListEntry(m_config, "List of autosaved files");
- QStringList::ConstIterator backedUpUrlsEndIt = backedUpUrlsList.constEnd();
- for (QStringList::ConstIterator backedUpUrlsIt = backedUpUrlsList.constBegin();
+ TQStringList::ConstIterator backedUpUrlsEndIt = backedUpUrlsList.constEnd();
+ for (TQStringList::ConstIterator backedUpUrlsIt = backedUpUrlsList.constBegin();
backedUpUrlsIt != backedUpUrlsEndIt; ++backedUpUrlsIt )
{
// when quanta crashes and file autoreloading option is on
// then if user restarts quanta, the backup copies will reload
- QString backedUpFileName = (*backedUpUrlsIt).left((*backedUpUrlsIt).findRev(".")); //the filename without the PID
+ TQString backedUpFileName = (*backedUpUrlsIt).left((*backedUpUrlsIt).findRev(".")); //the filename without the PID
bool notFound;
- QString autosavedPath = searchPathListEntry(backedUpFileName, autosavedUrlsList, notFound);
+ TQString autosavedPath = searchPathListEntry(backedUpFileName, autosavedUrlsList, notFound);
if (!autosavedPath.isEmpty()) //the current item was autosaved and is not in use by another Quanta
{
KURL originalVersion;
@@ -1158,16 +1158,16 @@ void QuantaInit::recoverCrashed(QStringList& recoveredFileNameList)
KIO::UDSEntry entry;
KIO::NetAccess::stat(originalVersion, entry, m_quanta);
KFileItem* item= new KFileItem(entry, originalVersion, false, true);
- QString origTime = item->timeString();
+ TQString origTime = item->timeString();
KIO::filesize_t origSize = item->size();
delete item;
KIO::NetAccess::stat(autosavedVersion, entry, m_quanta);
item= new KFileItem(entry, autosavedVersion, false, true);
- QString backupTime = item->timeString();
+ TQString backupTime = item->timeString();
KIO::filesize_t backupSize = item->size();
delete item;
- if (QFileInfo(autosavedPath).exists()) //if the backup file exists
+ if (TQFileInfo(autosavedPath).exists()) //if the backup file exists
{
emit hideSplash();
DirtyDlg *dlg = new DirtyDlg(autosavedVersion.path(), originalVersion.path(), false, m_quanta);
@@ -1198,7 +1198,7 @@ void QuantaInit::recoverCrashed(QStringList& recoveredFileNameList)
{
//backup the current version and restore it from the autosaved backup
KURL backupURL = originalVersion;
- backupURL.setPath(backupURL.path() + "." + QString::number(getpid(),10) + ".backup");
+ backupURL.setPath(backupURL.path() + "." + TQString::number(getpid(),10) + ".backup");
QExtFileInfo::copy(originalVersion, backupURL, -1, true, false, m_quanta);
QExtFileInfo::copy(autosavedVersion, originalVersion, -1, true, false, m_quanta);
//we save a list of autosaved file names so "KQApplicationPrivate::init()"
@@ -1211,13 +1211,13 @@ void QuantaInit::recoverCrashed(QStringList& recoveredFileNameList)
recoveredFileNameList += backedUpFileName;
}
delete dlg;
- QFile::remove(autosavedPath); //we don't need the backup anymore
+ TQFile::remove(autosavedPath); //we don't need the backup anymore
}
}
//remove the auto-backup file from the list
m_config->setGroup("General Options");
- QStringList autosavedFilesEntryList = QuantaCommon::readPathListEntry(m_config, "List of autosaved files");
- QStringList::Iterator entryIt = autosavedFilesEntryList.begin();
+ TQStringList autosavedFilesEntryList = QuantaCommon::readPathListEntry(m_config, "List of autosaved files");
+ TQStringList::Iterator entryIt = autosavedFilesEntryList.begin();
while(entryIt != autosavedFilesEntryList.end())
{
if ((*entryIt) == KURL::fromPathOrURL(autosavedPath).url())
@@ -1235,8 +1235,8 @@ void QuantaInit::recoverCrashed(QStringList& recoveredFileNameList)
//remove processed items
m_config->setGroup("General Options");
- QStringList backedupFilesEntryList = QuantaCommon::readPathListEntry(m_config, "List of backedup files");
- QStringList::Iterator entryIt = backedupFilesEntryList.begin();
+ TQStringList backedupFilesEntryList = QuantaCommon::readPathListEntry(m_config, "List of backedup files");
+ TQStringList::Iterator entryIt = backedupFilesEntryList.begin();
while (entryIt != backedupFilesEntryList.end())
{
if ((*entryIt) == (*backedUpUrlsIt))
@@ -1249,15 +1249,15 @@ void QuantaInit::recoverCrashed(QStringList& recoveredFileNameList)
}
//clean up auto-backup list, just in case of an old Quanta was used before
- QStringList::Iterator entryIt = autosavedUrlsList.begin();
+ TQStringList::Iterator entryIt = autosavedUrlsList.begin();
while (entryIt != autosavedUrlsList.end())
{
- QString quPID = retrievePID((*entryIt));
+ TQString quPID = retrievePID((*entryIt));
//check if the file is opened by another running Quanta or not
bool isOrphan = true;
- QStringList::ConstIterator PIDEndIt = m_PIDlist.constEnd();
- for (QStringList::ConstIterator PIDIt = m_PIDlist.constBegin(); PIDIt != PIDEndIt; ++PIDIt )
+ TQStringList::ConstIterator PIDEndIt = m_PIDlist.constEnd();
+ for (TQStringList::ConstIterator PIDIt = m_PIDlist.constBegin(); PIDIt != PIDEndIt; ++PIDIt )
{
if ((*PIDIt) == quPID && qConfig.quantaPID != quPID)
{
@@ -1276,20 +1276,20 @@ void QuantaInit::recoverCrashed(QStringList& recoveredFileNameList)
}
- void QuantaInit::execCommandPS(const QString& cmd)
+ void QuantaInit::execCommandPS(const TQString& cmd)
{
//We create a KProcess that executes the "ps" *nix command to get the PIDs of the
//other instances of quanta actually running
KProcess *execCommand = new KProcess();
- *(execCommand) << QStringList::split(" ",cmd);
+ *(execCommand) << TQStringList::split(" ",cmd);
- connect(execCommand, SIGNAL(receivedStdout(KProcess*,char*,int)),
- m_quanta, SLOT(slotGetScriptOutput(KProcess*,char*,int)));
- connect(execCommand, SIGNAL(receivedStderr(KProcess*,char*,int)),
- m_quanta, SLOT(slotGetScriptError(KProcess*,char*,int)));
- connect(execCommand, SIGNAL(processExited(KProcess*)),
- m_quanta, SLOT(slotProcessExited(KProcess*)));
+ connect(execCommand, TQT_SIGNAL(receivedStdout(KProcess*,char*,int)),
+ m_quanta, TQT_SLOT(slotGetScriptOutput(KProcess*,char*,int)));
+ connect(execCommand, TQT_SIGNAL(receivedStderr(KProcess*,char*,int)),
+ m_quanta, TQT_SLOT(slotGetScriptError(KProcess*,char*,int)));
+ connect(execCommand, TQT_SIGNAL(processExited(KProcess*)),
+ m_quanta, TQT_SLOT(slotProcessExited(KProcess*)));
if (!execCommand->start(KProcess::NotifyOnExit,KProcess::All))
{
@@ -1298,9 +1298,9 @@ void QuantaInit::recoverCrashed(QStringList& recoveredFileNameList)
else
{
//To avoid lock-ups, start a timer.
- QTimer *timer = new QTimer(m_quanta);
- connect(timer, SIGNAL(timeout()),
- m_quanta, SLOT(slotProcessTimeout()));
+ TQTimer *timer = new TQTimer(m_quanta);
+ connect(timer, TQT_SIGNAL(timeout()),
+ m_quanta, TQT_SLOT(slotProcessTimeout()));
timer->start(180*1000, true);
QExtFileInfo internalFileInfo;
m_quanta->m_loopStarted = true;
@@ -1310,21 +1310,21 @@ void QuantaInit::recoverCrashed(QStringList& recoveredFileNameList)
}
- QString QuantaInit::searchPathListEntry(const QString& url, const QStringList& autosavedUrlsList, bool &notFound)
+ TQString QuantaInit::searchPathListEntry(const TQString& url, const TQStringList& autosavedUrlsList, bool &notFound)
{
- QString backedUpUrlHashedPath = retrieveHashedPath('.' + Document::hashFilePath(url));
+ TQString backedUpUrlHashedPath = retrieveHashedPath('.' + Document::hashFilePath(url));
notFound = true;
- QStringList::ConstIterator autosavedUrlsEndIt = autosavedUrlsList.constEnd();
- for (QStringList::ConstIterator autosavedUrlsIt = autosavedUrlsList.constBegin();
+ TQStringList::ConstIterator autosavedUrlsEndIt = autosavedUrlsList.constEnd();
+ for (TQStringList::ConstIterator autosavedUrlsIt = autosavedUrlsList.constBegin();
autosavedUrlsIt != autosavedUrlsEndIt;
++autosavedUrlsIt)
{
- QString quPID = retrievePID((*autosavedUrlsIt));
+ TQString quPID = retrievePID((*autosavedUrlsIt));
//check if the file is opened by another running Quanta or not
bool isOrphan = true;
- QStringList::ConstIterator PIDEndIt = m_PIDlist.constEnd();
- for (QStringList::ConstIterator PIDIt = m_PIDlist.constBegin(); PIDIt != PIDEndIt; ++PIDIt )
+ TQStringList::ConstIterator PIDEndIt = m_PIDlist.constEnd();
+ for (TQStringList::ConstIterator PIDIt = m_PIDlist.constBegin(); PIDIt != PIDEndIt; ++PIDIt )
{
if ((*PIDIt) == quPID && qConfig.quantaPID != quPID)
{
@@ -1341,11 +1341,11 @@ void QuantaInit::recoverCrashed(QStringList& recoveredFileNameList)
}
}
- return QString::null;
+ return TQString::null;
}
/** Retrieves hashed path from the name of a backup file */
-QString QuantaInit::retrieveHashedPath(const QString& filename)
+TQString QuantaInit::retrieveHashedPath(const TQString& filename)
{
int lastPoint = filename.findRev(".");
int Ppos = filename.find("P", lastPoint);
@@ -1355,9 +1355,9 @@ QString QuantaInit::retrieveHashedPath(const QString& filename)
/** Retrieves PID from the name of a backup file */
-QString QuantaInit::retrievePID(const QString& filename)
+TQString QuantaInit::retrievePID(const TQString& filename)
{
- QString strPID = QString::null;
+ TQString strPID = TQString::null;
strPID = filename.mid(filename.findRev("P") + 1);
if (strPID.isEmpty())
@@ -1385,10 +1385,10 @@ void QuantaInit::loadVPLConfig()
}
struct Dependency{
- QString name;
- QString execName;
- QString url;
- QString description;
+ TQString name;
+ TQString execName;
+ TQString url;
+ TQString description;
enum Type{
Executable = 0,
Plugin
@@ -1399,7 +1399,7 @@ struct Dependency{
void QuantaInit::checkRuntimeDependencies()
{
- QValueList<Dependency> dependencies;
+ TQValueList<Dependency> dependencies;
Dependency dependency;
dependency.name = "Kommander";
dependency.execName = "kmdr-executor";
@@ -1474,40 +1474,40 @@ void QuantaInit::checkRuntimeDependencies()
dependency.type = Dependency::Plugin;
dependencies.append(dependency);
- QString errorStr;
- QString stdErrorMsg = i18n("<br><b>- %1</b> [<i>%2</i>] - %3 will not be available;");
- for (QValueList<Dependency>::ConstIterator it = dependencies.constBegin(); it != dependencies.constEnd(); ++it)
+ TQString errorStr;
+ TQString stdErrorMsg = i18n("<br><b>- %1</b> [<i>%2</i>] - %3 will not be available;");
+ for (TQValueList<Dependency>::ConstIterator it = dependencies.constBegin(); it != dependencies.constEnd(); ++it)
{
dependency = *it;
if (dependency.type == Dependency::Executable)
{
if (KStandardDirs::findExe(dependency.execName).isNull())
- errorStr += QString(stdErrorMsg).arg(dependency.name).arg(dependency.url).arg(dependency.description);
+ errorStr += TQString(stdErrorMsg).arg(dependency.name).arg(dependency.url).arg(dependency.description);
} else
if (dependency.type == Dependency::Plugin)
{
if (!QuantaPlugin::validatePlugin(m_quanta->m_pluginInterface->plugin(dependency.execName)))
- errorStr += QString(stdErrorMsg).arg(dependency.name).arg(dependency.url).arg(dependency.description);
+ errorStr += TQString(stdErrorMsg).arg(dependency.name).arg(dependency.url).arg(dependency.description);
}
}
#ifdef ENABLE_CVSSERVICE
- QString error;
- QCString appId;
+ TQString error;
+ TQCString appId;
- KApplication::startServiceByDesktopName("cvsservice", QStringList(), &error,
+ KApplication::startServiceByDesktopName("cvsservice", TQStringList(), &error,
&appId);
if (appId.isEmpty())
{
- errorStr += QString(stdErrorMsg).arg("Cervisia (cvsservice)").arg("http://www.kde.org/apps/cervisia").arg(i18n("integrated CVS management"));
+ errorStr += TQString(stdErrorMsg).arg("Cervisia (cvsservice)").arg("http://www.kde.org/apps/cervisia").arg(i18n("integrated CVS management"));
} else
{
CVSService::ref(m_quanta->actionCollection())->setAppId(appId);
- connect(CVSService::ref(), SIGNAL(clearMessages()), m_quanta->m_messageOutput, SLOT(clear()));
- connect(CVSService::ref(), SIGNAL(showMessage(const QString&, bool)), m_quanta->m_messageOutput, SLOT(showMessage(const QString&, bool)));
- connect(CVSService::ref(), SIGNAL(commandExecuted(const QString&, const QStringList&)), m_quanta, SLOT(slotCVSCommandExecuted(const QString&, const QStringList&)));
- //connect(CVSService::ref(), SIGNAL(statusMsg(const QString &)), m_quanta, SLOT(slotStatusMsg(const QString & )));
+ connect(CVSService::ref(), TQT_SIGNAL(clearMessages()), m_quanta->m_messageOutput, TQT_SLOT(clear()));
+ connect(CVSService::ref(), TQT_SIGNAL(showMessage(const TQString&, bool)), m_quanta->m_messageOutput, TQT_SLOT(showMessage(const TQString&, bool)));
+ connect(CVSService::ref(), TQT_SIGNAL(commandExecuted(const TQString&, const TQStringList&)), m_quanta, TQT_SLOT(slotCVSCommandExecuted(const TQString&, const TQStringList&)));
+ //connect(CVSService::ref(), TQT_SIGNAL(statusMsg(const TQString &)), m_quanta, TQT_SLOT(slotStatusMsg(const TQString & )));
m_quanta->fTab->plugCVSMenu();
pTab->plugCVSMenu();
}
@@ -1523,36 +1523,36 @@ void QuantaInit::checkRuntimeDependencies()
void QuantaInit::readAbbreviations()
{
- QDomDocument doc;
- QString groupName;
+ TQDomDocument doc;
+ TQString groupName;
bool mainAbbrevFileFound = false;
- QStringList mainFileList;
+ TQStringList mainFileList;
mainFileList << qConfig.globalDataDir + resourceDir + "abbreviations.xml";
mainFileList << KGlobal::dirs()->saveLocation("data") + resourceDir + "abbreviations.xml";
for (uint i = 0; i < mainFileList.count(); i++)
{
- if (!QFile::exists(mainFileList[i]))
+ if (!TQFile::exists(mainFileList[i]))
continue;
- QFile file(mainFileList[i]);
+ TQFile file(mainFileList[i]);
if (file.open(IO_ReadOnly))
{
if (doc.setContent(&file))
{
- QDomNodeList groupList = doc.elementsByTagName("Group");
+ TQDomNodeList groupList = doc.elementsByTagName("Group");
for (uint groupIdx = 0; groupIdx < groupList.count(); groupIdx++)
{
Abbreviation abbrev;
- QDomElement el = groupList.item(groupIdx).toElement();
+ TQDomElement el = groupList.item(groupIdx).toElement();
groupName = el.attribute("name");
- QDomNodeList dtepList = el.elementsByTagName("DTEP");
+ TQDomNodeList dtepList = el.elementsByTagName("DTEP");
for (uint dtepListIdx = 0; dtepListIdx < dtepList.count(); dtepListIdx++)
{
abbrev.dteps.append(dtepList.item(dtepListIdx).toElement().attribute("name"));
}
- QDomNodeList nodeList = el.elementsByTagName("Template");
+ TQDomNodeList nodeList = el.elementsByTagName("Template");
for (uint nodeIdx = 0; nodeIdx < nodeList.count(); nodeIdx++)
{
- QDomElement e = nodeList.item(nodeIdx).toElement();
+ TQDomElement e = nodeList.item(nodeIdx).toElement();
abbrev.abbreviations.insert(e.attribute("name")+" "+e.attribute("description"), e.attribute("code"));
}
qConfig.abbreviations.insert(groupName, abbrev);
@@ -1565,19 +1565,19 @@ void QuantaInit::readAbbreviations()
if (mainAbbrevFileFound) return;
//Compatibility code: read the abbreviations files from the DTEP directories
//TODO: Remove when upgrade from 3.2 is not supported.
- QStringList filenameList = DTDs::ref()->fileNameList(false);
- QStringList::Iterator it;
+ TQStringList filenameList = DTDs::ref()->fileNameList(false);
+ TQStringList::Iterator it;
for (it = filenameList.begin(); it != filenameList.end(); ++it)
{
int pos =(*it).find('|');
- QString dirName = (*it).mid(pos + 1);
- QString dtepName = (*it).left(pos);
+ TQString dirName = (*it).mid(pos + 1);
+ TQString dtepName = (*it).left(pos);
KURL dirURL(dirName);
dirURL.setFileName("");
dirName = dirURL.path(1);
- QString abbrevFile = dirName;
- QString tmpStr = dirName;
- QStringList resourceDirs = KGlobal::dirs()->resourceDirs("data");
+ TQString abbrevFile = dirName;
+ TQString tmpStr = dirName;
+ TQStringList resourceDirs = KGlobal::dirs()->resourceDirs("data");
bool dirFound = false;
for (uint i = 0; i < resourceDirs.count(); i++)
{
@@ -1593,18 +1593,18 @@ void QuantaInit::readAbbreviations()
abbrevFile = KGlobal::dirs()->saveLocation("data", tmpStr) +"/";
}
abbrevFile.append("abbreviations");
- if (!QFile::exists(abbrevFile))
+ if (!TQFile::exists(abbrevFile))
abbrevFile = dirName + "abbreviations";
- QFile f(abbrevFile);
+ TQFile f(abbrevFile);
if (f.open(IO_ReadOnly))
{
if (doc.setContent(&f))
{
Abbreviation abbrev;
- QDomNodeList nodeList = doc.elementsByTagName("Template");
+ TQDomNodeList nodeList = doc.elementsByTagName("Template");
for (uint i = 0; i < nodeList.count(); i++)
{
- QDomElement e = nodeList.item(i).toElement();
+ TQDomElement e = nodeList.item(i).toElement();
abbrev.abbreviations.insert(e.attribute("name")+" "+e.attribute("description"), e.attribute("code"));
}
abbrev.dteps.append(dtepName);
@@ -1622,7 +1622,7 @@ int QuantaInit::runningQuantas()
int i = 0;
for (QCStringList::iterator it = list.begin(); it != list.end(); ++it)
{
- if (QString(*it).startsWith("quanta", false))
+ if (TQString(*it).startsWith("quanta", false))
++i;
}
return i;
diff --git a/quanta/src/quanta_init.h b/quanta/src/quanta_init.h
index 8013e0bd..0b1f6ae9 100644
--- a/quanta/src/quanta_init.h
+++ b/quanta/src/quanta_init.h
@@ -20,7 +20,7 @@
// include files for Qt
-#include <qobject.h>
+#include <tqobject.h>
// include files for KDE
#include <kparts/dockmainwindow.h>
@@ -48,12 +48,12 @@ public:
~QuantaInit();
/** Loads the initial project */
- void loadInitialProject(const QString& url);
+ void loadInitialProject(const TQString& url);
/**Executes *nix ps command */
- void execCommandPS(const QString& cmd);
+ void execCommandPS(const TQString& cmd);
/** if there are backup files, asks user whether wants to restore them or to mantain the originals instead*/
- void recoverCrashed(QStringList& recoveredFileNameList);
+ void recoverCrashed(TQStringList& recoveredFileNameList);
/** Delayed initialization. */
void initQuanta();
void openLastFiles();
@@ -76,22 +76,22 @@ private:
void checkRuntimeDependencies();
void readAbbreviations();
- KMdiToolViewAccessor* addToolTreeView(QWidget *widget, const QString &name, const QPixmap &icon, KDockWidget::DockPosition position);
+ KMdiToolViewAccessor* addToolTreeView(TQWidget *widget, const TQString &name, const TQPixmap &icon, KDockWidget::DockPosition position);
/** Initialize the plugin architecture. */
void initPlugins();
/** find where was url backed up in the list of autosaved urls*/
- QString searchPathListEntry(const QString& url, const QStringList& autosavedUrlsList, bool &notFound);
+ TQString searchPathListEntry(const TQString& url, const TQStringList& autosavedUrlsList, bool &notFound);
/** Retrieves hashed path from the name of a backup file */
- QString retrieveHashedPath(const QString& filename);
+ TQString retrieveHashedPath(const TQString& filename);
/** Obtains PID from file extension */
- QString retrievePID(const QString& filename);
+ TQString retrievePID(const TQString& filename);
ProjectTreeView *pTab;
TemplatesTreeView *tTab;
// config
KConfig *m_config;
- QStringList m_PIDlist;
+ TQStringList m_PIDlist;
/** @return number of Quanta instances registered by dcop */
int runningQuantas();
};
diff --git a/quanta/src/quantadoc.cpp b/quanta/src/quantadoc.cpp
index 9100432e..eb5c538f 100644
--- a/quanta/src/quantadoc.cpp
+++ b/quanta/src/quantadoc.cpp
@@ -16,14 +16,14 @@
***************************************************************************/
// include files for Qt
-#include <qdir.h>
-#include <qfileinfo.h>
-#include <qwidget.h>
-#include <qtabwidget.h>
-#include <qtabbar.h>
-#include <qlayout.h>
-#include <qdragobject.h>
-#include <qobject.h>
+#include <tqdir.h>
+#include <tqfileinfo.h>
+#include <tqwidget.h>
+#include <tqtabwidget.h>
+#include <tqtabbar.h>
+#include <tqlayout.h>
+#include <tqdragobject.h>
+#include <tqobject.h>
// include files for KDE
@@ -76,13 +76,13 @@
#include "tagactionmanager.h"
#include "tagactionset.h"
-QuantaDoc::QuantaDoc(QWidget *parent, const char *name) : QObject(parent, name)
+QuantaDoc::QuantaDoc(TQWidget *parent, const char *name) : TQObject(parent, name)
{
fileWatcher = new KDirWatch(this);
attribMenu = new KPopupMenu();
attribMenu->insertTitle(i18n("Tag"));
- connect( attribMenu, SIGNAL(activated(int)), this, SLOT(slotInsertAttrib(int)));
+ connect( attribMenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotInsertAttrib(int)));
}
QuantaDoc::~QuantaDoc()
@@ -144,18 +144,18 @@ bool QuantaDoc::newDocument( const KURL& url, bool switchToExisting )
return true;
}
-void QuantaDoc::openDocument(const KURL& urlToOpen, const QString &a_encoding,
+void QuantaDoc::openDocument(const KURL& urlToOpen, const TQString &a_encoding,
bool switchToExisting, bool readOnly)
{
bool idleTimerStatus = quantaApp->slotEnableIdleTimer(false);
KURL url = urlToOpen;
if (url.isLocalFile())
{
- QString path = QDir(url.path()).canonicalPath();
+ TQString path = TQDir(url.path()).canonicalPath();
if (!path.isEmpty())
url.setPath(path);
}
- QString encoding = a_encoding;
+ TQString encoding = a_encoding;
if (!newDocument(url, switchToExisting))
{
quantaApp->slotEnableIdleTimer(idleTimerStatus);
@@ -175,10 +175,10 @@ void QuantaDoc::openDocument(const KURL& urlToOpen, const QString &a_encoding,
{
if (encoding.isEmpty())
encoding = quantaApp->defaultEncoding();
- w->disconnect(SIGNAL(openingFailed(const KURL&)));
- connect(w, SIGNAL(openingFailed(const KURL&)), this, SLOT(slotOpeningFailed(const KURL&)));
- w->disconnect(SIGNAL(openingCompleted(const KURL&)));
- connect(w, SIGNAL(openingCompleted(const KURL&)), this, SLOT(slotOpeningCompleted(const KURL&)));
+ w->disconnect(TQT_SIGNAL(openingFailed(const KURL&)));
+ connect(w, TQT_SIGNAL(openingFailed(const KURL&)), this, TQT_SLOT(slotOpeningFailed(const KURL&)));
+ w->disconnect(TQT_SIGNAL(openingCompleted(const KURL&)));
+ connect(w, TQT_SIGNAL(openingCompleted(const KURL&)), this, TQT_SLOT(slotOpeningCompleted(const KURL&)));
w->open(url, encoding);
quantaApp->setTitle(url.prettyURL(0, KURL::StripFileProtocol));
}
@@ -192,7 +192,7 @@ void QuantaDoc::openDocument(const KURL& urlToOpen, const QString &a_encoding,
KTextEditor::HighlightingInterface* highlightIf = dynamic_cast<KTextEditor::HighlightingInterface*>(w->doc());
if (highlightIf)
{
- QString hlName;
+ TQString hlName;
int htmlIdx = -1, xmlIdx = -1;
for (uint i = 0; i < highlightIf->hlModeCount(); i++)
{
@@ -243,7 +243,7 @@ void QuantaDoc::slotOpeningCompleted(const KURL &url)
quantaApp->slotNewStatus();
quantaApp->setTitle(url.prettyURL(0, KURL::StripFileProtocol));
Project::ref()->loadCursorPosition(w->url(), dynamic_cast<KTextEditor::ViewCursorInterface*>(w->view()));
- emit eventHappened("after_open", url.url(), QString::null);
+ emit eventHappened("after_open", url.url(), TQString::null);
bool flag = TagActionManager::canIndentDTD(w->defaultDTD()->name);
quantaApp->actionCollection()->action("apply_source_indentation")->setEnabled(flag);
@@ -263,16 +263,16 @@ void QuantaDoc::slotAttribPopup()
if (node && node->tag)
{
Tag *tag = node->tag;
- QString tagName = tag->name;
- QStrIList attrList = QStrIList();
- QString name;
+ TQString tagName = tag->name;
+ TQStrIList attrList = TQStrIList();
+ TQString name;
for (int i=0; i < tag->attrCount(); i++ )
attrList.append( tag->attribute(i) );
if ( QuantaCommon::isKnownTag(w->getDTDIdentifier(),tagName) )
{
- QString caption = i18n("Attributes of <%1>").arg(tagName);
+ TQString caption = i18n("Attributes of <%1>").arg(tagName);
attribMenu->insertTitle( caption );
AttributeList *list = QuantaCommon::tagAttributes(w->getDTDIdentifier(),tagName );
@@ -289,9 +289,9 @@ void QuantaDoc::slotAttribPopup()
}
QTag* qtag = QuantaCommon::tagFromDTD(w->getDTDIdentifier(), tagName);
- for (QStringList::Iterator it = qtag->commonGroups.begin(); it != qtag->commonGroups.end(); ++it)
+ for (TQStringList::Iterator it = qtag->commonGroups.begin(); it != qtag->commonGroups.end(); ++it)
{
- QPopupMenu* popUpMenu = new QPopupMenu(attribMenu, (*it).latin1());
+ TQPopupMenu* popUpMenu = new TQPopupMenu(attribMenu, (*it).latin1());
AttributeList *attrs = qtag->parentDTD->commonAttrs->find(*it);
for (uint j = 0; j < attrs->count(); j++)
{
@@ -302,7 +302,7 @@ void QuantaDoc::slotAttribPopup()
popUpMenu->setItemEnabled( menuId , false );
}
}
- connect( popUpMenu, SIGNAL(activated(int)), this, SLOT(slotInsertAttrib(int)));
+ connect( popUpMenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotInsertAttrib(int)));
attribMenu->insertItem(*it, popUpMenu);
}
@@ -310,14 +310,14 @@ void QuantaDoc::slotAttribPopup()
{
attribMenu->setActiveItem( 0);
- QPoint globalPos = w->view()->mapToGlobal(w->viewCursorIf->cursorCoordinates());
- QFont font = w->view()->font();
- globalPos.setY(globalPos.y() + QFontMetrics(font).height());
+ TQPoint globalPos = w->view()->mapToGlobal(w->viewCursorIf->cursorCoordinates());
+ TQFont font = w->view()->font();
+ globalPos.setY(globalPos.y() + TQFontMetrics(font).height());
attribMenu->exec(globalPos);
}
}
else {
- QString message = i18n("Unknown tag: %1").arg(tagName);
+ TQString message = i18n("Unknown tag: %1").arg(tagName);
quantaApp->slotStatusMsg( message );
}
}
@@ -333,20 +333,20 @@ void QuantaDoc::slotInsertAttrib( int id )
if (node && node->tag)
{
Tag *tag = node->tag;
- QString tagName = tag->name;
+ TQString tagName = tag->name;
if ( QuantaCommon::isKnownTag(w->getDTDIdentifier(), tagName) )
{
int menuId;
AttributeList *list = QuantaCommon::tagAttributes(w->getDTDIdentifier(), tagName);
menuId = list->count();
- QString attrStr;
+ TQString attrStr;
if (id <= menuId)
{
attrStr = list->at(id)->name;
} else
{
QTag* qtag = QuantaCommon::tagFromDTD(w->getDTDIdentifier(), tagName);
- for (QStringList::Iterator it = qtag->commonGroups.begin(); it != qtag->commonGroups.end(); ++it)
+ for (TQStringList::Iterator it = qtag->commonGroups.begin(); it != qtag->commonGroups.end(); ++it)
{
AttributeList *attrs = qtag->parentDTD->commonAttrs->find(*it);
menuId += attrs->count();
@@ -367,7 +367,7 @@ void QuantaDoc::slotInsertAttrib( int id )
delete attribMenu;
attribMenu = new KPopupMenu();
attribMenu->insertTitle(i18n("Tag"));
- connect( attribMenu, SIGNAL(activated(int)), this, SLOT(slotInsertAttrib(int)));
+ connect( attribMenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotInsertAttrib(int)));
}
}
diff --git a/quanta/src/quantadoc.h b/quanta/src/quantadoc.h
index f825d72e..37891d69 100644
--- a/quanta/src/quantadoc.h
+++ b/quanta/src/quantadoc.h
@@ -31,11 +31,11 @@ class QuantaDoc : public QObject
public:
- QuantaDoc(QWidget *parent, const char *name=0);
+ QuantaDoc(TQWidget *parent, const char *name=0);
~QuantaDoc();
bool newDocument(const KURL&, bool switchToExisting = true);
- void openDocument(const KURL&, const QString& a_encoding = QString::null, bool switchToExisting = true, bool readOnly = false);
+ void openDocument(const KURL&, const TQString& a_encoding = TQString::null, bool switchToExisting = true, bool readOnly = false);
public slots:
/** close documents. */
@@ -49,7 +49,7 @@ public slots:
signals:
void newStatus();
void hideSplash();
- void eventHappened(const QString&, const QString&, const QString& );
+ void eventHappened(const TQString&, const TQString&, const TQString& );
private:
KPopupMenu *attribMenu;
diff --git a/quanta/src/quantaview.cpp b/quanta/src/quantaview.cpp
index 39cff3bc..51f93294 100644
--- a/quanta/src/quantaview.cpp
+++ b/quanta/src/quantaview.cpp
@@ -16,20 +16,20 @@
***************************************************************************/
// include files for Qt
-#include <qprinter.h>
-#include <qpainter.h>
-#include <qtabbar.h>
-#include <qtabwidget.h>
-#include <qtimer.h>
-#include <qlayout.h>
-#include <qwidgetstack.h>
-#include <qdom.h>
-#include <qfile.h>
-#include <qevent.h>
-#include <qwidget.h>
-#include <qsplitter.h>
-#include <qpoint.h>
-#include <qscrollview.h>
+#include <tqprinter.h>
+#include <tqpainter.h>
+#include <tqtabbar.h>
+#include <tqtabwidget.h>
+#include <tqtimer.h>
+#include <tqlayout.h>
+#include <tqwidgetstack.h>
+#include <tqdom.h>
+#include <tqfile.h>
+#include <tqevent.h>
+#include <tqwidget.h>
+#include <tqsplitter.h>
+#include <tqpoint.h>
+#include <tqscrollview.h>
// include files for KDE
#include <kaction.h>
@@ -74,9 +74,9 @@
#include "tagdialog.h"
extern int NN;
-extern QValueList<Node*> nodes;
+extern TQValueList<Node*> nodes;
-QuantaView::QuantaView(QWidget *parent, const char *name, const QString &caption )
+QuantaView::QuantaView(TQWidget *parent, const char *name, const TQString &caption )
: KMdiChildView(parent, name)
, m_document(0L)
, m_plugin(0L)
@@ -86,21 +86,21 @@ QuantaView::QuantaView(QWidget *parent, const char *name, const QString &caption
{
setMDICaption(caption);
//Connect the VPL update timers
- connect(&m_sourceUpdateTimer, SIGNAL(timeout()), this, SLOT(sourceUpdateTimerTimeout()));
- connect(&m_VPLUpdateTimer, SIGNAL(timeout()), this, SLOT(VPLUpdateTimerTimeout()));
+ connect(&m_sourceUpdateTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(sourceUpdateTimerTimeout()));
+ connect(&m_VPLUpdateTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(VPLUpdateTimerTimeout()));
//create the source and VPL holding widgets
- m_documentArea = new QWidget(this);
+ m_documentArea = new TQWidget(this);
//get the reference to the user toolbar holding widget
ToolbarTabWidget *m_toolbarTab = ToolbarTabWidget::ref();
- m_toolbarTab->reparent(this, 0, QPoint(), true);
- m_toolbarTab ->setFocusPolicy( QWidget::NoFocus );
+ m_toolbarTab->reparent(this, 0, TQPoint(), true);
+ m_toolbarTab ->setFocusPolicy( TQWidget::NoFocus );
//create a splitter to separate the VPL and document area
- m_splitter = new QSplitter(Qt::Vertical, this);
+ m_splitter = new TQSplitter(Qt::Vertical, this);
//place the widgets in a grid
- m_viewLayout = new QGridLayout(this, 2, 0);
+ m_viewLayout = new TQGridLayout(this, 2, 0);
m_viewLayout->setRowStretch(0, 0);
m_viewLayout->setRowStretch(1,1);
m_viewLayout->addWidget( m_toolbarTab, 0, 0);
@@ -118,7 +118,7 @@ QuantaView::~QuantaView()
quantaApp->slotFileClosed(m_document);
if (m_document)
{
- m_document->view()->reparent(0L, 0, QPoint(), false);
+ m_document->view()->reparent(0L, 0, TQPoint(), false);
if (quantaApp)
emit documentClosed(m_document->url());
}
@@ -138,7 +138,7 @@ bool QuantaView::mayRemove()
if (m_document && m_document->isUntitled() && !m_document->isModified())
unmodifiedUntitled = true;
if (m_customWidget)
- m_customWidget->reparent(0L, 0, QPoint(), false);
+ m_customWidget->reparent(0L, 0, TQPoint(), false);
if (!saveModified())
return false;
slotSetSourceLayout();
@@ -149,8 +149,8 @@ bool QuantaView::mayRemove()
Node::deleteNode(baseNode);
baseNode = 0L;
kdDebug(24000) << "Node objects after delete = " << NN << " ; list count = " << nodes.count() << endl;
- QValueList<Node*> nList = nodes;
-/* for (QValueList<Node*>::ConstIterator it = nList.constBegin(); it != nList.constEnd(); ++it)
+ TQValueList<Node*> nList = nodes;
+/* for (TQValueList<Node*>::ConstIterator it = nList.constBegin(); it != nList.constEnd(); ++it)
Node::deleteNode(*it);
kdDebug(24000) << "Node objects after cleanup = " << NN << " ; list count = " << nodes.count() << endl;*/
}
@@ -159,7 +159,7 @@ bool QuantaView::mayRemove()
KURL url = m_document->url();
Project::ref()->saveBookmarks(url, dynamic_cast<KTextEditor::MarkInterface*>(m_document->doc()));
if (!unmodifiedUntitled)
- emit eventHappened("before_close", url.url(), QString::null);
+ emit eventHappened("before_close", url.url(), TQString::null);
m_currentViewsLayout = -1;
// m_document->closeTempFile();
if (!m_document->isUntitled() && url.isLocalFile())
@@ -172,7 +172,7 @@ bool QuantaView::mayRemove()
quantaApp->menuBar()->activateItemAt(-1);
quantaApp->guiFactory()->removeClient(m_document->view());
if (!unmodifiedUntitled)
- emit eventHappened("after_close", url.url(), QString::null);
+ emit eventHappened("after_close", url.url(), TQString::null);
}
/* kdDebug(24000) << "Calling reparse from close " << endl;
parser->setSAParserEnabled(true);
@@ -186,18 +186,18 @@ void QuantaView::addDocument(Document *document)
if (!document)
return;
m_document = document;
- connect(m_document, SIGNAL(editorGotFocus()), this, SLOT(slotSourceGetFocus()));
- connect(m_document->view(), SIGNAL(cursorPositionChanged()), this, SIGNAL(cursorPositionChanged()));
+ connect(m_document, TQT_SIGNAL(editorGotFocus()), this, TQT_SLOT(slotSourceGetFocus()));
+ connect(m_document->view(), TQT_SIGNAL(cursorPositionChanged()), this, TQT_SIGNAL(cursorPositionChanged()));
m_kafkaDocument = KafkaDocument::ref();
- connect(m_kafkaDocument->getKafkaWidget(), SIGNAL(hasFocus(bool)),
- this, SLOT(slotVPLGetFocus(bool)));
- connect(m_kafkaDocument, SIGNAL(newCursorPosition(int,int)),
- this, SLOT(slotSetCursorPositionInSource(int, int)));
- connect(m_kafkaDocument, SIGNAL(loadingError(Node *)),
- this, SLOT(slotVPLLoadingError(Node *)));
+ connect(m_kafkaDocument->getKafkaWidget(), TQT_SIGNAL(hasFocus(bool)),
+ this, TQT_SLOT(slotVPLGetFocus(bool)));
+ connect(m_kafkaDocument, TQT_SIGNAL(newCursorPosition(int,int)),
+ this, TQT_SLOT(slotSetCursorPositionInSource(int, int)));
+ connect(m_kafkaDocument, TQT_SIGNAL(loadingError(Node *)),
+ this, TQT_SLOT(slotVPLLoadingError(Node *)));
m_kafkaReloadingEnabled = true;
m_quantaReloadingEnabled = true;
@@ -215,29 +215,29 @@ void QuantaView::addDocument(Document *document)
void QuantaView::addPlugin(QuantaPlugin *plugin)
{
ToolbarTabWidget *m_toolbarTab = ToolbarTabWidget::ref();
- m_toolbarTab->reparent(0, 0, QPoint(), false);
+ m_toolbarTab->reparent(0, 0, TQPoint(), false);
m_plugin = plugin;
m_splitter->hide();
- QWidget *w = m_plugin->widget();
+ TQWidget *w = m_plugin->widget();
if (w)
{
- w->reparent(m_documentArea, 0, QPoint(), true);
+ w->reparent(m_documentArea, 0, TQPoint(), true);
w->resize(m_documentArea->size());
}
- m_documentArea->reparent(this, 0, QPoint(), true);
+ m_documentArea->reparent(this, 0, TQPoint(), true);
m_viewLayout->addWidget(m_documentArea, 1, 0);
activated();
updateTab();
}
-void QuantaView::addCustomWidget(QWidget *widget, const QString &label)
+void QuantaView::addCustomWidget(TQWidget *widget, const TQString &label)
{
if (widget)
{
- ToolbarTabWidget::ref()->reparent(0, 0, QPoint(), false);
+ ToolbarTabWidget::ref()->reparent(0, 0, TQPoint(), false);
m_customWidget = widget;
m_splitter->hide();
- widget->reparent(m_documentArea, 0, QPoint(), true);
+ widget->reparent(m_documentArea, 0, TQPoint(), true);
widget->resize(m_documentArea->size());
if (!label.isEmpty())
{
@@ -249,7 +249,7 @@ void QuantaView::addCustomWidget(QWidget *widget, const QString &label)
} else
if (m_customWidget)
{
- ToolbarTabWidget::ref()->reparent(this, 0, QPoint(), qConfig.enableDTDToolbar);
+ ToolbarTabWidget::ref()->reparent(this, 0, TQPoint(), qConfig.enableDTDToolbar);
m_viewLayout->addWidget(ToolbarTabWidget::ref(), 0 , 0);
m_customWidget = 0L; //avoid infinite recursion
reloadLayout();
@@ -287,10 +287,10 @@ void QuantaView::updateTab()
if (m_document)
{
// try to set the icon from mimetype
- QIconSet mimeIcon (KMimeType::pixmapForURL(m_document->url(), 0, KIcon::Small));
+ TQIconSet mimeIcon (KMimeType::pixmapForURL(m_document->url(), 0, KIcon::Small));
if (mimeIcon.isNull())
- mimeIcon = QIconSet(SmallIcon("document"));
- QString urlStr = QExtFileInfo::shortName(m_document->url().path());
+ mimeIcon = TQIconSet(SmallIcon("document"));
+ TQString urlStr = QExtFileInfo::shortName(m_document->url().path());
if (m_document->isModified())
{
if (qConfig.showCloseButtons == "ShowAlways")
@@ -330,7 +330,7 @@ void QuantaView::updateTab()
}
}
-QString QuantaView::tabName()
+TQString QuantaView::tabName()
{
if (m_document)
{
@@ -371,8 +371,8 @@ void QuantaView::slotSetSourceLayout()
//show the document if full size
m_splitter->hide();
- m_kafkaDocument->getKafkaWidget()->view()->reparent(0, 0, QPoint(), false);
- m_document->view()->reparent(m_documentArea, 0, QPoint(), true);
+ m_kafkaDocument->getKafkaWidget()->view()->reparent(0, 0, TQPoint(), false);
+ m_document->view()->reparent(m_documentArea, 0, TQPoint(), true);
m_document->view()->resize(m_documentArea->size());
m_viewLayout->addWidget(m_documentArea, 1, 0);
m_document->view()->setFocus();
@@ -412,9 +412,9 @@ void QuantaView::slotSetSourceAndVPLLayout()
{
reloadSourceView();
}
- m_kafkaDocument->getKafkaWidget()->view()->reparent(m_splitter, 0, QPoint(), true);
+ m_kafkaDocument->getKafkaWidget()->view()->reparent(m_splitter, 0, TQPoint(), true);
m_splitter->moveToFirst(m_kafkaDocument->getKafkaWidget()->view());
- m_document->view()->reparent(m_splitter, 0, QPoint(), true);
+ m_document->view()->reparent(m_splitter, 0, TQPoint(), true);
m_viewLayout->addWidget(m_splitter, 1, 0);
m_splitter->setSizes(m_splitterSizes);
m_splitter->show();
@@ -458,7 +458,7 @@ void QuantaView::slotSetVPLOnlyLayout()
if (!m_kafkaDocument->isLoaded())
m_kafkaDocument->loadDocument(m_document);
- m_kafkaDocument->getKafkaWidget()->view()->reparent(m_documentArea, 0, QPoint(), true);
+ m_kafkaDocument->getKafkaWidget()->view()->reparent(m_documentArea, 0, TQPoint(), true);
m_kafkaDocument->getKafkaWidget()->view()->resize(m_documentArea->size());
m_viewLayout->addWidget(m_documentArea, 1, 0);
m_kafkaDocument->getKafkaWidget()->view()->setFocus();
@@ -672,19 +672,19 @@ void QuantaView::slotSetCursorPositionInSource(int col, int line)
m_document->viewCursorIf->setCursorPositionReal(line, col);
}
-void QuantaView::dragEnterEvent(QDragEnterEvent *e)
+void QuantaView::dragEnterEvent(TQDragEnterEvent *e)
{
e->accept(KURLDrag::canDecode(e));
}
-void QuantaView::dropEvent(QDropEvent *e)
+void QuantaView::dropEvent(TQDropEvent *e)
{
emit dragInsert(e);
}
-void QuantaView::resizeEvent(QResizeEvent *e)
+void QuantaView::resizeEvent(TQResizeEvent *e)
{
- QWidget::resizeEvent(e);
+ TQWidget::resizeEvent(e);
resize(m_documentArea->width(), m_documentArea->height());
}
@@ -719,12 +719,12 @@ void QuantaView::insertTag(const char *tag)
{
if (!m_document )
return;
- QString tagStr = QuantaCommon::tagCase(tag);
+ TQString tagStr = QuantaCommon::tagCase(tag);
const DTDStruct *dtd = m_document->currentDTD(true);
bool single = QuantaCommon::isSingleTag(dtd->name, tagStr);
bool optional = QuantaCommon::isOptionalTag(dtd->name, tagStr);
- QString startTag = tagStr;
+ TQString startTag = tagStr;
startTag.prepend("<");
if ( dtd->singleTagStyle == "xml" &&
( single || (optional && !qConfig.closeOptionalTags))
@@ -737,7 +737,7 @@ void QuantaView::insertTag(const char *tag)
if ( (qConfig.closeTags && !single && !optional) ||
(qConfig.closeOptionalTags && optional) )
{
- m_document->insertTag( startTag, QString("</")+tagStr+">");
+ m_document->insertTag( startTag, TQString("</")+tagStr+">");
}
else
{
@@ -747,7 +747,7 @@ void QuantaView::insertTag(const char *tag)
//FIXME: Move out from here??
/** Insert a new tag by bringing up the TagDialog. */
-void QuantaView::insertNewTag(const QString &tag, const QString &attr, bool insertInLine)
+void QuantaView::insertNewTag(const TQString &tag, const TQString &attr, bool insertInLine)
{
if (m_document)
{
@@ -756,7 +756,7 @@ void QuantaView::insertNewTag(const QString &tag, const QString &attr, bool inse
insertOutputInTheNodeTree("", "", quantaApp->showTagDialogAndReturnNode(tag, attr));
else
{
- QString selection;
+ TQString selection;
if (m_document->selectionIf)
selection = m_document->selectionIf->selection();
TagDialog *dlg = new TagDialog(QuantaCommon::tagFromDTD(m_document->getDTDIdentifier(), tag), selection, attr, baseURL());
@@ -770,7 +770,7 @@ void QuantaView::insertNewTag(const QString &tag, const QString &attr, bool inse
}
}
-void QuantaView::insertOutputInTheNodeTree(const QString &str1, const QString &str2, Node *node)
+void QuantaView::insertOutputInTheNodeTree(const TQString &str1, const TQString &str2, Node *node)
{
if (!m_document)
return;
@@ -785,14 +785,14 @@ void QuantaView::insertOutputInTheNodeTree(const QString &str1, const QString &s
KafkaWidget *kafkaPart = m_kafkaDocument->getKafkaWidget();
NodeModifsSet *modifs;
DOM::Node domNode, domStartContainer, domEndContainer;
- QString tagName;
+ TQString tagName;
QTag *nodeQTag, *qTag, *nodeParentQTag;
Node *nodeCursor, *startContainer, *endContainer, *nodeParent, *dummy;
- QPtrList<QTag> qTagList;
+ TQPtrList<QTag> qTagList;
int startCol, startLine, endCol, endLine;
bool specialTagInsertion = false;
long nodeOffset, startOffset, endOffset, domNodeOffset;
- QValueList<int> loc;
+ TQValueList<int> loc;
uint line, col;
bool smartTagInsertion, hasSelection, nodeTreeModified;
@@ -1018,7 +1018,7 @@ void QuantaView::activated()
refreshWindow();
return;
}
- ToolbarTabWidget::ref()->reparent(this, 0, QPoint(), qConfig.enableDTDToolbar);
+ ToolbarTabWidget::ref()->reparent(this, 0, TQPoint(), qConfig.enableDTDToolbar);
m_viewLayout->addWidget(ToolbarTabWidget::ref(), 0 , 0);
quantaApp->partManager()->setActivePart(m_document->doc(), m_document->view());
m_document->checkDirtyStatus();
@@ -1055,7 +1055,7 @@ bool QuantaView::saveModified(bool ask)
return true;
bool completed=true;
- QString fileName = m_document->url().fileName();
+ TQString fileName = m_document->url().fileName();
if (m_document->isModified() )
{
@@ -1108,7 +1108,7 @@ bool QuantaView::saveDocument(const KURL& url)
if (url.isEmpty())
return false;
- emit eventHappened("before_save", url.url(), QString::null);
+ emit eventHappened("before_save", url.url(), TQString::null);
m_saveResult = true;
KURL oldURL = m_document->url();
if (!m_document->isUntitled() && oldURL.isLocalFile())
@@ -1134,8 +1134,8 @@ bool QuantaView::saveDocument(const KURL& url)
{
KTextEditor::Document *doc = m_document->doc();
m_eventLoopStarted = false;
- connect(doc, SIGNAL(canceled(const QString &)), this, SLOT(slotSavingFailed(const QString &)));
- connect(doc, SIGNAL(completed()), this, SLOT(slotSavingCompleted()));
+ connect(doc, TQT_SIGNAL(canceled(const TQString &)), this, TQT_SLOT(slotSavingFailed(const TQString &)));
+ connect(doc, TQT_SIGNAL(completed()), this, TQT_SLOT(slotSavingCompleted()));
m_saveResult = m_document->saveAs(url);
if (m_saveResult)
{
@@ -1144,8 +1144,8 @@ bool QuantaView::saveDocument(const KURL& url)
m_eventLoopStarted = true;
internalFileInfo.enter_loop();
}
- disconnect(doc, SIGNAL(canceled(const QString &)), this, SLOT(slotSavingFailed(const QString &)));
- disconnect(doc, SIGNAL(completed()), this, SLOT(slotSavingCompleted()));
+ disconnect(doc, TQT_SIGNAL(canceled(const TQString &)), this, TQT_SLOT(slotSavingFailed(const TQString &)));
+ disconnect(doc, TQT_SIGNAL(completed()), this, TQT_SLOT(slotSavingCompleted()));
if (!m_saveResult) //there was an error while saving
{
if (oldURL.isLocalFile())
@@ -1161,11 +1161,11 @@ bool QuantaView::saveDocument(const KURL& url)
{
setCaption(m_document->url().fileName());
}
- emit eventHappened("after_save", m_document->url().url(), QString::null);
+ emit eventHappened("after_save", m_document->url().url(), TQString::null);
return true;
}
-void QuantaView::slotSavingFailed(const QString &error)
+void QuantaView::slotSavingFailed(const TQString &error)
{
Q_UNUSED(error);
m_saveResult = false;
diff --git a/quanta/src/quantaview.h b/quanta/src/quantaview.h
index 24ecd776..f8033133 100644
--- a/quanta/src/quantaview.h
+++ b/quanta/src/quantaview.h
@@ -19,11 +19,11 @@
#define QUANTAVIEW_H
// include files for Qt
-#include <qguardedptr.h>
-#include <qwidget.h>
-#include <qptrlist.h>
-#include <qvaluelist.h>
-#include <qtimer.h>
+#include <tqguardedptr.h>
+#include <tqwidget.h>
+#include <tqptrlist.h>
+#include <tqvaluelist.h>
+#include <tqtimer.h>
//kde includes
#include <kmdichildview.h>
@@ -53,7 +53,7 @@ class QSplitter;
class Node;
/** The QuantaView class provides the view widget for the QuantaApp
- * instance. The View instance inherits QWidget as a base class and
+ * instance. The View instance inherits TQWidget as a base class and
* represents the view object of a KTMainWindow. As QuantaView is part
* of the docuement-view model, it needs a reference to the document
* object connected with it by the QuantaApp class to manipulate and
@@ -67,7 +67,7 @@ class QuantaView : public KMdiChildView
public:
- QuantaView(QWidget *parent = 0, const char *name=0, const QString &caption = QString::null);
+ QuantaView(TQWidget *parent = 0, const char *name=0, const TQString &caption = TQString::null);
~QuantaView();
/** returns true if the view can be removed, false otherwise */
@@ -77,7 +77,7 @@ public:
void addDocument(Document *document);
/** Adds a custom widget to the view. */
- void addCustomWidget(QWidget *widget, const QString &label);
+ void addCustomWidget(TQWidget *widget, const TQString &label);
/** returns the Document object associated with this view. Returns 0L if the view holds
a non-Document object */
@@ -86,7 +86,7 @@ public:
/**Adds a QuantaPlugin object to the view.*/
void addPlugin(QuantaPlugin *plugin);
- QWidget* documentArea() {return m_documentArea;}
+ TQWidget* documentArea() {return m_documentArea;}
bool saveDocument(const KURL&);
/** Saves the document if it's modified. Ask the user if their
@@ -114,7 +114,7 @@ public:
/** Called when this view lost the active status */
void deactivated();
- void resizeEvent(QResizeEvent* e);
+ void resizeEvent(TQResizeEvent* e);
/** Resize the current view */
void resize(int width, int height);
/** Redraws the view, resizes the components to their correct size */
@@ -124,17 +124,17 @@ public:
void updateTab();
/** Returns the tab name associated with this view */
- QString tabName();
+ TQString tabName();
void insertTag( const char *tag);
/** Insert a new tag by bringing up the TagDialog. */
- void insertNewTag(const QString &tag, const QString &attr = QString::null, bool insertInLine = true);
+ void insertNewTag(const TQString &tag, const TQString &attr = TQString::null, bool insertInLine = true);
/**
* This function take the output of the TagAction, parse it into Nodes and insert it
* in the Node tree. Then kafka will take care of updating itself from the Node Tree.
*/
- void insertOutputInTheNodeTree(const QString &str1, const QString &str2 = QString::null, Node *node = 0L);
+ void insertOutputInTheNodeTree(const TQString &str1, const TQString &str2 = TQString::null, Node *node = 0L);
enum ViewFocus {
SourceFocus = 0,
@@ -180,7 +180,7 @@ public slots:
private slots:
void slotSavingCompleted();
- void slotSavingFailed(const QString& error);
+ void slotSavingFailed(const TQString& error);
/**
* Called to update VPL.
@@ -194,40 +194,40 @@ private slots:
signals:
/** emitted when a file from the template view is dropped on the view */
- void dragInsert(QDropEvent *);
+ void dragInsert(TQDropEvent *);
/** asks for hiding the preview widget */
void hidePreview();
void showProblemsView();
void cursorPositionChanged();
- void title(const QString &);
+ void title(const TQString &);
/** emitted if this view contained an editor and it is closed */
void documentClosed(const KURL&);
- void eventHappened(const QString&, const QString&, const QString& );
+ void eventHappened(const TQString&, const TQString&, const TQString& );
private:
/** Kafka stuff */
- QValueList<int> m_splitterSizes;
+ TQValueList<int> m_splitterSizes;
int m_curCol, m_curLine, m_curOffset;
DOM::Node curNode;
bool m_kafkaReloadingEnabled, m_quantaReloadingEnabled;
- QTimer m_sourceUpdateTimer, m_VPLUpdateTimer;
+ TQTimer m_sourceUpdateTimer, m_VPLUpdateTimer;
- QWidget *m_documentArea;///< the area of the view which can be used to show the source/VPL
+ TQWidget *m_documentArea;///< the area of the view which can be used to show the source/VPL
Document *m_document;
QuantaPlugin *m_plugin;
- QWidget *m_customWidget; ///<view holds a custom widget, eg. a documentation
- QGuardedPtr<KafkaDocument> m_kafkaDocument;
- QSplitter *m_splitter;
- QGridLayout *m_viewLayout;
+ TQWidget *m_customWidget; ///<view holds a custom widget, eg. a documentation
+ TQGuardedPtr<KafkaDocument> m_kafkaDocument;
+ TQSplitter *m_splitter;
+ TQGridLayout *m_viewLayout;
int m_currentViewsLayout; ///< holds the current layout, which can be SourceOnly, VPLOnly or SourceAndVPL
int m_currentFocus;
bool m_saveResult;
bool m_eventLoopStarted;
protected:
- virtual void dropEvent(QDropEvent *e);
- virtual void dragEnterEvent(QDragEnterEvent *e);
+ virtual void dropEvent(TQDropEvent *e);
+ virtual void dragEnterEvent(TQDragEnterEvent *e);
};
#endif // QUANTAVIEW_H
diff --git a/quanta/src/viewmanager.cpp b/quanta/src/viewmanager.cpp
index f02108e9..5d9ea103 100644
--- a/quanta/src/viewmanager.cpp
+++ b/quanta/src/viewmanager.cpp
@@ -13,7 +13,7 @@
***************************************************************************/
//qt includes
-#include <qdir.h>
+#include <tqdir.h>
//kde includes
#include <kdirwatch.h>
@@ -61,26 +61,26 @@
#define UPLOAD_ID 12
#define DELETE_ID 13
-ViewManager::ViewManager(QObject *parent, const char *name) : QObject(parent, name)
+ViewManager::ViewManager(TQObject *parent, const char *name) : TQObject(parent, name)
{
m_lastActiveView = 0L;
m_lastActiveEditorView = 0L;
m_documentationView = 0L;
m_tabPopup = new KPopupMenu(quantaApp);
- m_tabPopup->insertItem(SmallIcon("fileclose"), i18n("&Close"), this, SLOT(slotCloseView()));
- m_tabPopup->insertItem(i18n("Close &Other Tabs"), this, SLOT(slotCloseOtherTabs()));
- m_tabPopup->insertItem(i18n("Close &All"), this, SLOT(closeAll()));
- m_tabPopup->insertItem(SmallIcon("revert"), i18n("&Reload"), this, SLOT(slotReloadFile()), 0, RELOAD_ID);
- m_tabPopup->insertItem(SmallIcon("up"), i18n("&Upload File"), this, SLOT(slotUploadFile()), 0, UPLOAD_ID);
- m_tabPopup->insertItem(SmallIcon("editdelete"), i18n("&Delete File"), this, SLOT(slotDeleteFile()), 0, DELETE_ID);
+ m_tabPopup->insertItem(SmallIcon("fileclose"), i18n("&Close"), this, TQT_SLOT(slotCloseView()));
+ m_tabPopup->insertItem(i18n("Close &Other Tabs"), this, TQT_SLOT(slotCloseOtherTabs()));
+ m_tabPopup->insertItem(i18n("Close &All"), this, TQT_SLOT(closeAll()));
+ m_tabPopup->insertItem(SmallIcon("revert"), i18n("&Reload"), this, TQT_SLOT(slotReloadFile()), 0, RELOAD_ID);
+ m_tabPopup->insertItem(SmallIcon("up"), i18n("&Upload File"), this, TQT_SLOT(slotUploadFile()), 0, UPLOAD_ID);
+ m_tabPopup->insertItem(SmallIcon("editdelete"), i18n("&Delete File"), this, TQT_SLOT(slotDeleteFile()), 0, DELETE_ID);
m_tabPopup->insertSeparator();
m_fileListPopup = new KPopupMenu(quantaApp);
- connect(m_fileListPopup, SIGNAL(aboutToShow()), this, SLOT(slotFileListPopupAboutToShow()));
- connect(m_fileListPopup, SIGNAL(activated(int)), this, SLOT(slotFileListPopupItemActivated(int)));
+ connect(m_fileListPopup, TQT_SIGNAL(aboutToShow()), this, TQT_SLOT(slotFileListPopupAboutToShow()));
+ connect(m_fileListPopup, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotFileListPopupItemActivated(int)));
m_bookmarks = new QuantaBookmarks(this, QuantaBookmarks::Position, true);
m_bookmarksMenu = new KPopupMenu(quantaApp);
m_bookmarks->setBookmarksMenu(m_bookmarksMenu);
- connect(m_bookmarks, SIGNAL(gotoFileAndLine(const QString&, int, int)), quantaApp, SLOT(gotoFileAndLine(const QString&, int, int)));
+ connect(m_bookmarks, TQT_SIGNAL(gotoFileAndLine(const TQString&, int, int)), quantaApp, TQT_SLOT(gotoFileAndLine(const TQString&, int, int)));
m_bookmarksMenuId = m_tabPopup->insertItem(SmallIconSet("bookmark"), i18n("&Bookmarks"), m_bookmarksMenu);
m_tabPopup->insertItem(i18n("&Switch To"), m_fileListPopup);
m_contextView = 0L;
@@ -88,18 +88,18 @@ ViewManager::ViewManager(QObject *parent, const char *name) : QObject(parent, na
m_separatorVisible = false;
}
-QuantaView* ViewManager::createView(const QString &caption)
+QuantaView* ViewManager::createView(const TQString &caption)
{
QuantaView *view = new QuantaView(quantaApp, "", caption);
quantaApp->addWindow(view);
- connect(view, SIGNAL(cursorPositionChanged()), quantaApp, SLOT(slotNewLineColumn()));
- connect(view, SIGNAL(title(const QString &)), quantaApp, SLOT(slotNewLineColumn()));
- connect(view, SIGNAL(dragInsert(QDropEvent*)), this, SIGNAL(dragInsert(QDropEvent *)));
- connect(view, SIGNAL(hidePreview()), quantaApp, SLOT(slotChangePreviewStatus()));
- disconnect(view, SIGNAL(childWindowCloseRequest( KMdiChildView *)), 0, 0 );
- connect(view, SIGNAL(childWindowCloseRequest( KMdiChildView*)), this, SLOT(slotCloseRequest(KMdiChildView*)));
- connect(view, SIGNAL(documentClosed(const KURL&)), this, SLOT(slotDocumentClosed(const KURL&)));
- connect(view, SIGNAL(eventHappened(const QString&, const QString&, const QString& )), QPEvents::ref(), SLOT(slotEventHappened(const QString&, const QString&, const QString& )));
+ connect(view, TQT_SIGNAL(cursorPositionChanged()), quantaApp, TQT_SLOT(slotNewLineColumn()));
+ connect(view, TQT_SIGNAL(title(const TQString &)), quantaApp, TQT_SLOT(slotNewLineColumn()));
+ connect(view, TQT_SIGNAL(dragInsert(TQDropEvent*)), this, TQT_SIGNAL(dragInsert(TQDropEvent *)));
+ connect(view, TQT_SIGNAL(hidePreview()), quantaApp, TQT_SLOT(slotChangePreviewStatus()));
+ disconnect(view, TQT_SIGNAL(childWindowCloseRequest( KMdiChildView *)), 0, 0 );
+ connect(view, TQT_SIGNAL(childWindowCloseRequest( KMdiChildView*)), this, TQT_SLOT(slotCloseRequest(KMdiChildView*)));
+ connect(view, TQT_SIGNAL(documentClosed(const KURL&)), this, TQT_SLOT(slotDocumentClosed(const KURL&)));
+ connect(view, TQT_SIGNAL(eventHappened(const TQString&, const TQString&, const TQString& )), QPEvents::ref(), TQT_SLOT(slotEventHappened(const TQString&, const TQString&, const TQString& )));
return view;
}
@@ -108,7 +108,7 @@ void ViewManager::createNewDocument()
{
int i = 1;
while (isOpened(KURL("file:"+i18n("Untitled%1").arg(i)))) i++;
- QString fname = i18n("Untitled%1").arg(i);
+ TQString fname = i18n("Untitled%1").arg(i);
QuantaView *view = createView(fname);
#ifdef ENABLE_EDITORS
@@ -121,8 +121,8 @@ void ViewManager::createNewDocument()
KTextEditor::Document *doc = KTextEditor::createDocument ("libkatepart", view, "KTextEditor::Document");
#endif
Document *w = new Document(doc, 0L);
- connect(w, SIGNAL(showAnnotation(uint, const QString&, const QPair<QString, QString>&)), quantaApp->annotationOutput(), SLOT(insertAnnotation(uint, const QString&, const QPair<QString, QString>&)));
- QString encoding = quantaApp->defaultEncoding();
+ connect(w, TQT_SIGNAL(showAnnotation(uint, const TQString&, const QPair<TQString, TQString>&)), quantaApp->annotationOutput(), TQT_SLOT(insertAnnotation(uint, const TQString&, const QPair<TQString, TQString>&)));
+ TQString encoding = quantaApp->defaultEncoding();
KTextEditor::EncodingInterface* encodingIf = dynamic_cast<KTextEditor::EncodingInterface*>(doc);
if (encodingIf)
encodingIf->setEncoding(encoding);
@@ -130,16 +130,16 @@ void ViewManager::createNewDocument()
KTextEditor::View * v = w->view();
//[MB02] connect all kate views for drag and drop
- connect(w->view(), SIGNAL(dropEventPass(QDropEvent *)), this, SIGNAL(dragInsert(QDropEvent *)));
+ connect(w->view(), TQT_SIGNAL(dropEventPass(TQDropEvent *)), this, TQT_SIGNAL(dragInsert(TQDropEvent *)));
w->setUntitledUrl( fname );
KTextEditor::PopupMenuInterface* popupIf = dynamic_cast<KTextEditor::PopupMenuInterface*>(w->view());
if (popupIf)
- popupIf->installPopup((QPopupMenu *)quantaApp->factory()->container("popup_editor", quantaApp));
+ popupIf->installPopup((TQPopupMenu *)quantaApp->factory()->container("popup_editor", quantaApp));
quantaApp->setFocusProxy(w->view());
- w->view()->setFocusPolicy(QWidget::WheelFocus);
- connect( v, SIGNAL(newStatus()), quantaApp, SLOT(slotNewStatus()));
+ w->view()->setFocusPolicy(TQWidget::WheelFocus);
+ connect( v, TQT_SIGNAL(newStatus()), quantaApp, TQT_SLOT(slotNewStatus()));
quantaApp->slotNewPart(doc, true); // register new part in partmanager and make active
view->addDocument(w);
@@ -154,7 +154,7 @@ bool ViewManager::removeView(QuantaView *view, bool force, bool createNew)
{
if (!view) return false;
int noOfViews = 0;
- QValueList<Document*> list;
+ TQValueList<Document*> list;
KMdiIterator<KMdiChildView*> *it = quantaApp->createIterator();
for (it->first(); !it->isDone(); it->next())
{
@@ -180,9 +180,9 @@ bool ViewManager::removeView(QuantaView *view, bool force, bool createNew)
if (view == m_lastActiveEditorView)
m_lastActiveEditorView = 0L;
if (view == activeView())
- ToolbarTabWidget::ref()->reparent(0L, 0, QPoint(), false);
+ ToolbarTabWidget::ref()->reparent(0L, 0, TQPoint(), false);
if (!createNew)
- disconnect(quantaApp, SIGNAL(lastChildViewClosed()), this, SLOT(slotLastViewClosed()));
+ disconnect(quantaApp, TQT_SIGNAL(lastChildViewClosed()), this, TQT_SLOT(slotLastViewClosed()));
quantaApp->closeWindow(view);
if (createNew)
{
@@ -191,7 +191,7 @@ bool ViewManager::removeView(QuantaView *view, bool force, bool createNew)
quantaApp->slotFileNew();
}
} else
- connect(quantaApp, SIGNAL(lastChildViewClosed()), this, SLOT(slotLastViewClosed()));
+ connect(quantaApp, TQT_SIGNAL(lastChildViewClosed()), this, TQT_SLOT(slotLastViewClosed()));
return true;
}
}
@@ -255,17 +255,17 @@ void ViewManager::slotCloseOtherTabs()
else
currentView = quantaApp->activeWindow();
if (dynamic_cast<QuantaView*>(currentView) && !static_cast<QuantaView*>(currentView)->document())
- ToolbarTabWidget::ref()->reparent(0, 0, QPoint(), false);
+ ToolbarTabWidget::ref()->reparent(0, 0, TQPoint(), false);
KMdiIterator<KMdiChildView*> *it = quantaApp->createIterator();
//save the children first to a list, as removing invalidates our iterator
- QValueList<KMdiChildView *> children;
+ TQValueList<KMdiChildView *> children;
for (it->first(); !it->isDone(); it->next())
{
children.append(it->currentItem());
}
delete it;
KURL::List modifiedList;
- QValueListIterator<KMdiChildView *> childIt;
+ TQValueListIterator<KMdiChildView *> childIt;
for (childIt = children.begin(); childIt != children.end(); ++childIt)
{
view = *childIt;
@@ -283,7 +283,7 @@ void ViewManager::slotCloseOtherTabs()
{
KURL::List filesToSave;
KSaveSelectDialog dlg(modifiedList, filesToSave /*empty ignore list */, quantaApp);
- if (dlg.exec() == QDialog::Accepted)
+ if (dlg.exec() == TQDialog::Accepted)
{
filesToSave = dlg.filesToSave();
for (childIt = children.begin(); childIt != children.end(); ++childIt)
@@ -328,7 +328,7 @@ QuantaView* ViewManager::isOpened(const KURL& url)
KURL url2 = url;
if (url2.isLocalFile() && !url.path().startsWith(i18n("Untitled")))
{
- QDir dir(url2.path());
+ TQDir dir(url2.path());
url2.setPath(dir.canonicalPath());
}
KMdiIterator<KMdiChildView*> *it = quantaApp->createIterator();
@@ -366,9 +366,9 @@ KURL::List ViewManager::openedFiles(bool noUntitled)
return list;
}
-QValueList<Document*> ViewManager::openedDocuments()
+TQValueList<Document*> ViewManager::openedDocuments()
{
- QValueList<Document*> list;
+ TQValueList<Document*> list;
KMdiIterator<KMdiChildView*> *it = quantaApp->createIterator();
QuantaView *view;
for (it->first(); !it->isDone(); it->next())
@@ -400,13 +400,13 @@ bool ViewManager::saveAll()
{
if (!w->isUntitled())
{
- emit eventHappened("before_save", w->url().url(), QString::null);
+ emit eventHappened("before_save", w->url().url(), TQString::null);
w->docUndoRedo->fileSaved();
w->save();
w->removeBackup(quantaApp->config());
if (w->isModified())
flagsave = false;
- emit eventHappened("after_save", w->url().url(), QString::null);
+ emit eventHappened("after_save", w->url().url(), TQString::null);
} else
{
if (!view->saveModified())
@@ -428,14 +428,14 @@ bool ViewManager::closeAll(bool createNew)
KMdiIterator<KMdiChildView*> *it = quantaApp->createIterator();
QuantaView *view;
//save the children first to a list, as removing invalidates our iterator
- QValueList<KMdiChildView *> children;
+ TQValueList<KMdiChildView *> children;
for (it->first(); !it->isDone(); it->next())
{
children.append(it->currentItem());
}
delete it;
KURL::List modifiedList;
- QValueListIterator<KMdiChildView *> childIt;
+ TQValueListIterator<KMdiChildView *> childIt;
for (childIt = children.begin(); childIt != children.end(); ++childIt)
{
view = dynamic_cast<QuantaView*>(*childIt);
@@ -452,7 +452,7 @@ bool ViewManager::closeAll(bool createNew)
{
KURL::List filesToSave;
KSaveSelectDialog dlg(modifiedList, filesToSave /*empty ignore list */, quantaApp);
- if (dlg.exec() == QDialog::Accepted)
+ if (dlg.exec() == TQDialog::Accepted)
{
filesToSave = dlg.filesToSave();
for (childIt = children.begin(); childIt != children.end(); ++childIt)
@@ -480,9 +480,9 @@ bool ViewManager::closeAll(bool createNew)
return false; //save aborted
}
}
- disconnect(quantaApp, SIGNAL(viewActivated (KMdiChildView *)), this, SLOT(slotViewActivated(KMdiChildView*)));
- disconnect(quantaApp, SIGNAL(lastChildViewClosed()), this, SLOT(slotLastViewClosed()));
- ToolbarTabWidget::ref()->reparent(0L, 0, QPoint(), false);
+ disconnect(quantaApp, TQT_SIGNAL(viewActivated (KMdiChildView *)), this, TQT_SLOT(slotViewActivated(KMdiChildView*)));
+ disconnect(quantaApp, TQT_SIGNAL(lastChildViewClosed()), this, TQT_SLOT(slotLastViewClosed()));
+ ToolbarTabWidget::ref()->reparent(0L, 0, TQPoint(), false);
for (childIt = children.begin(); childIt != children.end(); ++childIt)
{
@@ -508,8 +508,8 @@ bool ViewManager::closeAll(bool createNew)
} else
{
//actually this code should be never executed
- connect(quantaApp, SIGNAL(viewActivated (KMdiChildView *)), this, SLOT(slotViewActivated(KMdiChildView*)));
- connect(quantaApp, SIGNAL(lastChildViewClosed()), this, SLOT(slotLastViewClosed()));
+ connect(quantaApp, TQT_SIGNAL(viewActivated (KMdiChildView *)), this, TQT_SLOT(slotViewActivated(KMdiChildView*)));
+ connect(quantaApp, TQT_SIGNAL(lastChildViewClosed()), this, TQT_SLOT(slotLastViewClosed()));
view->activated();
emit filesClosed(false);
return false;
@@ -523,8 +523,8 @@ bool ViewManager::closeAll(bool createNew)
}
}
}
- connect(quantaApp, SIGNAL(viewActivated (KMdiChildView *)), this, SLOT(slotViewActivated(KMdiChildView*)));
- connect(quantaApp, SIGNAL(lastChildViewClosed()), this, SLOT(slotLastViewClosed()));
+ connect(quantaApp, TQT_SIGNAL(viewActivated (KMdiChildView *)), this, TQT_SLOT(slotViewActivated(KMdiChildView*)));
+ connect(quantaApp, TQT_SIGNAL(lastChildViewClosed()), this, TQT_SLOT(slotLastViewClosed()));
if (createNew)
{
createNewDocument();
@@ -561,7 +561,7 @@ QuantaView* ViewManager::documentationView(bool create)
if (!m_documentationView && create)
{
m_documentationView = createView();
- m_documentationView->addCustomWidget((QWidget*)quantaApp->documentationPart()->view(), i18n("Documentation"));
+ m_documentationView->addCustomWidget((TQWidget*)quantaApp->documentationPart()->view(), i18n("Documentation"));
}
return m_documentationView;
}
@@ -588,7 +588,7 @@ bool ViewManager::allEditorsClosed()
return true;
}
-void ViewManager::slotTabContextMenu(QWidget *widget, const QPoint& point)
+void ViewManager::slotTabContextMenu(TQWidget *widget, const TQPoint& point)
{
if (m_separatorVisible)
m_tabPopup->removeItemAt(SEPARATOR_INDEX);
@@ -627,8 +627,8 @@ void ViewManager::slotTabContextMenu(QWidget *widget, const QPoint& point)
if (w && w->markIf)
{
m_bookmarks->setDocument(w);
- QPtrList<KTextEditor::Mark> m = w->markIf->marks();
- QPtrListIterator<KTextEditor::Mark> it(m);
+ TQPtrList<KTextEditor::Mark> m = w->markIf->marks();
+ TQPtrListIterator<KTextEditor::Mark> it(m);
for(; *it; ++it)
{
if ((*it)->type & KTextEditor::MarkInterface::markType01)
@@ -667,7 +667,7 @@ void ViewManager::slotTabContextMenu(QWidget *widget, const QPoint& point)
void ViewManager::slotFileListPopupAboutToShow()
{
m_fileListPopup->clear();
- QStringList viewList;
+ TQStringList viewList;
KMdiIterator<KMdiChildView*> *it = quantaApp->createIterator();
QuantaView *view;
int id = 0;
@@ -736,7 +736,7 @@ void ViewManager::slotDocumentClosed(const KURL& url)
}
/** Return the URL of the currently active document */
-QString ViewManager::currentURL()
+TQString ViewManager::currentURL()
{
Document *w = activeDocument();
if (w)
diff --git a/quanta/src/viewmanager.h b/quanta/src/viewmanager.h
index e7a4fb31..05278901 100644
--- a/quanta/src/viewmanager.h
+++ b/quanta/src/viewmanager.h
@@ -34,7 +34,7 @@ class ViewManager : public QObject
Q_OBJECT
public:
/** Returns a reference to the viewmanager object */
- static ViewManager* const ref(QObject *parent = 0L, const char *name = 0L)
+ static ViewManager* const ref(TQObject *parent = 0L, const char *name = 0L)
{
static ViewManager *m_ref;
if (!m_ref) m_ref = new ViewManager(parent, name);
@@ -44,7 +44,7 @@ public:
virtual ~ViewManager(){};
/** Creates a QuantaView object */
- QuantaView *createView(const QString &caption = QString::null);
+ QuantaView *createView(const TQString &caption = TQString::null);
/** Removes a QuantaView object. Returns false on failure (eg. the view was not saved and it refused
the delete itself.) If force is true, the view is removed without asking for save.
*/
@@ -65,7 +65,7 @@ public:
/** Returns a list with the URLs of the opened documents */
KURL::List openedFiles(bool noUntitled=true);
/** Returns a list with the Document* object of the opened documents */
- QValueList<Document*> openedDocuments();
+ TQValueList<Document*> openedDocuments();
/** Returns the view holding the documentation widget. If create is true and there is no such view yet,
it creates one. */
@@ -75,7 +75,7 @@ public:
QuantaView *lastActiveEditorView() {return m_lastActiveEditorView;}
/** Return the URL of the currently active document */
- QString currentURL();
+ TQString currentURL();
public slots:
/**called when a new view was activated */
@@ -91,7 +91,7 @@ public slots:
void slotLastViewClosed();
/** called when the context menu was invoked on a tab */
- void slotTabContextMenu(QWidget *widget, const QPoint & point);
+ void slotTabContextMenu(TQWidget *widget, const TQPoint & point);
/** called when the user requests to close a tab with the close button */
void slotCloseRequest(KMdiChildView *widget);
/** called from the views and just emits the signal @ref documentClosed */
@@ -99,12 +99,12 @@ public slots:
signals:
/** emitted when a file from the template view is dropped on a view */
- void dragInsert(QDropEvent *);
+ void dragInsert(TQDropEvent *);
/** emitted when a view was activated */
void viewActivated(const KURL &);
/** emitted when a view was closed */
void documentClosed(const KURL&);
- void eventHappened(const QString&, const QString&, const QString& );
+ void eventHappened(const TQString&, const TQString&, const TQString& );
/** emitted when all files were closed. The argument is true if the closes
was successful, false if the unser canceled the closing */
void filesClosed(bool);
@@ -123,7 +123,7 @@ private slots:
private:
/** Private constructor for the singleton object. */
- ViewManager(QObject * parent = 0, const char * name = 0);
+ ViewManager(TQObject * parent = 0, const char * name = 0);
/** Returns true if there isn't any opened view holding an editor */
bool allEditorsClosed();
diff --git a/quanta/treeviews/basetreeview.cpp b/quanta/treeviews/basetreeview.cpp
index 8d8fad11..c7f65b22 100644
--- a/quanta/treeviews/basetreeview.cpp
+++ b/quanta/treeviews/basetreeview.cpp
@@ -16,20 +16,20 @@
***************************************************************************/
// QT includes
-#include <qeventloop.h>
-#include <qlayout.h>
-#include <qfileinfo.h>
-#include <qlabel.h>
-#include <qimage.h>
-#include <qregexp.h>
-#include <qclipboard.h>
-#include <qpoint.h>
-#include <qregexp.h>
-#include <qlineedit.h>
-#include <qfont.h>
-#include <qpainter.h>
-#include <qtooltip.h>
-#include <qptrstack.h>
+#include <tqeventloop.h>
+#include <tqlayout.h>
+#include <tqfileinfo.h>
+#include <tqlabel.h>
+#include <tqimage.h>
+#include <tqregexp.h>
+#include <tqclipboard.h>
+#include <tqpoint.h>
+#include <tqregexp.h>
+#include <tqlineedit.h>
+#include <tqfont.h>
+#include <tqpainter.h>
+#include <tqtooltip.h>
+#include <tqptrstack.h>
// KDE includes
#include <kaction.h>
@@ -70,32 +70,32 @@
class BaseTreeViewToolTip : public QToolTip
{
public:
- BaseTreeViewToolTip( QWidget *parent, BaseTreeView *lv );
+ BaseTreeViewToolTip( TQWidget *parent, BaseTreeView *lv );
- void maybeTip( const QPoint &pos );
+ void maybeTip( const TQPoint &pos );
private:
BaseTreeView *m_view;
};
-BaseTreeViewToolTip::BaseTreeViewToolTip( QWidget *parent, BaseTreeView *lv )
- : QToolTip( parent ), m_view( lv )
+BaseTreeViewToolTip::BaseTreeViewToolTip( TQWidget *parent, BaseTreeView *lv )
+ : TQToolTip( parent ), m_view( lv )
{
}
-void BaseTreeViewToolTip::maybeTip( const QPoint &pos )
+void BaseTreeViewToolTip::maybeTip( const TQPoint &pos )
{
if ( !parentWidget() || !m_view || !m_view->showToolTips() )
return;
- QListViewItem *item = m_view->itemAt(pos);
+ TQListViewItem *item = m_view->itemAt(pos);
if (!item)
return;
- QString text;
+ TQString text;
KFileTreeViewItem * kftvi = dynamic_cast<BaseTreeViewItem *> (item);
if (kftvi) {
- QString desc = kftvi->text(1);
+ TQString desc = kftvi->text(1);
text = kftvi->fileItem()->getToolTipText();
if ( !desc.isEmpty() )
text.prepend("&nbsp;<i>" + desc + "</i><br>");
@@ -116,7 +116,7 @@ BaseTreeViewItem::BaseTreeViewItem( KFileTreeViewItem *parent, KFileItem* item,
{
}
-QString BaseTreeViewItem::key(int column, bool ascending) const
+TQString BaseTreeViewItem::key(int column, bool ascending) const
{
if (ascending)
if (isDir())
@@ -130,19 +130,19 @@ QString BaseTreeViewItem::key(int column, bool ascending) const
return text(column).prepend(" ");
}
-int BaseTreeViewItem::compare(QListViewItem *i, int col,
+int BaseTreeViewItem::compare(TQListViewItem *i, int col,
bool ascending) const
{
return key(col, ascending).compare(i->key(col, ascending));
}
-void BaseTreeViewItem::paintCell(QPainter *p, const QColorGroup &cg,
+void BaseTreeViewItem::paintCell(TQPainter *p, const TQColorGroup &cg,
int column, int width, int align)
{
- QColorGroup _cg( cg );
+ TQColorGroup _cg( cg );
if (column == 0)
{
- QFont f = p->font();
+ TQFont f = p->font();
if (quantaApp)
f.setBold(ViewManager::ref()->isOpened(url()));
p->setFont(f);
@@ -151,7 +151,7 @@ void BaseTreeViewItem::paintCell(QPainter *p, const QColorGroup &cg,
int h, s, v;
p->pen().color().getHsv(&h, &s, &v);
v = (v < 155 ? v + 100 : 255);
- _cg.setColor(QColorGroup::Text, QColor(h, s, v, QColor::Hsv));
+ _cg.setColor(TQColorGroup::Text, TQColor(h, s, v, TQColor::Hsv));
};
KFileTreeViewItem::paintCell( p, _cg, column, width, align );
}
@@ -164,7 +164,7 @@ void BaseTreeViewItem::refreshIcon()
//BaseTreeBranch implementation
BaseTreeBranch::BaseTreeBranch(KFileTreeView *parent, const KURL& url,
- const QString& name, const QPixmap& pix,
+ const TQString& name, const TQPixmap& pix,
bool showHidden ,
KFileTreeViewItem *branchRoot)
: KFileTreeBranch(parent, url, name, pix, showHidden, branchRoot)
@@ -203,7 +203,7 @@ KFileTreeViewItem* BaseTreeBranch::createTreeViewItem(KFileTreeViewItem *parent,
}
-void BaseTreeBranch::addOpenFolder(QStringList* openFolder)
+void BaseTreeBranch::addOpenFolder(TQStringList* openFolder)
{
if (! openFolder) // just in case
return;
@@ -244,7 +244,7 @@ void BaseTreeBranch::reopenFolder()
if (folderToOpen.isEmpty())
return;
KFileTreeViewItem *item;
- for (QStringList::Iterator it = folderToOpen.begin(); it != folderToOpen.end(); ++it) {
+ for (TQStringList::Iterator it = folderToOpen.begin(); it != folderToOpen.end(); ++it) {
KURL url( (*it) );
item = findTVIByURL(url);
if (item) {
@@ -265,7 +265,7 @@ void BaseTreeBranch::updateOpenFolder()
while (item) {
if (item->isDir() && item->isOpen()) {
updateDirectory( item->url() );
- kapp->processEvents(QEventLoop::ExcludeUserInput | QEventLoop::ExcludeSocketNotifiers);
+ kapp->processEvents(TQEventLoop::ExcludeUserInput | TQEventLoop::ExcludeSocketNotifiers);
// dive into the tree first
newItem = dynamic_cast<KFileTreeViewItem *>(item->firstChild());
if (newItem) {
@@ -291,11 +291,11 @@ void BaseTreeBranch::updateOpenFolder()
//
////////////////////////////////////////////////////////////////////////////////////
-BaseTreeView::BaseTreeView(QWidget *parent, const char *name)
+BaseTreeView::BaseTreeView(TQWidget *parent, const char *name)
: KFileTreeView(parent, name), fileInfoDlg(0), m_saveOpenFolder(false), m_openWithMenu(0L), m_openWithMenuId(-1)
{
m_parent = parent;
- QToolTip::remove(viewport()); // remove the tooltip from QListView
+ TQToolTip::remove(viewport()); // remove the tooltip from QListView
m_tooltip = new BaseTreeViewToolTip(viewport(), this);
setFrameStyle( Panel | Sunken );
setRootIsDecorated(true);
@@ -303,38 +303,38 @@ BaseTreeView::BaseTreeView(QWidget *parent, const char *name)
setLineWidth(2);
setFullWidth(true);
setShowSortIndicator(true);
- setFocusPolicy(QWidget::ClickFocus);
+ setFocusPolicy(TQWidget::ClickFocus);
setShowFolderOpenPixmap(false);
- connect(this, SIGNAL(returnPressed(QListViewItem *)),
- this, SLOT(slotReturnPressed(QListViewItem *)));
+ connect(this, TQT_SIGNAL(returnPressed(TQListViewItem *)),
+ this, TQT_SLOT(slotReturnPressed(TQListViewItem *)));
- connect(this, SIGNAL(dropped(QWidget *, QDropEvent *, KURL::List&, KURL&)),
- this, SLOT(slotDropped(QWidget *, QDropEvent *, KURL::List&, KURL&)));
+ connect(this, TQT_SIGNAL(dropped(TQWidget *, TQDropEvent *, KURL::List&, KURL&)),
+ this, TQT_SLOT(slotDropped(TQWidget *, TQDropEvent *, KURL::List&, KURL&)));
- connect(this, SIGNAL(itemRenamed(QListViewItem*, const QString &, int )),
- this, SLOT(slotRenameItem(QListViewItem*, const QString &, int )));
+ connect(this, TQT_SIGNAL(itemRenamed(TQListViewItem*, const TQString &, int )),
+ this, TQT_SLOT(slotRenameItem(TQListViewItem*, const TQString &, int )));
- connect(this, SIGNAL(executed(QListViewItem *)),
- this, SLOT(slotSelectFile(QListViewItem *)));
+ connect(this, TQT_SIGNAL(executed(TQListViewItem *)),
+ this, TQT_SLOT(slotSelectFile(TQListViewItem *)));
- connect(this, SIGNAL(openFile(const KURL &)),
- quantaApp, SLOT(slotFileOpen(const KURL &)));
+ connect(this, TQT_SIGNAL(openFile(const KURL &)),
+ quantaApp, TQT_SLOT(slotFileOpen(const KURL &)));
- connect(this, SIGNAL(openImage(const KURL &)),
- quantaApp, SLOT(slotImageOpen(const KURL &)));
+ connect(this, TQT_SIGNAL(openImage(const KURL &)),
+ quantaApp, TQT_SLOT(slotImageOpen(const KURL &)));
- connect(this, SIGNAL(closeFile(const KURL &)),
- quantaApp, SLOT(slotFileClose(const KURL &)));
+ connect(this, TQT_SIGNAL(closeFile(const KURL &)),
+ quantaApp, TQT_SLOT(slotFileClose(const KURL &)));
- connect(this, SIGNAL(insertTag(const KURL &, DirInfo)),
- quantaApp, SLOT(slotInsertTag(const KURL &, DirInfo)));
+ connect(this, TQT_SIGNAL(insertTag(const KURL &, DirInfo)),
+ quantaApp, TQT_SLOT(slotInsertTag(const KURL &, DirInfo)));
}
BaseTreeView::~BaseTreeView()
{
- QToolTip::remove(viewport());
+ TQToolTip::remove(viewport());
delete m_tooltip;
}
@@ -360,7 +360,7 @@ void BaseTreeView::itemRenamed(const KURL& oldURL, const KURL& newURL)
/** Called for: double click, return, Open */
-void BaseTreeView::slotSelectFile(QListViewItem *item)
+void BaseTreeView::slotSelectFile(TQListViewItem *item)
{
KFileTreeViewItem* kftvi = currentKFileTreeViewItem();
if (!kftvi || kftvi->isDir()) return;
@@ -400,7 +400,7 @@ bool BaseTreeView::expandArchiv (KFileTreeViewItem *item)
if ( ! urlToOpen.isLocalFile()) return false;
- QString mimeType = KMimeType::findByURL(urlToOpen)->name();
+ TQString mimeType = KMimeType::findByURL(urlToOpen)->name();
if ( mimeType == "application/x-tgz" ||
mimeType == "application/x-tbz" ||
@@ -435,8 +435,8 @@ FileInfoDlg* BaseTreeView::addFileInfoPage(KPropertiesDialog* propDlg)
if ( !currentKFileTreeViewItem()->isDir() )
{
- QFrame *quantaFilePage = propDlg->addPage(i18n("Quanta File Info"));
- QVBoxLayout *topLayout = new QVBoxLayout( quantaFilePage);
+ TQFrame *quantaFilePage = propDlg->addPage(i18n("Quanta File Info"));
+ TQVBoxLayout *topLayout = new TQVBoxLayout( quantaFilePage);
quantaFileProperties = new FileInfoDlg( quantaFilePage, i18n("Quanta") );
int fsize,fimgsize=0;
@@ -444,20 +444,20 @@ FileInfoDlg* BaseTreeView::addFileInfoPage(KPropertiesDialog* propDlg)
KURL u = currentURL();
if (u.isLocalFile()) //get the file info only for local file. TODO: for non-local ones
{
- QString nameForInfo = u.path();
- QString path =u.directory(0,0); //extract path for images
- QString sourcename=u.fileName(0);
+ TQString nameForInfo = u.path();
+ TQString path =u.directory(0,0); //extract path for images
+ TQString sourcename=u.fileName(0);
- QFile qfile(nameForInfo);
+ TQFile qfile(nameForInfo);
fsize=qfile.size(); //html file size
- QString mimetype = KMimeType::findByFileContent(nameForInfo)->name();
+ TQString mimetype = KMimeType::findByFileContent(nameForInfo)->name();
if (mimetype.contains("text"))
{
qfile.open(IO_ReadOnly);
- QString imgname,imgpath;
- QTextStream stream(&qfile);
- stream.setEncoding(QTextStream::UnicodeUTF8);
+ TQString imgname,imgpath;
+ TQTextStream stream(&qfile);
+ stream.setEncoding(TQTextStream::UnicodeUTF8);
while (!stream.atEnd()) //open & parse file
{
imgname = stream.readLine();
@@ -482,7 +482,7 @@ FileInfoDlg* BaseTreeView::addFileInfoPage(KPropertiesDialog* propDlg)
{
KURL v(KURL::fromPathOrURL( path ),imgname);
imgpath=v.path();
- QFile qimage(imgpath);
+ TQFile qimage(imgpath);
if (qimage.exists() && v.isLocalFile())
{
fimgsize+=qimage.size();
@@ -501,7 +501,7 @@ FileInfoDlg* BaseTreeView::addFileInfoPage(KPropertiesDialog* propDlg)
}
else if (mimetype.contains("image"))
{ // assume it's an image file
- QImage imagefile=QImage(nameForInfo);
+ TQImage imagefile=TQImage(nameForInfo);
quantaFileProperties->lineNum->setText(i18n("Image size: %1 x %2").arg(imagefile.width()).arg(imagefile.height()));
quantaFileProperties->imageNum->hide();
quantaFileProperties->imageSize->hide();
@@ -532,7 +532,7 @@ void BaseTreeView::slotClose()
void BaseTreeView::slotOpen()
{
- QListViewItem *item = currentItem();
+ TQListViewItem *item = currentItem();
if (item)
{
emit open(item);
@@ -592,9 +592,9 @@ void BaseTreeView::insertOpenWithMenu(KPopupMenu *menu, int position)
}
m_openWithActions.clear();
KURL urlToOpen = currentURL();
- QString mimeType = KMimeType::findByURL(urlToOpen, 0, true, true)->name();
+ TQString mimeType = KMimeType::findByURL(urlToOpen, 0, true, true)->name();
KTrader::OfferList offers = KTrader::self()->query(mimeType, "Type == 'Application'");
- QDict<QuantaPlugin> plugins = QuantaPluginInterface::ref()->plugins();
+ TQDict<QuantaPlugin> plugins = QuantaPluginInterface::ref()->plugins();
m_pluginIds.clear();
if (offers.count() > 0 || plugins.count() > 0)
@@ -605,8 +605,8 @@ void BaseTreeView::insertOpenWithMenu(KPopupMenu *menu, int position)
KTrader::OfferList::Iterator it;
for (it = offers.begin(); it != offers.end(); ++it)
{
- KAction *action = new KAction((*it)->name(), (*it)->icon(), 0, 0, QFile::encodeName((*it)->desktopEntryPath()).data());
- connect(action, SIGNAL(activated()), this, SLOT(slotOpenWithApplication()));
+ KAction *action = new KAction((*it)->name(), (*it)->icon(), 0, 0, TQFile::encodeName((*it)->desktopEntryPath()).data());
+ connect(action, TQT_SIGNAL(activated()), this, TQT_SLOT(slotOpenWithApplication()));
action->plug(m_openWithMenu);
m_openWithActions.append(action);
}
@@ -615,19 +615,19 @@ void BaseTreeView::insertOpenWithMenu(KPopupMenu *menu, int position)
if (plugins.count() > 0)
{
m_openWithMenu->insertTitle(i18n("Plugins"));
- QDictIterator<QuantaPlugin> it2(plugins);
+ TQDictIterator<QuantaPlugin> it2(plugins);
for(;it2.current();++it2)
{
int id = m_openWithMenu->insertItem(KGlobal::iconLoader()->loadIconSet(it2.current()->icon(),KIcon::Small), it2.current()->name());
m_pluginIds[id] = it2.current();
}
- connect(m_openWithMenu, SIGNAL(activated(int)), SLOT(slotOpenWithActivated(int)));
+ connect(m_openWithMenu, TQT_SIGNAL(activated(int)), TQT_SLOT(slotOpenWithActivated(int)));
m_openWithMenu->insertSeparator();
}
- m_openWithMenu->insertItem(i18n("&Other..."), this, SLOT(slotOpenWith()));
+ m_openWithMenu->insertItem(i18n("&Other..."), this, TQT_SLOT(slotOpenWith()));
m_openWithMenuId = menu->insertItem(i18n("Open &With"), m_openWithMenu, -1, position);
} else
- m_openWithMenuId = menu->insertItem(i18n("Open &With..."), this, SLOT(slotOpenWith()), 0, -1, position);
+ m_openWithMenuId = menu->insertItem(i18n("Open &With..."), this, TQT_SLOT(slotOpenWith()), 0, -1, position);
}
void BaseTreeView::slotInsertTag()
@@ -648,7 +648,7 @@ void BaseTreeView::slotCopy()
{
if (currentItem())
{
- QClipboard *cb = QApplication::clipboard();
+ QClipboard *cb = TQApplication::clipboard();
cb->setText( currentURL().prettyURL() );
}
}
@@ -658,8 +658,8 @@ void BaseTreeView::slotPaste()
{
if (currentItem())
{
- QClipboard *cb = QApplication::clipboard();
- KURL::List list( QStringList::split( QChar('\n'), cb->text() ) );
+ QClipboard *cb = TQApplication::clipboard();
+ KURL::List list( TQStringList::split( TQChar('\n'), cb->text() ) );
KURL url = currentURL();
if ( ! currentKFileTreeViewItem()->isDir() )
@@ -701,7 +701,7 @@ void BaseTreeView::slotPopulateFinished(KFileTreeViewItem *item)
item->setOpen(false);
item->setExpandable(false);
} else {
- QString url = item->url().url();
+ TQString url = item->url().url();
BaseTreeBranch *btb = dynamic_cast<BaseTreeBranch *>(item->branch());
if (btb && ! btb->folderToOpen.empty()) {
btb->reopenFolder();
@@ -740,7 +740,7 @@ void BaseTreeView::slotProperties()
{
fileInfoDlg = addFileInfoPage(propDlg);
}
- connect(propDlg, SIGNAL( applied() ), this, SLOT( slotPropertiesApplied()) );
+ connect(propDlg, TQT_SIGNAL( applied() ), this, TQT_SLOT( slotPropertiesApplied()) );
propDlg->exec();
}
@@ -758,7 +758,7 @@ void BaseTreeView::slotPropertiesApplied()
if (fileInfoDlg && kftvi)
{
// has description changed?
- QString newDesc = fileInfoDlg->fileDesc->text();
+ TQString newDesc = fileInfoDlg->fileDesc->text();
if (kftvi->text(1) != newDesc)
itemDescChanged(kftvi, newDesc);
}
@@ -776,7 +776,7 @@ void BaseTreeView::slotPropertiesApplied()
void BaseTreeView::slotReloadAllTrees()
{
- QPtrStack<BaseTreeBranch> stack;
+ TQPtrStack<BaseTreeBranch> stack;
BaseTreeBranch *btb;
KFileTreeBranchIterator it( branches() );
for ( ; it.current(); ++it)
@@ -804,7 +804,7 @@ void BaseTreeView::slotReload()
void BaseTreeView::reload(BaseTreeBranch *btb)
{
// remember the old status
- QStringList folderToOpen;
+ TQStringList folderToOpen;
btb->addOpenFolder(&folderToOpen);
KURL url = btb->rootUrl();
// remove and open again
@@ -829,16 +829,16 @@ void BaseTreeView::slotJobFinished(KIO::Job *job)
}
-void BaseTreeView::slotReturnPressed(QListViewItem *item)
+void BaseTreeView::slotReturnPressed(TQListViewItem *item)
{
emit executed(item);
}
-bool BaseTreeView::acceptDrag(QDropEvent* e ) const
+bool BaseTreeView::acceptDrag(TQDropEvent* e ) const
{
- QPoint p (contentsToViewport(e->pos()));
- QListViewItem *atpos = itemAt(p);
+ TQPoint p (contentsToViewport(e->pos()));
+ TQListViewItem *atpos = itemAt(p);
KFileTreeViewItem *kftvi = dynamic_cast <KFileTreeViewItem *> (atpos);
if (kftvi)
return (KFileTreeView::acceptDrag(e) && kftvi->isDir()); // accept only on folders
@@ -847,7 +847,7 @@ bool BaseTreeView::acceptDrag(QDropEvent* e ) const
}
-void BaseTreeView::slotDropped (QWidget *, QDropEvent * /*e*/, KURL::List& fileList, KURL& dest)
+void BaseTreeView::slotDropped (TQWidget *, TQDropEvent * /*e*/, KURL::List& fileList, KURL& dest)
{
if(fileList.empty())
return;
@@ -880,7 +880,7 @@ void BaseTreeView::slotDropped (QWidget *, QDropEvent * /*e*/, KURL::List& fileL
} else {
// create the popup menu
- QPopupMenu popup;
+ TQPopupMenu popup;
if (sMoving || (sReading && sDeleting))
popup.insertItem(SmallIconSet("goto"), i18n("&Move Here"), 2 );
if (sReading)
@@ -890,7 +890,7 @@ void BaseTreeView::slotDropped (QWidget *, QDropEvent * /*e*/, KURL::List& fileL
popup.insertSeparator();
popup.insertItem(SmallIconSet("cancel"), i18n("C&ancel"), 5);
- result = popup.exec( QCursor::pos() );
+ result = popup.exec( TQCursor::pos() );
}
}
bool tooltip = showToolTips();
@@ -915,18 +915,18 @@ void BaseTreeView::slotDropped (QWidget *, QDropEvent * /*e*/, KURL::List& fileL
if (!job)
return;
- connect(job, SIGNAL( result(KIO::Job *) ),
- this, SLOT( slotJobFinished(KIO::Job *) ) );
+ connect(job, TQT_SIGNAL( result(KIO::Job *) ),
+ this, TQT_SLOT( slotJobFinished(KIO::Job *) ) );
progressBar->setTotalSteps(100);
- connect(job, SIGNAL(percent( KIO::Job *, unsigned long)),
- this, SLOT(slotPercent( KIO::Job *, unsigned long)));
+ connect(job, TQT_SIGNAL(percent( KIO::Job *, unsigned long)),
+ this, TQT_SLOT(slotPercent( KIO::Job *, unsigned long)));
}
-void BaseTreeView::findDrop(const QPoint &pos, QListViewItem *&parent, QListViewItem *&after)
+void BaseTreeView::findDrop(const TQPoint &pos, TQListViewItem *&parent, TQListViewItem *&after)
{
- QPoint p (contentsToViewport(pos));
- QListViewItem *atpos = itemAt(p);
+ TQPoint p (contentsToViewport(pos));
+ TQListViewItem *atpos = itemAt(p);
// if (atpos && atpos->parent()) {
// after = atpos;
// parent = atpos->parent();
@@ -937,7 +937,7 @@ void BaseTreeView::findDrop(const QPoint &pos, QListViewItem *&parent, QListView
}
-void BaseTreeView::slotNewProjectLoaded(const QString &name, const KURL &baseURL, const KURL &)
+void BaseTreeView::slotNewProjectLoaded(const TQString &name, const KURL &baseURL, const KURL &)
{
m_projectName = name;
m_projectBaseURL = baseURL;
@@ -952,8 +952,8 @@ bool BaseTreeView::isFileOpen(const KURL &url)
bool BaseTreeView::isPathInClipboard()
{
- QClipboard *cb = QApplication::clipboard();
- KURL::List list( QStringList::split( QChar('\n'), cb->text() ) );
+ QClipboard *cb = TQApplication::clipboard();
+ KURL::List list( TQStringList::split( TQChar('\n'), cb->text() ) );
for ( KURL::List::Iterator it = list.begin(); it != list.end(); ++it )
{
if ( !(*it).isValid() )
@@ -975,7 +975,7 @@ void BaseTreeView::slotDocumentClosed(const KURL& url)
item->repaint();
}
}
-/* QListViewItemIterator iter(this);
+/* TQListViewItemIterator iter(this);
for ( ; iter.current(); ++iter )
{
iter.current()->repaint();
@@ -1002,7 +1002,7 @@ void BaseTreeView::cancelRename(int col)
}
-void BaseTreeView::slotRenameItem(QListViewItem* item, const QString & newText, int col)
+void BaseTreeView::slotRenameItem(TQListViewItem* item, const TQString & newText, int col)
{
if (!item)
return;
@@ -1017,7 +1017,7 @@ void BaseTreeView::slotRenameItem(QListViewItem* item, const QString & newText,
}
-void BaseTreeView::doRename(KFileTreeViewItem* kftvi, const QString & newName)
+void BaseTreeView::doRename(KFileTreeViewItem* kftvi, const TQString & newName)
{
if (! kftvi)
return;
@@ -1027,7 +1027,7 @@ void BaseTreeView::doRename(KFileTreeViewItem* kftvi, const QString & newName)
if (kftvi->isDir())
{
- newURL.setPath(QFileInfo(oldURL.path(-1)).dirPath() + '/' + newName + '/');
+ newURL.setPath(TQFileInfo(oldURL.path(-1)).dirPath() + '/' + newName + '/');
oldURL.adjustPath(1);
} else
{
@@ -1057,7 +1057,7 @@ void BaseTreeView::doRename(KFileTreeViewItem* kftvi, const QString & newName)
}
-void BaseTreeView::saveLayout(KConfig *config, const QString &group)
+void BaseTreeView::saveLayout(KConfig *config, const TQString &group)
{
KListView::saveLayout(config, group);
if (! m_saveOpenFolder || ! qConfig.saveTrees)
@@ -1072,18 +1072,18 @@ void BaseTreeView::saveLayout(KConfig *config, const QString &group)
btb = dynamic_cast<BaseTreeBranch *>( (*it) );
if (btb && btb->rootUrl().isLocalFile()) {
++i;
- QStringList folderList;
+ TQStringList folderList;
// remember the root url so that I find the branch on restore
folderList.append(btb->rootUrl().url());
btb->addOpenFolder(&folderList);
- config->writePathEntry("OpenFolderList" + QString::number(i), folderList);
+ config->writePathEntry("OpenFolderList" + TQString::number(i), folderList);
}
}
config->writeEntry("NumOpenFolderList", i);
}
-void BaseTreeView::restoreLayout(KConfig *config, const QString &group)
+void BaseTreeView::restoreLayout(KConfig *config, const TQString &group)
{
KListView::restoreLayout(config, group);
KConfigGroupSaver saver(config, group);
@@ -1097,7 +1097,7 @@ void BaseTreeView::restoreLayout(KConfig *config, const QString &group)
int maxBranch = config->readNumEntry("NumOpenFolderList", 0);
for (int i = 1; i <= maxBranch; ++i)
{
- QStringList folderList = QuantaCommon::readPathListEntry(config, "OpenFolderList" + QString::number(i));
+ TQStringList folderList = QuantaCommon::readPathListEntry(config, "OpenFolderList" + TQString::number(i));
if (folderList.count() > 1) {
KURL rootURL = (*folderList.begin());
folderList.remove(folderList.begin()); // remove the root URL
@@ -1120,7 +1120,7 @@ void BaseTreeView::restoreLayout(KConfig *config, const QString &group)
void BaseTreeView::slotCreateSiteTemplate()
{
- QString startDir;
+ TQString startDir;
if (Project::ref()->hasProject())
{
startDir = Project::ref()->templateURL().url();
@@ -1164,10 +1164,10 @@ void BaseTreeView::slotCreateSiteTemplate()
{
if (!(*it).path().endsWith("/"))
{
- QFile f((*it).path());
+ TQFile f((*it).path());
if (f.open(IO_ReadOnly))
{
- QByteArray buffer(f.readAll());
+ TQByteArray buffer(f.readAll());
if (!tar.writeFile((*it).path().remove(url.path()), "user", "group", buffer.size(), buffer.data()))
{
error = true;
@@ -1191,7 +1191,7 @@ void BaseTreeView::slotCreateSiteTemplate()
void BaseTreeView::slotCreateFolder()
{
bool ok;
- QString folderName = KInputDialog::getText(i18n("Create New Folder"), i18n("Folder name:"), "", &ok, this);
+ TQString folderName = KInputDialog::getText(i18n("Create New Folder"), i18n("Folder name:"), "", &ok, this);
if (ok)
{
KURL url = currentURL();
@@ -1206,7 +1206,7 @@ void BaseTreeView::slotCreateFolder()
void BaseTreeView::slotCreateFile()
{
bool ok;
- QString fileName = KInputDialog::getText(i18n("Create New File"), i18n("File name:"), "", &ok, this);
+ TQString fileName = KInputDialog::getText(i18n("Create New File"), i18n("File name:"), "", &ok, this);
if (ok)
{
KURL url = currentURL();
diff --git a/quanta/treeviews/basetreeview.h b/quanta/treeviews/basetreeview.h
index 345b5a79..2ec49022 100644
--- a/quanta/treeviews/basetreeview.h
+++ b/quanta/treeviews/basetreeview.h
@@ -19,7 +19,7 @@
#define BASETREEVIEW_H
//qt includes
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
//kde includes
#include <kfiletreebranch.h>
@@ -59,17 +59,17 @@ public:
/**
sorts folders separate from files
*/
- QString key (int column, bool ascending) const;
+ TQString key (int column, bool ascending) const;
/**
makes compare independent from locale
*/
- int compare( QListViewItem *i, int col, bool ascending ) const;
+ int compare( TQListViewItem *i, int col, bool ascending ) const;
/**
makes open files bold and the second column lighter
*/
- void paintCell(QPainter *p, const QColorGroup &cg, int column, int width, int align);
+ void paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int align);
/**
refresh icon
@@ -87,7 +87,7 @@ class BaseTreeBranch : public KFileTreeBranch {
public:
BaseTreeBranch(KFileTreeView *parent, const KURL& url,
- const QString& name, const QPixmap& pix,
+ const TQString& name, const TQPixmap& pix,
bool showHidden = false, KFileTreeViewItem *branchRoot = 0);
/**
get the BaseTreeViewItem
@@ -102,7 +102,7 @@ public:
/**
files matching to this will not be shown
*/
- QRegExp excludeFilterRx;
+ TQRegExp excludeFilterRx;
/**
adds the current open folders of the branch to a stringslist.
@@ -110,13 +110,13 @@ public:
@param openFolder the list where to add the URL strings
*/
- void addOpenFolder(QStringList *openFolder);
+ void addOpenFolder(TQStringList *openFolder);
/** opens the next folder in @ref folderToOpen */
void reopenFolder();
/** list of folders to open */
- QStringList folderToOpen;
+ TQStringList folderToOpen;
/** inform the dirwatcher to update all open folders */
void updateOpenFolder();
@@ -135,7 +135,7 @@ class BaseTreeView : public KFileTreeView {
Q_OBJECT
public:
- BaseTreeView(QWidget *parent = 0L, const char *name = 0L);
+ BaseTreeView(TQWidget *parent = 0L, const char *name = 0L);
virtual ~BaseTreeView();
/**
@@ -145,7 +145,7 @@ public:
* @param config the KConfig object to write to
* @param group the config group to use
*/
- void saveLayout(KConfig *config, const QString &group);
+ void saveLayout(KConfig *config, const TQString &group);
/**
* Reads the list view's layout from a KConfig group as stored with
@@ -154,7 +154,7 @@ public:
* @param config the KConfig object to read from
* @param group the config group to use
*/
- void restoreLayout(KConfig *config, const QString &group);
+ void restoreLayout(KConfig *config, const TQString &group);
/**
* en/disable saving a list of open folders in @ref saveLayout and
@@ -169,7 +169,7 @@ public slots:
/**
sets new project information
*/
- void slotNewProjectLoaded(const QString &, const KURL &, const KURL &);
+ void slotNewProjectLoaded(const TQString &, const KURL &, const KURL &);
/**
repaints all treeview items
*/
@@ -183,8 +183,8 @@ protected slots:
virtual void slotJobFinished( KIO::Job *job);
void slotInsertInProject();
void slotInsertDirInProject();
- virtual void slotReturnPressed(QListViewItem *item);
- virtual void slotDropped (QWidget *, QDropEvent *, KURL::List&, KURL&);
+ virtual void slotReturnPressed(TQListViewItem *item);
+ virtual void slotDropped (TQWidget *, TQDropEvent *, KURL::List&, KURL&);
/**
sends value from KIO::Job to progressbar
*/
@@ -204,7 +204,7 @@ protected slots:
emits a signal (@ref openFile or @ref openImage)
or expands an archiv (@ref expandArchiv) in the tree
*/
- virtual void slotSelectFile(QListViewItem *item);
+ virtual void slotSelectFile(TQListViewItem *item);
/**
emits the signal @ref insertTag
*/
@@ -246,7 +246,7 @@ protected slots:
/**
connect signal itemRenamed to this slot to handle inline rename
*/
- virtual void slotRenameItem(QListViewItem* kvtvi, const QString & newText, int col);
+ virtual void slotRenameItem(TQListViewItem* kvtvi, const TQString & newText, int col);
/**
create a site template tarball from the selected directory
*/
@@ -282,7 +282,7 @@ protected:
@param item the treeview item
@param newDesc the new description of item
*/
- virtual void itemDescChanged(KFileTreeViewItem* item, const QString& newDesc)
+ virtual void itemDescChanged(KFileTreeViewItem* item, const TQString& newDesc)
{
Q_UNUSED(item);
Q_UNUSED(newDesc);
@@ -304,8 +304,8 @@ protected:
@return true if expanding was possible
*/
bool expandArchiv (KFileTreeViewItem *item);
- bool acceptDrag(QDropEvent* e ) const;
- void findDrop(const QPoint &pos, QListViewItem *&parent, QListViewItem *&after);
+ bool acceptDrag(TQDropEvent* e ) const;
+ void findDrop(const TQPoint &pos, TQListViewItem *&parent, TQListViewItem *&after);
/**
this is for project and template tree to reduce includes there
@@ -321,24 +321,24 @@ protected:
*/
void insertOpenWithMenu(KPopupMenu *menu, int position);
KPropertiesDialog *propDlg;
- QString m_projectName;
+ TQString m_projectName;
KURL m_projectBaseURL;
FileInfoDlg* fileInfoDlg;
/** the parent of the treeview
the passwords are cached there
*/
- QWidget * m_parent;
+ TQWidget * m_parent;
BaseTreeViewToolTip * m_tooltip;
// some stuff for renaming
- void doRename(KFileTreeViewItem* kvtvi, const QString & newName);
+ void doRename(KFileTreeViewItem* kvtvi, const TQString & newName);
/** reimplemented to reset renameable */
void cancelRename(int col);
signals:
void openFile(const KURL&);
void openImage(const KURL&);
- void open(QListViewItem *name);
+ void open(TQListViewItem *name);
void insertDirInProject(const KURL&);
void insertFileInProject(const KURL&);
void insertTag(const KURL &, DirInfo);
@@ -355,8 +355,8 @@ private:
bool m_saveOpenFolder;
KPopupMenu *m_openWithMenu;
int m_openWithMenuId;
- QValueList<KAction *> m_openWithActions;
- QMap<int, QuantaPlugin*> m_pluginIds;
+ TQValueList<KAction *> m_openWithActions;
+ TQMap<int, QuantaPlugin*> m_pluginIds;
};
#endif
diff --git a/quanta/treeviews/docfolder.cpp b/quanta/treeviews/docfolder.cpp
index 02669a1e..0a1d941d 100644
--- a/quanta/treeviews/docfolder.cpp
+++ b/quanta/treeviews/docfolder.cpp
@@ -16,8 +16,8 @@
***************************************************************************/
// QT includes
-#include <qstrlist.h>
-#include <qpixmap.h>
+#include <tqstrlist.h>
+#include <tqpixmap.h>
// KDE includes
#include <kconfig.h>
@@ -28,14 +28,14 @@
#include "docfolder.h"
#include "docitem.h"
-DocFolder::DocFolder(QListViewItem *parent, const QString &_name, KConfig *config, const QString &basePath)
+DocFolder::DocFolder(TQListViewItem *parent, const TQString &_name, KConfig *config, const TQString &basePath)
: KListViewItem(parent)
{
name = _name;
topLevel = false;
url = "";
- QStrList list;
+ TQStrList list;
config->readListEntry( name, list );
@@ -43,14 +43,14 @@ DocFolder::DocFolder(QListViewItem *parent, const QString &_name, KConfig *confi
for ( list.last(); ( item = list.current() ) ; list.prev() ) {
if ( item[0] != '#' ) {
- QString url = config->readEntry( item );
- DocItem *el = new DocItem( this, QString(item), basePath+url);
+ TQString url = config->readEntry( item );
+ DocItem *el = new DocItem( this, TQString(item), basePath+url);
el->setPixmap( 0, SmallIcon("info") );
} else
if ( item[0] == '#' ) { // current item is folder
item++; // remove leading #
- QString l_url = config->readEntry( QString("folder_")+item, "" );
- DocFolder *el = new DocFolder(this, QString(item), config, basePath);
+ TQString l_url = config->readEntry( TQString("folder_")+item, "" );
+ DocFolder *el = new DocFolder(this, TQString(item), config, basePath);
if ( ! l_url.isEmpty() )
el->url = basePath+l_url;
el->setPixmap( 0, UserIcon("mini-book1") );
@@ -59,13 +59,13 @@ DocFolder::DocFolder(QListViewItem *parent, const QString &_name, KConfig *confi
}
}
-DocFolder::DocFolder(QListView *parent, const QString &_name, KConfig *config, const QString &basePath)
+DocFolder::DocFolder(TQListView *parent, const TQString &_name, KConfig *config, const TQString &basePath)
: KListViewItem(parent)
{
name = _name;
topLevel = false;
url = "";
- QStrList list;
+ TQStrList list;
config->readListEntry( name, list );
@@ -73,14 +73,14 @@ DocFolder::DocFolder(QListView *parent, const QString &_name, KConfig *config, c
for ( list.last(); ( item = list.current() ) ; list.prev() ) {
if ( item[0] != '#' ) {
- QString url = config->readEntry( item );
- DocItem *el = new DocItem( this, QString(item), basePath+url);
+ TQString url = config->readEntry( item );
+ DocItem *el = new DocItem( this, TQString(item), basePath+url);
el->setPixmap( 0, SmallIcon("info") );
} else
if ( item[0] == '#' ) { // current item is folder
item++; // remove leading #
- QString l_url = config->readEntry( QString("folder_")+item, "" );
- DocFolder *el = new DocFolder(this, QString(item), config, basePath);
+ TQString l_url = config->readEntry( TQString("folder_")+item, "" );
+ DocFolder *el = new DocFolder(this, TQString(item), config, basePath);
if ( ! l_url.isEmpty() )
el->url = basePath+l_url;
el->setPixmap( 0, UserIcon("mini-book1") );
@@ -95,7 +95,7 @@ DocFolder::~DocFolder(){
}
-QString DocFolder::text( int i) const
+TQString DocFolder::text( int i) const
{
if (i == 0)
return name;
@@ -106,12 +106,12 @@ QString DocFolder::text( int i) const
void DocFolder::setup()
{
setExpandable( true );
- QListViewItem::setup();
+ TQListViewItem::setup();
}
/** */
void DocFolder::setOpen( bool o)
{
- QListViewItem::setOpen( o );
+ TQListViewItem::setOpen( o );
if ( !topLevel ) {
if (o)
setPixmap( 0, UserIcon("mini-book2") );
diff --git a/quanta/treeviews/docfolder.h b/quanta/treeviews/docfolder.h
index 6b6668e1..f3c8db87 100644
--- a/quanta/treeviews/docfolder.h
+++ b/quanta/treeviews/docfolder.h
@@ -18,7 +18,7 @@
#ifndef DOCFOLDER_H
#define DOCFOLDER_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include <klistview.h>
@@ -33,17 +33,17 @@ class KConfig;
class DocFolder : public KListViewItem {
public:
- DocFolder(QListViewItem *parent, const QString &_name, KConfig *config, const QString &basePath);
- DocFolder(QListView *parent, const QString &_name, KConfig *config, const QString &basePath);
+ DocFolder(TQListViewItem *parent, const TQString &_name, KConfig *config, const TQString &basePath);
+ DocFolder(TQListView *parent, const TQString &_name, KConfig *config, const TQString &basePath);
~DocFolder();
- QString text( int column ) const;
+ TQString text( int column ) const;
void setup();
/** */
void setOpen( bool o);
public:
- QString url;
- QString name;
+ TQString url;
+ TQString name;
bool topLevel;
};
diff --git a/quanta/treeviews/docitem.cpp b/quanta/treeviews/docitem.cpp
index 7c9efa83..f24c3bb9 100644
--- a/quanta/treeviews/docitem.cpp
+++ b/quanta/treeviews/docitem.cpp
@@ -15,20 +15,20 @@
* *
***************************************************************************/
-#include <qstrlist.h>
+#include <tqstrlist.h>
#include <kconfig.h>
#include "docitem.h"
-DocItem::DocItem(QListViewItem *parent, const QString &_name, const QString &_url)
+DocItem::DocItem(TQListViewItem *parent, const TQString &_name, const TQString &_url)
: KListViewItem(parent)
{
url = _url;
name = _name;
}
-DocItem::DocItem(QListView *parent, const QString &_name, const QString &_url)
+DocItem::DocItem(TQListView *parent, const TQString &_name, const TQString &_url)
: KListViewItem(parent)
{
url = _url;
@@ -41,7 +41,7 @@ DocItem::~DocItem()
}
-QString DocItem::text( int i) const
+TQString DocItem::text( int i) const
{
if (i == 0)
return name;
diff --git a/quanta/treeviews/docitem.h b/quanta/treeviews/docitem.h
index 94fff375..59b126a1 100644
--- a/quanta/treeviews/docitem.h
+++ b/quanta/treeviews/docitem.h
@@ -18,7 +18,7 @@
#ifndef DOCITEM_H
#define DOCITEM_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include <klistview.h>
@@ -31,14 +31,14 @@ class KConfig;
class DocItem : public KListViewItem {
public:
- DocItem(QListViewItem *parent, const QString &_name, const QString &_url);
- DocItem(QListView *parent, const QString &_name, const QString &_url);
+ DocItem(TQListViewItem *parent, const TQString &_name, const TQString &_url);
+ DocItem(TQListView *parent, const TQString &_name, const TQString &_url);
~DocItem();
- QString text( int column ) const;
+ TQString text( int column ) const;
public: // Public attributes
- QString url;
- QString name;
+ TQString url;
+ TQString name;
};
diff --git a/quanta/treeviews/doctreeview.cpp b/quanta/treeviews/doctreeview.cpp
index fd9abf65..d0234faf 100644
--- a/quanta/treeviews/doctreeview.cpp
+++ b/quanta/treeviews/doctreeview.cpp
@@ -16,10 +16,10 @@
***************************************************************************/
// QT clases
-#include <qstrlist.h>
-#include <qheader.h>
-#include <qpixmap.h>
-#include <qdir.h>
+#include <tqstrlist.h>
+#include <tqheader.h>
+#include <tqpixmap.h>
+#include <tqdir.h>
// KDE clases
#include <kconfig.h>
@@ -35,11 +35,11 @@
#include "docfolder.h"
#include "docitem.h"
-DocTreeView::DocTreeView(QWidget *parent, const char *name )
+DocTreeView::DocTreeView(TQWidget *parent, const char *name )
: KListView(parent,name)
{
- contextHelpDict = new QDict<QString>( 101, false );
+ contextHelpDict = new TQDict<TQString>( 101, false );
setRootIsDecorated( true );
header()->hide();
@@ -54,17 +54,17 @@ DocTreeView::DocTreeView(QWidget *parent, const char *name )
projectDocFolder = new KListViewItem(this, i18n("Project Documentation"));
projectDocFolder->setOpen(true);
slotRefreshTree();
- setFocusPolicy(QWidget::ClickFocus);
+ setFocusPolicy(TQWidget::ClickFocus);
- connect(this, SIGNAL(executed(QListViewItem *)), SLOT(clickItem(QListViewItem *)) );
- connect(this, SIGNAL(returnPressed(QListViewItem *)), SLOT(clickItem(QListViewItem *)));
- connect(this, SIGNAL(doubleClicked(QListViewItem *)), SLOT(slotDoubleClicked(QListViewItem *)));
+ connect(this, TQT_SIGNAL(executed(TQListViewItem *)), TQT_SLOT(clickItem(TQListViewItem *)) );
+ connect(this, TQT_SIGNAL(returnPressed(TQListViewItem *)), TQT_SLOT(clickItem(TQListViewItem *)));
+ connect(this, TQT_SIGNAL(doubleClicked(TQListViewItem *)), TQT_SLOT(slotDoubleClicked(TQListViewItem *)));
m_contextMenu = new KPopupMenu(this);
- m_menuReload = m_contextMenu->insertItem(i18n("&Reload"), this, SLOT(slotReloadProjectDocs()));
- m_contextMenu->insertItem(SmallIcon("network"), i18n("&Download Documentation..."), this, SIGNAL(downloadDoc()));
- connect(this, SIGNAL(contextMenu(KListView*, QListViewItem*, const QPoint&)),
- this, SLOT(slotMenu(KListView*, QListViewItem*, const QPoint&)));
+ m_menuReload = m_contextMenu->insertItem(i18n("&Reload"), this, TQT_SLOT(slotReloadProjectDocs()));
+ m_contextMenu->insertItem(SmallIcon("network"), i18n("&Download Documentation..."), this, TQT_SIGNAL(downloadDoc()));
+ connect(this, TQT_SIGNAL(contextMenu(KListView*, TQListViewItem*, const TQPoint&)),
+ this, TQT_SLOT(slotMenu(KListView*, TQListViewItem*, const TQPoint&)));
}
@@ -75,41 +75,41 @@ DocTreeView::~DocTreeView(){
void DocTreeView::slotRefreshTree()
{
- for (QValueList<DocFolder *>::Iterator it = m_folderList.begin(); it != m_folderList.end(); ++it)
+ for (TQValueList<DocFolder *>::Iterator it = m_folderList.begin(); it != m_folderList.end(); ++it)
{
delete *it;
}
m_folderList.clear();
- QStringList docDirs = KGlobal::instance()->dirs()->findDirs("appdata", "doc");
+ TQStringList docDirs = KGlobal::instance()->dirs()->findDirs("appdata", "doc");
- for ( QStringList::Iterator it = docDirs.begin(); it != docDirs.end(); ++it )
+ for ( TQStringList::Iterator it = docDirs.begin(); it != docDirs.end(); ++it )
{
- QString docDir = *it;
- QDir dir(docDir, "*.docrc");
- QStringList files = dir.entryList();
+ TQString docDir = *it;
+ TQDir dir(docDir, "*.docrc");
+ TQStringList files = dir.entryList();
- 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 )
{
KConfig config( docDir + *it_f );
config.setGroup("Tree");
- QString relDocDir = config.readEntry("Doc dir");
- QString name = config.readEntry("Name").lower();
+ TQString relDocDir = config.readEntry("Doc dir");
+ TQString name = config.readEntry("Name").lower();
- DocFolder *folder = new DocFolder(this, config.readEntry("Top Element"), &config , QDir::cleanDirPath(docDir+relDocDir)+"/");
+ DocFolder *folder = new DocFolder(this, config.readEntry("Top Element"), &config , TQDir::cleanDirPath(docDir+relDocDir)+"/");
folder->setPixmap( 0, SmallIcon("folder_open") );
folder->topLevel = true;
folder->setOpen(true);
m_folderList.append(folder);
config.setGroup("Context");
- QStrList list;
+ TQStrList list;
config.readListEntry("ContextList", list );
for ( unsigned int i=0; i<list.count(); i++ )
{
- QString keyword = list.at(i);
- QString *url = new QString(QDir::cleanDirPath(docDir + relDocDir + "/" + config.readEntry( list.at(i) )));
+ TQString keyword = list.at(i);
+ TQString *url = new TQString(TQDir::cleanDirPath(docDir + relDocDir + "/" + config.readEntry( list.at(i) )));
contextHelpDict->insert( name + "|" + keyword, url );
}
}
@@ -117,9 +117,9 @@ void DocTreeView::slotRefreshTree()
}
-void DocTreeView::clickItem( QListViewItem *)
+void DocTreeView::clickItem( TQListViewItem *)
{
- QListViewItem *it = currentItem();
+ TQListViewItem *it = currentItem();
if ( !it )
return;
DocItem *dit = dynamic_cast< DocItem *>(it);
@@ -136,16 +136,16 @@ void DocTreeView::clickItem( QListViewItem *)
}
-QString * DocTreeView::contextHelp(const QString &keyword)
+TQString * DocTreeView::contextHelp(const TQString &keyword)
{
- QString word = keyword.mid(keyword.find("|"));
+ TQString word = keyword.mid(keyword.find("|"));
if (contextHelpDict->find(keyword))
return contextHelpDict->find(keyword);
else
return contextHelpDict->find(word); //to support old documentation packages
}
-void DocTreeView::slotDoubleClicked(QListViewItem *item )
+void DocTreeView::slotDoubleClicked(TQListViewItem *item )
{
if (item)
{
@@ -155,13 +155,13 @@ void DocTreeView::slotDoubleClicked(QListViewItem *item )
void DocTreeView::slotAddProjectDoc(const KURL& url)
{
- QString path = url.path();
+ TQString path = url.path();
int pos = path.find("/doc/");
path = path.mid(pos + 5);
new DocItem(projectDocFolder, path, url.url());
}
-void DocTreeView::slotMenu(KListView *, QListViewItem *item, const QPoint &point)
+void DocTreeView::slotMenu(KListView *, TQListViewItem *item, const TQPoint &point)
{
m_contextMenu->setItemVisible(m_menuReload, false);
if (item)
@@ -175,16 +175,16 @@ void DocTreeView::slotMenu(KListView *, QListViewItem *item, const QPoint &point
m_contextMenu->popup(point);
}
-void DocTreeView::slotNewProjectLoaded(const QString &, const KURL &, const KURL &)
+void DocTreeView::slotNewProjectLoaded(const TQString &, const KURL &, const KURL &)
{
slotReloadProjectDocs();
}
void DocTreeView::slotReloadProjectDocs()
{
- QListViewItem *child = projectDocFolder->firstChild();
+ TQListViewItem *child = projectDocFolder->firstChild();
while (child) {
- QListViewItem *c = child;
+ TQListViewItem *c = child;
child = child->nextSibling();
delete c;
}
diff --git a/quanta/treeviews/doctreeview.h b/quanta/treeviews/doctreeview.h
index 8061085d..ef60d468 100644
--- a/quanta/treeviews/doctreeview.h
+++ b/quanta/treeviews/doctreeview.h
@@ -19,8 +19,8 @@
#define DOCTREEVIEW_H
//qt includes
-#include <qdict.h>
-#include <qvaluelist.h>
+#include <tqdict.h>
+#include <tqvaluelist.h>
//kde includes
#include <klistview.h>
@@ -36,33 +36,33 @@ class KPopupMenu;
class DocTreeView : public KListView {
Q_OBJECT
public:
- DocTreeView(QWidget *parent=0, const char *name=0);
+ DocTreeView(TQWidget *parent=0, const char *name=0);
~DocTreeView();
- QString *contextHelp(const QString &keyword);
+ TQString *contextHelp(const TQString &keyword);
public slots:
- void slotNewProjectLoaded(const QString &, const KURL &, const KURL &);
+ void slotNewProjectLoaded(const TQString &, const KURL &, const KURL &);
void slotReloadProjectDocs();
void slotAddProjectDoc(const KURL& url);
/** Re-reads the documentation directories. */
void slotRefreshTree();
signals:
- void openURL(const QString& );
+ void openURL(const TQString& );
void reloadProjectDocs();
void downloadDoc();
private slots:
- void clickItem( QListViewItem *);
- void slotDoubleClicked(QListViewItem *);
- void slotMenu(KListView *, QListViewItem *item, const QPoint &point);
+ void clickItem( TQListViewItem *);
+ void slotDoubleClicked(TQListViewItem *);
+ void slotMenu(KListView *, TQListViewItem *item, const TQPoint &point);
private:
- QDict<QString> *contextHelpDict;
- QValueList<DocFolder *> m_folderList;
+ TQDict<TQString> *contextHelpDict;
+ TQValueList<DocFolder *> m_folderList;
KListViewItem *projectDocFolder;
KPopupMenu *m_contextMenu;
int m_menuReload;
diff --git a/quanta/treeviews/filestreeview.cpp b/quanta/treeviews/filestreeview.cpp
index be4c6a7e..fd943139 100644
--- a/quanta/treeviews/filestreeview.cpp
+++ b/quanta/treeviews/filestreeview.cpp
@@ -40,7 +40,7 @@
//FilesTreeView implementation
-FilesTreeView::FilesTreeView(KConfig *config, QWidget *parent, const char *name)
+FilesTreeView::FilesTreeView(KConfig *config, TQWidget *parent, const char *name)
: BaseTreeView(parent, name)
{
setAcceptDrops(true);
@@ -52,8 +52,8 @@ FilesTreeView::FilesTreeView(KConfig *config, QWidget *parent, const char *name)
// I must read this here because quanta_init has not done it yet
qConfig.showHiddenFiles = m_config->readBoolEntry("Show Hidden Files", true);
qConfig.saveTrees = m_config->readBoolEntry("Save Local Trees", true);
- QStringList topStrList = QuantaCommon::readPathListEntry(m_config, "Top folders");
- QStringList topStrAliasList = QuantaCommon::readPathListEntry(m_config, "Top folder aliases");
+ TQStringList topStrList = QuantaCommon::readPathListEntry(m_config, "Top folders");
+ TQStringList topStrAliasList = QuantaCommon::readPathListEntry(m_config, "Top folder aliases");
KURL url;
for (uint i = 0; i < topStrList.count(); i++)
{
@@ -84,49 +84,49 @@ FilesTreeView::FilesTreeView(KConfig *config, QWidget *parent, const char *name)
m_fileMenu = new KPopupMenu(this);
- m_fileMenu->insertItem(SmallIcon("fileopen"), i18n("&Open"), this ,SLOT(slotOpen()));
- m_fileMenu->insertItem(i18n("Insert &Tag"), this, SLOT(slotInsertTag()));
- m_menuClose = m_fileMenu->insertItem(SmallIcon("fileclose"), i18n("Clos&e"), this, SLOT(slotClose()));
+ m_fileMenu->insertItem(SmallIcon("fileopen"), i18n("&Open"), this ,TQT_SLOT(slotOpen()));
+ m_fileMenu->insertItem(i18n("Insert &Tag"), this, TQT_SLOT(slotInsertTag()));
+ m_menuClose = m_fileMenu->insertItem(SmallIcon("fileclose"), i18n("Clos&e"), this, TQT_SLOT(slotClose()));
m_fileMenu->insertSeparator();
- m_insertFileInProject = m_fileMenu->insertItem(i18n("&Insert in Project..."), this, SLOT(slotInsertInProject()));
- m_fileMenu->insertItem(SmallIcon("editcopy"), i18n("&Copy"), this, SLOT(slotCopy()));
- m_fileMenu->insertItem(i18n("Re&name"), this, SLOT(slotStartRename()));
- m_fileMenu->insertItem(SmallIcon("editdelete"), i18n("&Delete"), this, SLOT(slotDelete()));
+ m_insertFileInProject = m_fileMenu->insertItem(i18n("&Insert in Project..."), this, TQT_SLOT(slotInsertInProject()));
+ m_fileMenu->insertItem(SmallIcon("editcopy"), i18n("&Copy"), this, TQT_SLOT(slotCopy()));
+ m_fileMenu->insertItem(i18n("Re&name"), this, TQT_SLOT(slotStartRename()));
+ m_fileMenu->insertItem(SmallIcon("editdelete"), i18n("&Delete"), this, TQT_SLOT(slotDelete()));
m_fileMenu->insertSeparator();
- m_fileMenu->insertItem(SmallIcon("info"), i18n("&Properties"), this, SLOT(slotProperties()));
+ m_fileMenu->insertItem(SmallIcon("info"), i18n("&Properties"), this, TQT_SLOT(slotProperties()));
KPopupMenu *createNewMenu = new KPopupMenu(this);
- createNewMenu->insertItem(SmallIcon("folder_new"), i18n("F&older..."), this, SLOT(slotCreateFolder()));
- createNewMenu->insertItem(SmallIcon("document"), i18n("&File..."), this, SLOT(slotCreateFile()));
+ createNewMenu->insertItem(SmallIcon("folder_new"), i18n("F&older..."), this, TQT_SLOT(slotCreateFolder()));
+ createNewMenu->insertItem(SmallIcon("document"), i18n("&File..."), this, TQT_SLOT(slotCreateFile()));
m_folderMenu = new KPopupMenu();
- m_folderMenu->insertItem(SmallIcon("folder_new"), i18n("New Top &Folder..."), this, SLOT(slotNewTopFolder()));
- m_menuTop = m_folderMenu->insertItem(i18n("&Add Folder to Top"), this, SLOT(slotAddToTop()));
- m_folderMenu->insertItem(i18n("Create Site &Template..."), this, SLOT(slotCreateSiteTemplate()));
+ m_folderMenu->insertItem(SmallIcon("folder_new"), i18n("New Top &Folder..."), this, TQT_SLOT(slotNewTopFolder()));
+ m_menuTop = m_folderMenu->insertItem(i18n("&Add Folder to Top"), this, TQT_SLOT(slotAddToTop()));
+ m_folderMenu->insertItem(i18n("Create Site &Template..."), this, TQT_SLOT(slotCreateSiteTemplate()));
m_folderMenu->insertItem(SmallIcon("empty"), i18n("&Create New"), createNewMenu);
m_folderMenu->insertSeparator();
- m_insertFolderInProject = m_folderMenu->insertItem(i18n("&Insert in Project..."), this, SLOT(slotInsertDirInProject()));
- m_folderMenu->insertItem(SmallIcon("editcopy"), i18n("&Copy"), this, SLOT(slotCopy()));
- m_menuPasteFolder = m_folderMenu->insertItem(SmallIcon("editpaste"), i18n("&Paste"), this, SLOT(slotPaste()));
- m_menuChangeAlias = m_folderMenu->insertItem(i18n("&Change Alias..."), this, SLOT(slotChangeAlias()));
- m_menuFolderRename = m_folderMenu->insertItem(i18n("Re&name"), this, SLOT(slotStartRename()));
- m_menuDel = m_folderMenu->insertItem( SmallIcon("editdelete"), i18n("&Delete"), this, SLOT(slotDelete()));
+ m_insertFolderInProject = m_folderMenu->insertItem(i18n("&Insert in Project..."), this, TQT_SLOT(slotInsertDirInProject()));
+ m_folderMenu->insertItem(SmallIcon("editcopy"), i18n("&Copy"), this, TQT_SLOT(slotCopy()));
+ m_menuPasteFolder = m_folderMenu->insertItem(SmallIcon("editpaste"), i18n("&Paste"), this, TQT_SLOT(slotPaste()));
+ m_menuChangeAlias = m_folderMenu->insertItem(i18n("&Change Alias..."), this, TQT_SLOT(slotChangeAlias()));
+ m_menuFolderRename = m_folderMenu->insertItem(i18n("Re&name"), this, TQT_SLOT(slotStartRename()));
+ m_menuDel = m_folderMenu->insertItem( SmallIcon("editdelete"), i18n("&Delete"), this, TQT_SLOT(slotDelete()));
m_folderMenu->insertSeparator();
- m_folderMenu->insertItem(SmallIcon("info"), i18n("&Properties"), this, SLOT(slotProperties()));
- m_reloadMenuId = m_folderMenu->insertItem(SmallIcon("revert"), i18n("&Reload"), this, SLOT(slotReload()));
+ m_folderMenu->insertItem(SmallIcon("info"), i18n("&Properties"), this, TQT_SLOT(slotProperties()));
+ m_reloadMenuId = m_folderMenu->insertItem(SmallIcon("revert"), i18n("&Reload"), this, TQT_SLOT(slotReload()));
m_emptyMenu = new KPopupMenu();
- m_emptyMenu->insertItem(i18n("New Top &Folder..."), this, SLOT(slotNewTopFolder()), 0, -1 , 0);
+ m_emptyMenu->insertItem(i18n("New Top &Folder..."), this, TQT_SLOT(slotNewTopFolder()), 0, -1 , 0);
addColumn(i18n("Files Tree"), -1);
addColumn("");
- connect(this, SIGNAL(open(QListViewItem *)),
- this, SLOT(slotSelectFile(QListViewItem *)));
- connect(this, SIGNAL(contextMenu(KListView*, QListViewItem*, const QPoint&)),
- this, SLOT(slotMenu(KListView*, QListViewItem*, const QPoint&)));
+ connect(this, TQT_SIGNAL(open(TQListViewItem *)),
+ this, TQT_SLOT(slotSelectFile(TQListViewItem *)));
+ connect(this, TQT_SIGNAL(contextMenu(KListView*, TQListViewItem*, const TQPoint&)),
+ this, TQT_SLOT(slotMenu(KListView*, TQListViewItem*, const TQPoint&)));
// generate top list of directories
for (uint i = 0; i < topURLList.count(); i++)
@@ -158,7 +158,7 @@ KFileTreeBranch* FilesTreeView::newBranch(const KURL& url)
newBrnch = new BaseTreeBranch(this, url, i18n("Home Folder"), SmallIcon(fileItem.iconName()), true);
} else
{
- QString s = url.fileName();
+ TQString s = url.fileName();
if (s.isEmpty())
s = "/";
if (topURLAliases.contains(url.url()))
@@ -175,7 +175,7 @@ KFileTreeBranch* FilesTreeView::newBranch(const KURL& url)
/** RMB pressed, bring up the menu */
-void FilesTreeView::slotMenu(KListView* listView, QListViewItem *item, const QPoint &point)
+void FilesTreeView::slotMenu(KListView* listView, TQListViewItem *item, const TQPoint &point)
{
Q_UNUSED(listView);
#ifdef ENABLE_CVSSERVICE
@@ -255,7 +255,7 @@ void FilesTreeView::slotAddToTop()
{
topURLList.append(url);
bool ok;
- QString aliasName = KInputDialog::getText(i18n("Set Alias"), i18n("Alternative folder name:"), url.fileName(), &ok, this);
+ TQString aliasName = KInputDialog::getText(i18n("Set Alias"), i18n("Alternative folder name:"), url.fileName(), &ok, this);
if (!ok)
aliasName = url.fileName();
topURLAliases.insert(url.url(), aliasName);
@@ -274,13 +274,13 @@ void FilesTreeView::slotAddToTop()
void FilesTreeView::slotNewTopFolder()
{
- KURL url = KFileDialog::getExistingURL(QString::null, this, i18n("Choose Local or Remote Folder"));
+ KURL url = KFileDialog::getExistingURL(TQString::null, this, i18n("Choose Local or Remote Folder"));
if (url.isEmpty()) return;
url.adjustPath(+1);
if (topURLList.findIndex(url) == -1)
{
bool ok;
- QString aliasName = KInputDialog::getText(i18n("Set Alias"), i18n("Alternative folder name:"), url.fileName(), &ok, this);
+ TQString aliasName = KInputDialog::getText(i18n("Set Alias"), i18n("Alternative folder name:"), url.fileName(), &ok, this);
if (!ok)
aliasName = url.fileName();
topURLAliases.insert(url.url(), aliasName);
@@ -316,7 +316,7 @@ void FilesTreeView::slotChangeAlias()
if (topURLList.findIndex(url) != -1)
{
bool ok;
- QString aliasName = KInputDialog::getText(i18n("Change Alias"), i18n("Alternative folder name:"), topURLAliases[url.url()], &ok, this);
+ TQString aliasName = KInputDialog::getText(i18n("Change Alias"), i18n("Alternative folder name:"), topURLAliases[url.url()], &ok, this);
if (ok)
{
topURLAliases.replace(url.url(), aliasName);
diff --git a/quanta/treeviews/filestreeview.h b/quanta/treeviews/filestreeview.h
index a77ba3de..7522b74e 100644
--- a/quanta/treeviews/filestreeview.h
+++ b/quanta/treeviews/filestreeview.h
@@ -19,7 +19,7 @@
#define FILESTREEVIEW_H
//qt includes
-#include <qmap.h>
+#include <tqmap.h>
// quanta includes
#include "basetreeview.h"
@@ -35,10 +35,10 @@ class FilesTreeView : public BaseTreeView {
Q_OBJECT
public:
- FilesTreeView(KConfig *config, QWidget *parent, const char *name = 0L);
+ FilesTreeView(KConfig *config, TQWidget *parent, const char *name = 0L);
virtual ~FilesTreeView();
KURL::List topURLList;
- QMap<QString, QString> topURLAliases;
+ TQMap<TQString, TQString> topURLAliases;
void plugCVSMenu();
protected slots:
@@ -47,7 +47,7 @@ protected slots:
*/
void slotNewTopFolder();
- virtual void slotMenu(KListView *listView, QListViewItem *item, const QPoint &point);
+ virtual void slotMenu(KListView *listView, TQListViewItem *item, const TQPoint &point);
/**
creates a new branch from the current url
*/
diff --git a/quanta/treeviews/newtemplatedirdlg.cpp b/quanta/treeviews/newtemplatedirdlg.cpp
index bdf6d87f..48fd6b5e 100644
--- a/quanta/treeviews/newtemplatedirdlg.cpp
+++ b/quanta/treeviews/newtemplatedirdlg.cpp
@@ -13,15 +13,15 @@
* *
***************************************************************************/
-#include <qpushbutton.h>
+#include <tqpushbutton.h>
#include "newtemplatedirdlg.h"
#include "newtemplatedirdlg.moc"
-NewTemplateDirDlg::NewTemplateDirDlg(QWidget *parent, const char *name ) : TemplateDirForm(parent,name)
+NewTemplateDirDlg::NewTemplateDirDlg(TQWidget *parent, const char *name ) : TemplateDirForm(parent,name)
{
setCaption(name);
- 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()) );
}
NewTemplateDirDlg::~NewTemplateDirDlg()
diff --git a/quanta/treeviews/newtemplatedirdlg.h b/quanta/treeviews/newtemplatedirdlg.h
index daa6864a..730246e7 100644
--- a/quanta/treeviews/newtemplatedirdlg.h
+++ b/quanta/treeviews/newtemplatedirdlg.h
@@ -16,7 +16,7 @@
#ifndef NEWTEMPLATEDIRDLG_H
#define NEWTEMPLATEDIRDLG_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include <templatedirform.h>
/**
@@ -26,7 +26,7 @@
class NewTemplateDirDlg : public TemplateDirForm {
Q_OBJECT
public:
- NewTemplateDirDlg(QWidget *parent=0, const char *name=0);
+ NewTemplateDirDlg(TQWidget *parent=0, const char *name=0);
~NewTemplateDirDlg();
};
diff --git a/quanta/treeviews/projecttreeview.cpp b/quanta/treeviews/projecttreeview.cpp
index dc8744aa..0b28e246 100644
--- a/quanta/treeviews/projecttreeview.cpp
+++ b/quanta/treeviews/projecttreeview.cpp
@@ -16,10 +16,10 @@
***************************************************************************/
// QT includes
-#include <qpainter.h>
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qdict.h>
+#include <tqpainter.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
+#include <tqdict.h>
// KDE includes
#include <klocale.h>
@@ -51,10 +51,10 @@ ProjectTreeViewItem::ProjectTreeViewItem( KFileTreeViewItem *parent, KFileItem*
{
}
-void ProjectTreeViewItem::paintCell(QPainter *p, const QColorGroup &cg,
+void ProjectTreeViewItem::paintCell(TQPainter *p, const TQColorGroup &cg,
int column, int width, int align)
{
- QFont f = p->font();
+ TQFont f = p->font();
if (ProjectTreeView::ref()->isDocumentFolder(url()))
{
f.setItalic(true);
@@ -71,7 +71,7 @@ void ProjectTreeViewItem::paintCell(QPainter *p, const QColorGroup &cg,
//ProjectTreeBranch implementation
ProjectTreeBranch::ProjectTreeBranch(KFileTreeView *parent, const KURL& url,
- const QString& name, const QPixmap& pix,
+ const TQString& name, const TQPixmap& pix,
bool showHidden,
KFileTreeViewItem *branchRoot)
: BaseTreeBranch(parent, url, name, pix, showHidden, branchRoot)
@@ -100,7 +100,7 @@ KFileTreeViewItem* ProjectTreeBranch::createTreeViewItem(KFileTreeViewItem *pare
}
//ProjectTreeView implementation
-ProjectTreeView::ProjectTreeView(QWidget *parent, const char *name )
+ProjectTreeView::ProjectTreeView(TQWidget *parent, const char *name )
: BaseTreeView(parent,name), m_projectFiles(0)
{
//setSelectionModeExt(KListView::Extended);
@@ -118,62 +118,62 @@ ProjectTreeView::ProjectTreeView(QWidget *parent, const char *name )
m_projectDir->root()->setEnabled(false);
m_uploadStatusMenu = new KPopupMenu(this);
- m_alwaysUploadId = m_uploadStatusMenu->insertItem(i18n("&When Modified"), this, SLOT(slotAlwaysUpload()));
- m_neverUploadId = m_uploadStatusMenu->insertItem(i18n("&Never"), this, SLOT(slotNeverUpload()));
- m_confirmUploadId = m_uploadStatusMenu->insertItem(i18n("&Confirm"), this, SLOT(slotConfirmUpload()));
- connect(m_uploadStatusMenu, SIGNAL(aboutToShow()), this, SLOT(slotUploadMenuAboutToShow()));
+ m_alwaysUploadId = m_uploadStatusMenu->insertItem(i18n("&When Modified"), this, TQT_SLOT(slotAlwaysUpload()));
+ m_neverUploadId = m_uploadStatusMenu->insertItem(i18n("&Never"), this, TQT_SLOT(slotNeverUpload()));
+ m_confirmUploadId = m_uploadStatusMenu->insertItem(i18n("&Confirm"), this, TQT_SLOT(slotConfirmUpload()));
+ connect(m_uploadStatusMenu, TQT_SIGNAL(aboutToShow()), this, TQT_SLOT(slotUploadMenuAboutToShow()));
m_fileMenu = new KPopupMenu(this);
- m_fileMenu->insertItem(SmallIcon("fileopen"), i18n("&Open"), this, SLOT(slotOpen()));
- m_openInQuantaId = m_fileMenu->insertItem(i18n("Load Toolbar"), this, SLOT(slotLoadToolbar()));
- m_fileMenu->insertItem(i18n("Insert &Tag"), this, SLOT(slotInsertTag()));
- m_menuClose = m_fileMenu->insertItem(SmallIcon("fileclose"), i18n("Clos&e"), this, SLOT(slotClose()));
+ m_fileMenu->insertItem(SmallIcon("fileopen"), i18n("&Open"), this, TQT_SLOT(slotOpen()));
+ m_openInQuantaId = m_fileMenu->insertItem(i18n("Load Toolbar"), this, TQT_SLOT(slotLoadToolbar()));
+ m_fileMenu->insertItem(i18n("Insert &Tag"), this, TQT_SLOT(slotInsertTag()));
+ m_menuClose = m_fileMenu->insertItem(SmallIcon("fileclose"), i18n("Clos&e"), this, TQT_SLOT(slotClose()));
m_fileMenu->insertSeparator();
- m_fileMenu->insertItem(SmallIcon("up"), i18n("&Upload File..."), this, SLOT(slotUploadSingleURL()));
- m_fileMenu->insertItem(SmallIcon("up"), i18n("&Quick File Upload"), this, SLOT(slotQuickUploadURL()));
- m_fileMenu->insertItem(i18n("Re&name"), this, SLOT(slotStartRename()));
- m_fileMenu->insertItem( i18n("&Remove From Project"), this, SLOT(slotRemoveFromProject(int)));
- m_fileMenu->insertItem(SmallIcon("editdelete"), i18n("&Delete"), this, SLOT(slotDelete()));
+ m_fileMenu->insertItem(SmallIcon("up"), i18n("&Upload File..."), this, TQT_SLOT(slotUploadSingleURL()));
+ m_fileMenu->insertItem(SmallIcon("up"), i18n("&Quick File Upload"), this, TQT_SLOT(slotQuickUploadURL()));
+ m_fileMenu->insertItem(i18n("Re&name"), this, TQT_SLOT(slotStartRename()));
+ m_fileMenu->insertItem( i18n("&Remove From Project"), this, TQT_SLOT(slotRemoveFromProject(int)));
+ m_fileMenu->insertItem(SmallIcon("editdelete"), i18n("&Delete"), this, TQT_SLOT(slotDelete()));
m_fileMenu->insertSeparator();
m_fileMenu->insertItem(i18n("Upload &Status"), m_uploadStatusMenu);
- m_fileMenu->insertItem(SmallIcon("info"), i18n("&Properties"), this, SLOT(slotProperties()));
+ m_fileMenu->insertItem(SmallIcon("info"), i18n("&Properties"), this, TQT_SLOT(slotProperties()));
KPopupMenu *createNewMenu = new KPopupMenu(this);
- createNewMenu->insertItem(SmallIcon("folder_new"), i18n("F&older..."), this, SLOT(slotCreateFolder()));
- createNewMenu->insertItem(SmallIcon("document"), i18n("&File..."), this, SLOT(slotCreateFile()));
+ createNewMenu->insertItem(SmallIcon("folder_new"), i18n("F&older..."), this, TQT_SLOT(slotCreateFolder()));
+ createNewMenu->insertItem(SmallIcon("document"), i18n("&File..."), this, TQT_SLOT(slotCreateFile()));
m_folderMenu = new KPopupMenu(this);
m_folderMenu->insertItem(SmallIconSet("filenew"), i18n("&Create New"), createNewMenu);
m_folderMenu->insertSeparator();
- m_folderMenu->insertItem(SmallIcon("up"), i18n("&Upload Folder..."), this, SLOT(slotUploadSingleURL()));
- m_folderMenu->insertItem(SmallIcon("up"), i18n("&Quick Folder Upload"), this, SLOT(slotQuickUploadURL()));
- m_folderMenu->insertItem(i18n("Create Site &Template..."), this, SLOT(slotCreateSiteTemplate()));
- m_folderMenu->insertItem(i18n("Re&name"), this, SLOT(slotStartRename()));
- m_folderMenu->insertItem(i18n("&Remove From Project"), this, SLOT(slotRemoveFromProject(int)));
- m_folderMenu->insertItem(SmallIcon("editdelete"), i18n("&Delete"), this, SLOT(slotDelete()));
+ m_folderMenu->insertItem(SmallIcon("up"), i18n("&Upload Folder..."), this, TQT_SLOT(slotUploadSingleURL()));
+ m_folderMenu->insertItem(SmallIcon("up"), i18n("&Quick Folder Upload"), this, TQT_SLOT(slotQuickUploadURL()));
+ m_folderMenu->insertItem(i18n("Create Site &Template..."), this, TQT_SLOT(slotCreateSiteTemplate()));
+ m_folderMenu->insertItem(i18n("Re&name"), this, TQT_SLOT(slotStartRename()));
+ m_folderMenu->insertItem(i18n("&Remove From Project"), this, TQT_SLOT(slotRemoveFromProject(int)));
+ m_folderMenu->insertItem(SmallIcon("editdelete"), i18n("&Delete"), this, TQT_SLOT(slotDelete()));
m_folderMenu->insertSeparator();
- m_setDocumentRootId = m_folderMenu->insertItem(i18n("Document-&Base Folder"), this, SLOT(slotChangeDocumentFolderStatus()));
+ m_setDocumentRootId = m_folderMenu->insertItem(i18n("Document-&Base Folder"), this, TQT_SLOT(slotChangeDocumentFolderStatus()));
m_folderMenu->insertItem(i18n("Upload &Status"), m_uploadStatusMenu);
- m_folderMenu->insertItem(SmallIcon("info"), i18n("&Properties"), this, SLOT(slotProperties()));
+ m_folderMenu->insertItem(SmallIcon("info"), i18n("&Properties"), this, TQT_SLOT(slotProperties()));
m_projectMenu = new KPopupMenu(this);
m_projectMenu->insertItem(SmallIconSet("filenew"), i18n("&Create New"), createNewMenu);
m_projectMenu->insertSeparator();
- m_projectMenu->insertItem(SmallIcon("up"), i18n("&Upload Project..."), this, SLOT(slotUploadProject()));
- m_projectMenu->insertItem(SmallIcon("reload"), i18n("Re&scan Project Folder..."), this, SLOT(slotRescan()));
- m_projectMenu->insertItem(SmallIcon("configure"), i18n("Project &Properties"), this, SLOT(slotOptions()));
- m_projectMenu->insertItem(SmallIcon("revert"), i18n("&Reload"), this, SLOT(slotReload()));
+ m_projectMenu->insertItem(SmallIcon("up"), i18n("&Upload Project..."), this, TQT_SLOT(slotUploadProject()));
+ m_projectMenu->insertItem(SmallIcon("reload"), i18n("Re&scan Project Folder..."), this, TQT_SLOT(slotRescan()));
+ m_projectMenu->insertItem(SmallIcon("configure"), i18n("Project &Properties"), this, TQT_SLOT(slotOptions()));
+ m_projectMenu->insertItem(SmallIcon("revert"), i18n("&Reload"), this, TQT_SLOT(slotReload()));
m_projectMenu->insertSeparator();
m_projectMenu->insertItem(i18n("Upload &Status"), m_uploadStatusMenu);
- connect(this, SIGNAL(contextMenu(KListView*, QListViewItem*, const QPoint&)),
- this, SLOT(slotMenu(KListView*, QListViewItem*, const QPoint&)));
+ connect(this, TQT_SIGNAL(contextMenu(KListView*, TQListViewItem*, const TQPoint&)),
+ this, TQT_SLOT(slotMenu(KListView*, TQListViewItem*, const TQPoint&)));
- connect(this, SIGNAL(open(QListViewItem *)),
- this, SLOT(slotSelectFile(QListViewItem *)));
+ connect(this, TQT_SIGNAL(open(TQListViewItem *)),
+ this, TQT_SLOT(slotSelectFile(TQListViewItem *)));
restoreLayout(kapp->config(), className());
// the restored size of the first column might be too large for the current content
@@ -187,7 +187,7 @@ ProjectTreeView::~ProjectTreeView(){
KFileTreeBranch* ProjectTreeView::newBranch(const KURL& url)
{
- QString m_projectNameStr = m_projectName+" ";
+ TQString m_projectNameStr = m_projectName+" ";
if (m_projectName)
{
if (url.protocol() == "file")
@@ -208,8 +208,8 @@ KFileTreeBranch* ProjectTreeView::newBranch(const KURL& url)
setRootIsDecorated(false);
}
- connect(m_projectDir, SIGNAL(populateFinished(KFileTreeViewItem*)),
- this, SLOT(slotPopulateFinished(KFileTreeViewItem*)));
+ connect(m_projectDir, TQT_SIGNAL(populateFinished(KFileTreeViewItem*)),
+ this, TQT_SLOT(slotPopulateFinished(KFileTreeViewItem*)));
addBranch(m_projectDir);
m_projectDir->urlList = m_projectFiles; // set list for filter
if (m_projectName)
@@ -222,7 +222,7 @@ KFileTreeBranch* ProjectTreeView::newBranch(const KURL& url)
/** slot for context menu */
-void ProjectTreeView::slotMenu(KListView *listView, QListViewItem *item, const QPoint& point)
+void ProjectTreeView::slotMenu(KListView *listView, TQListViewItem *item, const TQPoint& point)
{
Q_UNUSED(listView);
KURL url = currentURL();
@@ -230,7 +230,7 @@ void ProjectTreeView::slotMenu(KListView *listView, QListViewItem *item, const Q
CVSService::ref()->setRepository(m_projectBaseURL.path());
if (url.isLocalFile())
{
- QString path = url.path();
+ TQString path = url.path();
if (path == m_projectBaseURL.path())
path += "/.";
CVSService::ref()->setCurrentFile(path);
@@ -278,12 +278,12 @@ void ProjectTreeView::slotMenu(KListView *listView, QListViewItem *item, const Q
/** Sets the project template directory */
-void ProjectTreeView::slotNewProjectLoaded(const QString &name, const KURL &baseURL, const KURL &templateURL)
+void ProjectTreeView::slotNewProjectLoaded(const TQString &name, const KURL &baseURL, const KURL &templateURL)
{
BaseTreeView::slotNewProjectLoaded(name, baseURL, templateURL); // set m_projectName and m_projectBaseURL
if (!m_projectName.isNull())
{
- QString projectNameStr = m_projectName+" ";
+ TQString projectNameStr = m_projectName+" ";
if (m_projectBaseURL.protocol() == "file")
{
projectNameStr += i18n("[local disk]");
@@ -305,7 +305,7 @@ void ProjectTreeView::slotNewProjectLoaded(const QString &name, const KURL &base
m_documentFolderList.append(m_projectBaseURL);
}
-void ProjectTreeView::slotReloadTree( ProjectList *fileList, bool buildNewTree, const QStringList &folderToOpen)
+void ProjectTreeView::slotReloadTree( ProjectList *fileList, bool buildNewTree, const TQStringList &folderToOpen)
{
m_projectFiles = fileList;
m_documentFolderList.clear();
@@ -341,7 +341,7 @@ void ProjectTreeView::slotReloadTree( ProjectList *fileList, bool buildNewTree,
KFileTreeViewItem *item;
KFileTreeViewItem *rootItem = m_projectDir->root();
KURL url;
- QListViewItemIterator iter(this);
+ TQListViewItemIterator iter(this);
for ( ; iter.current(); ++iter )
{
item = dynamic_cast <KFileTreeViewItem*> (iter.current());
@@ -372,7 +372,7 @@ void ProjectTreeView::slotLoadToolbar()
void ProjectTreeView::slotCreateFolder()
{
bool ok;
- QString folderName = KInputDialog::getText(i18n("Create New Folder"), i18n("Folder name:"), "", &ok, this);
+ TQString folderName = KInputDialog::getText(i18n("Create New Folder"), i18n("Folder name:"), "", &ok, this);
if (ok)
{
KURL url = currentURL();
@@ -390,7 +390,7 @@ void ProjectTreeView::slotCreateFolder()
void ProjectTreeView::slotCreateFile()
{
bool ok;
- QString fileName = KInputDialog::getText(i18n("Create New File"), i18n("File name:"), "", &ok, this);
+ TQString fileName = KInputDialog::getText(i18n("Create New File"), i18n("File name:"), "", &ok, this);
if (ok)
{
KURL url = currentURL();
@@ -418,11 +418,11 @@ void ProjectTreeView::slotCreateFile()
void ProjectTreeView::slotRemoveFromProject(int askForRemove)
{
- QListViewItem *item = currentItem();
+ TQListViewItem *item = currentItem();
if (item)
{
KURL url = currentURL();
- QString nice = QExtFileInfo::toRelative(url, m_projectBaseURL).path();
+ TQString nice = QExtFileInfo::toRelative(url, m_projectBaseURL).path();
nice = KStringHandler::lsqueeze(nice, 60);
if ( !askForRemove ||
KMessageBox::warningContinueCancel(this,i18n("<qt>Do you really want to remove <br><b>%1</b><br> from the project?</qt>").arg(nice), i18n("Remove From Project"), KStdGuiItem::remove(), "RemoveFromProject") == KMessageBox::Continue )
@@ -477,7 +477,7 @@ void ProjectTreeView::slotPopulateFinished(KFileTreeViewItem* item)
{
BaseTreeView::slotPopulateFinished(item);
// populate descriptions
- QString desc;
+ TQString desc;
KFileTreeViewItem* file_item;
ProjectList::Iterator it( *m_projectFiles );
for ( ; it.current(); ++it)
@@ -506,7 +506,7 @@ void ProjectTreeView::slotPopulateFinished(KFileTreeViewItem* item)
}
-void ProjectTreeView::itemDescChanged(KFileTreeViewItem* item, const QString& newDesc)
+void ProjectTreeView::itemDescChanged(KFileTreeViewItem* item, const TQString& newDesc)
{
if (item) {
item->setText(1, newDesc);
@@ -622,7 +622,7 @@ bool ProjectTreeView::isDocumentFolder(const KURL &url)
}
-void ProjectTreeView::slotRenameItem(QListViewItem* kftvi, const QString& newText, int col)
+void ProjectTreeView::slotRenameItem(TQListViewItem* kftvi, const TQString& newText, int col)
{
if (!kftvi)
return;
diff --git a/quanta/treeviews/projecttreeview.h b/quanta/treeviews/projecttreeview.h
index 3bd7548d..e0235d30 100644
--- a/quanta/treeviews/projecttreeview.h
+++ b/quanta/treeviews/projecttreeview.h
@@ -31,14 +31,14 @@ class ProjectTreeViewItem : public BaseTreeViewItem {
public:
ProjectTreeViewItem( KFileTreeViewItem *parent, KFileItem* item, KFileTreeBranch *brnch );
/** makes document root italics */
- void paintCell(QPainter *p, const QColorGroup &cg, int column, int width, int align);
+ void paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int align);
};
class ProjectTreeBranch : public BaseTreeBranch {
public:
ProjectTreeBranch(KFileTreeView *parent, const KURL& url,
- const QString& name, const QPixmap& pix,
+ const TQString& name, const TQPixmap& pix,
bool showHidden = false, KFileTreeViewItem *branchRoot = 0L);
/** check for CVS and visible*/
@@ -61,7 +61,7 @@ public:
* the parameters are only used at the first call to create the class
*
*/
- static ProjectTreeView* const ref(QWidget *parent = 0L, const char *name = 0L)
+ static ProjectTreeView* const ref(TQWidget *parent = 0L, const char *name = 0L)
{
static ProjectTreeView *m_ref;
if (!m_ref) m_ref = new ProjectTreeView(parent, name);
@@ -76,14 +76,14 @@ public:
public slots: // Public slots
void slotOpen();
void slotLoadToolbar();
- void slotReloadTree(ProjectList *a_fileList, bool buildNewtree, const QStringList &folderToOpen);
+ void slotReloadTree(ProjectList *a_fileList, bool buildNewtree, const TQStringList &folderToOpen);
/** Sets new project information */
- void slotNewProjectLoaded(const QString &, const KURL &, const KURL &);
+ void slotNewProjectLoaded(const TQString &, const KURL &, const KURL &);
void slotPopulateFinished(KFileTreeViewItem* );
/** makes the url visible in the tree */
void slotViewActivated(const KURL&);
/** fills the list with the url's of the open folder */
- void slotGetTreeStatus(QStringList *folderToOpen)
+ void slotGetTreeStatus(TQStringList *folderToOpen)
{
m_projectDir->addOpenFolder(folderToOpen);
}
@@ -91,8 +91,8 @@ public slots: // Public slots
protected slots:
- void slotMenu(KListView *listView, QListViewItem *item, const QPoint &point);
- void slotRenameItem(QListViewItem* kvtvi, const QString & newText, int col);
+ void slotMenu(KListView *listView, TQListViewItem *item, const TQPoint &point);
+ void slotRenameItem(TQListViewItem* kvtvi, const TQString & newText, int col);
virtual void slotCreateFolder();
virtual void slotCreateFile();
@@ -103,10 +103,10 @@ signals: // Signals
/** No descriptions */
void showProjectOptions();
void insertToProject(const KURL&);
- void uploadSingleURL(const KURL&, const QString&, bool, bool);
+ void uploadSingleURL(const KURL&, const TQString&, bool, bool);
void loadToolbarFile(const KURL&);
void uploadProject();
- void changeFileDescription(const KURL& url, const QString& desc);
+ void changeFileDescription(const KURL& url, const TQString& desc);
void changeUploadStatus(const KURL& url, int status);
void changeDocumentFolderStatus(const KURL& url, bool status);
void reloadProject();
@@ -116,7 +116,7 @@ private:
* If you need the class use ProjectTreeView::ref() for
* construction and reference
*/
- ProjectTreeView(QWidget *parent, const char *name);
+ ProjectTreeView(TQWidget *parent, const char *name);
ProjectTreeBranch *m_projectDir;
KPopupMenu *m_fileMenu;
@@ -147,7 +147,7 @@ protected:
@param item the treeview item
@param newDesc the new description of item
*/
- void itemDescChanged(KFileTreeViewItem* item, const QString& newDesc);
+ void itemDescChanged(KFileTreeViewItem* item, const TQString& newDesc);
/**
adds the Quanta fileinfopage to the properties dialog
overwritten to enable the file description
diff --git a/quanta/treeviews/scripttreeview.cpp b/quanta/treeviews/scripttreeview.cpp
index 191be51c..896ed243 100644
--- a/quanta/treeviews/scripttreeview.cpp
+++ b/quanta/treeviews/scripttreeview.cpp
@@ -28,15 +28,15 @@
#include <kdebug.h>
//qt includes
-#include <qdir.h>
-#include <qdom.h>
-#include <qfile.h>
-#include <qfileinfo.h>
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qregexp.h>
-#include <qstringlist.h>
-#include <qtextedit.h>
+#include <tqdir.h>
+#include <tqdom.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
+#include <tqregexp.h>
+#include <tqstringlist.h>
+#include <tqtextedit.h>
//other includes
#include <libxml/xmlmemory.h>
@@ -59,7 +59,7 @@
extern int xmlLoadExtDtdDefaultValue;
-ScriptTreeView::ScriptTreeView(QWidget *parent, const char *name )
+ScriptTreeView::ScriptTreeView(TQWidget *parent, const char *name )
: BaseTreeView(parent,name)
{
setSaveOpenFolder(true);
@@ -80,28 +80,28 @@ ScriptTreeView::ScriptTreeView(QWidget *parent, const char *name )
addBranch(m_localDir);
// here you define which files should not be visible for the users
- const QString excludeString = ".*\\.info$|.*\\.css$|.*\\.xsl$";
+ const TQString excludeString = ".*\\.info$|.*\\.css$|.*\\.xsl$";
m_globalDir->excludeFilterRx.setPattern(excludeString);
m_localDir->excludeFilterRx.setPattern(excludeString);
m_fileMenu = new KPopupMenu(this);
- m_fileMenu->insertItem(SmallIcon("info"), i18n("&Description"), this, SLOT(slotProperties()));
- m_fileMenu->insertItem(SmallIcon("run"), i18n("&Run Script"), this, SLOT(slotRun()));
+ m_fileMenu->insertItem(SmallIcon("info"), i18n("&Description"), this, TQT_SLOT(slotProperties()));
+ m_fileMenu->insertItem(SmallIcon("run"), i18n("&Run Script"), this, TQT_SLOT(slotRun()));
m_fileMenu->insertSeparator();
- m_fileMenu->insertItem(i18n("&Edit Script"), this, SLOT(slotEditScript()));
- m_fileMenu->insertItem(i18n("Edit in &Quanta"), this, SLOT(slotEditInQuanta()));
- m_fileMenu->insertItem(i18n("Edi&t Description"), this, SLOT(slotEditDescription()));
+ m_fileMenu->insertItem(i18n("&Edit Script"), this, TQT_SLOT(slotEditScript()));
+ m_fileMenu->insertItem(i18n("Edit in &Quanta"), this, TQT_SLOT(slotEditInQuanta()));
+ m_fileMenu->insertItem(i18n("Edi&t Description"), this, TQT_SLOT(slotEditDescription()));
m_fileMenu->insertSeparator();
- m_fileMenu->insertItem(UserIcon("ball"), i18n("&Assign Action"), this, SLOT(slotAssignAction()));
- m_fileMenu->insertItem(SmallIcon("mail_send"), i18n("&Send in Email..."), this, SLOT(slotSendScriptInMail()));
- m_fileMenu->insertItem(SmallIcon("network"), i18n("&Upload Script..."), this, SLOT(slotUploadScript()));
+ m_fileMenu->insertItem(UserIcon("ball"), i18n("&Assign Action"), this, TQT_SLOT(slotAssignAction()));
+ m_fileMenu->insertItem(SmallIcon("mail_send"), i18n("&Send in Email..."), this, TQT_SLOT(slotSendScriptInMail()));
+ m_fileMenu->insertItem(SmallIcon("network"), i18n("&Upload Script..."), this, TQT_SLOT(slotUploadScript()));
m_folderMenu = new KPopupMenu(this);
- m_downloadMenuId = m_folderMenu->insertItem(SmallIcon("network"), i18n("&Download Script..."), this, SIGNAL(downloadScript()));
+ m_downloadMenuId = m_folderMenu->insertItem(SmallIcon("network"), i18n("&Download Script..."), this, TQT_SIGNAL(downloadScript()));
- connect(this, SIGNAL(contextMenu(KListView*, QListViewItem*, const QPoint&)),
- this, SLOT(slotMenu(KListView*, QListViewItem*, const QPoint&)));
+ connect(this, TQT_SIGNAL(contextMenu(KListView*, TQListViewItem*, const TQPoint&)),
+ this, TQT_SLOT(slotMenu(KListView*, TQListViewItem*, const TQPoint&)));
restoreLayout( kapp->config(), className() );
// the restored size of the first column might be too large for the current content
@@ -113,7 +113,7 @@ ScriptTreeView::~ScriptTreeView()
{
}
-void ScriptTreeView::slotMenu(KListView *, QListViewItem *item, const QPoint &point)
+void ScriptTreeView::slotMenu(KListView *, TQListViewItem *item, const TQPoint &point)
{
if (!item)
{
@@ -140,7 +140,7 @@ void ScriptTreeView::slotMenu(KListView *, QListViewItem *item, const QPoint &po
}
}
-void ScriptTreeView::slotSelectFile(QListViewItem *item)
+void ScriptTreeView::slotSelectFile(TQListViewItem *item)
{
if (item) {
if ( !currentKFileTreeViewItem()->isDir() )
@@ -168,7 +168,7 @@ void ScriptTreeView::slotEditScript()
emit showPreviewWidget(false);
KURL urlToOpen = currentURL();
KURL infoUrl = infoFile(urlToOpen);
- QString editApp = infoOptionValue(infoUrl, "editor");
+ TQString editApp = infoOptionValue(infoUrl, "editor");
if (editApp.isEmpty())
emit openFile(urlToOpen);
else
@@ -187,7 +187,7 @@ void ScriptTreeView::slotRun()
{
KURL urlToOpen = currentURL();
KURL infoUrl = infoFile(urlToOpen);
- QString execApp = infoOptionValue(infoUrl, "interpreter");
+ TQString execApp = infoOptionValue(infoUrl, "interpreter");
if (execApp.isEmpty())
{
KURL::List list;
@@ -197,7 +197,7 @@ void ScriptTreeView::slotRun()
else
{
KProcess *proc = new KProcess();
- QStringList argsList = QStringList::split(' ', execApp);
+ TQStringList argsList = TQStringList::split(' ', execApp);
*proc << argsList;
*proc << urlToOpen.path();
proc->start(KProcess::DontCare);
@@ -222,7 +222,7 @@ void ScriptTreeView::slotAssignAction()
{
KURL url = currentURL();
KURL infoURL = infoFile(url);
- QString execApp = infoOptionValue(infoURL, "interpreter");
+ TQString execApp = infoOptionValue(infoURL, "interpreter");
if (execApp.isEmpty())
execApp = "sh";
url.setPath(url.path().replace(locateLocal("data", resourceDir + "scripts/"), "%scriptdir/"));
@@ -231,7 +231,7 @@ void ScriptTreeView::slotAssignAction()
}
}
-QString ScriptTreeView::createScriptTarball()
+TQString ScriptTreeView::createScriptTarball()
{
KURL url = currentURL();
KURL infoURL = infoFile(url);
@@ -239,7 +239,7 @@ QString ScriptTreeView::createScriptTarball()
KTempDir* tempDir = new KTempDir(tmpDir);
tempDir->setAutoDelete(true);
tempDirList.append(tempDir);
- QString tempFileName=tempDir->name() + url.fileName() + ".tgz";
+ TQString tempFileName=tempDir->name() + url.fileName() + ".tgz";
//pack the .tag files and the description.rc into a .tgz file
KTar tar(tempFileName, "application/x-gzip");
@@ -251,9 +251,9 @@ QString ScriptTreeView::createScriptTarball()
files.append(KURL().fromPathOrURL(qConfig.globalDataDir + resourceDir + "scripts/info.xsl"));
for ( KURL::List::Iterator it_f = files.begin(); it_f != files.end(); ++it_f )
{
- QFile file((*it_f).path());
+ TQFile file((*it_f).path());
file.open(IO_ReadOnly);
- QByteArray bArray = file.readAll();
+ TQByteArray bArray = file.readAll();
tar.writeFile((*it_f).fileName(), "user", "group", bArray.size(), bArray.data());
file.close();
}
@@ -267,19 +267,19 @@ void ScriptTreeView::slotSendScriptInMail()
if ( !currentKFileTreeViewItem()->isDir() )
{
- QStringList attachmentFile;
+ TQStringList attachmentFile;
attachmentFile += createScriptTarball();
TagMailDlg *mailDlg = new TagMailDlg( this, i18n("Send script in email"));
- QString toStr;
- QString message = i18n("Hi,\n This is a Quanta Plus [http://quanta.kdewebdev.org] script tarball.\n\nHave fun.\n");
- QString titleStr;
- QString subjectStr;
+ TQString toStr;
+ TQString message = i18n("Hi,\n This is a Quanta Plus [http://quanta.kdewebdev.org] script tarball.\n\nHave fun.\n");
+ TQString titleStr;
+ TQString subjectStr;
mailDlg->TitleLabel->setText(i18n("Content:"));
/* mailDlg->titleEdit->setFixedHeight(60);
- mailDlg->titleEdit->setVScrollBarMode(QTextEdit::Auto);
- mailDlg->titleEdit->setHScrollBarMode(QTextEdit::Auto);*/
+ mailDlg->titleEdit->setVScrollBarMode(TQTextEdit::Auto);
+ mailDlg->titleEdit->setHScrollBarMode(TQTextEdit::Auto);*/
if ( mailDlg->exec() )
{
if ( !mailDlg->lineEmail->text().isEmpty())
@@ -294,7 +294,7 @@ void ScriptTreeView::slotSendScriptInMail()
delete mailDlg;
return;
}
- kapp->invokeMailer(toStr, QString::null, QString::null, subjectStr, message, QString::null, attachmentFile);
+ kapp->invokeMailer(toStr, TQString::null, TQString::null, subjectStr, message, TQString::null, attachmentFile);
}
delete mailDlg;
@@ -305,7 +305,7 @@ void ScriptTreeView::slotUploadScript()
{
if ( !currentKFileTreeViewItem()->isDir() )
{
- QString fileName = createScriptTarball();
+ TQString fileName = createScriptTarball();
emit uploadScript(fileName);
}
}
@@ -313,17 +313,17 @@ void ScriptTreeView::slotUploadScript()
KURL ScriptTreeView::infoFile(const KURL& url, bool htmlVersion)
{
KURL returnUrl = url;
- QString fileName = returnUrl.fileName();
- //fileName.truncate(fileName.length() - QFileInfo(fileName).extension().length() - 1);
+ TQString fileName = returnUrl.fileName();
+ //fileName.truncate(fileName.length() - TQFileInfo(fileName).extension().length() - 1);
fileName.append(".info");
returnUrl.setFileName(fileName);
- if (!QFileInfo(returnUrl.path()).exists())
+ if (!TQFileInfo(returnUrl.path()).exists())
{
- QFile f(returnUrl.path());
+ TQFile f(returnUrl.path());
if (f.open(IO_WriteOnly))
{
- QTextStream str(&f);
- str.setEncoding(QTextStream::UnicodeUTF8);
+ TQTextStream str(&f);
+ str.setEncoding(TQTextStream::UnicodeUTF8);
str << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" << endl;
str << "<?xml-stylesheet type=\"text/xsl\" href=\"info.xsl\" ?>" << endl;
str << "<!DOCTYPE QuantaScriptInfo>" << endl;
@@ -344,13 +344,13 @@ KURL ScriptTreeView::infoFile(const KURL& url, bool htmlVersion)
if (htmlVersion)
{
KTempFile *tempInfoFile = 0L;
- if (!QFileInfo(returnUrl.path()).exists())
+ if (!TQFileInfo(returnUrl.path()).exists())
{
tempInfoFile = new KTempFile(tmpDir);
tempInfoFile->setAutoDelete(true);
returnUrl = KURL::fromPathOrURL(tempInfoFile->name());
- QTextStream str(tempInfoFile->file());
- str.setEncoding(QTextStream::UnicodeUTF8);
+ TQTextStream str(tempInfoFile->file());
+ str.setEncoding(TQTextStream::UnicodeUTF8);
str << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" << endl;
str << "<?xml-stylesheet type=\"text/xsl\" href=\"info.xsl\" ?>" << endl;
str << "<!DOCTYPE QuantaScriptInfo>" << endl;
@@ -374,7 +374,7 @@ KURL ScriptTreeView::infoFile(const KURL& url, bool htmlVersion)
xmlDocPtr doc, res;
xmlSubstituteEntitiesDefault(1);
xmlLoadExtDtdDefaultValue = 1;
- QString xslFile = qConfig.globalDataDir + resourceDir + "scripts/info.xsl";
+ TQString xslFile = qConfig.globalDataDir + resourceDir + "scripts/info.xsl";
cur = xsltParseStylesheetFile(xmlCharStrndup(xslFile.utf8(), xslFile.utf8().length()));
doc = xmlParseFile(returnUrl.path().utf8());
res = xsltApplyStylesheet(cur, doc, 0);
@@ -394,19 +394,19 @@ KURL ScriptTreeView::infoFile(const KURL& url, bool htmlVersion)
return returnUrl;
}
-QString ScriptTreeView::infoOptionValue(const KURL& infoURL, const QString& optionName)
+TQString ScriptTreeView::infoOptionValue(const KURL& infoURL, const TQString& optionName)
{
- QString value;
- QFile f(infoURL.path());
+ TQString value;
+ TQFile f(infoURL.path());
if (f.open(IO_ReadOnly))
{
- QDomDocument doc;
+ TQDomDocument doc;
doc.setContent(&f);
f.close();
- QDomNodeList nodes = doc.elementsByTagName("options");
+ TQDomNodeList nodes = doc.elementsByTagName("options");
if (nodes.count() > 0)
{
- QDomElement el = nodes.item(0).toElement();
+ TQDomElement el = nodes.item(0).toElement();
value = el.attribute(optionName);
}
}
diff --git a/quanta/treeviews/scripttreeview.h b/quanta/treeviews/scripttreeview.h
index 7cf2b145..1bfa934d 100644
--- a/quanta/treeviews/scripttreeview.h
+++ b/quanta/treeviews/scripttreeview.h
@@ -44,7 +44,7 @@ class ScriptTreeView : public BaseTreeView {
public:
- ScriptTreeView(QWidget *parent, const char *name = 0L);
+ ScriptTreeView(TQWidget *parent, const char *name = 0L);
~ScriptTreeView();
protected slots:
@@ -55,12 +55,12 @@ protected slots:
*
* @param listView KListView where the event comes from
*
- * @param item QListViewItem where the mousepointer is hovering
+ * @param item TQListViewItem where the mousepointer is hovering
*
- * @param point QPoint coordinates of the event
+ * @param point TQPoint coordinates of the event
*
*/
- virtual void slotMenu(KListView *listView, QListViewItem *item, const QPoint &point);
+ virtual void slotMenu(KListView *listView, TQListViewItem *item, const TQPoint &point);
/**
* slot of QListView
@@ -69,7 +69,7 @@ protected slots:
*
* @param item the selected QListViewItem
*/
- virtual void slotSelectFile(QListViewItem *item);
+ virtual void slotSelectFile(TQListViewItem *item);
/**
* slot for the RBM
@@ -157,7 +157,7 @@ signals:
/**
* emited from @ref slotAssignAction to open the assignment dialog
*/
- void assignActionToScript(const KURL&, const QString&);
+ void assignActionToScript(const KURL&, const TQString&);
/**
* emited to make the script describtion visible
@@ -172,7 +172,7 @@ signals:
/**
* request to upload the @ref fileName script tarball
*/
- void uploadScript(const QString& fileName);
+ void uploadScript(const TQString& fileName);
private:
/**
@@ -201,12 +201,12 @@ private:
*
* @return the value of the option
*/
- QString infoOptionValue(const KURL& infoURL, const QString& optionName);
+ TQString infoOptionValue(const KURL& infoURL, const TQString& optionName);
/** Create a script tarball which can be uploaded or sent in email. Returns
- * the name of the created file or QString::null if creation has failed.
+ * the name of the created file or TQString::null if creation has failed.
*/
- QString createScriptTarball();
+ TQString createScriptTarball();
/**
* remember the menu for manipulation
diff --git a/quanta/treeviews/servertreeview.cpp b/quanta/treeviews/servertreeview.cpp
index 024e31d5..16d42b45 100644
--- a/quanta/treeviews/servertreeview.cpp
+++ b/quanta/treeviews/servertreeview.cpp
@@ -16,7 +16,7 @@
***************************************************************************/
// Qt includes
-#include <qpainter.h>
+#include <tqpainter.h>
// KDE includes
#include <kdebug.h>
@@ -41,30 +41,30 @@ ServerTreeViewItem::ServerTreeViewItem( KFileTreeViewItem *parent, KFileItem* it
{
}
-void ServerTreeViewItem::paintCell(QPainter *p, const QColorGroup &cg,
+void ServerTreeViewItem::paintCell(TQPainter *p, const TQColorGroup &cg,
int column, int width, int align)
{
- QColorGroup _cg( cg );
+ TQColorGroup _cg( cg );
KURL baseURL = Project::ref()->projectBaseURL();
KURL relURL = baseURL;
relURL.setPath(QExtFileInfo::toRelative(url(), branch()->url()).path());
KURL url = QExtFileInfo::toAbsolute(relURL, baseURL);
if ( !Project::ref()->contains(url) )
{
- QFont f = p->font();
+ TQFont f = p->font();
f.setItalic(true);
p->setFont(f);
int h, s, v;
p->pen().color().getHsv(&h, &s, &v);
v = (v < 155 ? v + 100 : 255);
- _cg.setColor(QColorGroup::Text, QColor(h, s, v, QColor::Hsv));
+ _cg.setColor(TQColorGroup::Text, TQColor(h, s, v, TQColor::Hsv));
};
BaseTreeViewItem::paintCell( p, _cg, column, width, align );
}
//ServerTreeBranch implementation
ServerTreeBranch::ServerTreeBranch(KFileTreeView *parent, const KURL& url,
- const QString& name, const QPixmap& pix,
+ const TQString& name, const TQPixmap& pix,
bool showHidden, KFileTreeViewItem *branchRoot)
: BaseTreeBranch(parent, url, name, pix, showHidden, branchRoot)
{
@@ -87,7 +87,7 @@ KFileTreeViewItem* ServerTreeBranch::createTreeViewItem(KFileTreeViewItem *paren
// ServerTreeView implementation
//
//
-ServerTreeView::ServerTreeView(KConfig *config, QWidget *parent, const KURL &url, const char *name)
+ServerTreeView::ServerTreeView(KConfig *config, TQWidget *parent, const KURL &url, const char *name)
: BaseTreeView(parent, name)
{
setAcceptDrops(true);
@@ -100,37 +100,37 @@ ServerTreeView::ServerTreeView(KConfig *config, QWidget *parent, const KURL &url
m_fileMenu = new KPopupMenu();
- m_fileMenu->insertItem(SmallIcon("fileopen"), i18n("&Open"), this ,SLOT(slotOpen()));
- m_fileMenu->insertItem(i18n("Open &With..."), this, SLOT(slotOpenWith()));
- m_menuClose = m_fileMenu->insertItem(SmallIcon("fileclose"), i18n("Clos&e"), this, SLOT(slotClose()));
+ m_fileMenu->insertItem(SmallIcon("fileopen"), i18n("&Open"), this ,TQT_SLOT(slotOpen()));
+ m_fileMenu->insertItem(i18n("Open &With..."), this, TQT_SLOT(slotOpenWith()));
+ m_menuClose = m_fileMenu->insertItem(SmallIcon("fileclose"), i18n("Clos&e"), this, TQT_SLOT(slotClose()));
m_fileMenu->insertSeparator();
-// m_insertFileInProject = m_fileMenu->insertItem(i18n("&Insert in Project..."), this, SLOT(slotInsertInProject()));
- m_fileMenu->insertItem(SmallIcon("editcopy"), i18n("&Copy"), this, SLOT(slotCopy()));
- m_fileMenu->insertItem(SmallIcon("editdelete"), i18n("&Delete"), this, SLOT(slotDelete()));
- m_fileMenu->insertItem(i18n("Re&name"), this, SLOT(slotStartRename()));
+// m_insertFileInProject = m_fileMenu->insertItem(i18n("&Insert in Project..."), this, TQT_SLOT(slotInsertInProject()));
+ m_fileMenu->insertItem(SmallIcon("editcopy"), i18n("&Copy"), this, TQT_SLOT(slotCopy()));
+ m_fileMenu->insertItem(SmallIcon("editdelete"), i18n("&Delete"), this, TQT_SLOT(slotDelete()));
+ m_fileMenu->insertItem(i18n("Re&name"), this, TQT_SLOT(slotStartRename()));
m_fileMenu->insertSeparator();
- m_fileMenu->insertItem(SmallIcon("info"), i18n("&Properties"), this, SLOT(slotProperties()));
+ m_fileMenu->insertItem(SmallIcon("info"), i18n("&Properties"), this, TQT_SLOT(slotProperties()));
m_folderMenu = new KPopupMenu();
-// m_insertFolderInProject = m_folderMenu->insertItem(i18n("&Insert in Project..."), this, SLOT(slotInsertDirInProject()));
- m_folderMenu->insertItem(SmallIcon("editcopy"), i18n("&Copy"), this, SLOT(slotCopy()));
- m_menuPasteFolder = m_folderMenu->insertItem(SmallIcon("editpaste"), i18n("&Paste"), this, SLOT(slotPaste()));
- m_menuDel = m_folderMenu->insertItem( SmallIcon("editdelete"), i18n("&Delete"), this, SLOT(slotDelete()));
- m_renameId = m_folderMenu->insertItem(i18n("Re&name"), this, SLOT(slotStartRename()));
+// m_insertFolderInProject = m_folderMenu->insertItem(i18n("&Insert in Project..."), this, TQT_SLOT(slotInsertDirInProject()));
+ m_folderMenu->insertItem(SmallIcon("editcopy"), i18n("&Copy"), this, TQT_SLOT(slotCopy()));
+ m_menuPasteFolder = m_folderMenu->insertItem(SmallIcon("editpaste"), i18n("&Paste"), this, TQT_SLOT(slotPaste()));
+ m_menuDel = m_folderMenu->insertItem( SmallIcon("editdelete"), i18n("&Delete"), this, TQT_SLOT(slotDelete()));
+ m_renameId = m_folderMenu->insertItem(i18n("Re&name"), this, TQT_SLOT(slotStartRename()));
m_folderMenu->insertSeparator();
- m_folderMenu->insertItem(SmallIcon("info"), i18n("&Properties"), this, SLOT(slotProperties()));
- m_reloadMenuId = m_folderMenu->insertItem(SmallIcon("revert"), i18n("&Reload"), this, SLOT(slotReload()));
+ m_folderMenu->insertItem(SmallIcon("info"), i18n("&Properties"), this, TQT_SLOT(slotProperties()));
+ m_reloadMenuId = m_folderMenu->insertItem(SmallIcon("revert"), i18n("&Reload"), this, TQT_SLOT(slotReload()));
addColumn(i18n("Upload Tree"), -1);
addColumn("");
- connect(this, SIGNAL(open(QListViewItem *)),
- this, SLOT(slotSelectFile(QListViewItem *)));
- connect(this, SIGNAL(contextMenu(KListView*, QListViewItem*, const QPoint&)),
- this, SLOT(slotMenu(KListView*, QListViewItem*, const QPoint&)));
- connect(Project::ref(), SIGNAL(reloadTree(ProjectList *, bool, const QStringList &)),
- this, SLOT(slotReloadTree(ProjectList *, bool, const QStringList &)));
+ connect(this, TQT_SIGNAL(open(TQListViewItem *)),
+ this, TQT_SLOT(slotSelectFile(TQListViewItem *)));
+ connect(this, TQT_SIGNAL(contextMenu(KListView*, TQListViewItem*, const TQPoint&)),
+ this, TQT_SLOT(slotMenu(KListView*, TQListViewItem*, const TQPoint&)));
+ connect(Project::ref(), TQT_SIGNAL(reloadTree(ProjectList *, bool, const TQStringList &)),
+ this, TQT_SLOT(slotReloadTree(ProjectList *, bool, const TQStringList &)));
restoreLayout(m_config, "UploadTreeView"); // a fixed name only for the tooltip configuration
// the restored size of the first column might be too large for the current content
@@ -156,7 +156,7 @@ KFileTreeBranch* ServerTreeView::newBranch(const KURL& url)
/** RMB pressed, bring up the menu */
-void ServerTreeView::slotMenu(KListView* listView, QListViewItem *item, const QPoint &point)
+void ServerTreeView::slotMenu(KListView* listView, TQListViewItem *item, const TQPoint &point)
{
Q_UNUSED(listView);
if (item)
@@ -179,13 +179,13 @@ void ServerTreeView::slotMenu(KListView* listView, QListViewItem *item, const QP
}
-void ServerTreeView::slotReloadTree( ProjectList *fileList, bool buildNewTree, const QStringList &folderToOpen)
+void ServerTreeView::slotReloadTree( ProjectList *fileList, bool buildNewTree, const TQStringList &folderToOpen)
{
Q_UNUSED(fileList);
Q_UNUSED(buildNewTree);
Q_UNUSED(folderToOpen);
- QListViewItemIterator iter(this);
+ TQListViewItemIterator iter(this);
for ( ; iter.current(); ++iter )
{
iter.current()->repaint();
diff --git a/quanta/treeviews/servertreeview.h b/quanta/treeviews/servertreeview.h
index c49b5a60..d0c9c3db 100644
--- a/quanta/treeviews/servertreeview.h
+++ b/quanta/treeviews/servertreeview.h
@@ -37,7 +37,7 @@ class ServerTreeViewItem : public BaseTreeViewItem {
public:
ServerTreeViewItem( KFileTreeViewItem *parent, KFileItem* item, KFileTreeBranch *brnch );
/** makes document not in project lighter */
- void paintCell(QPainter *p, const QColorGroup &cg, int column, int width, int align);
+ void paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int align);
};
/**
@@ -48,7 +48,7 @@ class ServerTreeBranch : public BaseTreeBranch {
public:
ServerTreeBranch(KFileTreeView *parent, const KURL& url,
- const QString& name, const QPixmap& pix,
+ const TQString& name, const TQPixmap& pix,
bool showHidden = false, KFileTreeViewItem *branchRoot = 0L);
/** check for CVS and visible*/
@@ -61,15 +61,15 @@ class ServerTreeView : public BaseTreeView {
Q_OBJECT
public:
- ServerTreeView(KConfig *config, QWidget *parent, const KURL &url, const char *name = 0L);
+ ServerTreeView(KConfig *config, TQWidget *parent, const KURL &url, const char *name = 0L);
virtual ~ServerTreeView();
protected slots:
- void slotMenu(KListView *listView, QListViewItem *item, const QPoint &point);
+ void slotMenu(KListView *listView, TQListViewItem *item, const TQPoint &point);
/** repaints the treeview items, because they might be added to or removed from the project*/
- void slotReloadTree( ProjectList *fileList, bool buildNewTree, const QStringList &folderToOpen);
+ void slotReloadTree( ProjectList *fileList, bool buildNewTree, const TQStringList &folderToOpen);
protected:
KFileTreeBranch* newBranch(const KURL& url);
diff --git a/quanta/treeviews/structtreetag.cpp b/quanta/treeviews/structtreetag.cpp
index 2742bcea..596143d7 100644
--- a/quanta/treeviews/structtreetag.cpp
+++ b/quanta/treeviews/structtreetag.cpp
@@ -15,7 +15,7 @@
* *
***************************************************************************/
//qt include
-#include <qregexp.h>
+#include <tqregexp.h>
// KDE includes
#include <kiconloader.h>
@@ -31,7 +31,7 @@
#include "document.h"
#include "resource.h"
-StructTreeTag::StructTreeTag(QListView *parent, QString a_title)
+StructTreeTag::StructTreeTag(TQListView *parent, TQString a_title)
: KListViewItem(parent, a_title)
{
node = 0L;
@@ -40,20 +40,20 @@ StructTreeTag::StructTreeTag(QListView *parent, QString a_title)
parentTree = static_cast<StructTreeView*>(parent);
}
-StructTreeTag::StructTreeTag(StructTreeTag *parent, Node *a_node, const QString a_title,
- QListViewItem *after )
+StructTreeTag::StructTreeTag(StructTreeTag *parent, Node *a_node, const TQString a_title,
+ TQListViewItem *after )
: KListViewItem(parent, after, a_title)
{
parentTree = parent->parentTree;
hasOpenFileMenu = false;
groupTag = 0L;
- static const QString space = " ";
- static const QRegExp nbspRx("&nbsp;|\\n");
+ static const TQString space = " ";
+ static const TQRegExp nbspRx("&nbsp;|\\n");
node = a_node;
if (node)
{
Tag *tag = node->tag;
- QString title = tag->name.lower();
+ TQString title = tag->name.lower();
if (a_title.isEmpty())
{
switch (tag->type)
@@ -108,17 +108,17 @@ StructTreeTag::StructTreeTag(StructTreeTag *parent, Node *a_node, const QString
QTag *parentQTag = 0L;
if (node->parent)
parentQTag = QuantaCommon::tagFromDTD(node->parent);
- QString qTagName = node->tag->dtd()->caseSensitive ? node->tag->name : node->tag->name.upper();
+ TQString qTagName = node->tag->dtd()->caseSensitive ? node->tag->name : node->tag->name.upper();
int line, col;
node->tag->beginPos(line, col);
if (parentQTag && !parentQTag->childTags.contains(qTagName) &&
!parentQTag->childTags.isEmpty())
{
node->tag->write()->setErrorMark(line);
- QString parentTagName = node->tag->dtd()->caseSensitive ? node->parent->tag->name : node->parent->tag->name.upper();
+ TQString parentTagName = node->tag->dtd()->caseSensitive ? node->parent->tag->name : node->parent->tag->name.upper();
parentTree->showMessage(i18n("Line %1: %2 is not a possible child of %3.\n").arg(line + 1).arg(qTagName).arg(parentTagName));
}
- QString nextTagName;
+ TQString nextTagName;
if (node->next)
{
nextTagName = node->tag->dtd()->caseSensitive ? node->next->tag->name : node->next->tag->name.upper();
@@ -175,8 +175,8 @@ StructTreeTag::StructTreeTag(StructTreeTag *parent, Node *a_node, const QString
{
int line, col;
node->tag->beginPos(line, col);
- QString qTagName = node->tag->dtd()->caseSensitive ? node->tag->name : node->tag->name.upper();
- QString qPrevTagName;
+ TQString qTagName = node->tag->dtd()->caseSensitive ? node->tag->name : node->tag->name.upper();
+ TQString qPrevTagName;
if (node->prev)
qPrevTagName = node->tag->dtd()->caseSensitive ? node->prev->tag->name : node->prev->tag->name.upper();
if (!node->prev || qTagName != "/" + qPrevTagName)
@@ -201,7 +201,7 @@ StructTreeTag::StructTreeTag(StructTreeTag *parent, Node *a_node, const QString
}
}
-StructTreeTag::StructTreeTag(StructTreeTag *parent, QString a_title )
+StructTreeTag::StructTreeTag(StructTreeTag *parent, TQString a_title )
: KListViewItem(parent, a_title)
{
node = 0L;
diff --git a/quanta/treeviews/structtreetag.h b/quanta/treeviews/structtreetag.h
index 0b365b0c..c49f07e8 100644
--- a/quanta/treeviews/structtreetag.h
+++ b/quanta/treeviews/structtreetag.h
@@ -30,15 +30,15 @@ class StructTreeView;
class StructTreeTag : public KListViewItem {
public:
- StructTreeTag(QListView *parent, const QString a_title = QString::null );
- StructTreeTag(StructTreeTag *parent, Node *a_node, const QString a_title = QString::null, QListViewItem *after = 0L);
- StructTreeTag(StructTreeTag *parent, const QString a_title = QString::null );
+ StructTreeTag(TQListView *parent, const TQString a_title = TQString::null );
+ StructTreeTag(StructTreeTag *parent, Node *a_node, const TQString a_title = TQString::null, TQListViewItem *after = 0L);
+ StructTreeTag(StructTreeTag *parent, const TQString a_title = TQString::null );
~StructTreeTag();
Node *node;
bool hasOpenFileMenu;
Tag* groupTag;
- QRegExp fileNameRx;
+ TQRegExp fileNameRx;
StructTreeView *parentTree;
};
diff --git a/quanta/treeviews/structtreeview.cpp b/quanta/treeviews/structtreeview.cpp
index f6f55b40..1f22e594 100644
--- a/quanta/treeviews/structtreeview.cpp
+++ b/quanta/treeviews/structtreeview.cpp
@@ -19,12 +19,12 @@
#include <assert.h>
// QT headers
-#include <qpixmap.h>
-#include <qheader.h>
-#include <qregexp.h>
-#include <qdatetime.h>
-#include <qdragobject.h>
-#include <qcursor.h>
+#include <tqpixmap.h>
+#include <tqheader.h>
+#include <tqregexp.h>
+#include <tqdatetime.h>
+#include <tqdragobject.h>
+#include <tqcursor.h>
// KDE headers
#include <kapplication.h>
@@ -57,7 +57,7 @@
#include "structtreeview.moc"
extern GroupElementMapList globalGroupMap;
-StructTreeView::StructTreeView(QWidget *parent, const char *name )
+StructTreeView::StructTreeView(TQWidget *parent, const char *name )
: KListView(parent,name), m_marker(0), m_draggedItem(0)/*, m_thisWidget(0)*/
{
for (int i = 0; i < 15; i++)
@@ -83,7 +83,7 @@ StructTreeView::StructTreeView(QWidget *parent, const char *name )
setLineWidth( 2 );
addColumn( i18n("Name"), -1 );
- setFocusPolicy(QWidget::ClickFocus);
+ setFocusPolicy(TQWidget::ClickFocus);
dtdMenu = new KPopupMenu(this);
@@ -95,46 +95,46 @@ StructTreeView::StructTreeView(QWidget *parent, const char *name )
dtdMenu->insertItem(dtdList[i], i, -1);
}
- connect(dtdMenu, SIGNAL(activated(int)), this, SLOT(slotDTDChanged(int)));
+ connect(dtdMenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotDTDChanged(int)));
- connect(this, SIGNAL(dropped(QDropEvent*, QListViewItem*, QListViewItem*)),
- SLOT(slotDropped(QDropEvent*, QListViewItem*, QListViewItem*)));
+ connect(this, TQT_SIGNAL(dropped(TQDropEvent*, TQListViewItem*, TQListViewItem*)),
+ TQT_SLOT(slotDropped(TQDropEvent*, TQListViewItem*, TQListViewItem*)));
emptyAreaMenu = new KPopupMenu(this);
emptyAreaMenu->insertItem(i18n("Show Groups For"), dtdMenu);
- emptyAreaMenu->insertItem(SmallIcon("reload"), i18n("&Reparse"), this, SLOT(slotReparseMenuItem()));
+ emptyAreaMenu->insertItem(SmallIcon("reload"), i18n("&Reparse"), this, TQT_SLOT(slotReparseMenuItem()));
popupMenu = new KPopupMenu(this);
popupMenu -> insertItem( i18n("Show Groups For"), dtdMenu);
popupMenu -> insertSeparator();
- popupMenu -> insertItem( i18n("Select Tag Area"), this ,SLOT(slotSelectTag()));
- popupMenu -> insertItem( i18n("Go to End of Tag"), this ,SLOT(slotGotoClosingTag()));
- openFileMenuId = popupMenu -> insertItem( i18n("Open File"), this ,SLOT(slotOpenFile()));
+ popupMenu -> insertItem( i18n("Select Tag Area"), this ,TQT_SLOT(slotSelectTag()));
+ popupMenu -> insertItem( i18n("Go to End of Tag"), this ,TQT_SLOT(slotGotoClosingTag()));
+ openFileMenuId = popupMenu -> insertItem( i18n("Open File"), this ,TQT_SLOT(slotOpenFile()));
popupMenu -> insertSeparator();
- popupMenu -> insertItem( i18n("Open Subtrees"), this ,SLOT(slotOpenSubTree()));
- popupMenu -> insertItem( i18n("Close Subtrees"),this ,SLOT(slotCloseSubTree()));
+ popupMenu -> insertItem( i18n("Open Subtrees"), this ,TQT_SLOT(slotOpenSubTree()));
+ popupMenu -> insertItem( i18n("Close Subtrees"),this ,TQT_SLOT(slotCloseSubTree()));
popupMenu -> insertSeparator();
#if 0
- popupMenu -> insertItem( i18n("Remove"),this ,SLOT(slotRemoveTags()));
+ popupMenu -> insertItem( i18n("Remove"),this ,TQT_SLOT(slotRemoveTags()));
popupMenu -> insertSeparator();
#endif
- popupMenu -> insertItem( SmallIcon("reload"), i18n("&Reparse"), this ,SLOT(slotReparseMenuItem()));
- followCursorId = popupMenu -> insertItem( i18n("Follow Cursor"), this ,SLOT(changeFollowCursor()));
+ popupMenu -> insertItem( SmallIcon("reload"), i18n("&Reparse"), this ,TQT_SLOT(slotReparseMenuItem()));
+ followCursorId = popupMenu -> insertItem( i18n("Follow Cursor"), this ,TQT_SLOT(changeFollowCursor()));
popupMenu -> setItemChecked ( followCursorId, followCursor() );
- connect( this, SIGNAL(mouseButtonPressed(int, QListViewItem*, const QPoint&, int)),
- this, SLOT (slotMouseClicked(int, QListViewItem*, const QPoint&, int)));
+ connect( this, TQT_SIGNAL(mouseButtonPressed(int, TQListViewItem*, const TQPoint&, int)),
+ this, TQT_SLOT (slotMouseClicked(int, TQListViewItem*, const TQPoint&, int)));
- connect( this, SIGNAL(doubleClicked(QListViewItem *)), SLOT(slotDoubleClicked(QListViewItem *)));
+ connect( this, TQT_SIGNAL(doubleClicked(TQListViewItem *)), TQT_SLOT(slotDoubleClicked(TQListViewItem *)));
- connect(this, SIGNAL(expanded(QListViewItem *)), SLOT(slotExpanded(QListViewItem *)));
- connect(this, SIGNAL(collapsed(QListViewItem *)), SLOT(slotCollapsed(QListViewItem *)));
+ connect(this, TQT_SIGNAL(expanded(TQListViewItem *)), TQT_SLOT(slotExpanded(TQListViewItem *)));
+ connect(this, TQT_SIGNAL(collapsed(TQListViewItem *)), TQT_SLOT(slotCollapsed(TQListViewItem *)));
write = 0L;
- timer = new QTime();
+ timer = new TQTime();
timer->start();
m_dirty = true;
}
@@ -161,9 +161,9 @@ void StructTreeView::buildTree(Node *baseNode, int openLevel, bool groupOnly)
StructTreeTag *item = 0L;
StructTreeTag *parentItem = top; //under this
int level = 0;
- QString title;
- QString tagStr;
- QString tmpStr;
+ TQString title;
+ TQString tagStr;
+ TQString tmpStr;
int groupId = 0;
const DTDStruct* parsingDTD;
for (uint index = 0; index < m_parsingDTDList.count(); index++)
@@ -191,7 +191,7 @@ void StructTreeView::buildTree(Node *baseNode, int openLevel, bool groupOnly)
}
} else
{
- QMap<QString, XMLStructGroup>::ConstIterator it;
+ TQMap<TQString, XMLStructGroup>::ConstIterator it;
for (it = parsingDTD->xmlStructTreeGroups.begin(); it != parsingDTD->xmlStructTreeGroups.end(); ++it)
{
XMLStructGroup group = it.data();
@@ -212,8 +212,8 @@ void StructTreeView::buildTree(Node *baseNode, int openLevel, bool groupOnly)
}
}
groupsCount = groupId;
- QMap<QString, QListViewItem*> lastItemInGroup;
- QMap<QString, QListViewItem*> groupItems;
+ TQMap<TQString, TQListViewItem*> lastItemInGroup;
+ TQMap<TQString, TQListViewItem*> groupItems;
while (currentNode)
{
if (!groupOnly)
@@ -233,14 +233,14 @@ void StructTreeView::buildTree(Node *baseNode, int openLevel, bool groupOnly)
}
const DTDStruct *dtd = currentNode->tag->dtd();
//add all the group elements belonging to this node to the tree
- for (QValueList<GroupElement*>::ConstIterator it = currentNode->m_groupElements.constBegin(); it != currentNode->m_groupElements.constEnd(); ++it)
+ for (TQValueList<GroupElement*>::ConstIterator it = currentNode->m_groupElements.constBegin(); it != currentNode->m_groupElements.constEnd(); ++it)
{
GroupElement *groupElement = (*it);
if (!groupIds.contains(groupElement->group->name + dtd->name))
continue;
StructTreeTag *groupItem = groups[groupIds[groupElement->group->name + dtd->name]];
- QListViewItem* insertAfter = 0L;
- QListViewItem* insertUnder = groupItem;
+ TQListViewItem* insertAfter = 0L;
+ TQListViewItem* insertUnder = groupItem;
if (groupItems.contains(groupElement->group->name + groupElement->tag->name))
insertUnder = groupItems[groupElement->group->name + groupElement->tag->name];
if (lastItemInGroup.contains(groupElement->group->name))
@@ -312,9 +312,9 @@ void StructTreeView::buildTree(Node *baseNode, int openLevel, bool groupOnly)
}
}
//add the externally found items to the tree
- QListViewItem *insertUnder;
- QListViewItem *insertAfter;
- QListViewItem *listItem;
+ TQListViewItem *insertUnder;
+ TQListViewItem *insertAfter;
+ TQListViewItem *listItem;
GroupElementMapList::Iterator it;
IncludedGroupElementsMap::Iterator externalIt;
for (uint index = 0; index < m_parsingDTDList.count(); index++)
@@ -328,7 +328,7 @@ void StructTreeView::buildTree(Node *baseNode, int openLevel, bool groupOnly)
{
group = parsingDTD->structTreeGroups[i];
groupId = groupIds[group.name + parsingDTD->name];
- QString name = group.name+"|";
+ TQString name = group.name+"|";
StructTreeTag *groupTag = groups[groupId];
for (externalIt = parser->includedMap.begin(); externalIt != parser->includedMap.end(); ++externalIt)
{
@@ -419,7 +419,7 @@ void StructTreeView::slotReparse(Document *w, Node* node, int openLevel, bool gr
}
} else
{
- QMap<QString, XMLStructGroup>::ConstIterator it;
+ TQMap<TQString, XMLStructGroup>::ConstIterator it;
uint i = 0;
for (it = parsingDTD->xmlStructTreeGroups.begin(); it != parsingDTD->xmlStructTreeGroups.end(); ++it)
{
@@ -444,7 +444,7 @@ void StructTreeView::slotReparse(Document *w, Node* node, int openLevel, bool gr
m_dirty = false;
}
-void StructTreeView::slotGotoTag( QListViewItem *item )
+void StructTreeView::slotGotoTag( TQListViewItem *item )
{
StructTreeTag *it = dynamic_cast<StructTreeTag*>(item);
if (!m_dirty && it && it->node && it->node->tag)
@@ -477,15 +477,15 @@ void StructTreeView::slotGotoTag( QListViewItem *item )
}
-void StructTreeView::slotMouseClicked(int button, QListViewItem *item, const QPoint& point, int dummy)
+void StructTreeView::slotMouseClicked(int button, TQListViewItem *item, const TQPoint& point, int dummy)
{
if (item)
{
config->setGroup("Parser options");
- QString handleMBM = config->readEntry("MBM", i18n("Select Tag Area"));
- QString handleLBM = config->readEntry("LBM", i18n("Find tag"));
- QString handleDoubleClick = config->readEntry("Double click", i18n("Select Tag Area"));
+ TQString handleMBM = config->readEntry("MBM", i18n("Select Tag Area"));
+ TQString handleLBM = config->readEntry("LBM", i18n("Find tag"));
+ TQString handleDoubleClick = config->readEntry("Double click", i18n("Select Tag Area"));
setSelected(item, true);
@@ -542,7 +542,7 @@ void StructTreeView::slotMouseClicked(int button, QListViewItem *item, const QPo
}
-void StructTreeView::slotDoubleClicked( QListViewItem *item)
+void StructTreeView::slotDoubleClicked( TQListViewItem *item)
{
config->setGroup("Parser options");
@@ -565,7 +565,7 @@ void StructTreeView::slotReparseMenuItem()
void StructTreeView::slotGotoClosingTag()
{
- QListViewItem *item = currentItem();
+ TQListViewItem *item = currentItem();
StructTreeTag *it = dynamic_cast<StructTreeTag*>(item);
if (!m_dirty && it && it->node)
{
@@ -594,7 +594,7 @@ void StructTreeView::slotGotoClosingTag()
void StructTreeView::slotSelectTag()
{
bool newFileOpened = false;
- QListViewItem *item = currentItem();
+ TQListViewItem *item = currentItem();
StructTreeTag *it = dynamic_cast<StructTreeTag*>(item);
if (!m_dirty && it && it->node)
{
@@ -642,7 +642,7 @@ void StructTreeView::slotSelectTag()
/** Do the recursive opening or closing of the trees */
-void StructTreeView::setOpenSubTree( QListViewItem *it, bool open)
+void StructTreeView::setOpenSubTree( TQListViewItem *it, bool open)
{
if (it)
{
@@ -655,7 +655,7 @@ void StructTreeView::setOpenSubTree( QListViewItem *it, bool open)
/** Recursively open the tree and all its subtrees */
void StructTreeView::slotOpenSubTree()
{
- QListViewItem *item = currentItem();
+ TQListViewItem *item = currentItem();
if (item)
{
item->setOpen( true );
@@ -667,7 +667,7 @@ void StructTreeView::slotOpenSubTree()
/** Recursively close the tree and all its subtrees */
void StructTreeView::slotCloseSubTree()
{
- QListViewItem *item = currentItem();
+ TQListViewItem *item = currentItem();
if (item)
{
item->setOpen( false );
@@ -696,7 +696,7 @@ void StructTreeView::setFollowCursor(bool follow)
}
/** No descriptions */
-void StructTreeView::slotExpanded(QListViewItem *item)
+void StructTreeView::slotExpanded(TQListViewItem *item)
{
StructTreeTag *it = dynamic_cast<StructTreeTag*>(item);
if (!m_dirty && it && it->node)
@@ -704,20 +704,20 @@ void StructTreeView::slotExpanded(QListViewItem *item)
}
/** No descriptions */
-void StructTreeView::slotCollapsed(QListViewItem *item)
+void StructTreeView::slotCollapsed(TQListViewItem *item)
{
StructTreeTag *it = dynamic_cast<StructTreeTag*>(item);
if (!m_dirty && it && it->node)
it->node->opened = false;
}
/** Do a reparse before showing. */
-void StructTreeView::showEvent(QShowEvent* /*ev*/)
+void StructTreeView::showEvent(TQShowEvent* /*ev*/)
{
slotReparseMenuItem();
}
/** Do a reparse before showing. */
-void StructTreeView::hideEvent(QHideEvent* /*ev*/)
+void StructTreeView::hideEvent(TQHideEvent* /*ev*/)
{
emit clearProblemOutput();
}
@@ -732,15 +732,15 @@ void StructTreeView::setContiguousSelectedItems()
{
kdDebug(25001) << "setContiguousSelectedItems" << endl;
- QPtrList<QListViewItem> selected_items = selectedItems(false);
+ TQPtrList<TQListViewItem> selected_items = selectedItems(false);
- QListViewItem* first = selected_items.getFirst();
- QListViewItem* last = selected_items.getLast();
+ TQListViewItem* first = selected_items.getFirst();
+ TQListViewItem* last = selected_items.getLast();
- QListViewItemIterator it(first);
+ TQListViewItemIterator it(first);
while(it.current() && it.current() != last)
{
- QListViewItem* item = it.current();
+ TQListViewItem* item = it.current();
if(!item->isSelected())
item->setSelected(true);
@@ -748,13 +748,13 @@ void StructTreeView::setContiguousSelectedItems()
}
}
-bool StructTreeView::acceptDrag(QDropEvent* e) const
+bool StructTreeView::acceptDrag(TQDropEvent* e) const
{
static int i = 0;
kdDebug(25001) << "acceptDrag: " << ++i << endl;
- QPoint p = contentsToViewport(e->pos());
- QListViewItem* current_item = itemAt(p);
+ TQPoint p = contentsToViewport(e->pos());
+ TQListViewItem* current_item = itemAt(p);
// assert(m_thisWidget);
@@ -775,7 +775,7 @@ bool StructTreeView::acceptDrag(QDropEvent* e) const
m_marker = current_item;
if(current_item == m_draggedItem ||
- !(e->provides("text/x-struct_tree_tag_item") || e->source() == (QWidget *)this) || !m_marker)
+ !(e->provides("text/x-struct_tree_tag_item") || e->source() == (TQWidget *)this) || !m_marker)
{
e->accept(false);
last_accept = false;
@@ -818,14 +818,14 @@ bool StructTreeView::acceptDrag(QDropEvent* e) const
return is_child;
}
-void StructTreeView::slotDropped(QDropEvent* e, QListViewItem* parent, QListViewItem* after)
+void StructTreeView::slotDropped(TQDropEvent* e, TQListViewItem* parent, TQListViewItem* after)
{
if(!e)
return;
if (e->source() != this)
return; // Only internal drags are supported atm
- if(!QTextDrag::canDecode(e))
+ if(!TQTextDrag::canDecode(e))
return;
KPopupMenu *menu = new KPopupMenu( this );
@@ -833,7 +833,7 @@ void StructTreeView::slotDropped(QDropEvent* e, QListViewItem* parent, QListView
menu->insertItem( SmallIcon("editcopy"), i18n("&Copy Here"), DRAG_COPY, 1 );
menu->insertSeparator();
menu->insertItem( SmallIcon("cancel"), i18n("C&ancel"), DRAG_CANCEL, 3 );
- int id = menu->exec(QCursor::pos(), 0);
+ int id = menu->exec(TQCursor::pos(), 0);
switch(id) {
case DRAG_COPY:
@@ -856,7 +856,7 @@ void StructTreeView::slotDropped(QDropEvent* e, QListViewItem* parent, QListView
void StructTreeView::startDrag()
{
// This a dummy drag object. Decode is made by the objects selected on the tree.
- QTextDrag* drag = new QTextDrag(this);
+ TQTextDrag* drag = new TQTextDrag(this);
// m_thisWidget = drag->source();
drag->setSubtype("x-struct_tree_tag_item");
drag->setPixmap(SmallIcon("node"));
@@ -864,27 +864,27 @@ void StructTreeView::startDrag()
}
-void StructTreeView::contentsMousePressEvent(QMouseEvent* e)
+void StructTreeView::contentsMousePressEvent(TQMouseEvent* e)
{
if(e->button() == LeftButton)
{
- QPoint p = contentsToViewport(e->pos());
+ TQPoint p = contentsToViewport(e->pos());
m_draggedItem = itemAt(p);
m_marker = m_draggedItem;
}
KListView::contentsMousePressEvent(e);
}
-void StructTreeView::copySelectedItems(QListViewItem* parent, QListViewItem* after)
+void StructTreeView::copySelectedItems(TQListViewItem* parent, TQListViewItem* after)
{
StructTreeTag* parent_item = dynamic_cast<StructTreeTag*> (parent);
StructTreeTag* after_item = dynamic_cast<StructTreeTag*> (after);
if(!parent_item/* || !after_item*/) // can happen if the element is inserted as the first child
return;
- QPtrList<QListViewItem> selected_items = selectedItems(false);
- QListViewItem* first_item = selected_items.getFirst();
- QListViewItem* last_item = selected_items.getLast();
+ TQPtrList<TQListViewItem> selected_items = selectedItems(false);
+ TQListViewItem* first_item = selected_items.getFirst();
+ TQListViewItem* last_item = selected_items.getLast();
Node* start_node = (dynamic_cast<StructTreeTag*> (first_item))->node;
Node* end_node = (dynamic_cast<StructTreeTag*> (last_item))->node;
@@ -913,16 +913,16 @@ void StructTreeView::copySelectedItems(QListViewItem* parent, QListViewItem* aft
write->docUndoRedo->addNewModifsSet(modifs, undoRedo::NodeTreeModif, 0, false);
}
-void StructTreeView::moveSelectedItems(QListViewItem* parent, QListViewItem* after)
+void StructTreeView::moveSelectedItems(TQListViewItem* parent, TQListViewItem* after)
{
StructTreeTag* parent_item = dynamic_cast<StructTreeTag*> (parent);
StructTreeTag* after_item = dynamic_cast<StructTreeTag*> (after);
if(!parent_item || !after_item)
return;
- QPtrList<QListViewItem> selected_items = selectedItems(false);
- QListViewItem* first_item = selected_items.getFirst();
- QListViewItem* last_item = selected_items.getLast();
+ TQPtrList<TQListViewItem> selected_items = selectedItems(false);
+ TQListViewItem* first_item = selected_items.getFirst();
+ TQListViewItem* last_item = selected_items.getLast();
Node* start_node = (dynamic_cast<StructTreeTag*> (first_item))->node;
Node* end_node = (dynamic_cast<StructTreeTag*> (last_item))->node;
@@ -954,24 +954,24 @@ void StructTreeView::moveSelectedItems(QListViewItem* parent, QListViewItem* aft
/** The treeview DTD has changed to id. */
void StructTreeView::slotDTDChanged(int id)
{
- QString text = dtdMenu->text(id);
+ TQString text = dtdMenu->text(id);
if (dtdMenu->indexOf(id) > 0)
{
- QString dtdName = DTDs::ref()->getDTDNameFromNickName(text);
+ TQString dtdName = DTDs::ref()->getDTDNameFromNickName(text);
emit showGroupsForDTEP(dtdName, !dtdMenu->isItemChecked(id));
} else
emit showGroupsForDTEP("clear", true);
}
-void StructTreeView::setParsingDTDs(const QStringList &parsingDTDList)
+void StructTreeView::setParsingDTDs(const TQStringList &parsingDTDList)
{
m_parsingDTDList.clear();
for (uint i = 0; i < dtdList.count(); i++)
{
dtdMenu->setItemChecked(i, false);
}
- QString dtdNickName;
- for (QStringList::ConstIterator it = parsingDTDList.constBegin(); it != parsingDTDList.constEnd(); ++it)
+ TQString dtdNickName;
+ for (TQStringList::ConstIterator it = parsingDTDList.constBegin(); it != parsingDTDList.constEnd(); ++it)
{
dtdNickName = DTDs::ref()->getDTDNickNameFromName(*it);
for (uint i = 0; i < dtdList.count(); i++)
@@ -988,7 +988,7 @@ void StructTreeView::slotOpenFile()
StructTreeTag *item = dynamic_cast<StructTreeTag*>(currentItem());
if (!m_dirty && item->node)
{
- QString text = item->groupTag->name;
+ TQString text = item->groupTag->name;
text.remove(item->fileNameRx);
KURL baseUrl = QExtFileInfo::path(write->url());
KURL url = baseUrl;
@@ -1014,16 +1014,16 @@ void StructTreeView::slotNodeTreeChanged()
m_dirty = true;
}
-void StructTreeView::showMessage(const QString& message)
+void StructTreeView::showMessage(const TQString& message)
{
emit showProblemMessage(message);
}
-void StructTreeView::slotMouseClickedVPL(int /*button*/, QListViewItem* item, const QPoint&, int)
+void StructTreeView::slotMouseClickedVPL(int /*button*/, TQListViewItem* item, const TQPoint&, int)
{
ViewManager::ref()->activeView()->setFocus();
- QPtrList<QListViewItem> selected_items = selectedItems(true);
+ TQPtrList<TQListViewItem> selected_items = selectedItems(true);
if(selected_items.count() == 1)
{
StructTreeTag* tag_item = dynamic_cast<StructTreeTag*> (item);
@@ -1049,7 +1049,7 @@ void StructTreeView::slotMouseClickedVPL(int /*button*/, QListViewItem* item, co
void StructTreeView::slotRemoveTags()
{
- QPtrList<QListViewItem> selected_items = selectedItems(true);
+ TQPtrList<TQListViewItem> selected_items = selectedItems(true);
Node* start_node = (dynamic_cast<StructTreeTag*> (selected_items.getFirst()))->node;
Node* end_node = start_node;
diff --git a/quanta/treeviews/structtreeview.h b/quanta/treeviews/structtreeview.h
index 4f59e7d3..2d87f038 100644
--- a/quanta/treeviews/structtreeview.h
+++ b/quanta/treeviews/structtreeview.h
@@ -18,8 +18,8 @@
#ifndef STRUCTTREEVIEW_H
#define STRUCTTREEVIEW_H
-#include <qmap.h>
-#include <qvaluelist.h>
+#include <tqmap.h>
+#include <tqvaluelist.h>
#include <klistview.h>
@@ -48,7 +48,7 @@ public:
* the parameters are only used at the first call to create the class
*
*/
- static StructTreeView* const ref(QWidget *parent = 0L, const char *name = 0L)
+ static StructTreeView* const ref(TQWidget *parent = 0L, const char *name = 0L)
{
static StructTreeView *m_ref;
if (!m_ref) m_ref = new StructTreeView (parent, name);
@@ -64,8 +64,8 @@ public:
void showTagAtPos(Node *node);
/** Delete the items */
void deleteList(bool groupOnly);
- void setParsingDTDs(const QStringList &parsingDTDList);
- void showMessage(const QString& message);
+ void setParsingDTDs(const TQStringList &parsingDTDList);
+ void showMessage(const TQString& message);
bool useOpenLevelSetting;
@@ -73,13 +73,13 @@ public:
public slots: // Public slots
/** repaint document structure */
void slotReparse(Document *w, Node* node, int openLevel = 3,bool groupOnly=false);
- void slotMouseClicked(int button, QListViewItem*, const QPoint&, int);
- void slotDoubleClicked( QListViewItem * );
+ void slotMouseClicked(int button, TQListViewItem*, const TQPoint&, int);
+ void slotDoubleClicked( TQListViewItem * );
// slots for RBM menu
void slotReparseMenuItem();
void slotSelectTag();
- void slotGotoTag( QListViewItem *item );
+ void slotGotoTag( TQListViewItem *item );
void slotGotoClosingTag();
/** Recursively open the tree and all its subtrees */
void slotOpenSubTree();
@@ -87,9 +87,9 @@ public slots: // Public slots
void slotCloseSubTree();
void changeFollowCursor() { setFollowCursor(!followCursorFlag); }
/** No descriptions */
- void slotCollapsed(QListViewItem *item);
+ void slotCollapsed(TQListViewItem *item);
/** No descriptions */
- void slotExpanded(QListViewItem *);
+ void slotExpanded(TQListViewItem *);
void slotOpenFile();
void slotNodeTreeChanged();
void slotRemoveTags();
@@ -99,11 +99,11 @@ signals:
void selectTagArea(Node* node);
void selectArea(int col1, int row1, int col2, int row2 );
void needReparse();
- void onTag( const QString &tag );
- void showGroupsForDTEP(const QString& dtep, bool show);
+ void onTag( const TQString &tag );
+ void showGroupsForDTEP(const TQString& dtep, bool show);
void openFile(const KURL&);
void openImage(const KURL&);
- void showProblemMessage(const QString&);
+ void showProblemMessage(const TQString&);
void clearProblemOutput();
private:
@@ -112,17 +112,17 @@ private:
* If you need the class use StructTreeView::ref() for
* construction and reference
*/
- StructTreeView(QWidget *parent=0, const char *name=0);
+ StructTreeView(TQWidget *parent=0, const char *name=0);
/** builds the structure tree */
void buildTree(Node *baseNode, int openLevel, bool groupOnly);
/** Do the recursive opening or closing of the trees */
- void setOpenSubTree(QListViewItem *it, bool open);
+ void setOpenSubTree(TQListViewItem *it, bool open);
/** Make ctrl have the same behavior has shift */
void setContiguousSelectedItems();
- void copySelectedItems(QListViewItem* parent, QListViewItem* after);
- void moveSelectedItems(QListViewItem* parent, QListViewItem* after);
+ void copySelectedItems(TQListViewItem* parent, TQListViewItem* after);
+ void moveSelectedItems(TQListViewItem* parent, TQListViewItem* after);
private:
@@ -134,43 +134,43 @@ private:
KPopupMenu *dtdMenu;
StructTreeTag *lastTag;
KConfig *config;
- QStringList dtdList;
- QValueList<const DTDStruct*> m_parsingDTDList;
+ TQStringList dtdList;
+ TQValueList<const DTDStruct*> m_parsingDTDList;
int openFileMenuId;
- QMap<QString, uint> groupIds;
+ TQMap<TQString, uint> groupIds;
bool m_dirty;
StructTreeTag *top;
- QValueList<StructTreeTag*> groups;
+ TQValueList<StructTreeTag*> groups;
uint groupsCount;
bool topOpened;
- QValueList<bool> groupOpened;
+ TQValueList<bool> groupOpened;
- mutable QListViewItem* m_marker; //track that has the drag/drop marker under it
- QListViewItem* m_draggedItem;
-// mutable QWidget* m_thisWidget; // non const this hack for acceptDrag
+ mutable TQListViewItem* m_marker; //track that has the drag/drop marker under it
+ TQListViewItem* m_draggedItem;
+// mutable TQWidget* m_thisWidget; // non const this hack for acceptDrag
protected: // Protected methods
/** Do a reparse before showing. */
- virtual void showEvent(QShowEvent*);
+ virtual void showEvent(TQShowEvent*);
/** Clear the problem output when hiding. */
- virtual void hideEvent(QHideEvent*);
+ virtual void hideEvent(TQHideEvent*);
// drag functions
- virtual bool acceptDrag(QDropEvent* e) const;
+ virtual bool acceptDrag(TQDropEvent* e) const;
virtual void startDrag();
- virtual void contentsMousePressEvent(QMouseEvent* e);
+ virtual void contentsMousePressEvent(TQMouseEvent* e);
protected slots: // Protected slots
/** The treeview DTD has changed to id. */
void slotDTDChanged(int id);
- void slotMouseClickedVPL(int button, QListViewItem*, const QPoint&, int);
- virtual void slotDropped(QDropEvent* e, QListViewItem* parent, QListViewItem* after);
+ void slotMouseClickedVPL(int button, TQListViewItem*, const TQPoint&, int);
+ virtual void slotDropped(TQDropEvent* e, TQListViewItem* parent, TQListViewItem* after);
protected: // Protected attributes
Document *write;
- QTime *timer;
+ TQTime *timer;
};
#endif
diff --git a/quanta/treeviews/tagattributeitems.cpp b/quanta/treeviews/tagattributeitems.cpp
index 4b74217d..176928c0 100644
--- a/quanta/treeviews/tagattributeitems.cpp
+++ b/quanta/treeviews/tagattributeitems.cpp
@@ -13,12 +13,12 @@
***************************************************************************/
//qt includes
-#include <qcombobox.h>
-#include <qheader.h>
-#include <qlineedit.h>
-#include <qlistbox.h>
-#include <qpainter.h>
-#include <qstyle.h>
+#include <tqcombobox.h>
+#include <tqheader.h>
+#include <tqlineedit.h>
+#include <tqlistbox.h>
+#include <tqpainter.h>
+#include <tqstyle.h>
//kde includes
#include <dcopref.h>
@@ -40,12 +40,12 @@
#include "qextfileinfo.h"
#include "styleeditor.h"
-TopLevelItem::TopLevelItem(KListView* parent, const QString &title)
+TopLevelItem::TopLevelItem(KListView* parent, const TQString &title)
: KListViewItem(parent, title)
{
}
-TopLevelItem::TopLevelItem(KListView* parent, QListViewItem* after, const QString &title)
+TopLevelItem::TopLevelItem(KListView* parent, TQListViewItem* after, const TQString &title)
: KListViewItem(parent, after, title)
{
}
@@ -55,7 +55,7 @@ TopLevelItem::~TopLevelItem()
}
-void TopLevelItem::paintCell(QPainter *p, const QColorGroup &cg,
+void TopLevelItem::paintCell(TQPainter *p, const TQColorGroup &cg,
int column, int width, int align)
{
if ( !p )
@@ -64,24 +64,24 @@ void TopLevelItem::paintCell(QPainter *p, const QColorGroup &cg,
// make toplevel item names bold
if (column == 0 && !parent())
{
- QFont f = p->font();
+ TQFont f = p->font();
f.setBold(true);
p->setFont(f);
}
KListViewItem::paintCell( p, cg, column, width, align );
if (column == 0)
{
- p->setPen(QPen(QColor(0,0,0)));
+ p->setPen(TQPen(TQColor(0,0,0)));
p->drawLine( width - 1, 0, width - 1, height());
}
}
-ParentItem::ParentItem(TagAttributeTree *listView, QListViewItem* parent)
+ParentItem::ParentItem(TagAttributeTree *listView, TQListViewItem* parent)
: KListViewItem(parent)
{
m_listView = listView;
- comboBox = new QComboBox(false, m_listView->viewport() );
- QRect r = m_listView->itemRect( this );
+ comboBox = new TQComboBox(false, m_listView->viewport() );
+ TQRect r = m_listView->itemRect( this );
if ( !r.size().isValid() )
{
m_listView->ensureItemVisible( this );
@@ -89,7 +89,7 @@ ParentItem::ParentItem(TagAttributeTree *listView, QListViewItem* parent)
}
r.setX( m_listView->header()->sectionPos( 0 ) + 20);
r.setWidth( m_listView->header()->sectionSize( 0 ) - 20);
- r = QRect( m_listView->viewportToContents( r.topLeft() ), r.size() );
+ r = TQRect( m_listView->viewportToContents( r.topLeft() ), r.size() );
comboBox->resize( r.size() );
m_listView->moveChild( comboBox, r.x(), r.y() );
}
@@ -100,7 +100,7 @@ ParentItem::~ParentItem()
}
-void ParentItem::paintCell(QPainter *p, const QColorGroup &cg,
+void ParentItem::paintCell(TQPainter *p, const TQColorGroup &cg,
int column, int width, int align)
{
if ( !p )
@@ -109,7 +109,7 @@ void ParentItem::paintCell(QPainter *p, const QColorGroup &cg,
KListViewItem::paintCell( p, cg, column, width, align );
if (column == 0)
{
- p->setPen(QPen(QColor(0,0,0)));
+ p->setPen(TQPen(TQColor(0,0,0)));
p->drawLine( width - 1, 0, width - 1, height());
}
}
@@ -133,57 +133,57 @@ void ParentItem::showList(bool show)
if (show)
{
comboBox->show();
- QObject::connect(comboBox, SIGNAL(activated(int)), m_listView, SLOT(slotParentSelected(int)));
+ TQObject::connect(comboBox, TQT_SIGNAL(activated(int)), m_listView, TQT_SLOT(slotParentSelected(int)));
}
else
{
comboBox->hide();
- QObject::disconnect(comboBox, SIGNAL(activated(int)), m_listView, SLOT(slotParentSelected(int)));
+ TQObject::disconnect(comboBox, TQT_SIGNAL(activated(int)), m_listView, TQT_SLOT(slotParentSelected(int)));
}
}
//Generic attribute item
-AttributeItem::AttributeItem(QListViewItem* parent, const QString &title, const QString& title2)
+AttributeItem::AttributeItem(TQListViewItem* parent, const TQString &title, const TQString& title2)
: KListViewItem(parent, title, title2)
{
lin = 0L;
lin2 = 0L;
}
-AttributeItem::AttributeItem(EditableTree* listView, QListViewItem* parent, const QString &title, const QString& title2)
+AttributeItem::AttributeItem(EditableTree* listView, TQListViewItem* parent, const TQString &title, const TQString& title2)
: KListViewItem(parent, title, title2)
{
m_listView = listView;
- lin = new QLineEdit( m_listView->viewport() );
- lin2 = new QLineEdit( m_listView->viewport() );
- QObject::connect( lin, SIGNAL( returnPressed() ), m_listView, SLOT( editorContentChanged() ) );
+ lin = new TQLineEdit( m_listView->viewport() );
+ lin2 = new TQLineEdit( m_listView->viewport() );
+ TQObject::connect( lin, TQT_SIGNAL( returnPressed() ), m_listView, TQT_SLOT( editorContentChanged() ) );
lin->hide();
lin2->hide();
}
-AttributeItem::AttributeItem(EditableTree *listView, const QString& title, const QString& title2)
+AttributeItem::AttributeItem(EditableTree *listView, const TQString& title, const TQString& title2)
: KListViewItem(listView, title, title2)
{
m_listView = listView;
- lin = new QLineEdit( m_listView->viewport() );
- lin2 = new QLineEdit( m_listView->viewport() );
+ lin = new TQLineEdit( m_listView->viewport() );
+ lin2 = new TQLineEdit( m_listView->viewport() );
lin2->setText(title);
lin->setText(title2);
- QObject::connect( lin, SIGNAL( returnPressed() ), m_listView, SLOT( editorContentChanged() ) );
+ TQObject::connect( lin, TQT_SIGNAL( returnPressed() ), m_listView, TQT_SLOT( editorContentChanged() ) );
lin->hide();
lin2->hide();
}
-AttributeItem::AttributeItem(EditableTree *listView, const QString& title, const QString& title2,
- QListViewItem* after)
+AttributeItem::AttributeItem(EditableTree *listView, const TQString& title, const TQString& title2,
+ TQListViewItem* after)
: KListViewItem(listView, after, title, title2)
{
m_listView = listView;
- lin = new QLineEdit( m_listView->viewport() );
- lin2 = new QLineEdit( m_listView->viewport() );
+ lin = new TQLineEdit( m_listView->viewport() );
+ lin2 = new TQLineEdit( m_listView->viewport() );
lin2->setText(title);
lin->setText(title2);
- QObject::connect( lin, SIGNAL( returnPressed() ), m_listView, SLOT( editorContentChanged() ) );
+ TQObject::connect( lin, TQT_SIGNAL( returnPressed() ), m_listView, TQT_SLOT( editorContentChanged() ) );
lin->hide();
lin2->hide();
}
@@ -194,7 +194,7 @@ AttributeItem::~AttributeItem()
delete lin2;
}
-void AttributeItem::paintCell(QPainter *p, const QColorGroup &cg,
+void AttributeItem::paintCell(TQPainter *p, const TQColorGroup &cg,
int column, int width, int align)
{
if ( !p )
@@ -202,12 +202,12 @@ void AttributeItem::paintCell(QPainter *p, const QColorGroup &cg,
KListViewItem::paintCell( p, cg, column, width, align );
if (column == 0)
{
- p->setPen(QPen(QColor(0,0,0)));
+ p->setPen(TQPen(TQColor(0,0,0)));
p->drawLine( width - 1, 0, width - 1, height());
}
}
-QString AttributeItem::editorText(int column)
+TQString AttributeItem::editorText(int column)
{
if(column == 1)
return lin->text();
@@ -260,9 +260,9 @@ void AttributeItem::hideEditor(int column)
}
}
-void AttributeItem::placeEditor( QWidget *w, int column)
+void AttributeItem::placeEditor( TQWidget *w, int column)
{
- QRect r = m_listView->itemRect( this );
+ TQRect r = m_listView->itemRect( this );
if ( !r.size().isValid() )
{
m_listView->ensureItemVisible( this );
@@ -278,21 +278,21 @@ void AttributeItem::placeEditor( QWidget *w, int column)
r.setX( m_listView->header()->sectionPos( 0 ) );
r.setWidth( m_listView->header()->sectionSize( 0 ) - 1 );
}
- r = QRect( m_listView->viewportToContents( r.topLeft() ), r.size() );
+ r = TQRect( m_listView->viewportToContents( r.topLeft() ), r.size() );
w->resize( r.size() );
m_listView->moveChild( w, r.x(), r.y() );
}
//Boolean attribute item
-AttributeBoolItem::AttributeBoolItem(TagAttributeTree* listView, QListViewItem* parent, const QString &title, const QString& title2)
+AttributeBoolItem::AttributeBoolItem(TagAttributeTree* listView, TQListViewItem* parent, const TQString &title, const TQString& title2)
: AttributeItem(parent, title, title2)
{
m_listView = listView;
- combo = new QComboBox( m_listView->viewport() );
+ combo = new TQComboBox( m_listView->viewport() );
combo->insertItem((static_cast<TagAttributeTree *>(m_listView))->node()->tag->dtd()->booleanTrue);
combo->insertItem((static_cast<TagAttributeTree *>(m_listView))->node()->tag->dtd()->booleanFalse);
combo->hide();
- QObject::connect( combo, SIGNAL( activated(int) ), m_listView, SLOT( editorContentChanged() ) );
+ TQObject::connect( combo, TQT_SIGNAL( activated(int) ), m_listView, TQT_SLOT( editorContentChanged() ) );
}
AttributeBoolItem::~AttributeBoolItem()
@@ -300,7 +300,7 @@ AttributeBoolItem::~AttributeBoolItem()
delete combo;
}
-QString AttributeBoolItem::editorText(int)
+TQString AttributeBoolItem::editorText(int)
{
return combo->currentText();
}
@@ -324,14 +324,14 @@ void AttributeBoolItem::hideEditor(int)
}
//Boolean attribute item
-AttributeUrlItem::AttributeUrlItem(TagAttributeTree* listView, QListViewItem* parent, const QString &title, const QString& title2)
+AttributeUrlItem::AttributeUrlItem(TagAttributeTree* listView, TQListViewItem* parent, const TQString &title, const TQString& title2)
: AttributeItem(parent, title, title2)
{
m_listView = listView;
urlRequester = new KURLRequester( m_listView->viewport() );
urlRequester->setMode(KFile::File | KFile::ExistingOnly );
urlRequester->hide();
- QObject::connect( urlRequester, SIGNAL( returnPressed() ), m_listView, SLOT( editorContentChanged() ) );
+ TQObject::connect( urlRequester, TQT_SIGNAL( returnPressed() ), m_listView, TQT_SLOT( editorContentChanged() ) );
}
AttributeUrlItem::~AttributeUrlItem()
@@ -339,14 +339,14 @@ AttributeUrlItem::~AttributeUrlItem()
delete urlRequester;
}
-QString AttributeUrlItem::editorText(int)
+TQString AttributeUrlItem::editorText(int)
{
KURL url, baseURL;
QuantaCommon::setUrl(url, urlRequester->url());
baseURL = (static_cast<TagAttributeTree *>(m_listView))->node()->tag->write()->url();
baseURL.setPath(baseURL.directory());
url = QExtFileInfo::toRelative(url, baseURL);
- QString s = url.url();
+ TQString s = url.url();
if (url.protocol() == (static_cast<TagAttributeTree *>(m_listView))->node()->tag->write()->url().protocol())
s.remove(0, url.protocol().length() + 3);
return s;
@@ -375,11 +375,11 @@ void AttributeUrlItem::hideEditor(int)
//editable listbox
//Boolean attribute item
-AttributeListItem::AttributeListItem(EditableTree* listView, QListViewItem* parent, const QString &title, const QString& title2, Attribute *attr)
+AttributeListItem::AttributeListItem(EditableTree* listView, TQListViewItem* parent, const TQString &title, const TQString& title2, Attribute *attr)
: AttributeItem(parent, title, title2)
{
m_listView = listView;
- combo = new QComboBox( m_listView->viewport() );
+ combo = new TQComboBox( m_listView->viewport() );
Node *node = (static_cast<TagAttributeTree *>(m_listView))->node();
QTag *qTag = QuantaCommon::tagFromDTD(node);
if (qTag)
@@ -391,15 +391,15 @@ AttributeListItem::AttributeListItem(EditableTree* listView, QListViewItem* pare
combo->insertStringList(attr->values);
if (attr->source == "dcop") //fill the list with a result of a DCOP call
{
- QString interface = "QuantaIf";
+ TQString interface = "QuantaIf";
if (!attr->interface.isEmpty())
interface = attr->interface;
- QString arguments = attr->arguments;
+ TQString arguments = attr->arguments;
arguments.replace("%tagname%", node->tag->name);
DCOPReply reply = QuantaCommon::callDCOPMethod(interface, attr->method, arguments);
if (reply.isValid())
{
- QStringList list = reply;
+ TQStringList list = reply;
combo->insertStringList(list);
}
}
@@ -409,7 +409,7 @@ AttributeListItem::AttributeListItem(EditableTree* listView, QListViewItem* pare
combo->setEditable(true);
}
combo->hide();
- QObject::connect( combo, SIGNAL( activated(int) ), m_listView, SLOT( editorContentChanged() ) );
+ TQObject::connect( combo, TQT_SIGNAL( activated(int) ), m_listView, TQT_SLOT( editorContentChanged() ) );
}
AttributeListItem::~AttributeListItem()
@@ -417,7 +417,7 @@ AttributeListItem::~AttributeListItem()
delete combo;
}
-QString AttributeListItem::editorText(int)
+TQString AttributeListItem::editorText(int)
{
return combo->currentText();
}
@@ -455,14 +455,14 @@ void AttributeListItem::hideEditor(int)
}
//editable color combobox
-AttributeColorItem::AttributeColorItem(EditableTree* listView, QListViewItem* parent, const QString &title, const QString& title2)
+AttributeColorItem::AttributeColorItem(EditableTree* listView, TQListViewItem* parent, const TQString &title, const TQString& title2)
: AttributeItem(parent, title, title2)
{
m_listView = listView;
combo = new KColorCombo( m_listView->viewport() );
combo->setEditable(true);
combo->hide();
- QObject::connect( combo, SIGNAL( activated(int) ), m_listView, SLOT( editorContentChanged() ) );
+ TQObject::connect( combo, TQT_SIGNAL( activated(int) ), m_listView, TQT_SLOT( editorContentChanged() ) );
}
AttributeColorItem::~AttributeColorItem()
@@ -470,9 +470,9 @@ AttributeColorItem::~AttributeColorItem()
delete combo;
}
-QString AttributeColorItem::editorText(int)
+TQString AttributeColorItem::editorText(int)
{
- QString name = combo->color().name();
+ TQString name = combo->color().name();
if (name == "#000000")
name = "";
combo->setCurrentText(name);
@@ -491,7 +491,7 @@ void AttributeColorItem::showEditor(int)
void AttributeColorItem::hideEditor(int)
{
m_listView->editorContentChanged();
- QString name = combo->color().name();
+ TQString name = combo->color().name();
if (name == "#000000")
name = "";
setText(1, name);
@@ -499,7 +499,7 @@ void AttributeColorItem::hideEditor(int)
}
//editable style combobox
-AttributeStyleItem::AttributeStyleItem(EditableTree* listView, QListViewItem* parent, const QString &title, const QString& title2)
+AttributeStyleItem::AttributeStyleItem(EditableTree* listView, TQListViewItem* parent, const TQString &title, const TQString& title2)
: AttributeItem(parent, title, title2)
{
m_listView = listView;
@@ -508,7 +508,7 @@ AttributeStyleItem::AttributeStyleItem(EditableTree* listView, QListViewItem* pa
//combo->setEditable(true);
m_se->hide();
- QObject::connect( m_se->button(), SIGNAL( clicked() ), m_listView, SLOT( editorContentChanged() ) );
+ TQObject::connect( m_se->button(), TQT_SIGNAL( clicked() ), m_listView, TQT_SLOT( editorContentChanged() ) );
}
AttributeStyleItem::~AttributeStyleItem()
@@ -516,7 +516,7 @@ AttributeStyleItem::~AttributeStyleItem()
delete m_se;
}
-QString AttributeStyleItem::editorText(int)
+TQString AttributeStyleItem::editorText(int)
{
return m_se->lineEdit()->text();
}
diff --git a/quanta/treeviews/tagattributeitems.h b/quanta/treeviews/tagattributeitems.h
index 8d603529..2ff774d9 100644
--- a/quanta/treeviews/tagattributeitems.h
+++ b/quanta/treeviews/tagattributeitems.h
@@ -15,7 +15,7 @@
#ifndef TAGATTRIBUTEITEM_H
#define TAGATTRIBUTEITEM_H
-#include <qptrlist.h>
+#include <tqptrlist.h>
class KColorCombo;
class KURLRequester;
@@ -35,14 +35,14 @@ class TopLevelItem : public KListViewItem
{
public:
- TopLevelItem(KListView *parent, const QString& title);
- TopLevelItem(KListView *parent, QListViewItem* after, const QString& title);
+ TopLevelItem(KListView *parent, const TQString& title);
+ TopLevelItem(KListView *parent, TQListViewItem* after, const TQString& title);
virtual ~TopLevelItem();
protected:
- void paintCell( QPainter *p, const QColorGroup &cg,
+ void paintCell( TQPainter *p, const TQColorGroup &cg,
int column, int width, int align );
};
@@ -50,7 +50,7 @@ class ParentItem : public KListViewItem
{
public:
- ParentItem(TagAttributeTree *listView, QListViewItem *parent);
+ ParentItem(TagAttributeTree *listView, TQListViewItem *parent);
virtual ~ParentItem();
Node *node(int index);
@@ -59,36 +59,36 @@ public:
protected:
- void paintCell( QPainter *p, const QColorGroup &cg,
+ void paintCell( TQPainter *p, const TQColorGroup &cg,
int column, int width, int align );
private:
- QPtrList<Node> m_nodeList;
- QComboBox *comboBox;
+ TQPtrList<Node> m_nodeList;
+ TQComboBox *comboBox;
TagAttributeTree *m_listView;
};
class AttributeItem : public KListViewItem
{
public:
- AttributeItem(QListViewItem* parent, const QString& title, const QString& title2);
- AttributeItem(EditableTree *listView, QListViewItem* parent, const QString& title, const QString& title2);
- AttributeItem(EditableTree *listView, const QString& title, const QString& title2);
- AttributeItem(EditableTree *listView, const QString& title, const QString& title2, QListViewItem* after);
+ AttributeItem(TQListViewItem* parent, const TQString& title, const TQString& title2);
+ AttributeItem(EditableTree *listView, TQListViewItem* parent, const TQString& title, const TQString& title2);
+ AttributeItem(EditableTree *listView, const TQString& title, const TQString& title2);
+ AttributeItem(EditableTree *listView, const TQString& title, const TQString& title2, TQListViewItem* after);
virtual ~AttributeItem();
virtual void replaceCurrentEditor();
virtual void showEditor(int column = 1);
virtual void hideEditor(int column = 1);
- virtual void placeEditor(QWidget *w, int column = 1);
- virtual QString editorText(int column = 1);
+ virtual void placeEditor(TQWidget *w, int column = 1);
+ virtual TQString editorText(int column = 1);
//I'm not sane... lin is the right editor, lin2 is the left one.
- QLineEdit *lin, *lin2;
+ TQLineEdit *lin, *lin2;
protected:
- void paintCell( QPainter *p, const QColorGroup &cg,
+ void paintCell( TQPainter *p, const TQColorGroup &cg,
int column, int width, int align );
EditableTree *m_listView;
@@ -97,8 +97,8 @@ protected:
class AttributeNameSpaceItem:public AttributeItem
{
public:
- AttributeNameSpaceItem(QListViewItem* parent, const QString& title, const QString& title2): AttributeItem(parent, title, title2){};
- AttributeNameSpaceItem(EditableTree *listView, QListViewItem* parent, const QString& title, const QString& title2):AttributeItem(listView, parent, title, title2){};
+ AttributeNameSpaceItem(TQListViewItem* parent, const TQString& title, const TQString& title2): AttributeItem(parent, title, title2){};
+ AttributeNameSpaceItem(EditableTree *listView, TQListViewItem* parent, const TQString& title, const TQString& title2):AttributeItem(listView, parent, title, title2){};
virtual ~AttributeNameSpaceItem(){};
};
@@ -106,26 +106,26 @@ public:
class AttributeBoolItem : public AttributeItem
{
public:
- AttributeBoolItem(TagAttributeTree *listView, QListViewItem* parent, const QString& title, const QString& title2);
+ AttributeBoolItem(TagAttributeTree *listView, TQListViewItem* parent, const TQString& title, const TQString& title2);
virtual ~AttributeBoolItem();
virtual void showEditor(int column = 1);
virtual void hideEditor(int column = 1);
- virtual QString editorText(int column = 1);
+ virtual TQString editorText(int column = 1);
private:
- QComboBox* combo;
+ TQComboBox* combo;
};
class AttributeUrlItem : public AttributeItem
{
public:
- AttributeUrlItem(TagAttributeTree *listView, QListViewItem* parent, const QString& title, const QString& title2);
+ AttributeUrlItem(TagAttributeTree *listView, TQListViewItem* parent, const TQString& title, const TQString& title2);
virtual ~AttributeUrlItem();
virtual void showEditor(int column = 1);
virtual void hideEditor(int column = 1);
- virtual QString editorText(int column = 1);
+ virtual TQString editorText(int column = 1);
private:
KURLRequester* urlRequester;
@@ -134,26 +134,26 @@ private:
class AttributeListItem : public AttributeItem
{
public:
- AttributeListItem(EditableTree *listView, QListViewItem* parent, const QString& title, const QString& title2, Attribute *attr = 0L);
+ AttributeListItem(EditableTree *listView, TQListViewItem* parent, const TQString& title, const TQString& title2, Attribute *attr = 0L);
virtual ~AttributeListItem();
virtual void showEditor(int column = 1);
virtual void hideEditor(int column = 1);
- virtual QString editorText(int column = 1);
+ virtual TQString editorText(int column = 1);
private:
- QComboBox* combo;
+ TQComboBox* combo;
};
class AttributeColorItem : public AttributeItem
{
public:
- AttributeColorItem(EditableTree *listView, QListViewItem* parent, const QString& title, const QString& title2);
+ AttributeColorItem(EditableTree *listView, TQListViewItem* parent, const TQString& title, const TQString& title2);
virtual ~AttributeColorItem();
virtual void showEditor(int column = 1);
virtual void hideEditor(int column = 1);
- virtual QString editorText(int column = 1);
+ virtual TQString editorText(int column = 1);
private:
KColorCombo* combo;
@@ -162,12 +162,12 @@ private:
class AttributeStyleItem : public AttributeItem
{
public:
- AttributeStyleItem(EditableTree *listView, QListViewItem* parent, const QString& title, const QString& title2);
+ AttributeStyleItem(EditableTree *listView, TQListViewItem* parent, const TQString& title, const TQString& title2);
virtual ~AttributeStyleItem();
virtual void showEditor(int column = 1);
virtual void hideEditor(int column = 1);
- virtual QString editorText(int column = 1);
+ virtual TQString editorText(int column = 1);
private:
diff --git a/quanta/treeviews/tagattributetree.cpp b/quanta/treeviews/tagattributetree.cpp
index a8e4406b..565c5a4c 100644
--- a/quanta/treeviews/tagattributetree.cpp
+++ b/quanta/treeviews/tagattributetree.cpp
@@ -13,13 +13,13 @@
***************************************************************************/
//qt includes
-#include <qfont.h>
-#include <qpainter.h>
-#include <qtimer.h>
-#include <qlineedit.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qtooltip.h>
+#include <tqfont.h>
+#include <tqpainter.h>
+#include <tqtimer.h>
+#include <tqlineedit.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqtooltip.h>
//kde includes
#include <kaction.h>
@@ -50,7 +50,7 @@
#include "viewmanager.h"
-EditableTree::EditableTree(QWidget *parent, const char *name)
+EditableTree::EditableTree(TQWidget *parent, const char *name)
: KListView(parent, name)
{
m_editable = true;
@@ -61,11 +61,11 @@ EditableTree::~EditableTree()
}
-void EditableTree::setCurrentItem( QListViewItem *item)
+void EditableTree::setCurrentItem( TQListViewItem *item)
{
if ( item && m_editable)
{
- QListViewItem *it = currentItem();
+ TQListViewItem *it = currentItem();
if ( dynamic_cast<AttributeItem*>(it) )
static_cast<AttributeItem*>(it)->hideEditor();
@@ -81,9 +81,9 @@ void EditableTree::editorContentChanged()
}
-void EditableTree::focusInEvent(QFocusEvent *)
+void EditableTree::focusInEvent(TQFocusEvent *)
{
- /**QListViewItem *it = currentItem();
+ /**TQListViewItem *it = currentItem();
if( dynamic_cast<AttributeItem*>(it))
{
static_cast<AttributeItem *>(it)->showEditor();
@@ -91,23 +91,23 @@ void EditableTree::focusInEvent(QFocusEvent *)
}*/
}
-void EditableTree::focusOutEvent(QFocusEvent *)
+void EditableTree::focusOutEvent(TQFocusEvent *)
{
- /**QListViewItem *it = currentItem();
+ /**TQListViewItem *it = currentItem();
if( dynamic_cast<AttributeItem*>(it))
{
static_cast<AttributeItem *>(it)->hideEditor();
}*/
}
-DualEditableTree::DualEditableTree(QWidget *parent, const char *name)
+DualEditableTree::DualEditableTree(TQWidget *parent, const char *name)
: EditableTree(parent, name)
{
curCol = 0;
- setFocusPolicy(QWidget::ClickFocus);
+ setFocusPolicy(TQWidget::ClickFocus);
this->installEventFilter(this);
- connect(this, SIGNAL(clicked(QListViewItem *, const QPoint &, int )),
- this, SLOT(itemClicked(QListViewItem *, const QPoint &, int )));
+ connect(this, TQT_SIGNAL(clicked(TQListViewItem *, const TQPoint &, int )),
+ this, TQT_SLOT(itemClicked(TQListViewItem *, const TQPoint &, int )));
}
DualEditableTree::~DualEditableTree()
@@ -115,7 +115,7 @@ DualEditableTree::~DualEditableTree()
}
-bool DualEditableTree::eventFilter(QObject *object, QEvent *event)
+bool DualEditableTree::eventFilter(TQObject *object, TQEvent *event)
{
AttributeItem *it = dynamic_cast<AttributeItem*>(currentItem());
AttributeItem *up = 0L, *down = 0L;
@@ -126,9 +126,9 @@ bool DualEditableTree::eventFilter(QObject *object, QEvent *event)
if(currentItem()->itemBelow())
down = dynamic_cast<AttributeItem *>(currentItem()->itemBelow());
- if(event->type() == QEvent::KeyPress && m_editable)
+ if(event->type() == TQEvent::KeyPress && m_editable)
{
- QKeyEvent *keyevent = static_cast<QKeyEvent *>(event);
+ TQKeyEvent *keyevent = static_cast<TQKeyEvent *>(event);
switch(keyevent->key())
{
case Key_Left:
@@ -171,7 +171,7 @@ bool DualEditableTree::eventFilter(QObject *object, QEvent *event)
return KListView::eventFilter(object, event);;
}
-void DualEditableTree::resizeEvent(QResizeEvent *ev)
+void DualEditableTree::resizeEvent(TQResizeEvent *ev)
{
KListView::resizeEvent(ev);
if(!currentItem()) return;
@@ -183,11 +183,11 @@ void DualEditableTree::resizeEvent(QResizeEvent *ev)
}
}
-void DualEditableTree::setCurrentItem(QListViewItem *item)
+void DualEditableTree::setCurrentItem(TQListViewItem *item)
{
if ( item && m_editable)
{
- QListViewItem *it = currentItem();
+ TQListViewItem *it = currentItem();
if ( dynamic_cast<AttributeItem*>(it) )
{
static_cast<AttributeItem*>(it)->hideEditor(0);
@@ -206,7 +206,7 @@ void DualEditableTree::editorContentChanged()
emit itemModified(dynamic_cast<AttributeItem*>(currentItem()));
}
-void DualEditableTree::itemClicked(QListViewItem *item, const QPoint &, int column)
+void DualEditableTree::itemClicked(TQListViewItem *item, const TQPoint &, int column)
{
if(item)
{
@@ -216,17 +216,17 @@ void DualEditableTree::itemClicked(QListViewItem *item, const QPoint &, int colu
}
}
-TagAttributeTree::TagAttributeTree(QWidget *parent, const char *name)
+TagAttributeTree::TagAttributeTree(TQWidget *parent, const char *name)
: EditableTree(parent, name)
{
setRootIsDecorated( true );
setSorting(-1);
setFrameStyle( Panel | Sunken );
setLineWidth( 2 );
- setFocusPolicy(QWidget::ClickFocus);
+ setFocusPolicy(TQWidget::ClickFocus);
addColumn(i18n("Attribute Name"));
addColumn(i18n("Value"));
- setResizeMode(QListView::LastColumn);
+ setResizeMode(TQListView::LastColumn);
m_node = 0L;
m_newNode = 0L;
m_parentItem = 0L;
@@ -258,7 +258,7 @@ void TagAttributeTree::setCurrentNode(Node *node)
#endif
AttributeItem *item = 0L;
TopLevelItem *group = 0L;
- QString attrName;
+ TQString attrName;
QTag *qTag = QuantaCommon::tagFromDTD(node);
Node *n = node->parent;
while (n)
@@ -283,7 +283,7 @@ void TagAttributeTree::setCurrentNode(Node *node)
if(node->tag->type == Tag::XmlTag || node->tag->type == Tag::XmlTagEnd)
{
- QString nameSpace = node->tag->nameSpace;
+ TQString nameSpace = node->tag->nameSpace;
if (node->tag->type == Tag::XmlTagEnd)
nameSpace.remove('/');
group = new TopLevelItem(this, group, i18n("Namespace"));
@@ -293,13 +293,13 @@ void TagAttributeTree::setCurrentNode(Node *node)
if (qTag)
{
group = new TopLevelItem(this, group, i18n("Attributes"));
- QStringList list;
+ TQStringList list;
for (int i = 0; i < qTag->attributeCount(); i++)
{
list += qTag->attributeAt(i)->name;
}
list.sort();
- QStringList::Iterator it = list.end();
+ TQStringList::Iterator it = list.end();
--it;
while (it != list.end())
{
@@ -367,8 +367,8 @@ void TagAttributeTree::setCurrentNode(Node *node)
}
}
- connect(this, SIGNAL(collapsed(QListViewItem*)), SLOT(slotCollapsed(QListViewItem*)));
- connect(this, SIGNAL(expanded(QListViewItem*)), SLOT(slotExpanded(QListViewItem*)));
+ connect(this, TQT_SIGNAL(collapsed(TQListViewItem*)), TQT_SLOT(slotCollapsed(TQListViewItem*)));
+ connect(this, TQT_SIGNAL(expanded(TQListViewItem*)), TQT_SLOT(slotExpanded(TQListViewItem*)));
}
void TagAttributeTree::editorContentChanged()
@@ -379,7 +379,7 @@ void TagAttributeTree::editorContentChanged()
rebuildEnabled = false;
if (dynamic_cast<AttributeNameSpaceItem*>(item))
{
- QString nameSpace = item->editorText();
+ TQString nameSpace = item->editorText();
m_node->tag->write()->changeTagNamespace(m_node->tag, nameSpace);
} else
{
@@ -403,11 +403,11 @@ void TagAttributeTree::editorContentChanged()
}
}
-/**void TagAttributeTree::setCurrentItem( QListViewItem *item )
+/**void TagAttributeTree::setCurrentItem( TQListViewItem *item )
{
if ( item )
{
- QListViewItem *it = currentItem();
+ TQListViewItem *it = currentItem();
if ( dynamic_cast<AttributeItem*>(it) )
static_cast<AttributeItem*>(it)->hideEditor();
@@ -423,17 +423,17 @@ void TagAttributeTree::slotParentSelected(int index)
if (m_parentItem)
{
m_newNode = m_parentItem->node(index);
- QTimer::singleShot(0, this, SLOT(slotDelayedSetCurrentNode()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotDelayedSetCurrentNode()));
}
}
-void TagAttributeTree::slotCollapsed(QListViewItem *item)
+void TagAttributeTree::slotCollapsed(TQListViewItem *item)
{
if (m_parentItem && item == m_parentItem->parent())
m_parentItem->showList(false);
}
-void TagAttributeTree::slotExpanded(QListViewItem *item)
+void TagAttributeTree::slotExpanded(TQListViewItem *item)
{
if (m_parentItem && item == m_parentItem->parent())
m_parentItem->showList(true);
@@ -451,39 +451,39 @@ void TagAttributeTree::slotDelayedSetCurrentNode()
}
}
-EnhancedTagAttributeTree::EnhancedTagAttributeTree(QWidget *parent, const char *name)
-: QWidget(parent, name)
+EnhancedTagAttributeTree::EnhancedTagAttributeTree(TQWidget *parent, const char *name)
+: TQWidget(parent, name)
{
- widgetLayout = new QGridLayout( this, 1, 1, 11, 6, "MainLayout");
+ widgetLayout = new TQGridLayout( this, 1, 1, 11, 6, "MainLayout");
attrTree = new TagAttributeTree(this, "TagAttributeTree");
- attrTree->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::MinimumExpanding);
+ attrTree->setSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::MinimumExpanding);
widgetLayout->addMultiCellWidget( attrTree, 1, 1, 0, 3 );
- nodeName = new QLabel(this, i18n( "Node Name" ));
- nodeName->setSizePolicy( QSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::Fixed, 0, 0, nodeName->sizePolicy().hasHeightForWidth() ) );
+ nodeName = new TQLabel(this, i18n( "Node Name" ));
+ nodeName->setSizePolicy( TQSizePolicy( TQSizePolicy::MinimumExpanding, TQSizePolicy::Fixed, 0, 0, nodeName->sizePolicy().hasHeightForWidth() ) );
widgetLayout->addWidget( nodeName, 0, 0 );
deleteTag = new KPushButton(this, i18n( "Delete Tag" ));
deleteTag->setPixmap(SmallIcon("editdelete"));
deleteTag->setMaximumHeight(32);
deleteTag->setMaximumWidth(32);
- QToolTip::add(deleteTag, i18n("Delete the current tag only."));
+ TQToolTip::add(deleteTag, i18n("Delete the current tag only."));
deleteAll = new KPushButton(this, i18n( "Delete All" ));
deleteAll->setPixmap(SmallIcon("editdelete"));
deleteAll->setMaximumHeight(32);
deleteAll->setMaximumWidth(32);
- QToolTip::add(deleteAll, i18n("Delete the current tag and all its children."));
+ TQToolTip::add(deleteAll, i18n("Delete the current tag and all its children."));
widgetLayout->addWidget( deleteTag, 0, 2 );
widgetLayout->addWidget( deleteAll, 0, 3 );
clearWState( WState_Polished );
- connect(attrTree, SIGNAL(newNodeSelected(Node *)), this, SLOT(NodeSelected(Node *)));
- connect(deleteTag, SIGNAL(clicked()), this, SLOT(deleteNode()));
- connect(deleteAll, SIGNAL(clicked()), this, SLOT(deleteSubTree()));
+ connect(attrTree, TQT_SIGNAL(newNodeSelected(Node *)), this, TQT_SLOT(NodeSelected(Node *)));
+ connect(deleteTag, TQT_SIGNAL(clicked()), this, TQT_SLOT(deleteNode()));
+ connect(deleteAll, TQT_SIGNAL(clicked()), this, TQT_SLOT(deleteSubTree()));
}
EnhancedTagAttributeTree::~EnhancedTagAttributeTree()
@@ -515,7 +515,7 @@ void EnhancedTagAttributeTree::showCaption()
if(curNode->tag->type == Tag::XmlTag || curNode->tag->type == Tag::XmlTagEnd ||
curNode->tag->type == Tag::ScriptTag)
{
- QString s = i18n("Current tag: <b>%1</b>").arg(curNode->tag->name);
+ TQString s = i18n("Current tag: <b>%1</b>").arg(curNode->tag->name);
nodeName->setText(KStringHandler::rPixelSqueeze(s, nodeName->fontMetrics(), attrTree->width()- 50));
}
else if(curNode->tag->type == Tag::Text)
@@ -537,7 +537,7 @@ void EnhancedTagAttributeTree::deleteSubTree()
int curLine, curCol;
long offset;
DOM::Node domNode;
- QValueList<int> loc;
+ TQValueList<int> loc;
//Save the cursor position in kafka/quanta
if(view->hadLastFocus() == QuantaView::SourceFocus)
@@ -590,7 +590,7 @@ void EnhancedTagAttributeTree::deleteNode()
int curLine, curCol;
long offset;
DOM::Node domNode;
- QValueList<int> loc;
+ TQValueList<int> loc;
NodeModifsSet *modifs;
//Save the cursor position in kafka/quanta
diff --git a/quanta/treeviews/tagattributetree.h b/quanta/treeviews/tagattributetree.h
index bae0f3ff..c07db51b 100644
--- a/quanta/treeviews/tagattributetree.h
+++ b/quanta/treeviews/tagattributetree.h
@@ -16,7 +16,7 @@
#define TAGATTRIBUTETREE_H
//qt includes
-#include <qwidget.h>
+#include <tqwidget.h>
//kde includes
#include <klistview.h>
@@ -35,17 +35,17 @@ class EditableTree : public KListView {
Q_OBJECT
public:
- EditableTree(QWidget *parent = 0, const char *name = 0);
+ EditableTree(TQWidget *parent = 0, const char *name = 0);
virtual ~EditableTree();
- virtual void setCurrentItem( QListViewItem *i);
+ virtual void setCurrentItem( TQListViewItem *i);
void setEditable(bool b) {m_editable = b;}
bool isEditable() {return m_editable;}
public slots:
virtual void editorContentChanged();
- virtual void focusInEvent(QFocusEvent *);
- virtual void focusOutEvent(QFocusEvent *);
+ virtual void focusInEvent(TQFocusEvent *);
+ virtual void focusOutEvent(TQFocusEvent *);
protected:
bool m_editable;
@@ -56,24 +56,24 @@ class DualEditableTree : public EditableTree
{
Q_OBJECT
public:
- DualEditableTree(QWidget *parent = 0, const char *name = 0);
+ DualEditableTree(TQWidget *parent = 0, const char *name = 0);
virtual ~DualEditableTree();
- virtual void setCurrentItem ( QListViewItem *i);
+ virtual void setCurrentItem ( TQListViewItem *i);
int currentColumn() {return curCol;}
protected:
- virtual bool eventFilter(QObject *object, QEvent *event);
- virtual void resizeEvent(QResizeEvent *);
+ virtual bool eventFilter(TQObject *object, TQEvent *event);
+ virtual void resizeEvent(TQResizeEvent *);
signals:
- void itemModified( QListViewItem *);
+ void itemModified( TQListViewItem *);
public slots:
virtual void editorContentChanged();
private slots:
- void itemClicked(QListViewItem *i, const QPoint &point, int col);
+ void itemClicked(TQListViewItem *i, const TQPoint &point, int col);
private:
int curCol;
@@ -83,11 +83,11 @@ class TagAttributeTree : public EditableTree {
Q_OBJECT
public:
- TagAttributeTree(QWidget *parent=0, const char *name=0);
+ TagAttributeTree(TQWidget *parent=0, const char *name=0);
virtual ~TagAttributeTree();
void setCurrentNode(Node *node);
- //virtual void setCurrentItem( QListViewItem *i );
+ //virtual void setCurrentItem( TQListViewItem *i );
Node *node() const {return m_node;}
public slots:
@@ -96,8 +96,8 @@ public slots:
virtual void editorContentChanged();
private slots:
- void slotCollapsed(QListViewItem *item);
- void slotExpanded(QListViewItem *item);
+ void slotCollapsed(TQListViewItem *item);
+ void slotExpanded(TQListViewItem *item);
signals:
void newNodeSelected(Node *node);
@@ -114,7 +114,7 @@ class EnhancedTagAttributeTree : public QWidget
{
Q_OBJECT
public:
- EnhancedTagAttributeTree(QWidget *parent = 0, const char *name = 0);
+ EnhancedTagAttributeTree(TQWidget *parent = 0, const char *name = 0);
virtual ~EnhancedTagAttributeTree();
void setCurrentNode(Node *node);
@@ -131,11 +131,11 @@ private slots:
private:
void showCaption();
- QLabel *nodeName;
+ TQLabel *nodeName;
KPushButton* deleteAll;
KPushButton* deleteTag;
TagAttributeTree *attrTree;
- QGridLayout *widgetLayout;
+ TQGridLayout *widgetLayout;
Node *curNode;
};
diff --git a/quanta/treeviews/templatestreeview.cpp b/quanta/treeviews/templatestreeview.cpp
index e87e2428..0b9973e8 100644
--- a/quanta/treeviews/templatestreeview.cpp
+++ b/quanta/treeviews/templatestreeview.cpp
@@ -19,19 +19,19 @@
#include <sys/types.h>
// QT includes
-#include <qbuttongroup.h>
-#include <qcheckbox.h>
-#include <qclipboard.h>
-#include <qdir.h>
-#include <qpixmap.h>
-#include <qheader.h>
-#include <qpoint.h>
-#include <qlayout.h>
-#include <qtextedit.h>
-#include <qregexp.h>
-#include <qlabel.h>
-#include <qmap.h>
-#include <qwidgetstack.h>
+#include <tqbuttongroup.h>
+#include <tqcheckbox.h>
+#include <tqclipboard.h>
+#include <tqdir.h>
+#include <tqpixmap.h>
+#include <tqheader.h>
+#include <tqpoint.h>
+#include <tqlayout.h>
+#include <tqtextedit.h>
+#include <tqregexp.h>
+#include <tqlabel.h>
+#include <tqmap.h>
+#include <tqwidgetstack.h>
// KDE includes
#include <kapplication.h>
@@ -70,17 +70,17 @@
#define NONE "None"
-const QString textMenu = I18N_NOOP("Insert as &Text");
-const QString binaryMenu = I18N_NOOP("Insert &Link to File");
-const QString docMenu = I18N_NOOP("&New Document Based on This");
-const QString siteMenu = I18N_NOOP("&Extract Site Template To...");
-QMap<QString, QString> typeToi18n;
-QMap<QString, QString> i18nToType;
+const TQString textMenu = I18N_NOOP("Insert as &Text");
+const TQString binaryMenu = I18N_NOOP("Insert &Link to File");
+const TQString docMenu = I18N_NOOP("&New Document Based on This");
+const TQString siteMenu = I18N_NOOP("&Extract Site Template To...");
+TQMap<TQString, TQString> typeToi18n;
+TQMap<TQString, TQString> i18nToType;
//TemplatesTreeBranch implementation
TemplatesTreeBranch::TemplatesTreeBranch(KFileTreeView *parent, const KURL& url,
- const QString& name, const QPixmap& pix,
+ const TQString& name, const TQPixmap& pix,
bool showHidden,
KFileTreeViewItem *branchRoot)
: BaseTreeBranch(parent, url, name, pix, showHidden, branchRoot)
@@ -99,7 +99,7 @@ KFileTreeViewItem* TemplatesTreeBranch::createTreeViewItem(KFileTreeViewItem *pa
{
if (url.isLocalFile())
{
- QDir dir (url.path(), "", QDir::All);
+ TQDir dir (url.path(), "", TQDir::All);
tvi->setExpandable(dir.count() != 2); // . and .. are always there
} else {
tvi->setExpandable(true); // we assume there is something
@@ -108,15 +108,15 @@ KFileTreeViewItem* TemplatesTreeBranch::createTreeViewItem(KFileTreeViewItem *pa
{
url = static_cast<BaseTreeViewItem*>(parent)->url();
}
- QFileInfo dotFileInfo(url.path() + "/.dirinfo");
+ TQFileInfo dotFileInfo(url.path() + "/.dirinfo");
while ((!dotFileInfo.exists()) && (dotFileInfo.dirPath() != "/"))
{
- dotFileInfo.setFile(QFileInfo(dotFileInfo.dirPath()).dirPath()+"/.dirinfo");
+ dotFileInfo.setFile(TQFileInfo(dotFileInfo.dirPath()).dirPath()+"/.dirinfo");
}
if (dotFileInfo.exists())
{
KConfig *config = new KConfig(dotFileInfo.filePath());
- QString s = config->readEntry("Type");
+ TQString s = config->readEntry("Type");
tvi->setText(1, typeToi18n[s]);
delete config;
}
@@ -143,35 +143,35 @@ TemplatesTreeView::TemplatesTreeView(KMainWindow *parent, const char *name )
m_fileMenu = new KPopupMenu(this);
- m_openId = m_fileMenu->insertItem(i18n("Open"), this ,SLOT(slotInsert()));
- m_fileMenu->insertItem(SmallIcon("fileopen"), i18n("&Open"), this ,SLOT(slotOpen()));
- m_fileMenu->insertItem(SmallIcon("mail_send"), i18n("Send in E&mail..."), this, SLOT(slotSendInMail()));
- m_fileMenu->insertItem(SmallIcon("network"), i18n("&Upload Template..."), this, SLOT(slotUploadTemplate()));
- m_insertFileInProject = m_fileMenu->insertItem(i18n("&Insert in Project..."), this, SLOT(slotInsertInProject()));
- m_menuClose = m_fileMenu->insertItem(SmallIcon("fileclose"), i18n("Clos&e"), this, SLOT(slotClose()));
+ m_openId = m_fileMenu->insertItem(i18n("Open"), this ,TQT_SLOT(slotInsert()));
+ m_fileMenu->insertItem(SmallIcon("fileopen"), i18n("&Open"), this ,TQT_SLOT(slotOpen()));
+ m_fileMenu->insertItem(SmallIcon("mail_send"), i18n("Send in E&mail..."), this, TQT_SLOT(slotSendInMail()));
+ m_fileMenu->insertItem(SmallIcon("network"), i18n("&Upload Template..."), this, TQT_SLOT(slotUploadTemplate()));
+ m_insertFileInProject = m_fileMenu->insertItem(i18n("&Insert in Project..."), this, TQT_SLOT(slotInsertInProject()));
+ m_menuClose = m_fileMenu->insertItem(SmallIcon("fileclose"), i18n("Clos&e"), this, TQT_SLOT(slotClose()));
m_fileMenu->insertSeparator();
- m_fileMenu->insertItem(SmallIcon("editcopy"), i18n("&Copy"), this, SLOT(slotCopy()));
- m_fileMenu->insertItem(SmallIcon("editdelete"), i18n("&Delete"), this, SLOT(slotDelete()));
+ m_fileMenu->insertItem(SmallIcon("editcopy"), i18n("&Copy"), this, TQT_SLOT(slotCopy()));
+ m_fileMenu->insertItem(SmallIcon("editdelete"), i18n("&Delete"), this, TQT_SLOT(slotDelete()));
m_fileMenu->insertSeparator();
- m_fileMenu->insertItem(SmallIcon("info"), i18n("&Properties"), this, SLOT(slotProperties()));
+ m_fileMenu->insertItem(SmallIcon("info"), i18n("&Properties"), this, TQT_SLOT(slotProperties()));
m_folderMenu = new KPopupMenu(this);
- m_folderMenu->insertItem(SmallIcon("folder_new"), i18n("&New Folder..."), this, SLOT(slotNewDir()));
- m_folderMenu->insertItem(SmallIcon("mail_send"), i18n("Send in E&mail..."), this, SLOT(slotSendInMail()));
- m_folderMenu->insertItem(SmallIcon("network"), i18n("&Upload Template..."), this, SLOT(slotUploadTemplate()));
- m_downloadMenuId = m_folderMenu->insertItem(SmallIcon("network"), i18n("&Download Template..."), this, SIGNAL(downloadTemplate()));
- m_insertFolderInProject = m_folderMenu->insertItem(i18n("&Insert in Project..."), this, SLOT(slotInsertDirInProject()));
+ m_folderMenu->insertItem(SmallIcon("folder_new"), i18n("&New Folder..."), this, TQT_SLOT(slotNewDir()));
+ m_folderMenu->insertItem(SmallIcon("mail_send"), i18n("Send in E&mail..."), this, TQT_SLOT(slotSendInMail()));
+ m_folderMenu->insertItem(SmallIcon("network"), i18n("&Upload Template..."), this, TQT_SLOT(slotUploadTemplate()));
+ m_downloadMenuId = m_folderMenu->insertItem(SmallIcon("network"), i18n("&Download Template..."), this, TQT_SIGNAL(downloadTemplate()));
+ m_insertFolderInProject = m_folderMenu->insertItem(i18n("&Insert in Project..."), this, TQT_SLOT(slotInsertDirInProject()));
m_folderMenu->insertSeparator();
- m_folderMenu->insertItem(SmallIcon("editcopy"), i18n("&Copy"), this, SLOT(slotCopy()));
- m_menuPasteFolder = m_folderMenu->insertItem(SmallIcon("editpaste"), i18n("&Paste"), this, SLOT(slotPaste()));
- m_deleteMenuId = m_folderMenu->insertItem(SmallIcon("editdelete"), i18n("&Delete"), this, SLOT(slotDelete()));
+ m_folderMenu->insertItem(SmallIcon("editcopy"), i18n("&Copy"), this, TQT_SLOT(slotCopy()));
+ m_menuPasteFolder = m_folderMenu->insertItem(SmallIcon("editpaste"), i18n("&Paste"), this, TQT_SLOT(slotPaste()));
+ m_deleteMenuId = m_folderMenu->insertItem(SmallIcon("editdelete"), i18n("&Delete"), this, TQT_SLOT(slotDelete()));
m_folderMenu->insertSeparator();
- m_folderMenu->insertItem(SmallIcon("info"), i18n("&Properties"), this, SLOT(slotProperties()));
- m_reloadMenuId = m_folderMenu->insertItem(SmallIcon("revert"), i18n("&Reload"), this, SLOT(slotReload()));
+ m_folderMenu->insertItem(SmallIcon("info"), i18n("&Properties"), this, TQT_SLOT(slotProperties()));
+ m_reloadMenuId = m_folderMenu->insertItem(SmallIcon("revert"), i18n("&Reload"), this, TQT_SLOT(slotReload()));
m_emptyAreaMenu = new KPopupMenu(this);
- m_emptyAreaMenu->insertItem(SmallIcon("network"), i18n("&Download Template..."), this, SIGNAL(downloadTemplate()));
+ m_emptyAreaMenu->insertItem(SmallIcon("network"), i18n("&Download Template..."), this, TQT_SIGNAL(downloadTemplate()));
addColumn(i18n("Templates"), -1);
addColumn(i18n("Group"), -1);
@@ -182,14 +182,14 @@ TemplatesTreeView::TemplatesTreeView(KMainWindow *parent, const char *name )
localURL.setPath(locateLocal("data", resourceDir + "templates/"));
newBranch(localURL);
- connect(this, SIGNAL(contextMenu(KListView*, QListViewItem*, const QPoint&)),
- this, SLOT(slotMenu(KListView*, QListViewItem*, const QPoint&)));
+ connect(this, TQT_SIGNAL(contextMenu(KListView*, TQListViewItem*, const TQPoint&)),
+ this, TQT_SLOT(slotMenu(KListView*, TQListViewItem*, const TQPoint&)));
- connect(this, SIGNAL(open(QListViewItem *)),
- this, SLOT(slotSelectFile(QListViewItem *)));
+ connect(this, TQT_SIGNAL(open(TQListViewItem *)),
+ this, TQT_SLOT(slotSelectFile(TQListViewItem *)));
setAcceptDrops(true);
- setSelectionMode(QListView::Single);
+ setSelectionMode(TQListView::Single);
setDragEnabled(true);
setSaveOpenFolder(true);
restoreLayout( kapp->config(), className() );
@@ -223,7 +223,7 @@ KFileTreeBranch* TemplatesTreeView::newBranch(const KURL& url)
addBranch(newBrnch);
if (url.isLocalFile())
{
- QDir dir (url.path(), "", QDir::All);
+ TQDir dir (url.path(), "", TQDir::All);
newBrnch->root()->setExpandable(dir.count() != 2); // . and .. are always there
} else {
newBrnch->root()->setExpandable(true); // we assume there is something
@@ -251,7 +251,7 @@ void TemplatesTreeView::slotInsertInDocument()
}
-void TemplatesTreeView::slotMenu(KListView*, QListViewItem *item, const QPoint &point)
+void TemplatesTreeView::slotMenu(KListView*, TQListViewItem *item, const TQPoint &point)
{
if (!item)
{
@@ -283,7 +283,7 @@ void TemplatesTreeView::slotMenu(KListView*, QListViewItem *item, const QPoint &
{
m_dirInfo = readDirInfo();
- QString menuText = "";
+ TQString menuText = "";
if (m_dirInfo.mimeType.upper().contains("TEXT"))
menuText = i18n(textMenu.utf8());
@@ -313,7 +313,7 @@ void TemplatesTreeView::slotNewDocument()
KURL url = filterTemplate();
if (QuantaCommon::checkMimeGroup(url, "text") || QuantaCommon::denyBinaryInsert(this) == KMessageBox::Yes)
{
- QListViewItem *item = currentItem();
+ TQListViewItem *item = currentItem();
if (item )
{
if ( currentKFileTreeViewItem() != currentKFileTreeViewItem()->branch()->root())
@@ -328,7 +328,7 @@ void TemplatesTreeView::slotNewDocument()
/** Insert the template as text, image, new document. */
void TemplatesTreeView::slotInsert()
{
- QString menuText = m_fileMenu->text(m_openId);
+ TQString menuText = m_fileMenu->text(m_openId);
if (menuText == i18n(textMenu.utf8()))
slotInsertInDocument();
@@ -340,7 +340,7 @@ void TemplatesTreeView::slotInsert()
slotExtractSiteTemplate();
}
-void TemplatesTreeView::slotSelectFile(QListViewItem *item)
+void TemplatesTreeView::slotSelectFile(TQListViewItem *item)
{
if ( !item ) return;
@@ -390,9 +390,9 @@ void TemplatesTreeView::slotNewDir()
}
if (createDirDlg->exec())
{
- QDir dir;
+ TQDir dir;
- QString startDir = "";
+ TQString startDir = "";
if ( !currentKFileTreeViewItem()->isDir() )
{
startDir = currentURL().path();
@@ -400,7 +400,7 @@ void TemplatesTreeView::slotNewDir()
{
startDir = currentURL().path() + "/dummy_file";
}
- startDir = QFileInfo(startDir).dirPath();
+ startDir = TQFileInfo(startDir).dirPath();
if (!dir.mkdir(startDir+"/"+createDirDlg->dirName->text()))
{
KMessageBox::error(this,i18n("Error while creating the new folder.\n \
@@ -418,7 +418,7 @@ void TemplatesTreeView::slotNewDir()
}
/** No descriptions */
-QDragObject * TemplatesTreeView::dragObject ()
+TQDragObject * TemplatesTreeView::dragObject ()
{
// don't drag folders
if ( ! currentKFileTreeViewItem() || currentKFileTreeViewItem()->isDir() ) return 0;
@@ -433,7 +433,7 @@ QDragObject * TemplatesTreeView::dragObject ()
}
/** No descriptions */
-void TemplatesTreeView::contentsDropEvent(QDropEvent *e)
+void TemplatesTreeView::contentsDropEvent(TQDropEvent *e)
{
if (KURLDrag::canDecode(e))
{
@@ -441,9 +441,9 @@ void TemplatesTreeView::contentsDropEvent(QDropEvent *e)
BaseTreeView::contentsDropEvent(e);
return;
}
- if (QTextDrag::canDecode(e))
+ if (TQTextDrag::canDecode(e))
{
- QListViewItem *item = itemAt(contentsToViewport(e->pos()));
+ TQListViewItem *item = itemAt(contentsToViewport(e->pos()));
if (item)
{
KURL dest;
@@ -452,8 +452,8 @@ void TemplatesTreeView::contentsDropEvent(QDropEvent *e)
else
dest = currentURL().directory(false);
dest.adjustPath(+1);
- QString content;
- QTextDrag::decode(e, content);
+ TQString content;
+ TQTextDrag::decode(e, content);
KURL url =KURLRequesterDlg::getURL( dest.path() + "template.txt",
this, i18n("Save selection as template file:"));
if ( !url.isEmpty() )
@@ -461,7 +461,7 @@ void TemplatesTreeView::contentsDropEvent(QDropEvent *e)
//now save the file
KTempFile* tempFile = new KTempFile(tmpDir);
tempFile->setAutoDelete(true);
- tempFile->textStream()->setEncoding(QTextStream::UnicodeUTF8);
+ tempFile->textStream()->setEncoding(TQTextStream::UnicodeUTF8);
*(tempFile->textStream()) << content;
tempFile->close();
bool proceed = true;
@@ -485,10 +485,10 @@ void TemplatesTreeView::contentsDropEvent(QDropEvent *e)
}
/** Reads a .dirinfo file from the selected item's path */
-DirInfo TemplatesTreeView::readDirInfo(const QString& dir)
+DirInfo TemplatesTreeView::readDirInfo(const TQString& dir)
{
DirInfo dirInfo;
- QString startDir = dir;
+ TQString startDir = dir;
if (startDir.isEmpty())
{
@@ -501,11 +501,11 @@ DirInfo TemplatesTreeView::readDirInfo(const QString& dir)
}
}
- QFileInfo dotFileInfo(QFileInfo(startDir).dirPath()+"/.dirinfo");
+ TQFileInfo dotFileInfo(TQFileInfo(startDir).dirPath()+"/.dirinfo");
while ((!dotFileInfo.exists()) && (dotFileInfo.dirPath() != "/"))
{
- dotFileInfo.setFile(QFileInfo(dotFileInfo.dirPath()).dirPath()+"/.dirinfo");
+ dotFileInfo.setFile(TQFileInfo(dotFileInfo.dirPath()).dirPath()+"/.dirinfo");
}
KConfig *config = new KConfig(dotFileInfo.filePath());
@@ -519,9 +519,9 @@ DirInfo TemplatesTreeView::readDirInfo(const QString& dir)
}
/** Writes a .dirinfo file from the selected item's path */
-bool TemplatesTreeView::writeDirInfo(const QString& m_dirInfoFile)
+bool TemplatesTreeView::writeDirInfo(const TQString& m_dirInfoFile)
{
- QString startDir = "";
+ TQString startDir = "";
if (m_dirInfoFile.isEmpty())
{
@@ -537,7 +537,7 @@ bool TemplatesTreeView::writeDirInfo(const QString& m_dirInfoFile)
startDir = m_dirInfoFile;
}
- QFileInfo dotFileInfo(QFileInfo(startDir).dirPath()+"/.dirinfo");
+ TQFileInfo dotFileInfo(TQFileInfo(startDir).dirPath()+"/.dirinfo");
bool success = false;
KConfig *config = new KConfig(dotFileInfo.filePath());
@@ -562,8 +562,8 @@ void TemplatesTreeView::slotProperties()
KPropertiesDialog *propDlg = new KPropertiesDialog( url, this, 0L, false, false); //autodeletes itself
//Always add the Quanta directory page
- QFrame *quantaDirPage = propDlg->addPage(i18n("Quanta Template"));
- QVBoxLayout *topLayout = new QVBoxLayout( quantaDirPage);
+ TQFrame *quantaDirPage = propDlg->addPage(i18n("Quanta Template"));
+ TQVBoxLayout *topLayout = new TQVBoxLayout( quantaDirPage);
m_quantaProperties = new QuantaPropertiesPage( quantaDirPage, i18n("Quanta") );
m_quantaProperties->typesCombo->insertItem(typeToi18n["text/all"]);
@@ -578,17 +578,17 @@ void TemplatesTreeView::slotProperties()
KIO::UDSEntry entry;
KIO::NetAccess::stat(url, entry, this);
KFileItem fItem(entry, url);
- QString permissions = fItem.permissionsString();
- QString userName;
+ TQString permissions = fItem.permissionsString();
+ TQString userName;
struct passwd *user = getpwuid(getuid());
if (user)
- userName = QString::fromLocal8Bit(user->pw_name);
- QString groupName;
+ userName = TQString::fromLocal8Bit(user->pw_name);
+ TQString groupName;
gid_t gid = getgid();
struct group *ge = getgrgid(gid);
if (ge)
{
- groupName = QString::fromLocal8Bit(ge->gr_name);
+ groupName = TQString::fromLocal8Bit(ge->gr_name);
if (groupName.isEmpty())
groupName.sprintf("%d", ge->gr_gid);
} else
@@ -597,7 +597,7 @@ void TemplatesTreeView::slotProperties()
if (permissions[8] == 'w' || (permissions[2] == 'w' && userName == fItem.user()) || (permissions[5] == 'w' && groupName == fItem.group()))
writable = true;
- QString startDir = "";
+ TQString startDir = "";
if (!currentKFileTreeViewItem()->isDir())
{
startDir = url.path();
@@ -608,7 +608,7 @@ void TemplatesTreeView::slotProperties()
m_quantaProperties->typeStack->raiseWidget(0);
}
m_quantaProperties->setEnabled(writable);
- QFileInfo dotFileInfo(QFileInfo(startDir).dirPath()+"/.dirinfo");
+ TQFileInfo dotFileInfo(TQFileInfo(startDir).dirPath()+"/.dirinfo");
m_parentDirInfo = readDirInfo(dotFileInfo.dirPath());
if (!dotFileInfo.exists() || m_dirInfo.mimeType == m_parentDirInfo.mimeType)
{
@@ -629,9 +629,9 @@ void TemplatesTreeView::slotProperties()
}
topLayout->addWidget( m_quantaProperties );
- connect( propDlg, SIGNAL( applied() ), this , SLOT( slotPropertiesApplied()) );
+ connect( propDlg, TQT_SIGNAL( applied() ), this , TQT_SLOT( slotPropertiesApplied()) );
- QString name = url.path() + TMPL;
+ TQString name = url.path() + TMPL;
KConfig config(name);
config.setGroup("Filtering");
name = config.readEntry("Action", NONE);
@@ -640,7 +640,7 @@ void TemplatesTreeView::slotProperties()
uint pos = 0;
uint j = 1;
m_quantaProperties->actionCombo->insertItem(i18n(NONE));
- QString tmpStr;
+ TQString tmpStr;
KActionCollection *ac = m_mainWindow->actionCollection();
uint acCount = ac->count();
for (uint i = 0; i < acCount; i++)
@@ -648,11 +648,11 @@ void TemplatesTreeView::slotProperties()
TagAction *action = dynamic_cast<TagAction*>(ac->action(i));
if (action)
{
- QDomElement el = action->data();
- QString type = el.attribute("type", "tag");
+ TQDomElement el = action->data();
+ TQString type = el.attribute("type", "tag");
if (type == "script")
{
- tmpStr = action->text().replace(QRegExp("\\&(?!\\&)"),"");
+ tmpStr = action->text().replace(TQRegExp("\\&(?!\\&)"),"");
m_quantaProperties->actionCombo->insertItem(tmpStr);
if (tmpStr == name)
pos = j;
@@ -664,7 +664,7 @@ void TemplatesTreeView::slotProperties()
//If the item is a file, add the Quanta file info page
addFileInfoPage(propDlg);
- if (propDlg->exec() == QDialog::Accepted)
+ if (propDlg->exec() == TQDialog::Accepted)
{
//TODO: move to slotPropertiesApplied
if (url != propDlg->kurl())
@@ -679,7 +679,7 @@ void TemplatesTreeView::slotProperties()
void TemplatesTreeView::slotPropertiesApplied()
{
DirInfo m_localDirInfo;
- QString typeString = "";
+ TQString typeString = "";
if (!m_quantaProperties->parentAttr->isChecked())
{
@@ -721,7 +721,7 @@ void TemplatesTreeView::slotPropertiesApplied()
writeTemplateInfo();
}
-void TemplatesTreeView::updateTypeDescription(KFileTreeViewItem *item, const QString &typeString)
+void TemplatesTreeView::updateTypeDescription(KFileTreeViewItem *item, const TQString &typeString)
{
if (item->parent() && item->isDir())
item->setText(1, typeString);
@@ -733,7 +733,7 @@ void TemplatesTreeView::updateTypeDescription(KFileTreeViewItem *item, const QSt
curItem->setText(1, typeString);
} else
{
- QFileInfo dotFileInfo(curItem->url().path() + "/.dirinfo");
+ TQFileInfo dotFileInfo(curItem->url().path() + "/.dirinfo");
if (!dotFileInfo.exists())
updateTypeDescription(curItem, typeString);
}
@@ -754,7 +754,7 @@ void TemplatesTreeView::slotInsertTag()
/*
Attention, this is called whenever a drop on a kate window happens!
*/
-void TemplatesTreeView::slotDragInsert(QDropEvent *e)
+void TemplatesTreeView::slotDragInsert(TQDropEvent *e)
{
if (KURLDrag::canDecode(e))
{
@@ -766,13 +766,13 @@ void TemplatesTreeView::slotDragInsert(QDropEvent *e)
KURL url = fileList.front();
- QString localFileName;
+ TQString localFileName;
if (url.isLocalFile())
{
localFileName = url.path();
m_dirInfo = readDirInfo(localFileName);
}
- QString mimeType = KMimeType::findByURL(url)->name();
+ TQString mimeType = KMimeType::findByURL(url)->name();
/* First, see if the type of the file is specified in the .dirinfo file */
if(m_dirInfo.mimeType.isEmpty())
@@ -807,15 +807,15 @@ void TemplatesTreeView::slotDragInsert(QDropEvent *e)
}
}
} else
- if (QTextDrag::canDecode(e))
+ if (TQTextDrag::canDecode(e))
{
- QString s;
- QTextDrag::decode(e, s);
+ TQString s;
+ TQTextDrag::decode(e, s);
KMessageBox::information(this,s, "Decode");
}
}
-void TemplatesTreeView::slotNewProjectLoaded(const QString &projectName, const KURL &baseURL, const KURL &templateURL)
+void TemplatesTreeView::slotNewProjectLoaded(const TQString &projectName, const KURL &baseURL, const KURL &templateURL)
{
BaseTreeView::slotNewProjectLoaded(projectName, baseURL, templateURL); // set m_projectName and m_projectBaseURL
if (m_projectDir)
@@ -832,7 +832,7 @@ void TemplatesTreeView::slotNewProjectLoaded(const QString &projectName, const K
*/
void TemplatesTreeView::writeTemplateInfo()
{
- QString fileName = currentURL().path() + TMPL;
+ TQString fileName = currentURL().path() + TMPL;
KConfig config(fileName);
config.setGroup("Filtering");
if ( m_quantaProperties->actionCombo->currentText() == i18n(NONE) )
@@ -846,8 +846,8 @@ void TemplatesTreeView::slotPaste()
{
if (currentItem())
{
- QClipboard *cb = QApplication::clipboard();
- KURL::List list( QStringList::split( QChar('\n'), cb->text() ) );
+ QClipboard *cb = TQApplication::clipboard();
+ KURL::List list( TQStringList::split( TQChar('\n'), cb->text() ) );
KURL url;
uint j = list.count();
@@ -855,14 +855,14 @@ void TemplatesTreeView::slotPaste()
{
url = list[i];
url.setFileName(url.fileName() + TMPL);
- if (url.isLocalFile() && QFileInfo(url.path()).exists())
+ if (url.isLocalFile() && TQFileInfo(url.path()).exists())
list += url;
}
url = currentURL();
if ( ! currentKFileTreeViewItem()->isDir() )
url.setFileName(""); // don't paste on files but in dirs
KIO::Job *job = KIO::copy( list, url);
- connect( job, SIGNAL( result( KIO::Job *) ), this , SLOT( slotJobFinished( KIO::Job *) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job *) ), this , TQT_SLOT( slotJobFinished( KIO::Job *) ) );
}
}
@@ -871,20 +871,20 @@ void TemplatesTreeView::slotDelete()
if (currentItem())
{
KURL url = currentURL();
- QString msg;
+ TQString msg;
if ( currentKFileTreeViewItem()->isDir() )
msg = i18n("Do you really want to delete folder \n%1 ?\n").arg(url.path());
else
msg = i18n("Do you really want to delete file \n%1 ?\n").arg(url.path());
- if ( KMessageBox::warningContinueCancel(this, msg, QString::null, KStdGuiItem::del()) == KMessageBox::Continue )
+ if ( KMessageBox::warningContinueCancel(this, msg, TQString::null, KStdGuiItem::del()) == KMessageBox::Continue )
{
KIO::Job *job = KIO::del(url);
- connect( job, SIGNAL( result( KIO::Job *) ), this , SLOT( slotJobFinished( KIO::Job *) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job *) ), this , TQT_SLOT( slotJobFinished( KIO::Job *) ) );
url.setFileName(url.fileName()+ TMPL);
- if ( QFileInfo(url.path()).exists() ) {
+ if ( TQFileInfo(url.path()).exists() ) {
KIO::Job *job2 = KIO::del(url);
- connect( job2, SIGNAL( result( KIO::Job *) ), this , SLOT( slotJobFinished( KIO::Job *) ) );
+ connect( job2, TQT_SIGNAL( result( KIO::Job *) ), this , TQT_SLOT( slotJobFinished( KIO::Job *) ) );
};
}
}
@@ -895,23 +895,23 @@ template file */
KURL TemplatesTreeView::filterTemplate()
{
KURL url = currentURL();
- QString name = url.path() + TMPL;
+ TQString name = url.path() + TMPL;
KConfig config(name);
config.setGroup("Filtering");
name = config.readEntry("Action", NONE);
TagAction *filterAction = 0L;
KActionCollection *ac = m_mainWindow->actionCollection();
uint acCount = ac->count();
- QString tmpStr;
+ TQString tmpStr;
for (uint i = 0; i < acCount; i++)
{
TagAction *action = dynamic_cast<TagAction*>(ac->action(i));
if (action)
{
- QDomElement el = action->data();
- QString type = el.attribute("type", "tag");
+ TQDomElement el = action->data();
+ TQString type = el.attribute("type", "tag");
tmpStr = action->text();
- tmpStr.replace(QRegExp("\\&(?!\\&)"),"");
+ tmpStr.replace(TQRegExp("\\&(?!\\&)"),"");
if (type == "script" && tmpStr == name)
{
filterAction = action;
@@ -925,7 +925,7 @@ KURL TemplatesTreeView::filterTemplate()
filterAction->setInputFileName(url.path());
filterAction->execute(true);
filterAction->setOutputFile(0L);
- filterAction->setInputFileName(QString::null);
+ filterAction->setInputFileName(TQString::null);
tempFile->close();
tempFileList.append(tempFile);
url.setPath(tempFile->name());
@@ -933,7 +933,7 @@ KURL TemplatesTreeView::filterTemplate()
return url;
}
-QString TemplatesTreeView::createTemplateTarball()
+TQString TemplatesTreeView::createTemplateTarball()
{
KURL url = currentURL();
KURL dirURL (url);
@@ -943,7 +943,7 @@ QString TemplatesTreeView::createTemplateTarball()
KTempDir* tempDir = new KTempDir(tmpDir);
tempDir->setAutoDelete(true);
tempDirList.append(tempDir);
- QString tempFileName=tempDir->name() + url.fileName() + ".tgz";
+ TQString tempFileName=tempDir->name() + url.fileName() + ".tgz";
//pack the files into a .tgz file
KTar tar(tempFileName, "application/x-gzip");
tar.open(IO_WriteOnly);
@@ -962,9 +962,9 @@ QString TemplatesTreeView::createTemplateTarball()
if (!(*it_f).fileName(false).isEmpty()) {
url = QExtFileInfo::toRelative( (*it_f), dirURL) ;
- QFile file((*it_f).path());
+ TQFile file((*it_f).path());
file.open(IO_ReadOnly);
- QByteArray bArray = file.readAll();
+ TQByteArray bArray = file.readAll();
tar.writeFile(url.path(), "user", "group", bArray.size(), bArray.data());
file.close();
};
@@ -979,19 +979,19 @@ void TemplatesTreeView::slotSendInMail()
if ( ! currentKFileTreeViewItem() ) return;
- QStringList attachmentFile;
+ TQStringList attachmentFile;
attachmentFile += createTemplateTarball();
TagMailDlg *mailDlg = new TagMailDlg( this, i18n("Send template in email"));
- QString toStr;
- QString message = i18n("Hi,\n This is a Quanta Plus [http://quanta.kdewebdev.org] template tarball.\n\nHave fun.\n");
- QString titleStr;
- QString subjectStr;
+ TQString toStr;
+ TQString message = i18n("Hi,\n This is a Quanta Plus [http://quanta.kdewebdev.org] template tarball.\n\nHave fun.\n");
+ TQString titleStr;
+ TQString subjectStr;
mailDlg->TitleLabel->setText(i18n("Content:"));
/* mailDlg->titleEdit->setFixedHeight(60);
- mailDlg->titleEdit->setVScrollBarMode(QTextEdit::Auto);
- mailDlg->titleEdit->setHScrollBarMode(QTextEdit::Auto);*/
+ mailDlg->titleEdit->setVScrollBarMode(TQTextEdit::Auto);
+ mailDlg->titleEdit->setHScrollBarMode(TQTextEdit::Auto);*/
if ( mailDlg->exec() )
{
if ( !mailDlg->lineEmail->text().isEmpty())
@@ -1006,7 +1006,7 @@ void TemplatesTreeView::slotSendInMail()
delete mailDlg;
return;
}
- kapp->invokeMailer(toStr, QString::null, QString::null, subjectStr, message, QString::null, attachmentFile);
+ kapp->invokeMailer(toStr, TQString::null, TQString::null, subjectStr, message, TQString::null, attachmentFile);
}
delete mailDlg;
}
@@ -1017,16 +1017,16 @@ void TemplatesTreeView::slotUploadTemplate()
emit uploadTemplate(createTemplateTarball());
}
-bool TemplatesTreeView::acceptDrag(QDropEvent* e ) const
+bool TemplatesTreeView::acceptDrag(TQDropEvent* e ) const
{
- return (BaseTreeView::acceptDrag(e) || QTextDrag::canDecode(e));
+ return (BaseTreeView::acceptDrag(e) || TQTextDrag::canDecode(e));
}
void TemplatesTreeView::slotExtractSiteTemplate()
{
- QString startDir = m_projectBaseURL.url();
+ TQString startDir = m_projectBaseURL.url();
if (startDir.isEmpty())
- startDir = QDir::homeDirPath();
+ startDir = TQDir::homeDirPath();
bool error = false;
KURLRequesterDlg urlRequester(startDir, i18n("Target folder"), this, "req", true);
urlRequester.urlRequester()->setMode(KFile::Directory);
@@ -1034,7 +1034,7 @@ void TemplatesTreeView::slotExtractSiteTemplate()
{
KURL targetURL = urlRequester.selectedURL();
KURL url = currentURL();
- QString tempFile;
+ TQString tempFile;
if (KIO::NetAccess::download(url, tempFile, this))
{
KTar tar(tempFile);
@@ -1047,11 +1047,11 @@ void TemplatesTreeView::slotExtractSiteTemplate()
{
KTempDir* tempDir = new KTempDir(tmpDir);
tempDir->setAutoDelete(true);
- QString tempDirName = tempDir->name();
+ TQString tempDirName = tempDir->name();
directory->copyTo(tempDirName, true);
- QStringList entries = directory->entries();
+ TQStringList entries = directory->entries();
KURL::List fileList;
- for (QStringList::Iterator it = entries.begin(); it != entries.end(); ++it)
+ for (TQStringList::Iterator it = entries.begin(); it != entries.end(); ++it)
fileList.append(KURL::fromPathOrURL(tempDirName + "/" + *it));
if (!KIO::NetAccess::dircopy(fileList, targetURL, this))
error = true;
@@ -1064,7 +1064,7 @@ void TemplatesTreeView::slotExtractSiteTemplate()
KIO::NetAccess::removeTempFile(tempFile);
if (!m_projectBaseURL.isEmpty() && !QExtFileInfo::toRelative(targetURL, m_projectBaseURL).url().startsWith("."))
{
- if (KMessageBox::questionYesNo(this, i18n("You have extracted the site template to a folder which is not under your main project folder.\nDo you want to copy the folder into the main project folder?"), QString::null, i18n("Copy Folder"), i18n("Do Not Copy")) == KMessageBox::Yes)
+ if (KMessageBox::questionYesNo(this, i18n("You have extracted the site template to a folder which is not under your main project folder.\nDo you want to copy the folder into the main project folder?"), TQString::null, i18n("Copy Folder"), i18n("Do Not Copy")) == KMessageBox::Yes)
{
emit insertDirInProject(targetURL);
}
diff --git a/quanta/treeviews/templatestreeview.h b/quanta/treeviews/templatestreeview.h
index c0df69e5..7816cffd 100644
--- a/quanta/treeviews/templatestreeview.h
+++ b/quanta/treeviews/templatestreeview.h
@@ -28,7 +28,7 @@ class TemplatesTreeBranch : public BaseTreeBranch {
public:
TemplatesTreeBranch(KFileTreeView *parent, const KURL& url,
- const QString& name, const QPixmap& pix,
+ const TQString& name, const TQPixmap& pix,
bool showHidden = false, KFileTreeViewItem *branchRoot = 0L);
/** read the mimetype */
@@ -57,9 +57,9 @@ public:
~TemplatesTreeView();
/** Writes a .dirinfo file from the selected item's path */
- bool writeDirInfo(const QString& dirInfoFile = QString::null);
+ bool writeDirInfo(const TQString& dirInfoFile = TQString::null);
/** Reads a .dirinfo file from the selected item's path */
- DirInfo readDirInfo(const QString& dir = QString::null);
+ DirInfo readDirInfo(const TQString& dir = TQString::null);
public slots:
@@ -75,12 +75,12 @@ public slots:
*
* @param listView KListView where the event comes from
*
- * @param item QListViewItem where the mousepointer is hovering
+ * @param item TQListViewItem where the mousepointer is hovering
*
- * @param point QPoint coordinates of the event
+ * @param point TQPoint coordinates of the event
*
*/
- void slotMenu(KListView *listView, QListViewItem *item, const QPoint &point);
+ void slotMenu(KListView *listView, TQListViewItem *item, const TQPoint &point);
/** Creates a new document based in the selected template. */
void slotNewDocument();
/** Insert the template as text, image, new document. */
@@ -90,7 +90,7 @@ public slots:
/** No descriptions */
void slotNewDir();
/** Handles dropping on the document from the template tree */
- void slotDragInsert(QDropEvent *);
+ void slotDragInsert(TQDropEvent *);
/**
* slot for the RBM
@@ -99,7 +99,7 @@ public slots:
*/
void slotSendInMail();
void slotUploadTemplate();
- virtual void slotSelectFile(QListViewItem *item);
+ virtual void slotSelectFile(TQListViewItem *item);
void slotOpen();
void slotPaste();
void slotDelete();
@@ -110,7 +110,7 @@ public slots:
void slotInsertTag();
/** Sets the project template directory */
- void slotNewProjectLoaded(const QString &, const KURL &, const KURL &);
+ void slotNewProjectLoaded(const TQString &, const KURL &, const KURL &);
private:
@@ -123,7 +123,7 @@ private:
template file */
KURL filterTemplate();
void writeTemplateInfo();
- void updateTypeDescription(KFileTreeViewItem *item, const QString &typeString);
+ void updateTypeDescription(KFileTreeViewItem *item, const TQString &typeString);
BaseTreeBranch *m_projectDir;
int m_deleteMenuId;
@@ -131,7 +131,7 @@ private:
int m_reloadMenuId;
int m_downloadMenuId;
QuantaPropertiesPage *m_quantaProperties;
- QString m_projectName;
+ TQString m_projectName;
KURL localURL;
KURL globalURL;
KPopupMenu *m_fileMenu;
@@ -148,15 +148,15 @@ private:
signals: // Signals
void insertFile(const KURL &);
void downloadTemplate();
- void uploadTemplate(const QString&);
+ void uploadTemplate(const TQString&);
protected: // Protected methods
KFileTreeBranch* newBranch(const KURL& url);
- virtual QDragObject * dragObject();
+ virtual TQDragObject * dragObject();
// virtual void startDrag();
- void contentsDropEvent(QDropEvent *event);
- bool acceptDrag(QDropEvent* e ) const;
- QString createTemplateTarball();
+ void contentsDropEvent(TQDropEvent *event);
+ bool acceptDrag(TQDropEvent* e ) const;
+ TQString createTemplateTarball();
};
#endif
diff --git a/quanta/treeviews/uploadtreefile.cpp b/quanta/treeviews/uploadtreefile.cpp
index 2df61f3f..9c055424 100644
--- a/quanta/treeviews/uploadtreefile.cpp
+++ b/quanta/treeviews/uploadtreefile.cpp
@@ -14,9 +14,9 @@
***************************************************************************/
// QT includes
-#include <qdir.h>
-#include <qpixmap.h>
-#include <qfileinfo.h>
+#include <tqdir.h>
+#include <tqpixmap.h>
+#include <tqfileinfo.h>
// KDE includes
#include <kfileitem.h>
@@ -28,7 +28,7 @@
#include "resource.h"
UploadTreeFile::UploadTreeFile( UploadTreeFolder *parent, const KURL &a_url, const KFileItem &a_fileItem)
- : KListViewItem( parent, a_url.fileName(), "", QString("%1").arg( (long int)a_fileItem.size() ), a_fileItem.timeString())
+ : KListViewItem( parent, a_url.fileName(), "", TQString("%1").arg( (long int)a_fileItem.size() ), a_fileItem.timeString())
{
m_url = a_url;
isDir = false;
@@ -40,8 +40,8 @@ UploadTreeFile::UploadTreeFile( UploadTreeFolder *parent, const KURL &a_url, con
setText(0, m_url.fileName());
}
-UploadTreeFile::UploadTreeFile( QListView *parent, const KURL &a_url, const KFileItem &a_fileItem)
- : KListViewItem( parent, a_url.fileName(), "", QString("%1").arg( (long int)a_fileItem.size() ), a_fileItem.timeString())
+UploadTreeFile::UploadTreeFile( TQListView *parent, const KURL &a_url, const KFileItem &a_fileItem)
+ : KListViewItem( parent, a_url.fileName(), "", TQString("%1").arg( (long int)a_fileItem.size() ), a_fileItem.timeString())
{
m_url = a_url;
isDir = false;
@@ -69,15 +69,15 @@ int UploadTreeFile::permissions()
}
/** used for sorting */
-QString UploadTreeFile::key ( int, bool ) const
+TQString UploadTreeFile::key ( int, bool ) const
{
- static QString key;
- key = QString( "1" + text(0) );
+ static TQString key;
+ key = TQString( "1" + text(0) );
return key;
-// return QFileInfo(key).extension()+key;
+// return TQFileInfo(key).extension()+key;
}
-void UploadTreeFile::setWhichPixmap(const QString& pixmap )
+void UploadTreeFile::setWhichPixmap(const TQString& pixmap )
{
setPixmap( 1, SmallIcon(pixmap) );
}
diff --git a/quanta/treeviews/uploadtreefile.h b/quanta/treeviews/uploadtreefile.h
index 54c8ce01..736a3a88 100644
--- a/quanta/treeviews/uploadtreefile.h
+++ b/quanta/treeviews/uploadtreefile.h
@@ -29,14 +29,14 @@ class KFileItem;
class UploadTreeFile : public KListViewItem {
public:
UploadTreeFile( UploadTreeFolder *parent, const KURL &a_url, const KFileItem &a_fileItem);
- UploadTreeFile( QListView *parent, const KURL &a_url, const KFileItem &a_fileItem);
+ UploadTreeFile( TQListView *parent, const KURL &a_url, const KFileItem &a_fileItem);
~UploadTreeFile();
- void setWhichPixmap(const QString& pixmap);
+ void setWhichPixmap(const TQString& pixmap);
int permissions();
/** used for sorting */
- virtual QString key ( int column, bool ascending ) const;
+ virtual TQString key ( int column, bool ascending ) const;
/** No descriptions */
KURL url();
void setConfirmUpload(bool confirm) {m_confirm = confirm;}
diff --git a/quanta/treeviews/uploadtreefolder.cpp b/quanta/treeviews/uploadtreefolder.cpp
index f38e648c..123eaf35 100644
--- a/quanta/treeviews/uploadtreefolder.cpp
+++ b/quanta/treeviews/uploadtreefolder.cpp
@@ -14,10 +14,10 @@
***************************************************************************/
// QT includes
-#include <qdir.h>
-#include <qdragobject.h>
-#include <qevent.h>
-#include <qpixmap.h>
+#include <tqdir.h>
+#include <tqdragobject.h>
+#include <tqevent.h>
+#include <tqpixmap.h>
// KDE includes
#include <kiconloader.h>
@@ -40,7 +40,7 @@ UploadTreeFolder::UploadTreeFolder(const KURL &a_url, UploadTreeFolder * parent,
}
-UploadTreeFolder::UploadTreeFolder(const KURL &a_url, QListView * parent, const char * name )
+UploadTreeFolder::UploadTreeFolder(const KURL &a_url, TQListView * parent, const char * name )
: KListViewItem( parent, name, "", "", "" )
{
parentFolder = 0L;
@@ -55,14 +55,14 @@ UploadTreeFolder::UploadTreeFolder(const KURL &a_url, QListView * parent, const
void UploadTreeFolder::setOpen( bool open )
{
- QListViewItem::setOpen( open );
+ TQListViewItem::setOpen( open );
}
/** retun full name of the folder */
//TODO: This should go away. Use url() instead.
-QString UploadTreeFolder::fullName()
+TQString UploadTreeFolder::fullName()
{
- QString s="";
+ TQString s="";
if ( parentFolder )
{
@@ -80,7 +80,7 @@ QString UploadTreeFolder::fullName()
void UploadTreeFolder::setup()
{
setExpandable( true );
- QListViewItem::setup();
+ TQListViewItem::setup();
}
/** reload file list */
@@ -88,7 +88,7 @@ void UploadTreeFolder::reloadList()
{
setOpen( false );
- QListViewItem *child;
+ TQListViewItem *child;
while ( (child = firstChild()) )
removeItem( child );
@@ -96,11 +96,11 @@ void UploadTreeFolder::reloadList()
}
/** need for sorting */
-QString UploadTreeFolder::key ( int, bool ) const
+TQString UploadTreeFolder::key ( int, bool ) const
{
- static QString key;
+ static TQString key;
- key = QString("0") + text(0);
+ key = TQString("0") + text(0);
return key;
}
@@ -109,7 +109,7 @@ UploadTreeFolder::~UploadTreeFolder()
{
}
-void UploadTreeFolder::setWhichPixmap(const QString& pixmap )
+void UploadTreeFolder::setWhichPixmap(const TQString& pixmap )
{
setPixmap( 1, SmallIcon(pixmap) );
}
diff --git a/quanta/treeviews/uploadtreefolder.h b/quanta/treeviews/uploadtreefolder.h
index 1ef77279..d6959ab3 100644
--- a/quanta/treeviews/uploadtreefolder.h
+++ b/quanta/treeviews/uploadtreefolder.h
@@ -16,10 +16,10 @@
#ifndef UPLOADTREEFOLDER_H
#define UPLOADTREEFOLDER_H
-#include <qfile.h>
-#include <qfileinfo.h>
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#include <klistview.h>
#include <kurl.h>
@@ -32,18 +32,18 @@ class KURL;
class UploadTreeFolder : public KListViewItem {
public:
- UploadTreeFolder( const KURL &a_url, QListView * parent, const char * name);
+ UploadTreeFolder( const KURL &a_url, TQListView * parent, const char * name);
UploadTreeFolder( const KURL &a_url, UploadTreeFolder * parent, const char * name );
virtual ~UploadTreeFolder();
/** used for sorting */
- virtual QString key ( int column, bool ascending ) const;
- QString fullName();
+ virtual TQString key ( int column, bool ascending ) const;
+ TQString fullName();
KURL url() {return m_url;}
virtual void setOpen( bool );
void setup();
- void setWhichPixmap(const QString& pixmap );
+ void setWhichPixmap(const TQString& pixmap );
public:
UploadTreeFolder * parentFolder;
diff --git a/quanta/treeviews/uploadtreeview.cpp b/quanta/treeviews/uploadtreeview.cpp
index 75d0fa0c..486a6156 100644
--- a/quanta/treeviews/uploadtreeview.cpp
+++ b/quanta/treeviews/uploadtreeview.cpp
@@ -13,7 +13,7 @@
* *
***************************************************************************/
-#include <qregexp.h>
+#include <tqregexp.h>
#include <kcursor.h>
#include <klocale.h>
@@ -23,7 +23,7 @@
#include "uploadtreeview.h"
#include "quantacommon.h"
-UploadTreeView::UploadTreeView( QWidget *parent, const char *name ) :
+UploadTreeView::UploadTreeView( TQWidget *parent, const char *name ) :
KListView(parent, name)
{
setRootIsDecorated( true );
@@ -37,24 +37,24 @@ UploadTreeView::UploadTreeView( QWidget *parent, const char *name ) :
addColumn( i18n("Size") );
addColumn( i18n("Date") );
- setFocusPolicy(QWidget::ClickFocus);
+ setFocusPolicy(TQWidget::ClickFocus);
- connect( this, SIGNAL(selectionChanged()), SLOT(slotSelectFile()));
- connect( this, SIGNAL(selectionChanged(QListViewItem *)),
- this, SLOT(slotSelectFile(QListViewItem *)));
+ connect( this, TQT_SIGNAL(selectionChanged()), TQT_SLOT(slotSelectFile()));
+ connect( this, TQT_SIGNAL(selectionChanged(TQListViewItem *)),
+ this, TQT_SLOT(slotSelectFile(TQListViewItem *)));
- connect(this, SIGNAL(doubleClicked(QListViewItem *, const QPoint &, int )), SLOT(slotDoubleClicked(QListViewItem *, const QPoint &, int )));
+ connect(this, TQT_SIGNAL(doubleClicked(TQListViewItem *, const TQPoint &, int )), TQT_SLOT(slotDoubleClicked(TQListViewItem *, const TQPoint &, int )));
}
UploadTreeView::~UploadTreeView()
{
}
-int UploadTreeView::checkboxTree( QListViewItem *it )
+int UploadTreeView::checkboxTree( TQListViewItem *it )
{
parentWidget()->setCursor(KCursor::workingCursor());
- QListViewItem *itIter = it ? it->firstChild() : firstChild();
+ TQListViewItem *itIter = it ? it->firstChild() : firstChild();
// bitFlag structure: (0/1)all children exist (0/1)no children exist.
// We don't need some children as a bit flag, because that's implied if the bits are "00".
@@ -132,9 +132,9 @@ int UploadTreeView::checkboxTree( QListViewItem *it )
return retVal;
}
-void UploadTreeView::selectAllUnderNode( QListViewItem* it, bool select )
+void UploadTreeView::selectAllUnderNode( TQListViewItem* it, bool select )
{
- QListViewItem *itIter = 0;
+ TQListViewItem *itIter = 0;
if (it == 0) itIter = firstChild();
else itIter = it->firstChild();
@@ -147,7 +147,7 @@ void UploadTreeView::selectAllUnderNode( QListViewItem* it, bool select )
}
}
-void UploadTreeView::slotSelectFile( QListViewItem *it )
+void UploadTreeView::slotSelectFile( TQListViewItem *it )
{
UploadTreeFolder *itF = dynamic_cast<UploadTreeFolder *>(it);
// This need a bit of special behavior for clicking on directories.
@@ -200,7 +200,7 @@ void UploadTreeView::slotSelectFile( QListViewItem *it )
bool hasSelected = false;
bool allSelected = true;
//check if the item has any children's selected
- QListViewItemIterator iter(itF->firstChild());
+ TQListViewItemIterator iter(itF->firstChild());
while ( iter.current() && iter.current() != itF->nextSibling())
{
if ( iter.current()->isSelected() )
@@ -237,9 +237,9 @@ void UploadTreeView::slotSelectFile( )
}
//TODO: This should search based on url's rather than on text(0)
-UploadTreeFolder* UploadTreeView::findFolder( UploadTreeFolder *it, const QString& folderName )
+UploadTreeFolder* UploadTreeView::findFolder( UploadTreeFolder *it, const TQString& folderName )
{
- QListViewItem *itIter = 0;
+ TQListViewItem *itIter = 0;
if (it == 0) itIter = firstChild();
else itIter = it->firstChild();
@@ -253,9 +253,9 @@ UploadTreeFolder* UploadTreeView::findFolder( UploadTreeFolder *it, const QStrin
return 0;
}
-UploadTreeFolder* UploadTreeView::printTree( UploadTreeFolder *it = 0,const QString& indent = QString::null )
+UploadTreeFolder* UploadTreeView::printTree( UploadTreeFolder *it = 0,const TQString& indent = TQString::null )
{
- QListViewItem *itIter = 0;
+ TQListViewItem *itIter = 0;
if (it == 0) itIter = firstChild();
else itIter = it->firstChild();
@@ -271,9 +271,9 @@ UploadTreeFolder* UploadTreeView::printTree( UploadTreeFolder *it = 0,const QStr
// :NOTE: AFAIK, safe to use only if you are sure the item searched for
// is already in here. It might be safe otherwise, but use at your own
// peril.
-QListViewItem* UploadTreeView::findItem(const QString& path )
+TQListViewItem* UploadTreeView::findItem(const TQString& path )
{
- QString item = path;
+ TQString item = path;
UploadTreeFolder *it = 0;
int i;
while ( ( i = item.find('/') ) >= 0 )
@@ -284,7 +284,7 @@ QListViewItem* UploadTreeView::findItem(const QString& path )
item.remove(0,i+1);
}
- QListViewItem *itIter = 0;
+ TQListViewItem *itIter = 0;
if ( it == 0 ) itIter = firstChild();
else itIter = it->firstChild();
@@ -300,8 +300,8 @@ QListViewItem* UploadTreeView::findItem(const QString& path )
UploadTreeFile* UploadTreeView::addItem(const KURL &a_url, const KFileItem& a_fileItem)
{
- QString item = a_url.path(); //TODO: do with real KURL's
- QString fname = item;
+ TQString item = a_url.path(); //TODO: do with real KURL's
+ TQString fname = item;
int i;
uint col = 0;
UploadTreeFolder *it = 0;
@@ -345,9 +345,9 @@ UploadTreeFile* UploadTreeView::addItem(const KURL &a_url, const KFileItem& a_fi
return file;
}
-void UploadTreeView::expandAll( QListViewItem *it )
+void UploadTreeView::expandAll( TQListViewItem *it )
{
- QListViewItem *itIter = it;
+ TQListViewItem *itIter = it;
if (it == 0) itIter = firstChild();
else itIter = it->firstChild();
@@ -361,9 +361,9 @@ void UploadTreeView::expandAll( QListViewItem *it )
}
}
-void UploadTreeView::collapseAll( QListViewItem *it )
+void UploadTreeView::collapseAll( TQListViewItem *it )
{
- QListViewItem *itIter = it;
+ TQListViewItem *itIter = it;
if (it == 0) itIter = firstChild();
else itIter = it->firstChild();
@@ -377,9 +377,9 @@ void UploadTreeView::collapseAll( QListViewItem *it )
}
}
-void UploadTreeView::invertAll( QListViewItem *it )
+void UploadTreeView::invertAll( TQListViewItem *it )
{
- QListViewItem *itIter = it;
+ TQListViewItem *itIter = it;
if (it == 0) itIter = firstChild();
else itIter = it->firstChild();
@@ -400,7 +400,7 @@ void UploadTreeView::invertAll( QListViewItem *it )
void UploadTreeView::selectAll( bool select )
{
- QListViewItemIterator it(this);
+ TQListViewItemIterator it(this);
for ( ; it.current(); ++it )
{
@@ -418,9 +418,9 @@ void UploadTreeView::selectAll( bool select )
/** No descriptions */
-QListViewItem* UploadTreeView::itemByUrl(const KURL& a_url)
+TQListViewItem* UploadTreeView::itemByUrl(const KURL& a_url)
{
- QListViewItemIterator it(this);
+ TQListViewItemIterator it(this);
UploadTreeFile *fileItem;
UploadTreeFolder *folderItem;
KURL url;
@@ -443,7 +443,7 @@ QListViewItem* UploadTreeView::itemByUrl(const KURL& a_url)
return 0L;
}
-void UploadTreeView::slotDoubleClicked(QListViewItem *item, const QPoint &, int )
+void UploadTreeView::slotDoubleClicked(TQListViewItem *item, const TQPoint &, int )
{
item->setOpen(!item->isOpen());
}
diff --git a/quanta/treeviews/uploadtreeview.h b/quanta/treeviews/uploadtreeview.h
index 85676e41..629f728d 100644
--- a/quanta/treeviews/uploadtreeview.h
+++ b/quanta/treeviews/uploadtreeview.h
@@ -16,9 +16,9 @@
#ifndef UPLOADTREEVIEW_H
#define UPLOADTREEVIEW_H
-#include <qdir.h>
-#include <qpixmap.h>
-#include <qheader.h>
+#include <tqdir.h>
+#include <tqpixmap.h>
+#include <tqheader.h>
#include "uploadtreefolder.h"
#include "uploadtreefile.h"
@@ -32,29 +32,29 @@ class KFileItem;
class UploadTreeView : public KListView {
Q_OBJECT
public:
- UploadTreeView( QWidget *parent, const char *name=0L );
+ UploadTreeView( TQWidget *parent, const char *name=0L );
~UploadTreeView();
UploadTreeFile* addItem( const KURL &a_url, const KFileItem &a_fileItem);
- QListViewItem* findItem( const QString& );
- int checkboxTree( QListViewItem *it = 0);
- void expandAll( QListViewItem * = 0 );
- void collapseAll( QListViewItem * = 0 );
- void invertAll( QListViewItem * = 0 );
+ TQListViewItem* findItem( const TQString& );
+ int checkboxTree( TQListViewItem *it = 0);
+ void expandAll( TQListViewItem * = 0 );
+ void collapseAll( TQListViewItem * = 0 );
+ void invertAll( TQListViewItem * = 0 );
virtual void selectAll( bool select);
/** No descriptions */
- QListViewItem* itemByUrl(const KURL& a_url);
+ TQListViewItem* itemByUrl(const KURL& a_url);
public slots:
- void slotSelectFile( QListViewItem * );
+ void slotSelectFile( TQListViewItem * );
void slotSelectFile( );
- void selectAllUnderNode( QListViewItem *it, bool select );
+ void selectAllUnderNode( TQListViewItem *it, bool select );
private slots:
- void slotDoubleClicked(QListViewItem *, const QPoint &, int );
+ void slotDoubleClicked(TQListViewItem *, const TQPoint &, int );
private:
- UploadTreeFolder* findFolder( UploadTreeFolder *, const QString&);
- UploadTreeFolder* printTree( UploadTreeFolder *, const QString&);
+ UploadTreeFolder* findFolder( UploadTreeFolder *, const TQString&);
+ UploadTreeFolder* printTree( UploadTreeFolder *, const TQString&);
};
#endif
diff --git a/quanta/utility/newstuff.cpp b/quanta/utility/newstuff.cpp
index f6cbf397..bc3a052f 100644
--- a/quanta/utility/newstuff.cpp
+++ b/quanta/utility/newstuff.cpp
@@ -13,7 +13,7 @@
* *
***************************************************************************/
//qt includes
-#include <qfileinfo.h>
+#include <tqfileinfo.h>
//kde includes
#include <kglobal.h>
@@ -36,8 +36,8 @@ void QNewDTEPStuff::installResource()
if (tar.open(IO_ReadOnly))
{
const KArchiveDirectory *directory = tar.directory();
- QString dtepDir =KGlobal::dirs()->saveLocation("data") + resourceDir + "dtep/";
- QString dtdName = (*directory->entries().at(0));
+ TQString dtepDir =KGlobal::dirs()->saveLocation("data") + resourceDir + "dtep/";
+ TQString dtdName = (*directory->entries().at(0));
if (dtdName.isEmpty())
{
ok = false;
@@ -53,16 +53,16 @@ void QNewDTEPStuff::installResource()
KMessageBox::error(parentWidget(), i18n("There was an error with the downloaded DTEP tarball file. Possible causes are damaged archive or invalid directory structure in the archive."), i18n("DTEP Installation Error"));
}
-QNewToolbarStuff::QNewToolbarStuff(const QString &type, QWidget *parentWidget)
+QNewToolbarStuff::QNewToolbarStuff(const TQString &type, TQWidget *parentWidget)
:KNewStuffSecure(type, parentWidget)
{
- connect(this, SIGNAL(loadToolbarFile(const KURL&)), parentWidget, SLOT(slotLoadToolbarFile(const KURL&)));
+ connect(this, TQT_SIGNAL(loadToolbarFile(const KURL&)), parentWidget, TQT_SLOT(slotLoadToolbarFile(const KURL&)));
}
void QNewToolbarStuff::installResource()
{
- KURL destURL = KURL::fromPathOrURL(KGlobal::dirs()->saveLocation("data") + resourceDir + "toolbars/" + QFileInfo(m_tarName).fileName());
+ KURL destURL = KURL::fromPathOrURL(KGlobal::dirs()->saveLocation("data") + resourceDir + "toolbars/" + TQFileInfo(m_tarName).fileName());
bool ok = true;
if (QuantaCommon::checkOverwrite(destURL, parentWidget()))
{
@@ -80,16 +80,16 @@ void QNewToolbarStuff::installResource()
}
}
-QNewTemplateStuff::QNewTemplateStuff(const QString &type, QWidget *parentWidget)
+QNewTemplateStuff::QNewTemplateStuff(const TQString &type, TQWidget *parentWidget)
:KNewStuffSecure(type, parentWidget)
{
- connect(this, SIGNAL(openFile(const KURL&)), parentWidget, SLOT(slotFileOpen(const KURL&)));
+ connect(this, TQT_SIGNAL(openFile(const KURL&)), parentWidget, TQT_SLOT(slotFileOpen(const KURL&)));
}
void QNewTemplateStuff::installResource()
{
- KURL destURL = KURL::fromPathOrURL(KGlobal::dirs()->saveLocation("data") + resourceDir + "templates/" + QFileInfo(m_tarName).fileName());
+ KURL destURL = KURL::fromPathOrURL(KGlobal::dirs()->saveLocation("data") + resourceDir + "templates/" + TQFileInfo(m_tarName).fileName());
bool ok = true;
if (QuantaCommon::checkOverwrite(destURL, parentWidget()))
{
@@ -114,7 +114,7 @@ void QNewScriptStuff::installResource()
if (tar.open(IO_ReadOnly))
{
const KArchiveDirectory *directory = tar.directory();
- QString scriptsDir =KGlobal::dirs()->saveLocation("data") + resourceDir + "scripts/";
+ TQString scriptsDir =KGlobal::dirs()->saveLocation("data") + resourceDir + "scripts/";
directory->copyTo(scriptsDir, true);
tar.close();
} else
@@ -131,7 +131,7 @@ void QNewDocStuff::installResource()
if (tar.open(IO_ReadOnly))
{
const KArchiveDirectory *directory = tar.directory();
- QString docDir =KGlobal::dirs()->saveLocation("data") + resourceDir + "doc/";
+ TQString docDir =KGlobal::dirs()->saveLocation("data") + resourceDir + "doc/";
directory->copyTo(docDir, true);
tar.close();
} else
diff --git a/quanta/utility/newstuff.h b/quanta/utility/newstuff.h
index dd2ad104..bdd49a50 100644
--- a/quanta/utility/newstuff.h
+++ b/quanta/utility/newstuff.h
@@ -17,7 +17,7 @@
#define NEWSTUFF_H
//qt includes
-#include <qobject.h>
+#include <tqobject.h>
//kde includes
#include <knewstuff/knewstuffsecure.h>
@@ -34,7 +34,7 @@ class QNewDTEPStuff: public KNewStuffSecure
Q_OBJECT
public:
- QNewDTEPStuff(const QString &type, QWidget *parentWidget=0)
+ QNewDTEPStuff(const TQString &type, TQWidget *parentWidget=0)
:KNewStuffSecure(type, parentWidget){};
~QNewDTEPStuff() {};
@@ -52,7 +52,7 @@ class QNewToolbarStuff: public KNewStuffSecure
Q_OBJECT
public:
- QNewToolbarStuff(const QString &type, QWidget *parentWidget=0);
+ QNewToolbarStuff(const TQString &type, TQWidget *parentWidget=0);
~QNewToolbarStuff() {};
signals:
@@ -72,7 +72,7 @@ class QNewTemplateStuff: public KNewStuffSecure
Q_OBJECT
public:
- QNewTemplateStuff(const QString &type, QWidget *parentWidget=0);
+ QNewTemplateStuff(const TQString &type, TQWidget *parentWidget=0);
~QNewTemplateStuff() {};
signals:
@@ -92,7 +92,7 @@ class QNewScriptStuff: public KNewStuffSecure
Q_OBJECT
public:
- QNewScriptStuff(const QString &type, QWidget *parentWidget=0)
+ QNewScriptStuff(const TQString &type, TQWidget *parentWidget=0)
:KNewStuffSecure(type, parentWidget){};
~QNewScriptStuff() {};
@@ -110,7 +110,7 @@ class QNewDocStuff: public KNewStuffSecure
Q_OBJECT
public:
- QNewDocStuff(const QString &type, QWidget *parentWidget=0)
+ QNewDocStuff(const TQString &type, TQWidget *parentWidget=0)
:KNewStuffSecure(type, parentWidget){};
~QNewDocStuff() {};
diff --git a/quanta/utility/qpevents.cpp b/quanta/utility/qpevents.cpp
index bb0d5db4..7bad8715 100644
--- a/quanta/utility/qpevents.cpp
+++ b/quanta/utility/qpevents.cpp
@@ -15,9 +15,9 @@
***************************************************************************/
//qt includes
-#include <qdatetime.h>
-#include <qfile.h>
-#include <qtextstream.h>
+#include <tqdatetime.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
//kde includes
#include <kapplication.h>
@@ -36,8 +36,8 @@
#include "tagaction.h"
//TODO: Better create a class for each internal event action
-QPEvents::QPEvents(QObject *parent, const char *name)
- : QObject(parent, name)
+QPEvents::QPEvents(TQObject *parent, const char *name)
+ : TQObject(parent, name)
{
m_eventNames["before_save"] = i18n("Before Document Save");
m_eventNames["after_save"] = i18n("After Document Save");
@@ -70,7 +70,7 @@ QPEvents::~QPEvents()
{
}
-void QPEvents::slotEventHappened(const QString& name, const QString& argument1, const QString& argument2)
+void QPEvents::slotEventHappened(const TQString& name, const TQString& argument1, const TQString& argument2)
{
if (!quantaApp || !Project::ref()->eventsEnabled())
return;
@@ -79,8 +79,8 @@ void QPEvents::slotEventHappened(const QString& name, const QString& argument1,
if (events->contains(name))
{
m_eventName = name;
- QValueList<EventAction> evList = (*events)[name];
- for (QValueList<EventAction>::Iterator it = evList.begin(); it != evList.end(); ++it)
+ TQValueList<EventAction> evList = (*events)[name];
+ for (TQValueList<EventAction>::Iterator it = evList.begin(); it != evList.end(); ++it)
{
EventAction ev = *it;
if (ev.type == EventAction::Internal)
@@ -131,7 +131,7 @@ void QPEvents::slotEventHappened(const QString& name, const QString& argument1,
}
} else
{
- QString relativePath = QExtFileInfo::toRelative(url, Project::ref()->projectBaseURL()).path();
+ TQString relativePath = QExtFileInfo::toRelative(url, Project::ref()->projectBaseURL()).path();
if (inProject && name == "after_save")
{
ev.arguments << i18n("Document saved");
@@ -230,16 +230,16 @@ bool QPEvents::handleEvent(const EventAction& ev)
{
if (ev.action == "email")
{
- QString receiver = ev.arguments[0];
+ TQString receiver = ev.arguments[0];
TeamMember member;
if (receiver == "teamleader")
member = Project::ref()->teamLeader();
else if (receiver.startsWith("subprojectleader-"))
{
- QString s = receiver.remove("subprojectleader-");
+ TQString s = receiver.remove("subprojectleader-");
member = Project::ref()->subprojectLeader(s);
SubProject subProject;
- QValueList<SubProject> *subprojects = Project::ref()->subprojects();
+ TQValueList<SubProject> *subprojects = Project::ref()->subprojects();
for (uint i = 0 ; i < subprojects->count(); i++)
{
if ((*subprojects)[i].name == s)
@@ -257,16 +257,16 @@ bool QPEvents::handleEvent(const EventAction& ev)
else if (receiver.startsWith("taskleader-"))
member = Project::ref()->taskLeader(receiver.remove("taskleader-"));
- QString body;
+ TQString body;
for (uint i = 2; i < ev.arguments.count(); i++)
body += ev.arguments[i] + "\n";
- kapp->invokeMailer(member.name + "<" + member.email + ">", "", "", ev.arguments[1], body, "", QStringList(), "");
+ kapp->invokeMailer(member.name + "<" + member.email + ">", "", "", ev.arguments[1], body, "", TQStringList(), "");
return true;
}
if (ev.action == "log")
{
- QString logFile = ev.arguments[0];
+ TQString logFile = ev.arguments[0];
KURL url = KURL::fromPathOrURL(logFile);
if (url.isValid() && !url.isLocalFile())
{
@@ -283,7 +283,7 @@ bool QPEvents::handleEvent(const EventAction& ev)
return false;
}
}
- QFile file(url.path());
+ TQFile file(url.path());
bool result;
if (ev.arguments[2] == "create_new")
result = file.open(IO_WriteOnly);
@@ -291,10 +291,10 @@ bool QPEvents::handleEvent(const EventAction& ev)
result = file.open(IO_WriteOnly | IO_Append);
if (result)
{
- QTextStream stream(&file);
- stream.setEncoding(QTextStream::UnicodeUTF8);
+ TQTextStream stream(&file);
+ stream.setEncoding(TQTextStream::UnicodeUTF8);
//Note: the log text should not be translated.
- QString s = QDateTime::currentDateTime().toString(Qt::ISODate) + ": ";
+ TQString s = TQDateTime::currentDateTime().toString(Qt::ISODate) + ": ";
s.append( "Event : " + m_eventName + " : ");
s.append( "Action: " + ev.action + " : ");
if (ev.arguments[1] == "full")
@@ -320,7 +320,7 @@ bool QPEvents::handleEvent(const EventAction& ev)
//KMessageBox::sorry(0L, i18n("External event actions are not yet supported."));
if (ev.action == "script" || ev.action =="action")
{
- QString name = ev.arguments[0];
+ TQString name = ev.arguments[0];
KAction *action = quantaApp->actionCollection()->action(name);
TagAction *tagAction = dynamic_cast<TagAction*>(action);
if (tagAction)
@@ -344,7 +344,7 @@ bool QPEvents::handleEvent(const EventAction& ev)
return false;
}
-QString QPEvents::fullEventName(const QString &name)
+TQString QPEvents::fullEventName(const TQString &name)
{
if (m_eventNames.contains(name))
return m_eventNames[name];
@@ -352,7 +352,7 @@ QString QPEvents::fullEventName(const QString &name)
return name;
}
-QString QPEvents::fullActionName(const QString& name)
+TQString QPEvents::fullActionName(const TQString& name)
{
if (m_actionNames.contains(name))
return m_actionNames[name];
@@ -360,9 +360,9 @@ QString QPEvents::fullActionName(const QString& name)
return name;
}
-QString QPEvents::eventName(const QString &fullName)
+TQString QPEvents::eventName(const TQString &fullName)
{
- for (QMap<QString, QString>::ConstIterator it = m_eventNames.constBegin(); it != m_eventNames.constEnd(); ++it)
+ for (TQMap<TQString, TQString>::ConstIterator it = m_eventNames.constBegin(); it != m_eventNames.constEnd(); ++it)
{
if (fullName == it.data())
return it.key();
@@ -370,9 +370,9 @@ QString QPEvents::eventName(const QString &fullName)
return fullName;
}
-QString QPEvents::actionName(const QString &fullName)
+TQString QPEvents::actionName(const TQString &fullName)
{
- for (QMap<QString, QString>::ConstIterator it = m_actionNames.constBegin(); it != m_actionNames.constEnd(); ++it)
+ for (TQMap<TQString, TQString>::ConstIterator it = m_actionNames.constBegin(); it != m_actionNames.constEnd(); ++it)
{
if (fullName == it.data())
return it.key();
@@ -380,20 +380,20 @@ QString QPEvents::actionName(const QString &fullName)
return fullName;
}
-QStringList QPEvents::eventNames()
+TQStringList QPEvents::eventNames()
{
- QStringList names;
- for (QMap<QString, QString>::ConstIterator it = m_eventNames.constBegin(); it != m_eventNames.constEnd(); ++it)
+ TQStringList names;
+ for (TQMap<TQString, TQString>::ConstIterator it = m_eventNames.constBegin(); it != m_eventNames.constEnd(); ++it)
{
names << it.data();
}
return names;
}
-QStringList QPEvents::actionNames()
+TQStringList QPEvents::actionNames()
{
- QStringList names;
- for (QMap<QString, QString>::ConstIterator it = m_actionNames.constBegin(); it != m_actionNames.constEnd(); ++it)
+ TQStringList names;
+ for (TQMap<TQString, TQString>::ConstIterator it = m_actionNames.constBegin(); it != m_actionNames.constEnd(); ++it)
{
names << it.data();
}
diff --git a/quanta/utility/qpevents.h b/quanta/utility/qpevents.h
index 83f6d37b..373ae089 100644
--- a/quanta/utility/qpevents.h
+++ b/quanta/utility/qpevents.h
@@ -17,7 +17,7 @@
#ifndef QPEVENTS_H
#define QPEVENTS_H
-#include <qobject.h>
+#include <tqobject.h>
/**
@author Andras Mantia
@@ -36,10 +36,10 @@ struct EventAction {
this is the name of the script, in case of internal events it can be one of the
following: "email"
*/
- QString action;
+ TQString action;
/** The arguments for the event action. It is different for each action.
*/
- QStringList arguments;
+ TQStringList arguments;
};
/** The configured events. The key is the event name, the data is the event description.
@@ -48,32 +48,32 @@ before a file is saved. Possible key names are: before_save, after_save, after_o
after_project_open, after_project_save, before_upload, after_upload, after_project_add,
after_project_remove, after_commit
*/
-typedef QMap<QString, QValueList<EventAction> > EventActions;
+typedef TQMap<TQString, TQValueList<EventAction> > EventActions;
class QPEvents : public QObject
{
Q_OBJECT
public:
- static QPEvents* const ref(QObject *parent = 0L)
+ static QPEvents* const ref(TQObject *parent = 0L)
{
static QPEvents *m_ref;
if (!m_ref) m_ref = new QPEvents(parent);
return m_ref;
}
~QPEvents();
- QString fullEventName(const QString &name);
- QString fullActionName(const QString &name);
- QString eventName(const QString &fullName);
- QString actionName(const QString &fullName);
- QStringList eventNames();
- QStringList actionNames();
+ TQString fullEventName(const TQString &name);
+ TQString fullActionName(const TQString &name);
+ TQString eventName(const TQString &fullName);
+ TQString actionName(const TQString &fullName);
+ TQStringList eventNames();
+ TQStringList actionNames();
public slots:
/** Called when an event has happened */
- void slotEventHappened(const QString& name, const QString& argument1, const QString& argument2);
+ void slotEventHappened(const TQString& name, const TQString& argument1, const TQString& argument2);
private:
- QPEvents(QObject *parent = 0, const char *name = 0);
+ QPEvents(TQObject *parent = 0, const char *name = 0);
/** Calls the action associated with an event. Returns true if the call succeeded, false
otherwise. The call might fail if:
- the action type is unknown
@@ -82,9 +82,9 @@ private:
*/
bool handleEvent(const EventAction& ev);
- QMap<QString, QString> m_eventNames;
- QMap<QString, QString> m_actionNames;
- QString m_eventName;
+ TQMap<TQString, TQString> m_eventNames;
+ TQMap<TQString, TQString> m_actionNames;
+ TQString m_eventName;
};
#endif
diff --git a/quanta/utility/quantabookmarks.cpp b/quanta/utility/quantabookmarks.cpp
index ebca5843..12ba69c5 100644
--- a/quanta/utility/quantabookmarks.cpp
+++ b/quanta/utility/quantabookmarks.cpp
@@ -31,21 +31,21 @@
#include <ktexteditor/editinterface.h>
#include <ktexteditor/viewcursorinterface.h>
-#include <qregexp.h>
-#include <qmemarray.h>
-#include <qevent.h>
+#include <tqregexp.h>
+#include <tqmemarray.h>
+#include <tqevent.h>
#include "viewmanager.h"
#include "document.h"
/**
Utility: selection sort
- sort a QMemArray<uint> in ascending order.
+ sort a TQMemArray<uint> in ascending order.
max it the largest (zerobased) index to sort.
To sort the entire array: ssort( *array, array.size() -1 );
This is only efficient if ran only once.
*/
-static void ssort( QMemArray<uint> &a, int max )
+static void ssort( TQMemArray<uint> &a, int max )
{
uint tmp, j, maxpos;
for ( uint h = max; h >= 1; h-- )
@@ -62,7 +62,7 @@ static void ssort( QMemArray<uint> &a, int max )
// TODO add a insort() or bubble_sort - more efficient for aboutToShow() ?
QuantaBookmarks::QuantaBookmarks(ViewManager *parent,Sorting sort, bool onlyFromActualDocument )
- : QObject( parent, "bookmarks" )
+ : TQObject( parent, "bookmarks" )
, m_sorting(sort)
, m_onlyFromActualDocument(onlyFromActualDocument)
{
@@ -86,38 +86,38 @@ void QuantaBookmarks::init(KActionCollection* ac)
{
m_bookmarkToggle = new KToggleAction(
i18n("Set &Bookmark"), "bookmark", CTRL+Key_B,
- this, SLOT(toggleBookmark()),
+ this, TQT_SLOT(toggleBookmark()),
ac, "bookmarks_toggle" );
m_bookmarkToggle->setWhatsThis(i18n("If a line has no bookmark then add one, otherwise remove it."));
m_bookmarkToggle->setCheckedState( i18n("Clear &Bookmark") );
m_bookmarkClear = new KAction(
i18n("Clear &All Bookmarks"), 0,
- this, SLOT(clearBookmarks()),
+ this, TQT_SLOT(clearBookmarks()),
ac, "bookmarks_clear");
m_bookmarkClear->setWhatsThis(i18n("Remove all bookmarks of the current document."));
m_goNext = new KAction(
i18n("Next Bookmark"), "next", ALT + Key_PageDown,
- this, SLOT(goNext()),
+ this, TQT_SLOT(goNext()),
ac, "bookmarks_next");
m_goNext->setWhatsThis(i18n("Go to the next bookmark."));
m_goPrevious = new KAction(
i18n("Previous Bookmark"), "previous", ALT + Key_PageUp,
- this, SLOT(goPrevious()),
+ this, TQT_SLOT(goPrevious()),
ac, "bookmarks_previous");
m_goPrevious->setWhatsThis(i18n("Go to the previous bookmark."));
//connect the aboutToShow() and aboutToHide() signals with
//the bookmarkMenuAboutToShow() and bookmarkMenuAboutToHide() slots
- connect( m_bookmarksMenu, SIGNAL(aboutToShow()), this, SLOT(bookmarkMenuAboutToShow()));
- connect( m_bookmarksMenu, SIGNAL(aboutToHide()), this, SLOT(bookmarkMenuAboutToHide()) );
+ connect( m_bookmarksMenu, TQT_SIGNAL(aboutToShow()), this, TQT_SLOT(bookmarkMenuAboutToShow()));
+ connect( m_bookmarksMenu, TQT_SIGNAL(aboutToHide()), this, TQT_SLOT(bookmarkMenuAboutToHide()) );
marksChanged ();
}
-void QuantaBookmarks::setBookmarksMenu(QPopupMenu* bookmarksMenu)
+void QuantaBookmarks::setBookmarksMenu(TQPopupMenu* bookmarksMenu)
{
m_bookmarksMenu = bookmarksMenu;
@@ -147,7 +147,7 @@ void QuantaBookmarks::clearBookmarks ()
Document *doc = m_viewManager->activeDocument();
if (doc && doc->markIf)
{
- QPtrList<KTextEditor::Mark> m = doc->markIf->marks();
+ TQPtrList<KTextEditor::Mark> m = doc->markIf->marks();
for (uint i=0; i < m.count(); i++)
doc->markIf->removeMark( m.at(i)->line, KTextEditor::MarkInterface::markType01 );
@@ -156,21 +156,21 @@ void QuantaBookmarks::clearBookmarks ()
}
}
-int QuantaBookmarks::insertBookmarks(QPopupMenu& menu, Document *doc, bool insertNavigationItems )
+int QuantaBookmarks::insertBookmarks(TQPopupMenu& menu, Document *doc, bool insertNavigationItems )
{
int insertedItems = 0;
if (doc->markIf)
{
uint line = doc->viewCursorIf->cursorLine();
- const QRegExp re("&(?!&)");
+ const TQRegExp re("&(?!&)");
int idx( -1 );
int old_menu_count = menu.count();
KTextEditor::Mark *next = 0;
KTextEditor::Mark *prev = 0;
- QPtrList<KTextEditor::Mark> m = doc->markIf->marks();
- QMemArray<uint> sortArray( m.count() );
- QPtrListIterator<KTextEditor::Mark> it( m );
+ TQPtrList<KTextEditor::Mark> m = doc->markIf->marks();
+ TQMemArray<uint> sortArray( m.count() );
+ TQPtrListIterator<KTextEditor::Mark> it( m );
if ( it.count() > 0 && insertNavigationItems)
menu.insertSeparator();
@@ -179,7 +179,7 @@ int QuantaBookmarks::insertBookmarks(QPopupMenu& menu, Document *doc, bool inser
{
if( (*it)->type & KTextEditor::MarkInterface::markType01 )
{
- QString bText = KStringHandler::rEmSqueeze
+ TQString bText = KStringHandler::rEmSqueeze
( doc->editIf->textLine( (*it)->line ),
menu.fontMetrics(), 32 );
bText.replace(re, "&&"); // kill undesired accellerators!
@@ -196,7 +196,7 @@ int QuantaBookmarks::insertBookmarks(QPopupMenu& menu, Document *doc, bool inser
}
menu.insertItem(
- QString("%1 - \"%2\"").arg( (*it)->line+1 ).arg( bText ),
+ TQString("%1 - \"%2\"").arg( (*it)->line+1 ).arg( bText ),
0, (*it)->line, idx );
insertedItems++;
@@ -234,7 +234,7 @@ int QuantaBookmarks::insertBookmarks(QPopupMenu& menu, Document *doc, bool inser
if ( next || prev )
menu.insertSeparator( idx );
}
- connect(&menu, SIGNAL(activated(int)), this, SLOT(gotoLineNumber(int)));
+ connect(&menu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(gotoLineNumber(int)));
}
return insertedItems;
}
@@ -259,10 +259,10 @@ void QuantaBookmarks::bookmarkMenuAboutToShow()
Document *doc = m_doc;
if (!doc)
doc = m_viewManager->activeDocument();
- QValueList<Document*> openedDocuments = m_viewManager->openedDocuments();
+ TQValueList<Document*> openedDocuments = m_viewManager->openedDocuments();
if (doc && doc->markIf)
{
- QPtrList<KTextEditor::Mark> m = doc->markIf->marks();
+ TQPtrList<KTextEditor::Mark> m = doc->markIf->marks();
if (!m_onlyFromActualDocument)
{
@@ -279,11 +279,11 @@ void QuantaBookmarks::bookmarkMenuAboutToShow()
if (!m_onlyFromActualDocument)
{
int i = 0;
- for (QValueList<Document*>::Iterator it = openedDocuments.begin(); it != openedDocuments.end(); ++it)
+ for (TQValueList<Document*>::Iterator it = openedDocuments.begin(); it != openedDocuments.end(); ++it)
{
if (*it != doc)
{
- QPopupMenu *menu = new QPopupMenu(m_bookmarksMenu);
+ TQPopupMenu *menu = new TQPopupMenu(m_bookmarksMenu);
m_bookmarksMenu->insertItem((*it)->url().fileName(), menu);
if (insertBookmarks(*menu, *it, false) > 0)
{
@@ -317,7 +317,7 @@ void QuantaBookmarks::goNext()
doc = m_viewManager->activeDocument();
if (doc && doc->markIf)
{
- QPtrList<KTextEditor::Mark> m = doc->markIf->marks();
+ TQPtrList<KTextEditor::Mark> m = doc->markIf->marks();
if (m.isEmpty())
return;
@@ -340,7 +340,7 @@ void QuantaBookmarks::goPrevious()
doc = m_viewManager->activeDocument();
if (doc && doc->markIf)
{
- QPtrList<KTextEditor::Mark> m = doc->markIf->marks();
+ TQPtrList<KTextEditor::Mark> m = doc->markIf->marks();
if (m.isEmpty())
return;
@@ -361,7 +361,7 @@ void QuantaBookmarks::gotoLineNumber(int line)
Document *doc = m_doc;
if (!doc)
doc = m_viewManager->activeDocument();
- const QObject *s = sender();
+ const TQObject *s = sender();
for (uint i = 0; i < m_othersMenuList.count(); i++)
{
if (s == m_othersMenuList[i])
diff --git a/quanta/utility/quantabookmarks.h b/quanta/utility/quantabookmarks.h
index 10c0aad4..5170a774 100644
--- a/quanta/utility/quantabookmarks.h
+++ b/quanta/utility/quantabookmarks.h
@@ -24,8 +24,8 @@ Quanta, so it works over multiple document */
#ifndef QUANTABOOKMARKS_H
#define QUANTABOOKMARKS_H
-#include <qobject.h>
-#include <qptrlist.h>
+#include <tqobject.h>
+#include <tqptrlist.h>
namespace KTextEditor { class Mark; }
@@ -50,14 +50,14 @@ class QuantaBookmarks : public QObject
virtual ~QuantaBookmarks();
void createActions( KActionCollection* );
- void setBookmarksMenu(QPopupMenu* bookmarksMenu);
+ void setBookmarksMenu(TQPopupMenu* bookmarksMenu);
QuantaBookmarks::Sorting sorting() { return m_sorting; };
void setSorting( Sorting s ) { m_sorting = s; };
void setDocument(Document *doc) {m_doc = doc;}
protected:
- int insertBookmarks(QPopupMenu& menu, Document *doc, bool insertNavigationItems = true);
+ int insertBookmarks(TQPopupMenu& menu, Document *doc, bool insertNavigationItems = true);
void init(KActionCollection* ac = 0L);
private slots:
@@ -74,7 +74,7 @@ class QuantaBookmarks : public QObject
void marksChanged ();
signals:
- void gotoFileAndLine(const QString&, int, int);
+ void gotoFileAndLine(const TQString&, int, int);
private:
KToggleAction* m_bookmarkToggle;
@@ -83,9 +83,9 @@ class QuantaBookmarks : public QObject
KAction* m_goPrevious;
Sorting m_sorting;
- QPopupMenu* m_bookmarksMenu;
- QValueList<QPopupMenu*> m_othersMenuList;
- QValueList<Document*> m_others;
+ TQPopupMenu* m_bookmarksMenu;
+ TQValueList<TQPopupMenu*> m_othersMenuList;
+ TQValueList<Document*> m_others;
ViewManager* m_viewManager;
Document *m_doc;
bool m_onlyFromActualDocument;
diff --git a/quanta/utility/quantacommon.cpp b/quanta/utility/quantacommon.cpp
index 7cc7fb1b..93421764 100644
--- a/quanta/utility/quantacommon.cpp
+++ b/quanta/utility/quantacommon.cpp
@@ -18,13 +18,13 @@
#include <unistd.h>
//qt includes
-#include <qstringlist.h>
-#include <qdict.h>
-#include <qdir.h>
-#include <qdom.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qwidget.h>
+#include <tqstringlist.h>
+#include <tqdict.h>
+#include <tqdir.h>
+#include <tqdom.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqwidget.h>
//kde includes
#include <kapplication.h>
@@ -48,10 +48,10 @@
#include <ktoolbar.h>
#include <ktoolbarbutton.h>
#include <kstringhandler.h>
-#include <qwhatsthis.h>
-#include <qtimer.h>
-#include <qclipboard.h>
-#include <qdatastream.h>
+#include <tqwhatsthis.h>
+#include <tqtimer.h>
+#include <tqclipboard.h>
+#include <tqdatastream.h>
#include "qextfileinfo.h"
#include "quantacommon.h"
@@ -61,22 +61,22 @@
QConfig qConfig; //holds the main configuration settings
-QString tmpDir;
+TQString tmpDir;
-QRegExp scriptBeginRx;
-QRegExp scriptEndRx;
+TQRegExp scriptBeginRx;
+TQRegExp scriptEndRx;
Node *baseNode;
Parser *parser;
KDirWatch *fileWatcher;
KProgress *progressBar;
-QString toolbarExtension = ".toolbar.tgz";
-QRegExp newLineRx("\\n");
-QStringList charList; //hold the list of the &char; chars. See the data/chars file.
-QMap<int, QString> replacementMap;
-QPtrList<KTempFile> tempFileList;
-QPtrList<KTempDir> tempDirList;
+TQString toolbarExtension = ".toolbar.tgz";
+TQRegExp newLineRx("\\n");
+TQStringList charList; //hold the list of the &char; chars. See the data/chars file.
+TQMap<int, TQString> replacementMap;
+TQPtrList<KTempFile> tempFileList;
+TQPtrList<KTempDir> tempDirList;
bool typingInProgress;
QuantaCommon::QuantaCommon(){
@@ -86,9 +86,9 @@ QuantaCommon::~QuantaCommon(){
}
/** convert tag to upper or lower case */
-QString QuantaCommon::tagCase( const QString& tag)
+TQString QuantaCommon::tagCase( const TQString& tag)
{
- QString sTag = tag;
+ TQString sTag = tag;
switch (qConfig.tagCase)
{
@@ -100,9 +100,9 @@ QString QuantaCommon::tagCase( const QString& tag)
}
/** convert attr of tag to upper or lower case */
-QString QuantaCommon::attrCase( const QString& attr)
+TQString QuantaCommon::attrCase( const TQString& attr)
{
- QString sAttr = attr;
+ TQString sAttr = attr;
switch (qConfig.attrCase)
{
@@ -115,14 +115,14 @@ QString QuantaCommon::attrCase( const QString& attr)
/** returns the attribute value in quoted form, by taking care of the
quotation setting*/
-QString QuantaCommon::quoteAttributeValue(const QString& value)
+TQString QuantaCommon::quoteAttributeValue(const TQString& value)
{
- QString quote = qConfig.attrValueQuotation;
+ TQString quote = qConfig.attrValueQuotation;
return quote + value + quote;
}
/** Set's up the url correctly from urlString. */
-void QuantaCommon::setUrl(KURL &url, const QString& urlString)
+void QuantaCommon::setUrl(KURL &url, const TQString& urlString)
{
KURL oldUrl = url;
url = urlString;
@@ -136,7 +136,7 @@ void QuantaCommon::setUrl(KURL &url, const QString& urlString)
}
/** No descriptions */
-bool QuantaCommon::isSingleTag(const QString& dtdName, const QString& tag)
+bool QuantaCommon::isSingleTag(const TQString& dtdName, const TQString& tag)
{
bool single = false;
@@ -147,7 +147,7 @@ bool QuantaCommon::isSingleTag(const QString& dtdName, const QString& tag)
const DTDStruct* dtd = DTDs::ref()->find(dtdName);
if (dtd && !tag.isEmpty())
{
- QString searchForTag = (dtd->caseSensitive) ? tag : tag.upper();
+ TQString searchForTag = (dtd->caseSensitive) ? tag : tag.upper();
QTag* qtag = dtd->tagsList->find(searchForTag);
if (qtag)
single = qtag->isSingle();
@@ -157,14 +157,14 @@ bool QuantaCommon::isSingleTag(const QString& dtdName, const QString& tag)
}
/** No descriptions */
-bool QuantaCommon::isOptionalTag(const QString& dtdName, const QString& tag)
+bool QuantaCommon::isOptionalTag(const TQString& dtdName, const TQString& tag)
{
bool optional = false;
const DTDStruct* dtd = DTDs::ref()->find(dtdName);
if (dtd && !tag.isEmpty())
{
- QString searchForTag = (dtd->caseSensitive) ? tag : tag.upper();
+ TQString searchForTag = (dtd->caseSensitive) ? tag : tag.upper();
QTag* qtag = dtd->tagsList->find(searchForTag);
if (qtag)
optional = qtag->isOptional();
@@ -173,14 +173,14 @@ bool QuantaCommon::isOptionalTag(const QString& dtdName, const QString& tag)
return optional;
}
/** No descriptions */
-bool QuantaCommon::isKnownTag(const QString& dtdName, const QString& tag)
+bool QuantaCommon::isKnownTag(const TQString& dtdName, const TQString& tag)
{
bool known = false;
const DTDStruct* dtd = DTDs::ref()->find(dtdName);
if (dtd && !tag.isEmpty())
{
- QString searchForTag = (dtd->caseSensitive) ? tag : tag.upper();
+ TQString searchForTag = (dtd->caseSensitive) ? tag : tag.upper();
if (dtd->tagsList->find(searchForTag))
known = true;
}
@@ -188,14 +188,14 @@ bool QuantaCommon::isKnownTag(const QString& dtdName, const QString& tag)
return known;
}
-AttributeList* QuantaCommon::tagAttributes(const QString& dtdName, const QString& tag)
+AttributeList* QuantaCommon::tagAttributes(const TQString& dtdName, const TQString& tag)
{
AttributeList* attrs = 0L;
const DTDStruct* dtd = DTDs::ref()->find(dtdName);
if (dtd && !tag.isEmpty())
{
- QString searchForTag = (dtd->caseSensitive) ? tag : tag.upper();
+ TQString searchForTag = (dtd->caseSensitive) ? tag : tag.upper();
QTag* qtag = dtd->tagsList->find(searchForTag);
if (qtag)
attrs = qtag->attributes();
@@ -205,19 +205,19 @@ AttributeList* QuantaCommon::tagAttributes(const QString& dtdName, const QString
}
/** Returns the QTag object for the tag "tag" from the DTD named "dtdname". */
-QTag* QuantaCommon::tagFromDTD(const QString& dtdName, const QString& tag)
+QTag* QuantaCommon::tagFromDTD(const TQString& dtdName, const TQString& tag)
{
const DTDStruct* dtd = DTDs::ref()->find(dtdName);
return tagFromDTD(dtd, tag);
}
/** Returns the QTag object for the tag "tag" from the DTD. */
-QTag* QuantaCommon::tagFromDTD(const DTDStruct *dtd, const QString& tag)
+QTag* QuantaCommon::tagFromDTD(const DTDStruct *dtd, const TQString& tag)
{
QTag *qtag = 0;
if (dtd && !tag.isEmpty())
{
- QString searchForTag = (dtd->caseSensitive) ? tag : tag.upper();
+ TQString searchForTag = (dtd->caseSensitive) ? tag : tag.upper();
qtag = dtd->tagsList->find(searchForTag);
}
@@ -234,18 +234,18 @@ QTag* QuantaCommon::tagFromDTD(Node *node)
}
/** Returns an XML style string containing the GUI for attributes. */
-QString QuantaCommon::xmlFromAttributes(AttributeList* attributes)
+TQString QuantaCommon::xmlFromAttributes(AttributeList* attributes)
{
- QString xmlStr;
- QTextStream stream( &xmlStr, IO_WriteOnly );
- stream.setEncoding(QTextStream::UnicodeUTF8);
+ TQString xmlStr;
+ TQTextStream stream( &xmlStr, IO_WriteOnly );
+ stream.setEncoding(TQTextStream::UnicodeUTF8);
if (attributes)
{
int row = 0;
for ( uint i = 0; i< attributes->count();i++)
{
Attribute *attribute = attributes->at(i);
- QString name = attribute->name.left(1).upper()+attribute->name.right(attribute->name.length()-1);
+ TQString name = attribute->name.left(1).upper()+attribute->name.right(attribute->name.length()-1);
stream << " <attr name=\"" + attribute->name +"\" type=\""+attribute->type+"\"";
if (!attribute->defaultValue.isEmpty())
stream << " defaultValue=\"" + attribute->defaultValue + "\"";
@@ -301,13 +301,13 @@ KStandardDirs* QuantaCommon::pluginDirs(const char *type)
return dirs;
}
/** Return true, if the url belong to the mimetype group. */
-bool QuantaCommon::checkMimeGroup(const KURL& url, const QString& group)
+bool QuantaCommon::checkMimeGroup(const KURL& url, const TQString& group)
{
KMimeType::List list = KMimeType::allMimeTypes();
KMimeType::List::iterator it;
bool status = false;
KMimeType::Ptr mime = KMimeType::findByURL(url);
- QString mimetype = mime->name();
+ TQString mimetype = mime->name();
mimetype = mimetype.section('/',-1);
for ( it = list.begin(); it != list.end(); ++it )
{
@@ -327,7 +327,7 @@ bool QuantaCommon::checkMimeGroup(const KURL& url, const QString& group)
status = true;
} else
{
- QVariant v = mime->property("X-KDE-text");
+ TQVariant v = mime->property("X-KDE-text");
if (v.isValid())
status = v.toBool();
}
@@ -339,10 +339,10 @@ bool QuantaCommon::checkMimeGroup(const KURL& url, const QString& group)
}
/** Return true, if the url has the mimetype type. */
-bool QuantaCommon::checkMimeType(const KURL& url, const QString& type)
+bool QuantaCommon::checkMimeType(const KURL& url, const TQString& type)
{
bool status = false;
- QString mimetype = KMimeType::findByURL(url)->name();
+ TQString mimetype = KMimeType::findByURL(url)->name();
mimetype = mimetype.section('/',-1);
if (mimetype == type) status = true;
@@ -350,10 +350,10 @@ bool QuantaCommon::checkMimeType(const KURL& url, const QString& type)
}
/** Return true, if the url has exactly the mimetype type. */
-bool QuantaCommon::checkExactMimeType(const KURL& url, const QString& type)
+bool QuantaCommon::checkExactMimeType(const KURL& url, const TQString& type)
{
bool status = false;
- QString mimetype = KMimeType::findByURL(url)->name();
+ TQString mimetype = KMimeType::findByURL(url)->name();
if (mimetype == type) status = true;
return status;
@@ -371,15 +371,15 @@ KURL QuantaCommon::convertToPath(const KURL& url)
/** Return a string to be used when an url is saved to the project file.
Returns url.url() if it's an absolute url and
url.path() if the url is relative */
-QString QuantaCommon::qUrl(const KURL &url)
+TQString QuantaCommon::qUrl(const KURL &url)
{
- QString result = url.path();
+ TQString result = url.path();
if (url.path().startsWith("/")) result = url.url();
return result;
}
/** No descriptions */
-void QuantaCommon::dirCreationError(QWidget *widget, const KURL& url)
+void QuantaCommon::dirCreationError(TQWidget *widget, const KURL& url)
{
KMessageBox::error(widget, i18n("<qt>Cannot create folder<br><b>%1</b>.<br>Check that you have write permission in the parent folder or that the connection to<br><b>%2</b><br> is valid.</qt>")
.arg(url.prettyURL(0, KURL::StripFileProtocol))
@@ -388,26 +388,26 @@ void QuantaCommon::dirCreationError(QWidget *widget, const KURL& url)
/**
Adds the backslash before the special chars (like ?, *, . ) so the returned
string can be used in regular expressions.*/
-QString QuantaCommon::makeRxCompatible(const QString& s)
+TQString QuantaCommon::makeRxCompatible(const TQString& s)
{
const uint max = 7;
- const QRegExp rxs[max]={QRegExp("\\?"),
- QRegExp("\\*"),
- QRegExp("\\."),
- QRegExp("\\^"),
- QRegExp("\\$"),
- QRegExp("\\{"),
- QRegExp("\\}")
+ const TQRegExp rxs[max]={TQRegExp("\\?"),
+ TQRegExp("\\*"),
+ TQRegExp("\\."),
+ TQRegExp("\\^"),
+ TQRegExp("\\$"),
+ TQRegExp("\\{"),
+ TQRegExp("\\}")
};
- const QString strs[max]={QString("\\?"),
- QString("\\*"),
- QString("\\."),
- QString("\\^"),
- QString("\\$"),
- QString("\\{"),
- QString("\\}")
+ const TQString strs[max]={TQString("\\?"),
+ TQString("\\*"),
+ TQString("\\."),
+ TQString("\\^"),
+ TQString("\\$"),
+ TQString("\\{"),
+ TQString("\\}")
};
- QString str = s;
+ TQString str = s;
for (uint i = 0; i < max - 1; i++)
{
str.replace(rxs[i], strs[i]);
@@ -417,11 +417,11 @@ QString QuantaCommon::makeRxCompatible(const QString& s)
}
/** Returns the translated a_str in English. A "back-translation" useful e.g in case of CSS elements selected from a listbox. */
-QString QuantaCommon::i18n2normal(const QString& a_str)
+TQString QuantaCommon::i18n2normal(const TQString& a_str)
{
-//TODO: a QMap lookup would be faster, but we need a pre-built QMap<QString,QString>
+//TODO: a TQMap lookup would be faster, but we need a pre-built TQMap<TQString,TQString>
const int keywordNum = 15 *5;
- const QString keywords[keywordNum] =
+ const TQString keywords[keywordNum] =
{"normal", "italic", "oblique", "serif", "sans-serif",
"cursive", "fantasy", "monospace", "small-caps", "lighter",
"bold", "bolder", "xx-small", "x-small", "small",
@@ -437,7 +437,7 @@ QString QuantaCommon::i18n2normal(const QString& a_str)
"none", "pre", "nowrap", "disc", "circle",
"square", "decimal", "lower-roman","upper-roman","lower-alpha",
"upper-alpha","inside","outside", "auto", "both" };
- QString str = a_str;
+ TQString str = a_str;
if (!a_str.isEmpty())
{
for (int i = 0; i < keywordNum; i++)
@@ -452,15 +452,15 @@ QString QuantaCommon::i18n2normal(const QString& a_str)
return str;
}
-static const QChar space(' ');
+static const TQChar space(' ');
-void QuantaCommon::removeCommentsAndQuotes(QString &str, const DTDStruct *dtd)
+void QuantaCommon::removeCommentsAndQuotes(TQString &str, const DTDStruct *dtd)
{
//Replace all the commented strings and the escaped quotation marks (\", \')
// with spaces so they will not mess up our parsing
int pos = 0;
int l;
- QString s;
+ TQString s;
while (pos != -1)
{
pos = dtd->commentsStartRx.search(str, pos);
@@ -500,7 +500,7 @@ void QuantaCommon::removeCommentsAndQuotes(QString &str, const DTDStruct *dtd)
}
//Now replace the quoted strings with spaces
- QRegExp strRx("(\"[^\"]*\"|'[^']*')");
+ TQRegExp strRx("(\"[^\"]*\"|'[^']*')");
pos = 0;
while (pos != -1)
{
@@ -518,13 +518,13 @@ void QuantaCommon::removeCommentsAndQuotes(QString &str, const DTDStruct *dtd)
}
-bool QuantaCommon::insideCommentsOrQuotes(int position, const QString &string, const DTDStruct *dtd)
+bool QuantaCommon::insideCommentsOrQuotes(int position, const TQString &string, const DTDStruct *dtd)
{
//Return true if position is inside a commented or quoted string
- QString str = string;
+ TQString str = string;
int pos = 0;
int l;
- QString s;
+ TQString s;
while (pos != -1)
{
pos = dtd->commentsStartRx.search(str, pos);
@@ -568,7 +568,7 @@ bool QuantaCommon::insideCommentsOrQuotes(int position, const QString &string, c
}
//Now replace the quoted strings with spaces
- const QRegExp strRx("(\"[^\"]*\"|'[^']*')");
+ const TQRegExp strRx("(\"[^\"]*\"|'[^']*')");
pos = 0;
while (pos != -1)
{
@@ -589,14 +589,14 @@ bool QuantaCommon::insideCommentsOrQuotes(int position, const QString &string, c
return false;
}
-DCOPReply QuantaCommon::callDCOPMethod(const QString& interface, const QString& method, const QString& arguments)
+DCOPReply QuantaCommon::callDCOPMethod(const TQString& interface, const TQString& method, const TQString& arguments)
{
- QStringList argumentList = QStringList::split(",", arguments, true);
- QString app = "quanta";
+ TQStringList argumentList = TQStringList::split(",", arguments, true);
+ TQString app = "quanta";
if (!kapp->inherits("KUniqueApplication"))
{
pid_t pid = ::getpid();
- app += QString("-%1").arg(pid);
+ app += TQString("-%1").arg(pid);
}
DCOPRef quantaRef(app.utf8(), interface.utf8());
DCOPReply reply;
@@ -627,7 +627,7 @@ DCOPReply QuantaCommon::callDCOPMethod(const QString& interface, const QString&
return reply;
}
-void QuantaCommon::normalizeStructure(QString f,QStringList& l)
+void QuantaCommon::normalizeStructure(TQString f,TQStringList& l)
{
f.remove("\t");
f.remove("\n");
@@ -635,7 +635,7 @@ void QuantaCommon::normalizeStructure(QString f,QStringList& l)
while(f.contains("<"))
{
- QString z(f);
+ TQString z(f);
z.truncate(z.find(">")+1);
z.remove(0,z.find("<"));
f.remove(0,f.find(">")+1);
@@ -649,26 +649,26 @@ bool QuantaCommon::closesTag(Tag *tag1, Tag *tag2)
{
if (!tag2->nameSpace.isEmpty())
return false; //namespace missmatch
- QString tag1Name = tag1->dtd()->caseSensitive ? tag1->name : tag1->name.upper();
- QString tag2Name = tag2->dtd()->caseSensitive ? tag2->name : tag2->name.upper();
+ TQString tag1Name = tag1->dtd()->caseSensitive ? tag1->name : tag1->name.upper();
+ TQString tag2Name = tag2->dtd()->caseSensitive ? tag2->name : tag2->name.upper();
if ("/" + tag1Name != tag2Name)
return false; //not the closing tag
} else
{
if (tag2->nameSpace.isEmpty())
return false; //namespace missmatch
- QString tag1Name = tag1->dtd()->caseSensitive ? (tag1->nameSpace + tag1->name) : (tag1->nameSpace.upper() + tag1->name.upper());
- QString tag2Name = tag2->dtd()->caseSensitive ? (tag2->nameSpace + tag2->name) : (tag2->nameSpace.upper() + tag2->name.upper());
+ TQString tag1Name = tag1->dtd()->caseSensitive ? (tag1->nameSpace + tag1->name) : (tag1->nameSpace.upper() + tag1->name.upper());
+ TQString tag2Name = tag2->dtd()->caseSensitive ? (tag2->nameSpace + tag2->name) : (tag2->nameSpace.upper() + tag2->name.upper());
if ("/" + tag1Name != tag2Name)
return false; //namespace missmatch or not the closing tag
}
return true;
}
-bool QuantaCommon::closesTag(QString namespaceName, QString tagName, bool caseSensitive,
- QString namespaceName2, QString tagName2, bool caseSensitive2)
+bool QuantaCommon::closesTag(TQString namespaceName, TQString tagName, bool caseSensitive,
+ TQString namespaceName2, TQString tagName2, bool caseSensitive2)
{
- QString tag1Name, tag2Name;
+ TQString tag1Name, tag2Name;
if(namespaceName.isEmpty())
{
if(!namespaceName.isEmpty())
@@ -692,7 +692,7 @@ bool QuantaCommon::closesTag(QString namespaceName, QString tagName, bool caseSe
return true;
}
-int QuantaCommon::denyBinaryInsert(QWidget *window)
+int QuantaCommon::denyBinaryInsert(TQWidget *window)
{
int result = KMessageBox::questionYesNo(window, i18n("The file type is not recognized. \
Opening binary files may confuse Quanta.\n Are you sure you want to open this file?"),
@@ -700,25 +700,25 @@ int QuantaCommon::denyBinaryInsert(QWidget *window)
return result;
}
-bool QuantaCommon::checkOverwrite(const KURL& url, QWidget *window)
+bool QuantaCommon::checkOverwrite(const KURL& url, TQWidget *window)
{
bool result = true;
if (QExtFileInfo::exists(url, false, window))
{
if (KMessageBox::warningContinueCancel(window,
- i18n( "<qt>The file <b>%1</b> already exists.<br>Do you want to overwrite it?</qt>" ).arg(url.prettyURL(0, KURL::StripFileProtocol)), QString::null, i18n("Overwrite")) == KMessageBox::Cancel)
+ i18n( "<qt>The file <b>%1</b> already exists.<br>Do you want to overwrite it?</qt>" ).arg(url.prettyURL(0, KURL::StripFileProtocol)), TQString::null, i18n("Overwrite")) == KMessageBox::Cancel)
result = false;
}
return result;
}
-QStringList QuantaCommon::readPathListEntry(KConfig *config, const QString &pKey)
+TQStringList QuantaCommon::readPathListEntry(KConfig *config, const TQString &pKey)
{
- QStringList list = config->readPathListEntry(pKey);
- QStringList::Iterator end = list.end();
- for (QStringList::Iterator it = list.begin(); it != end; ++it)
+ TQStringList list = config->readPathListEntry(pKey);
+ TQStringList::Iterator end = list.end();
+ for (TQStringList::Iterator it = list.begin(); it != end; ++it)
{
KURL u = KURL::fromPathOrURL(*it);
if (u.isValid() && u.isLocalFile())
@@ -730,9 +730,9 @@ QStringList QuantaCommon::readPathListEntry(KConfig *config, const QString &pKey
return list;
}
-QString QuantaCommon::readPathEntry(KConfig *config, const QString &pKey)
+TQString QuantaCommon::readPathEntry(KConfig *config, const TQString &pKey)
{
- QString path = config->readPathEntry(pKey);
+ TQString path = config->readPathEntry(pKey);
KURL u = KURL::fromPathOrURL(path);
if (u.isValid() && u.isLocalFile())
{
@@ -742,12 +742,12 @@ QString QuantaCommon::readPathEntry(KConfig *config, const QString &pKey)
return path;
}
-QString QuantaCommon::encodedChar(uint code)
+TQString QuantaCommon::encodedChar(uint code)
{
if (replacementMap.contains(code))
- return QString("%1;").arg(replacementMap[code]);
+ return TQString("%1;").arg(replacementMap[code]);
else
- return QString("&#%1;").arg(code);
+ return TQString("&#%1;").arg(code);
}
diff --git a/quanta/utility/quantacommon.h b/quanta/utility/quantacommon.h
index a88276b7..c9e283fa 100644
--- a/quanta/utility/quantacommon.h
+++ b/quanta/utility/quantacommon.h
@@ -26,7 +26,7 @@
*@author Andras Mantia
*/
-#define DEFAULT_DTD QString("-//W3C//DTD HTML 4.01 Transitional//EN")
+#define DEFAULT_DTD TQString("-//W3C//DTD HTML 4.01 Transitional//EN")
class QString;
class DCOPReply;
@@ -42,8 +42,8 @@ class KPopupMenu;
class Abbreviation{
public:
/*A list with abbreviations in the for of: <template templatename, code> */
- QMap<QString, QString> abbreviations;
- QStringList dteps;
+ TQMap<TQString, TQString> abbreviations;
+ TQStringList dteps;
};
@@ -53,7 +53,7 @@ public:
//Tag style options
uint tagCase;
uint attrCase;
- QChar attrValueQuotation;
+ TQChar attrValueQuotation;
bool closeOptionalTags;
bool closeTags;
bool updateClosingTags;
@@ -61,17 +61,17 @@ public:
//editor settings
bool useAutoCompletion;
bool enableDTDToolbar;
- QString defaultEncoding;
+ TQString defaultEncoding;
//parser options
bool instantUpdate;
bool showEmptyNodes;
bool showClosingTags;
uint refreshFrequency;
- QString defaultDocType;
+ TQString defaultDocType;
uint expandLevel;
bool showDTDSelectDialog;
- QString showCloseButtons; ///< can be Disabled, ShowAlways or ShowDelayed
+ TQString showCloseButtons; ///< can be Disabled, ShowAlways or ShowDelayed
uint toolviewTabs; ///< how does the toolview tabs look like
//kafka sync options
@@ -84,30 +84,30 @@ public:
bool inlineNodeIndentation;
//environment options
- QString globalDataDir; //not stored, initialized on app startup
- QStringList pluginSearchPaths; //global but read from plugins.rc
- QString markupMimeTypes;
- QString scriptMimeTypes;
- QString imageMimeTypes;
- QString textMimeTypes;
- QString previewPosition;
- QString docPosition;
- QString windowLayout;
+ TQString globalDataDir; //not stored, initialized on app startup
+ TQStringList pluginSearchPaths; //global but read from plugins.rc
+ TQString markupMimeTypes;
+ TQString scriptMimeTypes;
+ TQString imageMimeTypes;
+ TQString textMimeTypes;
+ TQString previewPosition;
+ TQString docPosition;
+ TQString windowLayout;
uint autosaveInterval;
- QString backupDirPath;
- QString quantaPID;
+ TQString backupDirPath;
+ TQString quantaPID;
bool showHiddenFiles; ///< show hidden files in files treeview?
bool saveTrees; ///< save tree status for local trees?
- QMap<QString, Abbreviation> abbreviations; ///< the abbreviation groups
+ TQMap<TQString, Abbreviation> abbreviations; ///< the abbreviation groups
bool replaceAccented; ///< replace or not the accented characters
bool replaceNotInEncoding; ///< replace characters with their entity number if they cannot be saved in the current encoding of the document.
bool smartTagInsertion; //enable/disable smartTagInsertion
};
typedef struct DirInfo{
- QString mimeType;
- QString preText;
- QString postText;
+ TQString mimeType;
+ TQString preText;
+ TQString postText;
bool usePrePostText;
};
@@ -121,30 +121,30 @@ public:
~QuantaCommon();
/** convert tag to upper or lower case */
- static QString tagCase( const QString& tag);
+ static TQString tagCase( const TQString& tag);
/** convert tag to upper or lower case */
- static QString attrCase( const QString& attr);
+ static TQString attrCase( const TQString& attr);
/** returns the attribute value in quoted form, by taking care of the
quotation setting*/
- static QString quoteAttributeValue(const QString& value);
+ static TQString quoteAttributeValue(const TQString& value);
/** Set's up the url correctly from urlString. */
- static void setUrl(KURL &url, const QString& urlString);
+ static void setUrl(KURL &url, const TQString& urlString);
/** No descriptions */
- static bool isSingleTag(const QString& dtdName, const QString& tag);
+ static bool isSingleTag(const TQString& dtdName, const TQString& tag);
/** No descriptions */
- static bool isOptionalTag(const QString& dtdName, const QString& tag);
+ static bool isOptionalTag(const TQString& dtdName, const TQString& tag);
/** No descriptions */
- static bool isKnownTag(const QString& dtdName, const QString& tag);
+ static bool isKnownTag(const TQString& dtdName, const TQString& tag);
/** No descriptions */
- static AttributeList* tagAttributes(const QString& dtdName, const QString& tag);
+ static AttributeList* tagAttributes(const TQString& dtdName, const TQString& tag);
/** Returns the QTag object for the tag "tag" from the DTD named "dtdname". */
- static QTag* tagFromDTD(const QString& dtdName, const QString& tag);
+ static QTag* tagFromDTD(const TQString& dtdName, const TQString& tag);
/** Returns the QTag object for the tag "tag" from the DTD. */
- static QTag* tagFromDTD(const DTDStruct* dtd, const QString& tag);
+ static QTag* tagFromDTD(const DTDStruct* dtd, const TQString& tag);
/** Returns the QTag object for the node "node" from node's DTD. */
static QTag* tagFromDTD(Node *node);
/** Returns an XML style string containing the GUI for attributes. */
- static QString xmlFromAttributes(AttributeList* attributes);
+ static TQString xmlFromAttributes(AttributeList* attributes);
/** Returns 0 if the (line,col) is inside the area specified by the other arguments,
-1 if it is before the area and 1 if it is after. */
static int isBetween(int line, int col, int bLine, int bCol, int eLine, int eCol);
@@ -153,47 +153,47 @@ pointer must be deleted by the caller!! */
static KStandardDirs* pluginDirs(const char *type);
/** Return true, if the url has the mimetype starting with type. */
- static bool checkMimeGroup(const KURL& url, const QString& type);
+ static bool checkMimeGroup(const KURL& url, const TQString& type);
/** Return true, if the url has the mimetype type. */
- static bool checkMimeType(const KURL& url, const QString& type);
+ static bool checkMimeType(const KURL& url, const TQString& type);
/** Return true, if the url has exactly the mimetype type. */
- static bool checkExactMimeType(const KURL& url, const QString& type);
+ static bool checkExactMimeType(const KURL& url, const TQString& type);
/** Returns the url without the filename. */
static KURL convertToPath(const KURL& url);
/** Return a string to be used when an url is saved to the project file.
Returns url.url() if it's an absolute url and
url.path() if the url is relative */
- static QString qUrl(const KURL& url);
+ static TQString qUrl(const KURL& url);
/** No descriptions */
- static void dirCreationError(QWidget *widget, const KURL& url);
+ static void dirCreationError(TQWidget *widget, const KURL& url);
/**
Adds the backslash before the special chars (like ?, *, . ) so the returned string can be used in regular expressions.
*/
- static QString makeRxCompatible(const QString& s);
+ static TQString makeRxCompatible(const TQString& s);
/** Returns the translated a_str in English. A "back-translation" useful e.g in case of CSS elements selected from a listbox. */
- static QString i18n2normal(const QString& a_str);
+ static TQString i18n2normal(const TQString& a_str);
/** No descriptions */
- static void normalizeStructure(QString f,QStringList& l);
+ static void normalizeStructure(TQString f,TQStringList& l);
/**Returns true if tag2 is the closing pair of tag1. It's namespace aware.*/
static bool closesTag(Tag *tag1, Tag *tag2);
- static bool closesTag(QString namespaceName, QString tagName, bool caseSensitive,
- QString namespaceName2, QString tagName2, bool caseSensitive2);
- static int denyBinaryInsert(QWidget *window);
- static void removeCommentsAndQuotes(QString& str, const DTDStruct* dtd);
- static bool insideCommentsOrQuotes(int position, const QString &string, const DTDStruct *dtd);
+ static bool closesTag(TQString namespaceName, TQString tagName, bool caseSensitive,
+ TQString namespaceName2, TQString tagName2, bool caseSensitive2);
+ static int denyBinaryInsert(TQWidget *window);
+ static void removeCommentsAndQuotes(TQString& str, const DTDStruct* dtd);
+ static bool insideCommentsOrQuotes(int position, const TQString &string, const DTDStruct *dtd);
/** Calls a Quanta DCOP method.
* @param interface the DCOP interface the method belongs to
* @param method the DCOP method name (with the argument types)
* @param arguments comma separated list of argument
* @return the return value of the DCOP caller
*/
- static DCOPReply callDCOPMethod(const QString& interface, const QString& method, const QString& arguments);
+ static DCOPReply callDCOPMethod(const TQString& interface, const TQString& method, const TQString& arguments);
/** Checks if url exists and shows a question about overwriting it.
* @param url the url to check
* @return true if the user answered yes, false otherwise.
*/
- static bool checkOverwrite(const KURL& url, QWidget *window);
+ static bool checkOverwrite(const KURL& url, TQWidget *window);
/**
* Same as KConfigBase::readPathListEntry, but resolves symlinks
@@ -201,7 +201,7 @@ pointer must be deleted by the caller!! */
* @param pKey
* @return
*/
- static QStringList readPathListEntry(KConfig *config, const QString &pKey);
+ static TQStringList readPathListEntry(KConfig *config, const TQString &pKey);
/**
* Same as KConfigBase::readPathEntry, but resolves symlinks
@@ -209,7 +209,7 @@ pointer must be deleted by the caller!! */
* @param pKey
* @return
*/
- static QString readPathEntry(KConfig *config, const QString &pKey);
+ static TQString readPathEntry(KConfig *config, const TQString &pKey);
/**
* Returns the HTML encoding string for character with the specified code.
@@ -218,7 +218,7 @@ pointer must be deleted by the caller!! */
* @param code the numeric code of the character
* @return the encoded string
*/
- static QString encodedChar(uint code);
+ static TQString encodedChar(uint code);
};
diff --git a/quanta/utility/quantanetaccess.cpp b/quanta/utility/quantanetaccess.cpp
index 095f9e08..dbaf1ce3 100644
--- a/quanta/utility/quantanetaccess.cpp
+++ b/quanta/utility/quantanetaccess.cpp
@@ -13,9 +13,9 @@
* *
***************************************************************************/
-#include <qstring.h>
-#include <qwidget.h>
-#include <qdir.h>
+#include <tqstring.h>
+#include <tqwidget.h>
+#include <tqdir.h>
#include <kio/netaccess.h>
#include <kurl.h>
@@ -28,7 +28,7 @@
#include "quantanetaccess.h"
#include "project.h"
-bool QuantaNetAccess::upload(const QString& src, const KURL& target, QWidget* window, bool confirm)
+bool QuantaNetAccess::upload(const TQString& src, const KURL& target, TQWidget* window, bool confirm)
{
bool ok = KIO::NetAccess::upload(src, target, window);
if (ok) {
@@ -42,7 +42,7 @@ bool QuantaNetAccess::upload(const QString& src, const KURL& target, QWidget* wi
bool QuantaNetAccess::file_copy( const KURL& src, const KURL& target, int permissions,
- bool overwrite, bool resume, QWidget* window, bool confirm)
+ bool overwrite, bool resume, TQWidget* window, bool confirm)
{
bool ok = KIO::NetAccess::file_copy( src, target, permissions, overwrite, resume, window );
if (ok) {
@@ -56,7 +56,7 @@ bool QuantaNetAccess::file_copy( const KURL& src, const KURL& target, int permis
bool QuantaNetAccess::file_move( const KURL& src, const KURL& target, int permissions,
- bool overwrite, bool resume, QWidget* window, bool confirm)
+ bool overwrite, bool resume, TQWidget* window, bool confirm)
{
// don't ask if move is inside of the project
bool oldConfirm = confirm;
@@ -79,7 +79,7 @@ bool QuantaNetAccess::file_move( const KURL& src, const KURL& target, int permis
}
-bool QuantaNetAccess::dircopy( const KURL::List & srcList, const KURL & target, QWidget* window, bool confirm )
+bool QuantaNetAccess::dircopy( const KURL::List & srcList, const KURL & target, TQWidget* window, bool confirm )
{
bool ok = KIO::NetAccess::dircopy( srcList, target, window );
if (ok) {
@@ -98,7 +98,7 @@ bool QuantaNetAccess::dircopy( const KURL::List & srcList, const KURL & target,
}
-bool QuantaNetAccess::move( const KURL::List& srcList, const KURL& target, QWidget* window, bool confirm )
+bool QuantaNetAccess::move( const KURL::List& srcList, const KURL& target, TQWidget* window, bool confirm )
{
KURL targetURL = adjustURL(target);
bool oldConfirm = confirm;
@@ -142,7 +142,7 @@ bool QuantaNetAccess::move( const KURL::List& srcList, const KURL& target, QWidg
}
-bool QuantaNetAccess::del( const KURL & url, QWidget* window, bool confirm )
+bool QuantaNetAccess::del( const KURL & url, TQWidget* window, bool confirm )
{
if ( !checkProjectDel(url, window, confirm)) {
return false;
@@ -156,7 +156,7 @@ bool QuantaNetAccess::del( const KURL & url, QWidget* window, bool confirm )
}
-bool QuantaNetAccess::mkdir( const KURL & url, QWidget* window, int permissions, bool confirm )
+bool QuantaNetAccess::mkdir( const KURL & url, TQWidget* window, int permissions, bool confirm )
{
KURL u = url;
u.adjustPath(-1); //some servers refuse to create directories ending with a slash
@@ -171,7 +171,7 @@ bool QuantaNetAccess::mkdir( const KURL & url, QWidget* window, int permissions,
}
-void QuantaNetAccess::checkProjectInsert(const KURL& target, QWidget* window, bool confirm)
+void QuantaNetAccess::checkProjectInsert(const KURL& target, TQWidget* window, bool confirm)
{
if ( !Project::ref()->hasProject()) return;
KURL saveUrl = adjustURL(target);
@@ -180,7 +180,7 @@ void QuantaNetAccess::checkProjectInsert(const KURL& target, QWidget* window, bo
{
if (confirm)
{
- QString nice = QExtFileInfo::toRelative(saveUrl, baseURL).path();
+ TQString nice = QExtFileInfo::toRelative(saveUrl, baseURL).path();
nice = KStringHandler::lsqueeze(nice, 60);
if ( KMessageBox::Yes != KMessageBox::questionYesNo(window, i18n("<qt>Do you want to add <br><b>%1</b><br> to the project?</qt>").arg(nice), i18n("Add to Project"), KStdGuiItem::add(), i18n("Do Not Add"), "AddToProject") )
{
@@ -196,7 +196,7 @@ void QuantaNetAccess::checkProjectInsert(const KURL& target, QWidget* window, bo
}
-bool QuantaNetAccess::checkProjectRemove(const KURL& src, QWidget* window, bool confirm, bool remove)
+bool QuantaNetAccess::checkProjectRemove(const KURL& src, TQWidget* window, bool confirm, bool remove)
{
if ( !Project::ref()->hasProject() ) return true;
KURL url = adjustURL(src);
@@ -205,7 +205,7 @@ bool QuantaNetAccess::checkProjectRemove(const KURL& src, QWidget* window, bool
{
if (confirm)
{
- QString nice = QExtFileInfo::toRelative(url, baseURL).path();
+ TQString nice = QExtFileInfo::toRelative(url, baseURL).path();
nice = KStringHandler::lsqueeze(nice, 60);
if ( KMessageBox::Continue != KMessageBox::warningContinueCancel(window, i18n("<qt>Do you really want to remove <br><b>%1</b><br> from the project?</qt>").arg(nice), i18n("Remove From Project"), KStdGuiItem::remove(), "RemoveFromProject") )
{
@@ -219,7 +219,7 @@ bool QuantaNetAccess::checkProjectRemove(const KURL& src, QWidget* window, bool
}
-bool QuantaNetAccess::checkProjectDel(const KURL& src, QWidget* window, bool confirm)
+bool QuantaNetAccess::checkProjectDel(const KURL& src, TQWidget* window, bool confirm)
{
KURL url = adjustURL(src);
if ( Project::ref()->hasProject() )
@@ -228,7 +228,7 @@ bool QuantaNetAccess::checkProjectDel(const KURL& src, QWidget* window, bool con
{
if (confirm)
{
- QString nice = url.prettyURL(0, KURL::StripFileProtocol);
+ TQString nice = url.prettyURL(0, KURL::StripFileProtocol);
nice = KStringHandler::csqueeze(nice, 60);
if ( KMessageBox::Continue != KMessageBox::warningContinueCancel(window, i18n("<qt>Do you really want to delete <br><b>%1</b><br> and remove it from the project?</qt>").arg(nice), i18n("Delete & Remove From Project"), KStdGuiItem::del(), "DeleteAndRemoveFromProject") )
{
@@ -241,7 +241,7 @@ bool QuantaNetAccess::checkProjectDel(const KURL& src, QWidget* window, bool con
}
// confirm normal delete if wanted
if (confirm) {
- QString nice = url.prettyURL(0, KURL::StripFileProtocol);
+ TQString nice = url.prettyURL(0, KURL::StripFileProtocol);
nice = KStringHandler::csqueeze(nice, 60);
return (KMessageBox::Continue == KMessageBox::warningContinueCancel(window, i18n("<qt>Do you really want to delete <br><b>%1</b>?</qt>").arg(nice), i18n("Delete File or Folder"), KStdGuiItem::del(), "DeleteFileOrFolder") );
}
@@ -253,16 +253,16 @@ KURL QuantaNetAccess::adjustURL(const KURL &url)
KURL u = url;
if ( u.isLocalFile() )
{
- QDir dir(u.path());
+ TQDir dir(u.path());
u.setPath(dir.canonicalPath());
}
return u;
}
-void QuantaNetAccess::errorMsg(QWidget* window)
+void QuantaNetAccess::errorMsg(TQWidget* window)
{
- QString msg = KIO::NetAccess::lastErrorString();
+ TQString msg = KIO::NetAccess::lastErrorString();
if ( !msg.isEmpty())
KMessageBox::sorry(window, msg);
}
diff --git a/quanta/utility/quantanetaccess.h b/quanta/utility/quantanetaccess.h
index abdedc86..244b92ae 100644
--- a/quanta/utility/quantanetaccess.h
+++ b/quanta/utility/quantanetaccess.h
@@ -32,50 +32,50 @@ class QuantaNetAccess
{
public:
- static bool upload(const QString& src, const KURL& target, QWidget* window, bool confirm = true);
+ static bool upload(const TQString& src, const KURL& target, TQWidget* window, bool confirm = true);
- static bool copy( const KURL & src, const KURL & target, QWidget* window, bool confirm = true )
+ static bool copy( const KURL & src, const KURL & target, TQWidget* window, bool confirm = true )
{
return file_copy( src, target, -1, false /*not overwrite*/, false, window, confirm );
}
static bool file_copy( const KURL& src, const KURL& target, int permissions,
- bool overwrite, bool resume, QWidget* window, bool confirm = true );
+ bool overwrite, bool resume, TQWidget* window, bool confirm = true );
static bool file_move( const KURL& src, const KURL& target, int permissions,
- bool overwrite, bool resume, QWidget* window, bool confirm = true );
+ bool overwrite, bool resume, TQWidget* window, bool confirm = true );
- static bool dircopy( const KURL & src, const KURL & target, QWidget* window, bool confirm = true )
+ static bool dircopy( const KURL & src, const KURL & target, TQWidget* window, bool confirm = true )
{
KURL::List srcList;
srcList.append( src );
return dircopy( srcList, target, window, confirm );
};
- static bool dircopy( const KURL::List & srcList, const KURL & target, QWidget* window, bool confirm = true );
+ static bool dircopy( const KURL::List & srcList, const KURL & target, TQWidget* window, bool confirm = true );
- static bool move( const KURL& src, const KURL& target, QWidget* window, bool confirm = true )
+ static bool move( const KURL& src, const KURL& target, TQWidget* window, bool confirm = true )
{
KURL::List srcList;
srcList.append( src );
return move( srcList, target, window, confirm );
}
- static bool move( const KURL::List& srcList, const KURL& target, QWidget* window, bool confirm = true );
+ static bool move( const KURL::List& srcList, const KURL& target, TQWidget* window, bool confirm = true );
- static bool del( const KURL & url, QWidget* window, bool confirm = true );
+ static bool del( const KURL & url, TQWidget* window, bool confirm = true );
- static bool mkdir( const KURL & url, QWidget* window, int permissions, bool confirm = true );
+ static bool mkdir( const KURL & url, TQWidget* window, int permissions, bool confirm = true );
- static void checkProjectInsert(const KURL& target, QWidget* window, bool confirm = true);
+ static void checkProjectInsert(const KURL& target, TQWidget* window, bool confirm = true);
- static bool checkProjectRemove(const KURL& target, QWidget* window, bool confirm = true, bool remove = true);
+ static bool checkProjectRemove(const KURL& target, TQWidget* window, bool confirm = true, bool remove = true);
- static bool checkProjectDel(const KURL& target, QWidget* window, bool confirm = true);
+ static bool checkProjectDel(const KURL& target, TQWidget* window, bool confirm = true);
static KURL adjustURL(const KURL &url);
- static void errorMsg(QWidget* window = 0);
+ static void errorMsg(TQWidget* window = 0);
private:
QuantaNetAccess() {};
diff --git a/quanta/utility/resource.h b/quanta/utility/resource.h
index 3f09946e..72160dac 100644
--- a/quanta/utility/resource.h
+++ b/quanta/utility/resource.h
@@ -33,25 +33,25 @@ struct DTDStruct;
extern QConfig qConfig;
-extern QString tmpDir;
+extern TQString tmpDir;
-extern QRegExp scriptBeginRx;
-extern QRegExp scriptEndRx;
+extern TQRegExp scriptBeginRx;
+extern TQRegExp scriptEndRx;
extern Node *baseNode;
extern Parser *parser;
extern KDirWatch *fileWatcher;
-extern QString toolbarExtension;
-extern QRegExp newLineRx;
-extern QStringList charList; //hold the list of the &char; chars. See the data/chars file.
-extern QPtrList<KTempFile> tempFileList;
-extern QPtrList<KTempDir> tempDirList;
+extern TQString toolbarExtension;
+extern TQRegExp newLineRx;
+extern TQStringList charList; //hold the list of the &char; chars. See the data/chars file.
+extern TQPtrList<KTempFile> tempFileList;
+extern TQPtrList<KTempDir> tempDirList;
extern KProgress *progressBar;
extern QuantaApp *quantaApp;
-extern const QString resourceDir;
+extern const TQString resourceDir;
extern bool typingInProgress;
extern int nodeNum;
diff --git a/quanta/utility/tagaction.cpp b/quanta/utility/tagaction.cpp
index 98bcf87c..28d37450 100644
--- a/quanta/utility/tagaction.cpp
+++ b/quanta/utility/tagaction.cpp
@@ -21,10 +21,10 @@
//qt includes
-#include <qdir.h>
-#include <qdom.h>
-#include <qfile.h>
-#include <qtimer.h>
+#include <tqdir.h>
+#include <tqdom.h>
+#include <tqfile.h>
+#include <tqtimer.h>
//kde includes
#include <kapplication.h>
@@ -72,8 +72,8 @@ int MyProcess::commSetupDoneC()
return KProcess::commSetupDoneC();
}
-TagAction::TagAction( QDomElement *element, KMainWindow *parentMainWindow, bool toggle)
- : KToggleAction(element->attribute("text").isEmpty() ? QString("") : i18n(element->attribute("text").utf8()),
+TagAction::TagAction( TQDomElement *element, KMainWindow *parentMainWindow, bool toggle)
+ : KToggleAction(element->attribute("text").isEmpty() ? TQString("") : i18n(element->attribute("text").utf8()),
KShortcut(element->attribute("shortcut")), 0, 0, parentMainWindow->actionCollection(), element->attribute("name")),
//disable toggle now m_toggle(toggle)
m_toggle(false)
@@ -84,31 +84,31 @@ TagAction::TagAction( QDomElement *element, KMainWindow *parentMainWindow, bool
m_useInputFile = false;
m_useOutputFile = false;
tag = element->cloneNode().toElement();
- QString s = tag.attribute("icon");
- if (!QFileInfo(s).exists())
+ TQString s = tag.attribute("icon");
+ if (!TQFileInfo(s).exists())
{
- s = QFileInfo(s).fileName();
+ s = TQFileInfo(s).fileName();
}
setIcon(s);
m_file = 0L;
loopStarted = false;
#if KDE_VERSION >= KDE_MAKE_VERSION(3,4,0)
- connect(this, SIGNAL(activated(KAction::ActivationReason, Qt::ButtonState)),
- SLOT(slotActionActivated(KAction::ActivationReason, Qt::ButtonState)));
+ connect(this, TQT_SIGNAL(activated(KAction::ActivationReason, Qt::ButtonState)),
+ TQT_SLOT(slotActionActivated(KAction::ActivationReason, Qt::ButtonState)));
#else
- connect(this, SIGNAL(activated()), SLOT(slotActionActivated()));
+ connect(this, TQT_SIGNAL(activated()), TQT_SLOT(slotActionActivated()));
#endif
- connect(this, SIGNAL(showMessage(const QString&, bool)), m_parentMainWindow, SIGNAL(showMessage(const QString&, bool)));
- connect(this, SIGNAL(clearMessages()), m_parentMainWindow, SIGNAL(clearMessages()));
- connect(this, SIGNAL(showMessagesView()), m_parentMainWindow, SLOT(slotShowMessagesView()));
- connect(this, SIGNAL(createNewFile()), m_parentMainWindow, SLOT(slotFileNew()));
+ connect(this, TQT_SIGNAL(showMessage(const TQString&, bool)), m_parentMainWindow, TQT_SIGNAL(showMessage(const TQString&, bool)));
+ connect(this, TQT_SIGNAL(clearMessages()), m_parentMainWindow, TQT_SIGNAL(clearMessages()));
+ connect(this, TQT_SIGNAL(showMessagesView()), m_parentMainWindow, TQT_SLOT(slotShowMessagesView()));
+ connect(this, TQT_SIGNAL(createNewFile()), m_parentMainWindow, TQT_SLOT(slotFileNew()));
}
TagAction::~TagAction()
{
}
-QString TagAction::type()
+TQString TagAction::type()
{
return tag.attribute("type","");
}
@@ -125,22 +125,22 @@ bool TagAction::slotActionActivated(KAction::ActivationReason reason, Qt::Button
w->viewCursorIf->cursorPositionReal(&line, &col);
NodeModifsSet* modifs = new NodeModifsSet();
- QString space;
+ TQString space;
space.fill( ' ', col);
- QString type = tag.attribute("type","");
+ TQString type = tag.attribute("type","");
if ( type == "tag" && view->hadLastFocus() == QuantaView::VPLFocus && toggable())
{
KafkaWidget* kafka_widget = KafkaDocument::ref()->getKafkaWidget();
- QString tag_name = XMLTagName();
+ TQString tag_name = XMLTagName();
NodeSelectionInd selection;
selection.fillWithVPLCursorSelection();
Node* start_node = 0, *end_node = 0, *current_node = 0;
int start_offset = 0, end_offset = 0, current_offset = 0;
- QString scope;
+ TQString scope;
if(kafka_widget->hasSelection())
{
// get selection
@@ -217,8 +217,8 @@ bool TagAction::slotActionActivated(KAction::ActivationReason reason, Qt::Button
}
else if(inside_tag == 1)
{
- QString attribute_name(tag.attribute("attribute_name", QString()));
- QString attribute_value(tag.attribute("attribute_value", QString()));
+ TQString attribute_name(tag.attribute("attribute_name", TQString()));
+ TQString attribute_value(tag.attribute("attribute_value", TQString()));
// special case
if(!attribute_name.isEmpty() && !attribute_value.isEmpty())
@@ -235,7 +235,7 @@ bool TagAction::slotActionActivated(KAction::ActivationReason reason, Qt::Button
if(aux1 == tag_parent && aux2 == tag_parent->getClosingNode())
{
if(tag_parent->tag->attributeValue(attribute_name, true) == attribute_value)
- kafkaCommon::editNodeAttribute(tag_parent, attribute_name, QString(), modifs);
+ kafkaCommon::editNodeAttribute(tag_parent, attribute_name, TQString(), modifs);
else
kafkaCommon::editNodeAttribute(tag_parent, attribute_name, attribute_value, modifs);
}
@@ -255,10 +255,10 @@ bool TagAction::slotActionActivated(KAction::ActivationReason reason, Qt::Button
}
if ( type == "tag" ) {
- QDomElement otag = (tag.namedItem("tag")).toElement();
- QDomElement xtag = (tag.namedItem("xtag")).toElement();
+ TQDomElement otag = (tag.namedItem("tag")).toElement();
+ TQDomElement xtag = (tag.namedItem("xtag")).toElement();
- QString attr = otag.text();
+ TQString attr = otag.text();
if ( attr[0] == '<' )
attr.remove(0,1);
if ( attr.right(1) == ">" )
@@ -266,7 +266,7 @@ bool TagAction::slotActionActivated(KAction::ActivationReason reason, Qt::Button
attr = attr.stripWhiteSpace();
int i = 0;
while ( !attr[i].isSpace() && !attr[i].isNull() ) i++;
- QString name = attr.left(i);
+ TQString name = attr.left(i);
attr = attr.remove(0,i).stripWhiteSpace();
if (otag.attribute("useDialog","false") == "true" && QuantaCommon::isKnownTag(w->defaultDTD()->name, name))
@@ -275,7 +275,7 @@ bool TagAction::slotActionActivated(KAction::ActivationReason reason, Qt::Button
}
else
{
- QString s1 = QuantaCommon::tagCase(name);
+ TQString s1 = QuantaCommon::tagCase(name);
if (otag.text().left(1) == "<") s1 = "<"+s1;
if (!attr.isEmpty())
s1 += " "+QuantaCommon::attrCase(attr);
@@ -292,7 +292,7 @@ bool TagAction::slotActionActivated(KAction::ActivationReason reason, Qt::Button
s1.append(">");
}
- QString s2;
+ TQString s2;
if ( xtag.attribute("use","false") == "true" )
{
if (qConfig.closeTags)
@@ -324,12 +324,12 @@ bool TagAction::slotActionActivated(KAction::ActivationReason reason, Qt::Button
proc = new MyProcess();
proc->setWorkingDirectory(quantaApp->projectBaseURL().path());
- QDomElement script = tag.namedItem("script").toElement();
- QString command = script.text();
+ TQDomElement script = tag.namedItem("script").toElement();
+ TQString command = script.text();
if ( !w->isUntitled() ) {
- QString fname = w->url().url();
+ TQString fname = w->url().url();
if ( w->url().protocol() == "file")
fname = w->url().path();
command.replace("%f", fname );
@@ -338,13 +338,13 @@ bool TagAction::slotActionActivated(KAction::ActivationReason reason, Qt::Button
pid_t pid = ::getpid();
if (kapp->inherits("KUniqueApplication"))
{
- command.replace("%pid", QString("unique %1").arg(pid));
+ command.replace("%pid", TQString("unique %1").arg(pid));
} else
{
- command.replace("%pid", QString("%1").arg(pid));
+ command.replace("%pid", TQString("%1").arg(pid));
}
- QString buffer;
- QString inputType = script.attribute("input","none");
+ TQString buffer;
+ TQString inputType = script.attribute("input","none");
if ( inputType == "current" ) {
buffer = w->editIf->text();
@@ -355,7 +355,7 @@ bool TagAction::slotActionActivated(KAction::ActivationReason reason, Qt::Button
command.replace("%input", buffer);
command = command.stripWhiteSpace();
int pos = command.find(' ');
- QString args;
+ TQString args;
if (pos != -1)
{
args = command.mid(pos+1);
@@ -364,7 +364,7 @@ bool TagAction::slotActionActivated(KAction::ActivationReason reason, Qt::Button
if (command.startsWith("~"))
{
command = command.mid(1);
- command.prepend(QDir::homeDirPath());
+ command.prepend(TQDir::homeDirPath());
}
*proc << command.stripWhiteSpace();
@@ -375,7 +375,7 @@ bool TagAction::slotActionActivated(KAction::ActivationReason reason, Qt::Button
while (pos != -1 )
{
pos = args.find("%scriptdir");
- QString scriptname;
+ TQString scriptname;
if (pos != -1)
{
int begin = args.findRev('"', pos);
@@ -410,13 +410,13 @@ bool TagAction::slotActionActivated(KAction::ActivationReason reason, Qt::Button
int pos = args.find("%projectbase");
if (pos != -1)
{
- QString s;
+ TQString s;
if (Project::ref()->hasProject())
s = Project::ref()->projectBaseURL().url();
args.replace("%projectbase", s);
}
- QStringList argsList1 = QStringList::split(' ', args);
- QStringList argsList;
+ TQStringList argsList1 = TQStringList::split(' ', args);
+ TQStringList argsList;
for (uint i = 0; i < argsList1.count(); i++)
{
if (argsList1[i] == "%userarguments")
@@ -434,12 +434,12 @@ bool TagAction::slotActionActivated(KAction::ActivationReason reason, Qt::Button
firstOutput = true;
firstError = true;
- connect( proc, SIGNAL(receivedStdout( KProcess*,char*,int)), this,
- SLOT( slotGetScriptOutput(KProcess*,char*,int)));
- connect( proc, SIGNAL(receivedStderr( KProcess*,char*,int)), this,
- SLOT( slotGetScriptError(KProcess*,char*,int)));
- connect( proc, SIGNAL(processExited( KProcess*)), this,
- SLOT( slotProcessExited(KProcess*)));
+ 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*)));
@@ -498,21 +498,21 @@ bool TagAction::slotActionActivated()
if ( !view || !view->document())
return false;
- QString space="";
- QString output;
+ TQString space="";
+ TQString output;
unsigned int line, col;
Document *w = view->document();
w->viewCursorIf->cursorPositionReal(&line, &col);
space.fill( ' ', col);
- QString type = tag.attribute("type","");
+ TQString type = tag.attribute("type","");
if ( type == "tag" ) {
- QDomElement otag = (tag.namedItem("tag")).toElement();
- QDomElement xtag = (tag.namedItem("xtag")).toElement();
+ TQDomElement otag = (tag.namedItem("tag")).toElement();
+ TQDomElement xtag = (tag.namedItem("xtag")).toElement();
- QString attr = otag.text();
+ TQString attr = otag.text();
if ( attr[0] == '<' )
attr.remove(0,1);
if ( attr.right(1) == ">" )
@@ -520,7 +520,7 @@ bool TagAction::slotActionActivated()
attr = attr.stripWhiteSpace();
int i = 0;
while ( !attr[i].isSpace() && !attr[i].isNull() ) i++;
- QString name = attr.left(i);
+ TQString name = attr.left(i);
attr = attr.remove(0,i).stripWhiteSpace();
if (otag.attribute("useDialog","false") == "true" && QuantaCommon::isKnownTag(w->defaultDTD()->name, name))
@@ -529,7 +529,7 @@ bool TagAction::slotActionActivated()
}
else
{
- QString s1 = QuantaCommon::tagCase(name);
+ TQString s1 = QuantaCommon::tagCase(name);
if (otag.text().left(1) == "<") s1 = "<"+s1;
if (!attr.isEmpty())
s1 += " "+QuantaCommon::attrCase(attr);
@@ -546,7 +546,7 @@ bool TagAction::slotActionActivated()
s1.append(">");
}
- QString s2;
+ TQString s2;
if ( xtag.attribute("use","false") == "true" )
{
if (qConfig.closeTags)
@@ -578,12 +578,12 @@ bool TagAction::slotActionActivated()
proc = new MyProcess();
proc->setWorkingDirectory(quantaApp->projectBaseURL().path());
- QDomElement script = tag.namedItem("script").toElement();
- QString command = script.text();
+ TQDomElement script = tag.namedItem("script").toElement();
+ TQString command = script.text();
if ( !w->isUntitled() ) {
- QString fname = w->url().url();
+ TQString fname = w->url().url();
if ( w->url().protocol() == "file")
fname = w->url().path();
command.replace("%f", fname );
@@ -592,13 +592,13 @@ bool TagAction::slotActionActivated()
pid_t pid = ::getpid();
if (kapp->inherits("KUniqueApplication"))
{
- command.replace("%pid", QString("unique %1").arg(pid));
+ command.replace("%pid", TQString("unique %1").arg(pid));
} else
{
- command.replace("%pid", QString("%1").arg(pid));
+ command.replace("%pid", TQString("%1").arg(pid));
}
- QString buffer;
- QString inputType = script.attribute("input","none");
+ TQString buffer;
+ TQString inputType = script.attribute("input","none");
if ( inputType == "current" ) {
buffer = w->editIf->text();
@@ -609,7 +609,7 @@ bool TagAction::slotActionActivated()
command.replace("%input", buffer);
command = command.stripWhiteSpace();
int pos = command.find(' ');
- QString args;
+ TQString args;
if (pos != -1)
{
args = command.mid(pos+1);
@@ -618,7 +618,7 @@ bool TagAction::slotActionActivated()
if (command.startsWith("~"))
{
command = command.mid(1);
- command.prepend(QDir::homeDirPath());
+ command.prepend(TQDir::homeDirPath());
}
*proc << command.stripWhiteSpace();
@@ -629,7 +629,7 @@ bool TagAction::slotActionActivated()
while (pos != -1 )
{
pos = args.find("%scriptdir");
- QString scriptname;
+ TQString scriptname;
if (pos != -1)
{
int begin = args.findRev('"', pos);
@@ -664,13 +664,13 @@ bool TagAction::slotActionActivated()
int pos = args.find("%projectbase");
if (pos != -1)
{
- QString s;
+ TQString s;
if (Project::ref()->hasProject())
s = Project::ref()->projectBaseURL().url();
args.replace("%projectbase", s);
}
- QStringList argsList1 = QStringList::split(' ', args);
- QStringList argsList;
+ TQStringList argsList1 = TQStringList::split(' ', args);
+ TQStringList argsList;
for (uint i = 0; i < argsList1.count(); i++)
{
if (argsList1[i] == "%userarguments")
@@ -688,12 +688,12 @@ bool TagAction::slotActionActivated()
firstOutput = true;
firstError = true;
- connect( proc, SIGNAL(receivedStdout( KProcess*,char*,int)), this,
- SLOT( slotGetScriptOutput(KProcess*,char*,int)));
- connect( proc, SIGNAL(receivedStderr( KProcess*,char*,int)), this,
- SLOT( slotGetScriptError(KProcess*,char*,int)));
- connect( proc, SIGNAL(processExited( KProcess*)), this,
- SLOT( slotProcessExited(KProcess*)));
+ 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*)));
@@ -742,8 +742,8 @@ bool TagAction::slotActionActivated()
void TagAction::slotGetScriptOutput( KProcess *, char *buffer, int buflen )
{
- QCString tmp( buffer, buflen + 1 );
- QString text( QString::fromLocal8Bit(tmp) );
+ TQCString tmp( buffer, buflen + 1 );
+ TQString text( TQString::fromLocal8Bit(tmp) );
// kdDebug(24000) << "Script output received: |" << text << "|" << endl;
Document *w = ViewManager::ref()->activeDocument();
if (!w)
@@ -804,8 +804,8 @@ void TagAction::slotGetScriptOutput( KProcess *, char *buffer, int buflen )
void TagAction::slotGetScriptError( KProcess *, char *buffer, int buflen )
{
Document *w = ViewManager::ref()->activeDocument();
- QCString tmp( buffer, buflen + 1 );
- QString text( QString::fromLocal8Bit(tmp) );
+ TQCString tmp( buffer, buflen + 1 );
+ TQString text( TQString::fromLocal8Bit(tmp) );
if ( scriptErrorDest == "merge" )
{
@@ -861,19 +861,19 @@ void TagAction::scriptDone()
proc = 0;
}
-void TagAction::setOutputFile(QFile* file)
+void TagAction::setOutputFile(TQFile* file)
{
m_file = file;
}
-void TagAction::setInputFileName(const QString& fileName)
+void TagAction::setInputFileName(const TQString& fileName)
{
m_inputFileName = fileName;
}
-QString TagAction::actionText()
+TQString TagAction::actionText()
{
- QString t = tag.attribute("text");
+ TQString t = tag.attribute("text");
int pos = t.find('&');
if (pos < (int)t.length()-1 && t[pos+1] != '&')
return t.remove(pos, 1);
@@ -881,15 +881,15 @@ QString TagAction::actionText()
return t;
}
-QString TagAction::XMLTagName() const
+TQString TagAction::XMLTagName() const
{
if(tag.attribute("type","").lower() != "tag")
- return QString();
+ return TQString();
- QDomElement otag = (tag.namedItem("tag")).toElement();
- QDomElement xtag = (tag.namedItem("xtag")).toElement();
+ TQDomElement otag = (tag.namedItem("tag")).toElement();
+ TQDomElement xtag = (tag.namedItem("xtag")).toElement();
- QString attr = otag.text();
+ TQString attr = otag.text();
if ( attr[0] == '<' )
attr.remove(0,1);
if ( attr.right(1) == ">" )
@@ -898,19 +898,19 @@ QString TagAction::XMLTagName() const
int i = 0;
while ( !attr[i].isSpace() && !attr[i].isNull() )
++i;
- QString name = attr.left(i);
+ TQString name = attr.left(i);
return name;
}
-QString TagAction::openXMLTagString() const
+TQString TagAction::openXMLTagString() const
{
- QString name = XMLTagName();
+ TQString name = XMLTagName();
- QDomElement otag = (tag.namedItem("tag")).toElement();
- QDomElement xtag = (tag.namedItem("xtag")).toElement();
+ TQDomElement otag = (tag.namedItem("tag")).toElement();
+ TQDomElement xtag = (tag.namedItem("xtag")).toElement();
- QString attr = otag.text();
+ TQString attr = otag.text();
if ( attr[0] == '<' )
attr.remove(0,1);
if ( attr.right(1) == ">" )
@@ -918,7 +918,7 @@ QString TagAction::openXMLTagString() const
attr = attr.stripWhiteSpace();
attr.remove(0, name.length());
- QString s1 = QuantaCommon::tagCase(name);
+ TQString s1 = QuantaCommon::tagCase(name);
if (otag.text().left(1) == "<") s1 = "<"+s1;
if (!attr.isEmpty())
s1 += " "+QuantaCommon::attrCase(attr);
@@ -939,10 +939,10 @@ QString TagAction::openXMLTagString() const
return s1;
}
-QString TagAction::closeXMLTagString() const
+TQString TagAction::closeXMLTagString() const
{
- QString s2;
- QDomElement xtag = (tag.namedItem("xtag")).toElement();
+ TQString s2;
+ TQDomElement xtag = (tag.namedItem("xtag")).toElement();
if ( xtag.attribute("use","false") == "true" )
{
if (qConfig.closeTags)
@@ -974,7 +974,7 @@ void TagAction::slotProcessExited(KProcess *process)
delete process;
}
-void TagAction::addArguments(const QStringList &arguments)
+void TagAction::addArguments(const TQStringList &arguments)
{
m_argsList = arguments;
}
@@ -990,8 +990,8 @@ void TagAction::execute(bool blocking)
if (slotActionActivated())
{
//To avoid lock-ups, start a timer.
- timer = new QTimer(this);
- connect(timer, SIGNAL(timeout()), SLOT(slotTimeout()));
+ timer = new TQTimer(this);
+ connect(timer, TQT_SIGNAL(timeout()), TQT_SLOT(slotTimeout()));
timer->start(180*1000, true);
QExtFileInfo internalFileInfo;
loopStarted = true;
@@ -1038,10 +1038,10 @@ void TagAction::applyTagInSelection(Node* start_node, int start_offset, Node* en
Q_ASSERT(view->hadLastFocus() == QuantaView::VPLFocus);
Q_ASSERT(toggable());
- QString tag_name = XMLTagName();
+ TQString tag_name = XMLTagName();
Q_ASSERT(kafkaCommon::isInsideTag(start_node, end_node, tag_name) == -1);
- QString open_tag = openXMLTagString();
+ TQString open_tag = openXMLTagString();
//We build the node from the tag name
Node* node = kafkaCommon::createNode("", "", Tag::XmlTag, w);
@@ -1066,7 +1066,7 @@ void TagAction::applyTagInSelection(Node* start_node, int start_offset, Node* en
if (!nodeQTag) return;
bool specialTagInsertion = false;
- QPtrList<QTag> qTagList = nodeQTag->parents();
+ TQPtrList<QTag> qTagList = nodeQTag->parents();
QTag* qTag = 0;
for (qTag = qTagList.first(); qTag; qTag = qTagList.next())
{
@@ -1128,7 +1128,7 @@ void TagAction::applyTagInMixedSelection(Node* start_node, int start_offset, Nod
{
Q_ASSERT(start_node != end_node);
- QString const tag_name = XMLTagName();
+ TQString const tag_name = XMLTagName();
// FIXME o pai pode ser do endNode. nao sei se esta merda eh precisa
/* Node* tag_parent = kafkaCommon::hasParent(start_node, tag_name);
@@ -1142,8 +1142,8 @@ void TagAction::applyTagInMixedSelection(Node* start_node, int start_offset, Nod
end_node = kafkaCommon::getCorrectEndNode(end_node, end_offset);
// look for commonParent
- QValueList<int> commonParentStartChildLocation;
- QValueList<int> commonParentEndChildLocation;
+ TQValueList<int> commonParentStartChildLocation;
+ TQValueList<int> commonParentEndChildLocation;
Node* commonParent = kafkaCommon::DTDGetCommonParent(start_node, end_node, commonParentStartChildLocation, commonParentEndChildLocation, 0);
if(!commonParent) return;
@@ -1159,7 +1159,7 @@ void TagAction::applyTagInMixedSelection(Node* start_node, int start_offset, Nod
// kafkaCommon::coutTree(baseNode, 3);
//We build the node from the tag name
- QString const open_tag_string = openXMLTagString();
+ TQString const open_tag_string = openXMLTagString();
Node* new_node = kafkaCommon::createNode("", "", Tag::XmlTag, w);
new_node->tag->parse(open_tag_string, w);
new_node->tag->name = QuantaCommon::tagCase(new_node->tag->name);
@@ -1211,15 +1211,15 @@ void TagAction::deapplyTagInSelection(Node* start_node, int start_offset, Node*
// QuantaView *view = ViewManager::ref()->activeView();
// Document* w = view->document();
- QString const tag_name = XMLTagName();
+ TQString const tag_name = XMLTagName();
// Set start and end nodes to the correct node
start_node = kafkaCommon::getCorrectStartNode(start_node, start_offset);
end_node = kafkaCommon::getCorrectEndNode(end_node, end_offset);
// look for commonParent
- QValueList<int> commonParentStartChildLocation;
- QValueList<int> commonParentEndChildLocation;
+ TQValueList<int> commonParentStartChildLocation;
+ TQValueList<int> commonParentEndChildLocation;
Node* commonParent = kafkaCommon::DTDGetCommonParent(start_node, end_node, commonParentStartChildLocation, commonParentEndChildLocation, 0);
if(!commonParent) return;
@@ -1235,12 +1235,12 @@ void TagAction::deapplyTagInSelection(Node* start_node, int start_offset, Node*
Node* tag_parent = kafkaCommon::hasParent(start_node, end_node, tag_name);
Q_ASSERT(tag_parent);
- QString attribute_name(tag.attribute("attribute_name", QString()));
- QString attribute_value(tag.attribute("attribute_value", QString()));
+ TQString attribute_name(tag.attribute("attribute_name", TQString()));
+ TQString attribute_value(tag.attribute("attribute_value", TQString()));
if(!attribute_name.isEmpty() && !attribute_value.isEmpty())
{
- kafkaCommon::editNodeAttribute(tag_parent, attribute_name, QString(), modifs);
+ kafkaCommon::editNodeAttribute(tag_parent, attribute_name, TQString(), modifs);
}
else
diff --git a/quanta/utility/tagaction.h b/quanta/utility/tagaction.h
index addb35cf..56fcde0e 100644
--- a/quanta/utility/tagaction.h
+++ b/quanta/utility/tagaction.h
@@ -22,8 +22,8 @@
#include <kaction.h>
#include <kactioncollection.h>
-#include <qstring.h>
-#include <qdom.h>
+#include <tqstring.h>
+#include <tqdom.h>
class KMainWindow;
class QuantaView;
@@ -54,15 +54,15 @@ public:
* @param toggle If set to true, the class behaves like a KToggleAction;
* Else it behaves like a KAction. This avoids the multi-inheritance problem.
*/
- TagAction(QDomElement *element, KMainWindow *parentMainWindow, bool toggle = false);
+ TagAction(TQDomElement *element, KMainWindow *parentMainWindow, bool toggle = false);
virtual ~TagAction();
- QDomElement data() const { return tag; }
+ TQDomElement data() const { return tag; }
void setModified(bool modified) { m_modified = modified;}
bool isModified() const {return m_modified;}
- void setOutputFile(QFile* file);
- void setInputFileName(const QString& fileName);
- void addArguments(const QStringList& arguments);
+ void setOutputFile(TQFile* file);
+ void setInputFileName(const TQString& fileName);
+ void addArguments(const TQStringList& arguments);
bool toggable() const {return tag.attribute("toggable") == "true";}
bool toggled() const {return isChecked();}
@@ -70,18 +70,18 @@ public:
@param blocking in case of script actions, the script is run in blocking mode, if this argument is true
*/
void execute(bool blocking);
- QString type();
+ TQString type();
/**
* Remove accelerator from tag action name *
*/
- QString actionText();
+ TQString actionText();
- QString XMLTagName() const;
- QString openXMLTagString() const;
- QString closeXMLTagString() const;
+ TQString XMLTagName() const;
+ TQString openXMLTagString() const;
+ TQString closeXMLTagString() const;
signals:
- void showMessage(const QString& msg, bool append);
+ void showMessage(const TQString& msg, bool append);
void clearMessages();
void showMessagesView();
void createNewFile();
@@ -121,14 +121,14 @@ private:
bool loopStarted;
bool m_useInputFile;
bool m_useOutputFile;
- QString scriptOutputDest;
- QString scriptErrorDest;
- QTimer* timer;
- QDomElement tag;
- QFile* m_file;
+ TQString scriptOutputDest;
+ TQString scriptErrorDest;
+ TQTimer* timer;
+ TQDomElement tag;
+ TQFile* m_file;
KMainWindow *m_parentMainWindow;
- QString m_inputFileName;
- QStringList m_argsList;
+ TQString m_inputFileName;
+ TQStringList m_argsList;
uint m_killCount;
bool const m_toggle;
};
diff --git a/quanta/utility/tagactionmanager.cpp b/quanta/utility/tagactionmanager.cpp
index 21183073..3733aaaf 100644
--- a/quanta/utility/tagactionmanager.cpp
+++ b/quanta/utility/tagactionmanager.cpp
@@ -22,7 +22,7 @@
#include <klocale.h>
#include <dom/dom_node.h>
-#include <qwidget.h>
+#include <tqwidget.h>
#include "tagactionmanager.h"
#include "tagactionset.h"
@@ -54,7 +54,7 @@ TagActionManager* TagActionManager::self()
return s_mSelf;
}
-void TagActionManager::initActions(QWidget* parent)
+void TagActionManager::initActions(TQWidget* parent)
{
Q_ASSERT(parent);
@@ -69,14 +69,14 @@ void TagActionManager::initActions(QWidget* parent)
m_tagActionSets.append(table);
}
-void TagActionManager::fillWithTagActions(QWidget* widget, DOM::Node const& node)
+void TagActionManager::fillWithTagActions(TQWidget* widget, DOM::Node const& node)
{
TagActionSetAbstract* tagActionSet = 0;
for(tagActionSet = m_tagActionSets.first(); tagActionSet; tagActionSet = m_tagActionSets.next())
tagActionSet->fillWithTagActions(widget, node);
}
-bool TagActionManager::canIndentDTD(QString const& dtd)
+bool TagActionManager::canIndentDTD(TQString const& dtd)
{
return (dtd.contains("HTML", false) ||
dtd.contains("XML", false));
diff --git a/quanta/utility/tagactionmanager.h b/quanta/utility/tagactionmanager.h
index 533c3b39..6f5968c8 100644
--- a/quanta/utility/tagactionmanager.h
+++ b/quanta/utility/tagactionmanager.h
@@ -24,7 +24,7 @@ namespace DOM
class Node;
}
-#include <qptrlist.h>
+#include <tqptrlist.h>
class QWidget;
class TagActionSetAbstract;
@@ -48,9 +48,9 @@ public:
* @param widget The widget in wich the actions will be pluged.
* @param node The context/current node.
*/
- void fillWithTagActions(QWidget* widget, DOM::Node const& node);
+ void fillWithTagActions(TQWidget* widget, DOM::Node const& node);
- static bool canIndentDTD(QString const& dtd);
+ static bool canIndentDTD(TQString const& dtd);
KActionCollection* actionCollection() const
{
@@ -62,13 +62,13 @@ private:
TagActionManager(TagActionManager const&)
{}
- void initActions(QWidget* parent);
+ void initActions(TQWidget* parent);
private:
static TagActionManager* s_mSelf;
KActionCollection* m_actionCollection;
- QPtrList<TagActionSetAbstract> m_tagActionSets;
+ TQPtrList<TagActionSetAbstract> m_tagActionSets;
};
#endif
diff --git a/quanta/utility/tagactionset.cpp b/quanta/utility/tagactionset.cpp
index 691ad182..a74df537 100644
--- a/quanta/utility/tagactionset.cpp
+++ b/quanta/utility/tagactionset.cpp
@@ -23,7 +23,7 @@
#include <dom/dom_string.h>
#include <klocale.h>
-#include <qwidget.h>
+#include <tqwidget.h>
#include "tagactionset.h"
#include "tagactionmanager.h"
@@ -40,14 +40,14 @@
#include "resource.h"
-TagActionSetAbstract::TagActionSetAbstract(QObject *parent, const char *name)
- : QObject(parent, name), m_currentNode(0)
+TagActionSetAbstract::TagActionSetAbstract(TQObject *parent, const char *name)
+ : TQObject(parent, name), m_currentNode(0)
{}
TagActionSetAbstract::~TagActionSetAbstract()
{}
-Node* TagActionSetAbstract::parentTag(Node* node, QString const& tagName)
+Node* TagActionSetAbstract::parentTag(Node* node, TQString const& tagName)
{
Q_ASSERT(node);
@@ -58,7 +58,7 @@ Node* TagActionSetAbstract::parentTag(Node* node, QString const& tagName)
return aux;
}
-Node* TagActionSetAbstract::firstChildTag(Node* startParentNode, QString const& tagName)
+Node* TagActionSetAbstract::firstChildTag(Node* startParentNode, TQString const& tagName)
{
Node* aux = startParentNode;
while(aux && aux->nodeName().lower() != tagName)
@@ -71,7 +71,7 @@ Node* TagActionSetAbstract::firstChildTag(Node* startParentNode, QString const&
return aux;
}
-bool TagActionSetAbstract::fillWithTagActions(QWidget* /*widget*/, DOM::Node const& node)
+bool TagActionSetAbstract::fillWithTagActions(TQWidget* /*widget*/, DOM::Node const& node)
{
m_currentDomNode = node;
m_currentNode = KafkaDocument::ref()->getNode(m_currentDomNode);
@@ -81,7 +81,7 @@ bool TagActionSetAbstract::fillWithTagActions(QWidget* /*widget*/, DOM::Node con
//_____________________________________________________________________________
-TagActionSet::TagActionSet(QObject *parent, const char *name)
+TagActionSet::TagActionSet(TQObject *parent, const char *name)
: TagActionSetAbstract(parent, name), m_separator(0)
{
m_separator = new KActionSeparator();
@@ -92,31 +92,31 @@ bool TagActionSet::isInTagContext() const
return true;
}
-void TagActionSet::initActionMenus(QWidget* /*widget*/)
+void TagActionSet::initActionMenus(TQWidget* /*widget*/)
{
}
-void TagActionSet::initActions(QWidget* /*parent*/)
+void TagActionSet::initActions(TQWidget* /*parent*/)
{
KActionCollection* ac(TagActionManager::self()->actionCollection());
- QString actionName = "apply_source_indentation";
+ TQString actionName = "apply_source_indentation";
new KAction(i18n("Apply Source Indentation"), 0, this,
- SLOT(slotApplySourceIndentation()),
+ TQT_SLOT(slotApplySourceIndentation()),
ac, actionName);
actionName = "copy_div_element";
new KAction(i18n("Copy DIV Area"), 0, this,
- SLOT(slotCopyDivElement()),
+ TQT_SLOT(slotCopyDivElement()),
ac, actionName);
actionName = "cut_div_element";
new KAction(i18n("Cut DIV Area"), 0, this,
- SLOT(slotCutDivElement()),
+ TQT_SLOT(slotCutDivElement()),
ac, actionName);
}
-bool TagActionSet::fillWithTagActions(QWidget* widget, DOM::Node const& node)
+bool TagActionSet::fillWithTagActions(TQWidget* widget, DOM::Node const& node)
{
bool validNode = TagActionSetAbstract::fillWithTagActions(widget, node);
@@ -162,7 +162,7 @@ bool TagActionSet::fillWithTagActions(QWidget* widget, DOM::Node const& node)
return true;
}
-void TagActionSet::unplugAllActions(QWidget* widget) const
+void TagActionSet::unplugAllActions(TQWidget* widget) const
{
KActionCollection* ac(TagActionManager::self()->actionCollection());
@@ -238,7 +238,7 @@ void TagActionSet::slotCopyDivElement()
return;
}
- KafkaDocument::ref()->slotCopy(divNode, 0, divClosingNode, 0, QString());
+ KafkaDocument::ref()->slotCopy(divNode, 0, divClosingNode, 0, TQString());
}
void TagActionSet::slotCutDivElement()
@@ -260,13 +260,13 @@ void TagActionSet::slotCutDivElement()
int cursorOffset = selection_ind.cursorOffset();
- KafkaDocument::ref()->slotCut(divNode, 0, divClosingNode, 0, &m_currentNode, cursorOffset, QString());
+ KafkaDocument::ref()->slotCut(divNode, 0, divClosingNode, 0, &m_currentNode, cursorOffset, TQString());
}
//_____________________________________________________________________________
-TableTagActionSet::TableTagActionSet(QObject *parent, const char *name)
+TableTagActionSet::TableTagActionSet(TQObject *parent, const char *name)
: TagActionSetAbstract(parent, name), m_separator(0), m_tableActionMenu_0(0), m_insertActionMenu_1(0)
{
m_separator = new KActionSeparator();
@@ -277,7 +277,7 @@ bool TableTagActionSet::isInTagContext() const
return parentTag(m_currentNode, "table");
}
-void TableTagActionSet::initActionMenus(QWidget* widget)
+void TableTagActionSet::initActionMenus(TQWidget* widget)
{
Q_ASSERT(!m_tableActionMenu_0);
@@ -287,7 +287,7 @@ void TableTagActionSet::initActionMenus(QWidget* widget)
}
-void TableTagActionSet::initActions(QWidget* parent)
+void TableTagActionSet::initActions(TQWidget* parent)
{
if(!m_tableActionMenu_0)
initActionMenus(parent);
@@ -296,34 +296,34 @@ void TableTagActionSet::initActions(QWidget* parent)
// Insert___________________________________________________________________________
- QString actionName = "insert_table";
+ TQString actionName = "insert_table";
//m_actionNames += actionName;
new KAction(i18n("Table..."), 0, this,
- SLOT(slotInsertTable()),
+ TQT_SLOT(slotInsertTable()),
ac, actionName);
actionName = "insert_row_above";
//m_actionNames += actionName;
new KAction(i18n("Row Above"), 0, this,
- SLOT(slotInsertRowAbove()),
+ TQT_SLOT(slotInsertRowAbove()),
ac, actionName);
actionName = "insert_row_below";
//m_actionNames += actionName;
new KAction(i18n("Row Below"), 0, this,
- SLOT(slotInsertRowBelow()),
+ TQT_SLOT(slotInsertRowBelow()),
ac, actionName);
actionName = "insert_column_left";
//m_actionNames += actionName;
new KAction(i18n("Column Left"), 0, this,
- SLOT(slotInsertColumnLeft()),
+ TQT_SLOT(slotInsertColumnLeft()),
ac, actionName);
actionName = "insert_column_right";
//m_actionNames += actionName;
new KAction(i18n("Column Right"), 0, this,
- SLOT(slotInsertColumnRight()),
+ TQT_SLOT(slotInsertColumnRight()),
ac, actionName);
// Remove___________________________________________________________________________
@@ -331,31 +331,31 @@ void TableTagActionSet::initActions(QWidget* parent)
actionName = "remove_table";
//m_actionNames += actionName;
new KAction(i18n("Table"), 0, this,
- SLOT(slotRemoveTable()),
+ TQT_SLOT(slotRemoveTable()),
ac, actionName);
actionName = "remove_rows";
//m_actionNames += actionName;
new KAction(i18n("Row(s)"), 0, this,
- SLOT(slotRemoveRows()),
+ TQT_SLOT(slotRemoveRows()),
ac, actionName);
actionName = "remove_columns";
//m_actionNames += actionName;
new KAction(i18n("Column(s)"), 0, this,
- SLOT(slotRemoveColumns()),
+ TQT_SLOT(slotRemoveColumns()),
ac, actionName);
actionName = "remove_cells";
//m_actionNames += actionName;
new KAction(i18n("Cell(s)"), 0, this,
- SLOT(slotRemoveCells()),
+ TQT_SLOT(slotRemoveCells()),
ac, actionName);
actionName = "remove_cells_content";
//m_actionNames += actionName;
new KAction(i18n("Cell(s) Content"), 0, this,
- SLOT(slotRemoveCellsContent()),
+ TQT_SLOT(slotRemoveCellsContent()),
ac, actionName);
// Merge___________________________________________________________________________
@@ -363,11 +363,11 @@ void TableTagActionSet::initActions(QWidget* parent)
actionName = "merge_selected_cells";
//m_actionNames += actionName;
new KAction(i18n("Merge Selected Cells"), 0, this,
- SLOT(slotMergeSelectedCells()),
+ TQT_SLOT(slotMergeSelectedCells()),
ac, actionName);
}
-bool TableTagActionSet::fillWithTagActions(QWidget* widget, DOM::Node const& node)
+bool TableTagActionSet::fillWithTagActions(TQWidget* widget, DOM::Node const& node)
{
bool validNode = TagActionSetAbstract::fillWithTagActions(widget, node);
@@ -553,7 +553,7 @@ bool TableTagActionSet::fillWithTagActions(QWidget* widget, DOM::Node const& nod
return true;
}
-void TableTagActionSet::unplugAllActions(QWidget* widget) const
+void TableTagActionSet::unplugAllActions(TQWidget* widget) const
{
m_separator->unplugAll();
m_tableActionMenu_0->unplug(widget);
@@ -912,8 +912,8 @@ bool TableTagActionSet::canMergeSelectedCells() const
NodeSelectionInd selection;
selection.fillWithVPLCursorSelection();
- QValueList<int> start = selection.cursorNode();
- QValueList<int> end = selection.cursorNodeEndSel();
+ TQValueList<int> start = selection.cursorNode();
+ TQValueList<int> end = selection.cursorNodeEndSel();
return start != end;
}
@@ -960,7 +960,7 @@ void TableTagActionSet::slotMergeSelectedCells()
if(count == 1)
return;
- kafkaCommon::editNodeAttribute(startTd, "colspan", QString::number(count), modifs);
+ kafkaCommon::editNodeAttribute(startTd, "colspan", TQString::number(count), modifs);
kafkaCommon::editNodeAttribute(startTd, "rowspan", "1", modifs);
view->document()->docUndoRedo->addNewModifsSet(modifs, undoRedo::NodeTreeModif);
diff --git a/quanta/utility/tagactionset.h b/quanta/utility/tagactionset.h
index 6bb2448f..b5a962c5 100644
--- a/quanta/utility/tagactionset.h
+++ b/quanta/utility/tagactionset.h
@@ -24,7 +24,7 @@ class Node;
}
class KActionSeparator;
-#include <qobject.h>
+#include <tqobject.h>
class QWidget;
class KActionSet;
class KActionMenu;
@@ -39,21 +39,21 @@ class TagActionSetAbstract : public QObject
{
Q_OBJECT
public:
- TagActionSetAbstract(QObject *parent = 0, const char *name = 0);
+ TagActionSetAbstract(TQObject *parent = 0, const char *name = 0);
virtual ~TagActionSetAbstract();
DOM::Node const& currentDomNode() const {return m_currentDomNode;}
- static Node* parentTag(Node* node, QString const& tagName);
- static Node* firstChildTag(Node* node, QString const& tagName);
+ static Node* parentTag(Node* node, TQString const& tagName);
+ static Node* firstChildTag(Node* node, TQString const& tagName);
virtual bool isInTagContext(/*DOM::Node const& node*/) const = 0;
- virtual void initActions(QWidget* parent) = 0;
- virtual bool fillWithTagActions(QWidget* widget, DOM::Node const& node);
- virtual void unplugAllActions(QWidget* widget) const = 0;
+ virtual void initActions(TQWidget* parent) = 0;
+ virtual bool fillWithTagActions(TQWidget* widget, DOM::Node const& node);
+ virtual void unplugAllActions(TQWidget* widget) const = 0;
protected:
- virtual void initActionMenus(QWidget* widget) = 0;
+ virtual void initActionMenus(TQWidget* widget) = 0;
protected:
Node* m_currentNode;
@@ -67,13 +67,13 @@ class TagActionSet : public TagActionSetAbstract
{
Q_OBJECT
public:
- TagActionSet(QObject *parent = 0, const char *name = 0);
+ TagActionSet(TQObject *parent = 0, const char *name = 0);
virtual ~TagActionSet() {}
virtual bool isInTagContext() const;
- virtual void initActions(QWidget* parent);
- virtual bool fillWithTagActions(QWidget* widget, DOM::Node const& node);
- virtual void unplugAllActions(QWidget* widget) const;
+ virtual void initActions(TQWidget* parent);
+ virtual bool fillWithTagActions(TQWidget* widget, DOM::Node const& node);
+ virtual void unplugAllActions(TQWidget* widget) const;
public slots:
void slotApplySourceIndentation();
@@ -81,7 +81,7 @@ public slots:
void slotCutDivElement();
protected:
- virtual void initActionMenus(QWidget* widget);
+ virtual void initActionMenus(TQWidget* widget);
private:
bool isInDivArea() const;
@@ -95,14 +95,14 @@ class TableTagActionSet : public TagActionSetAbstract
{
Q_OBJECT
public:
- TableTagActionSet(QObject *parent = 0, const char *name = 0);
+ TableTagActionSet(TQObject *parent = 0, const char *name = 0);
virtual ~TableTagActionSet()
{}
virtual bool isInTagContext(/*DOM::Node const& node*/) const;
- virtual void initActions(QWidget* parent);
- virtual bool fillWithTagActions(QWidget* widget, DOM::Node const& node);
- virtual void unplugAllActions(QWidget* widget) const;
+ virtual void initActions(TQWidget* parent);
+ virtual bool fillWithTagActions(TQWidget* widget, DOM::Node const& node);
+ virtual void unplugAllActions(TQWidget* widget) const;
public slots:
// Insert
@@ -121,7 +121,7 @@ public slots:
void slotMergeSelectedCells();
protected:
- virtual void initActionMenus(QWidget* widget);
+ virtual void initActionMenus(TQWidget* widget);
private:
// Insert
diff --git a/quanta/utility/toolbartabwidget.cpp b/quanta/utility/toolbartabwidget.cpp
index 03c6e86b..29c7cfa9 100644
--- a/quanta/utility/toolbartabwidget.cpp
+++ b/quanta/utility/toolbartabwidget.cpp
@@ -13,14 +13,14 @@
***************************************************************************/
//qt includes
-#include <qevent.h>
-#include <qlayout.h>
-#include <qobjectlist.h>
-#include <qpoint.h>
-#include <qtabbar.h>
-#include <qwidgetstack.h>
-#include <qtabwidget.h>
-#include <qfontmetrics.h>
+#include <tqevent.h>
+#include <tqlayout.h>
+#include <tqobjectlist.h>
+#include <tqpoint.h>
+#include <tqtabbar.h>
+#include <tqwidgetstack.h>
+#include <tqtabwidget.h>
+#include <tqfontmetrics.h>
//kde includes
#include <kaction.h>
@@ -38,45 +38,45 @@
//app includes
#include "toolbartabwidget.h"
-ToolbarTabWidget::ToolbarTabWidget(QWidget * parent, const char * name, WFlags f)
-:QTabWidget(parent, name, f)
+ToolbarTabWidget::ToolbarTabWidget(TQWidget * parent, const char * name, WFlags f)
+:TQTabWidget(parent, name, f)
{
m_popupMenu = new KPopupMenu(this);
m_popupMenu->insertTitle(i18n("Toolbar Menu"), 1);
- m_popupMenu->insertItem(i18n("New Action..."), parent, SLOT(slotNewAction()));
+ m_popupMenu->insertItem(i18n("New Action..."), parent, TQT_SLOT(slotNewAction()));
m_popupMenu->insertSeparator();
- m_popupMenu->insertItem(i18n("New Toolbar..."), parent, SLOT(slotAddToolbar()));
- m_popupMenu->insertItem(i18n("Remove Toolbar"), this, SLOT(slotRemoveToolbar()));
- m_popupMenu->insertItem(i18n("Rename Toolbar..."), this, SLOT(slotRenameToolbar()));
- m_popupMenu->insertItem(SmallIconSet("configure_toolbars"), i18n("Configure Toolbars..."), this, SLOT(slotEditToolbar()));
+ m_popupMenu->insertItem(i18n("New Toolbar..."), parent, TQT_SLOT(slotAddToolbar()));
+ m_popupMenu->insertItem(i18n("Remove Toolbar"), this, TQT_SLOT(slotRemoveToolbar()));
+ m_popupMenu->insertItem(i18n("Rename Toolbar..."), this, TQT_SLOT(slotRenameToolbar()));
+ m_popupMenu->insertItem(SmallIconSet("configure_toolbars"), i18n("Configure Toolbars..."), this, TQT_SLOT(slotEditToolbar()));
- connect(this, SIGNAL(removeToolbar(const QString&)),
- parent, SLOT(slotRemoveToolbar(const QString&)));
- connect(this, SIGNAL(renameToolbar(const QString&)),
- parent, SLOT(slotRenameToolbar(const QString&)));
- connect(this, SIGNAL(editToolbar(const QString&)),
- parent, SLOT(slotConfigureToolbars(const QString&)));
- connect(this, SIGNAL(newAction()),
- parent, SLOT(slotNewAction()));
- connect(this, SIGNAL(addToolbar()),
- parent, SLOT(slotAddToolbar()));
+ connect(this, TQT_SIGNAL(removeToolbar(const TQString&)),
+ parent, TQT_SLOT(slotRemoveToolbar(const TQString&)));
+ connect(this, TQT_SIGNAL(renameToolbar(const TQString&)),
+ parent, TQT_SLOT(slotRenameToolbar(const TQString&)));
+ connect(this, TQT_SIGNAL(editToolbar(const TQString&)),
+ parent, TQT_SLOT(slotConfigureToolbars(const TQString&)));
+ connect(this, TQT_SIGNAL(newAction()),
+ parent, TQT_SLOT(slotNewAction()));
+ connect(this, TQT_SIGNAL(addToolbar()),
+ parent, TQT_SLOT(slotAddToolbar()));
KAcceleratorManager::setNoAccel(this);
}
-void ToolbarTabWidget::insertTab(QWidget *child, const QString &label, const QString &id)
+void ToolbarTabWidget::insertTab(TQWidget *child, const TQString &label, const TQString &id)
{
if (child->inherits("KToolBar") && child->parentWidget())
{
- QTabWidget::insertTab(child->parentWidget(), label);
+ TQTabWidget::insertTab(child->parentWidget(), label);
toolbarList.insert(id, child);
}
}
-QWidget* ToolbarTabWidget::page(int index)
+TQWidget* ToolbarTabWidget::page(int index)
{
- QWidget *w = QTabWidget::page(index);
+ TQWidget *w = TQTabWidget::page(index);
- for (QMap<QString, QWidget*>::Iterator it = toolbarList.begin(); it != toolbarList.end(); ++it)
+ for (TQMap<TQString, TQWidget*>::Iterator it = toolbarList.begin(); it != toolbarList.end(); ++it)
{
if (it.data()->parentWidget() == w)
{
@@ -87,10 +87,10 @@ QWidget* ToolbarTabWidget::page(int index)
return w;
}
-QString ToolbarTabWidget::id(QWidget *w) const
+TQString ToolbarTabWidget::id(TQWidget *w) const
{
- QString idStr;
- for (QMap<QString, QWidget*>::ConstIterator it = toolbarList.constBegin(); it != toolbarList.constEnd(); ++it)
+ TQString idStr;
+ for (TQMap<TQString, TQWidget*>::ConstIterator it = toolbarList.constBegin(); it != toolbarList.constEnd(); ++it)
{
if (it.data()->parentWidget() == w)
{
@@ -101,11 +101,11 @@ QString ToolbarTabWidget::id(QWidget *w) const
return idStr;
}
-QString ToolbarTabWidget::id(int index) const
+TQString ToolbarTabWidget::id(int index) const
{
- QWidget *w = QTabWidget::page(index);
- QString idStr;
- for (QMap<QString, QWidget*>::ConstIterator it = toolbarList.constBegin(); it != toolbarList.constEnd(); ++it)
+ TQWidget *w = TQTabWidget::page(index);
+ TQString idStr;
+ for (TQMap<TQString, TQWidget*>::ConstIterator it = toolbarList.constBegin(); it != toolbarList.constEnd(); ++it)
{
if (it.data()->parentWidget() == w)
{
@@ -116,19 +116,19 @@ QString ToolbarTabWidget::id(int index) const
return idStr;
}
-QWidget* ToolbarTabWidget::page(const QString& id)
+TQWidget* ToolbarTabWidget::page(const TQString& id)
{
- QWidget *w = toolbarList.find(id).data();
+ TQWidget *w = toolbarList.find(id).data();
return w;
}
-void ToolbarTabWidget::removePage(QWidget * w)
+void ToolbarTabWidget::removePage(TQWidget * w)
{
- QWidget *parent = w->parentWidget();
+ TQWidget *parent = w->parentWidget();
if (w->inherits("KToolBar") && parent)
{
- QTabWidget::removePage(parent);
- for (QMap<QString, QWidget*>::ConstIterator it = toolbarList.constBegin(); it != toolbarList.constEnd(); ++it)
+ TQTabWidget::removePage(parent);
+ for (TQMap<TQString, TQWidget*>::ConstIterator it = toolbarList.constBegin(); it != toolbarList.constEnd(); ++it)
{
if (it.data() == w)
{
@@ -155,21 +155,21 @@ void ToolbarTabWidget::slotEditToolbar()
emit editToolbar(tabUnderMouseLabel + " <quanta>");
}
-void ToolbarTabWidget::mousePressEvent ( QMouseEvent * e )
+void ToolbarTabWidget::mousePressEvent ( TQMouseEvent * e )
{
if (e->button() == Qt::RightButton)
{
- QPoint p = e->globalPos();
- QTab *tab = 0L;
- QWidget *pageW = 0L;
+ TQPoint p = e->globalPos();
+ TQTab *tab = 0L;
+ TQWidget *pageW = 0L;
for (int i =0; i < tabBar()->count(); i++)
{
tab = tabBar()->tabAt(i);
pageW = page(i);
- QRect r = tab->rect();
- QPoint p1 = mapToGlobal(r.topLeft());
- QPoint p2 = mapToGlobal(r.bottomRight());
- if (QRect(p1, p2).contains(p))
+ TQRect r = tab->rect();
+ TQPoint p1 = mapToGlobal(r.topLeft());
+ TQPoint p2 = mapToGlobal(r.bottomRight());
+ if (TQRect(p1, p2).contains(p))
break;
else
tab = 0L;
@@ -177,7 +177,7 @@ void ToolbarTabWidget::mousePressEvent ( QMouseEvent * e )
tabUnderMouseLabel = tab ? tab->text() : label(currentPageIndex());
if (!pageW)
pageW = currentPage();
- for (QMap<QString, QWidget*>::Iterator it = toolbarList.begin(); it != toolbarList.end(); ++it)
+ for (TQMap<TQString, TQWidget*>::Iterator it = toolbarList.begin(); it != toolbarList.end(); ++it)
{
if (it.data()->parentWidget() == pageW)
{
@@ -191,14 +191,14 @@ void ToolbarTabWidget::mousePressEvent ( QMouseEvent * e )
}
-void ToolbarTabWidget::resizeEvent(QResizeEvent *e)
+void ToolbarTabWidget::resizeEvent(TQResizeEvent *e)
{
- QWidget::resizeEvent(e);
- QWidget *tb;
- for (QMap<QString, QWidget*>::Iterator it = toolbarList.begin(); it != toolbarList.end(); ++it)
+ TQWidget::resizeEvent(e);
+ TQWidget *tb;
+ for (TQMap<TQString, TQWidget*>::Iterator it = toolbarList.begin(); it != toolbarList.end(); ++it)
{
tb = it.data();
- tb->resize(QSize(width(), tb->height()));
+ tb->resize(TQSize(width(), tb->height()));
}
int i = currentPageIndex();
if (i > 0)
@@ -217,13 +217,13 @@ int ToolbarTabWidget::tabHeight() const
int height = tabBar()->height();
if (height < 2)
{
- height = QFontMetrics(KGlobalSettings::generalFont()).height() + 12;
+ height = TQFontMetrics(KGlobalSettings::generalFont()).height() + 12;
}
return height;
}
-QuantaToolBar::QuantaToolBar(QWidget *parent, const char *name, bool honor_style, bool readConfig)
+QuantaToolBar::QuantaToolBar(TQWidget *parent, const char *name, bool honor_style, bool readConfig)
:KToolBar (parent, name=0, honor_style, readConfig)
{
m_popupMenu = new KPopupMenu(this);
@@ -235,8 +235,8 @@ QuantaToolBar::QuantaToolBar(QWidget *parent, const char *name, bool honor_style
m_iconTextMenu->insertItem(i18n("Text Only"), 1);
m_iconTextMenu->insertItem(i18n("Text Alongside Icons"), 2);
m_iconTextMenu->insertItem(i18n("Text Under Icons"), 3);
- connect(m_iconTextMenu, SIGNAL(activated(int)), SLOT(slotIconTextChanged(int)));
- connect(m_iconTextMenu, SIGNAL(aboutToShow()), SLOT(slotIconTextMenuAboutToShow()));
+ connect(m_iconTextMenu, TQT_SIGNAL(activated(int)), TQT_SLOT(slotIconTextChanged(int)));
+ connect(m_iconTextMenu, TQT_SIGNAL(aboutToShow()), TQT_SLOT(slotIconTextMenuAboutToShow()));
setIconText(ToolbarTabWidget::ref()->iconText(), false);
}
@@ -263,7 +263,7 @@ void QuantaToolBar::slotIconTextChanged(int id)
{
ToolbarTabWidget *toolbarTab = ToolbarTabWidget::ref();
int width = toolbarTab->width();
- int bigHeight = iconSize() + QFontMetrics(KGlobalSettings::toolBarFont()).height() + 10;
+ int bigHeight = iconSize() + TQFontMetrics(KGlobalSettings::toolBarFont()).height() + 10;
int normalHeight = iconSize() + 10;
for (int i = 0; i < toolbarTab->count(); i++)
{
@@ -294,41 +294,41 @@ void QuantaToolBar::slotIconTextChanged(int id)
}
}
-void QuantaToolBar::mousePressEvent(QMouseEvent *e)
+void QuantaToolBar::mousePressEvent(TQMouseEvent *e)
{
if (e->button() == Qt::RightButton)
{
m_popupMenu->clear();
- QPoint p = e->globalPos();
+ TQPoint p = e->globalPos();
if (m_toolbarTab)
{
m_toolbarTab->tabUnderMouse = m_toolbarTab->id(m_toolbarTab->currentPageIndex());
m_toolbarTab->tabUnderMouseLabel = m_toolbarTab->label(m_toolbarTab->currentPageIndex());
m_popupMenu->insertTitle(i18n("Toolbar Menu") + " - "
+ i18n(m_toolbarTab->tabUnderMouseLabel.utf8()));
- m_popupMenu->insertItem(i18n("New Action..."), m_toolbarTab, SIGNAL(newAction()));
- QObjectList* childrenList = queryList("KToolBarButton");
+ m_popupMenu->insertItem(i18n("New Action..."), m_toolbarTab, TQT_SIGNAL(newAction()));
+ TQObjectList* childrenList = queryList("KToolBarButton");
for (uint i = 0; i < childrenList->count(); i++)
{
KToolBarButton *w = static_cast<KToolBarButton*>(childrenList->at(i));
- QPoint p1 = w->parentWidget()->mapToGlobal(w->pos());
- QPoint p2 = QPoint(p1.x() + w->width(), p1.y()+w->height());
- if (QRect(p1, p2).contains(p))
+ TQPoint p1 = w->parentWidget()->mapToGlobal(w->pos());
+ TQPoint p2 = TQPoint(p1.x() + w->width(), p1.y()+w->height());
+ if (TQRect(p1, p2).contains(p))
{
currentActionName = w->textLabel();
- QString actionName = currentActionName;
- m_popupMenu->insertItem(i18n("Remove Action - %1").arg(actionName.replace('&',"&&")), this, SLOT(slotRemoveAction()));
- m_popupMenu->insertItem(i18n("Edit Action - %1").arg(actionName), this, SLOT(slotEditAction()));
+ TQString actionName = currentActionName;
+ m_popupMenu->insertItem(i18n("Remove Action - %1").arg(actionName.replace('&',"&&")), this, TQT_SLOT(slotRemoveAction()));
+ m_popupMenu->insertItem(i18n("Edit Action - %1").arg(actionName), this, TQT_SLOT(slotEditAction()));
break;
}
}
m_popupMenu->insertSeparator();
- m_popupMenu->insertItem(i18n("New Toolbar..."), m_toolbarTab, SIGNAL(addToolbar()));
- m_popupMenu->insertItem(i18n("Remove Toolbar"), m_toolbarTab, SLOT(slotRemoveToolbar()));
- m_popupMenu->insertItem(i18n("Rename Toolbar..."), m_toolbarTab, SLOT(slotRenameToolbar()));
+ m_popupMenu->insertItem(i18n("New Toolbar..."), m_toolbarTab, TQT_SIGNAL(addToolbar()));
+ m_popupMenu->insertItem(i18n("Remove Toolbar"), m_toolbarTab, TQT_SLOT(slotRemoveToolbar()));
+ m_popupMenu->insertItem(i18n("Rename Toolbar..."), m_toolbarTab, TQT_SLOT(slotRenameToolbar()));
m_popupMenu->insertSeparator();
m_popupMenu->insertItem( i18n("Text Position"), m_iconTextMenu);
- m_popupMenu->insertItem(SmallIconSet("configure_toolbars"), i18n("Configure Toolbars..."), m_toolbarTab, SLOT(slotEditToolbar()));
+ m_popupMenu->insertItem(SmallIconSet("configure_toolbars"), i18n("Configure Toolbars..."), m_toolbarTab, TQT_SLOT(slotEditToolbar()));
}
m_popupMenu->popup(p);
}
@@ -341,7 +341,7 @@ void QuantaToolBar::slotEditAction()
void QuantaToolBar::slotRemoveAction()
{
- if ( KMessageBox::warningContinueCancel(this, i18n("<qt>Are you sure you want to remove the <b>%1</b> action?</qt>").arg(currentActionName),QString::null,KStdGuiItem::del()) == KMessageBox::Continue )
+ if ( KMessageBox::warningContinueCancel(this, i18n("<qt>Are you sure you want to remove the <b>%1</b> action?</qt>").arg(currentActionName),TQString::null,KStdGuiItem::del()) == KMessageBox::Continue )
{
emit removeAction(m_toolbarTab->tabUnderMouse, currentActionName);
}
diff --git a/quanta/utility/toolbartabwidget.h b/quanta/utility/toolbartabwidget.h
index aa800ae6..2fcc6718 100644
--- a/quanta/utility/toolbartabwidget.h
+++ b/quanta/utility/toolbartabwidget.h
@@ -15,8 +15,8 @@
#ifndef TOOLBARTABWIDGET_H
#define TOOLBARTABWIDGET_H
-#include <qwidget.h>
-#include <qmap.h>
+#include <tqwidget.h>
+#include <tqmap.h>
class QTabWidget;
class KPopupMenu;
@@ -28,9 +28,9 @@ class ToolbarTabWidget: public QTabWidget
{
Q_OBJECT
public:
- QWidgetStack *m_widgetStack;
+ TQWidgetStack *m_widgetStack;
- static ToolbarTabWidget* const ref(QWidget *parent = 0L, const char *name = 0L)
+ static ToolbarTabWidget* const ref(TQWidget *parent = 0L, const char *name = 0L)
{
static ToolbarTabWidget *m_ref;
if (!m_ref) m_ref = new ToolbarTabWidget (parent, name);
@@ -38,18 +38,18 @@ public:
}
virtual ~ToolbarTabWidget(){};
- virtual void insertTab(QWidget *child, const QString &label, const QString &id);
- virtual QWidget* page(int index);
- virtual QWidget* page(const QString& id);
+ virtual void insertTab(TQWidget *child, const TQString &label, const TQString &id);
+ virtual TQWidget* page(int index);
+ virtual TQWidget* page(const TQString& id);
int tabHeight() const;
- QString id(QWidget *w) const;
- QString id(int index) const;
+ TQString id(TQWidget *w) const;
+ TQString id(int index) const;
KToolBar::IconText iconText() const {return m_iconText;}
void setIconText(KToolBar::IconText mode) {m_iconText = mode; emit iconTextModeChanged();}
public slots:
- virtual void removePage(QWidget * w );
- virtual void resizeEvent(QResizeEvent *);
+ virtual void removePage(TQWidget * w );
+ virtual void resizeEvent(TQResizeEvent *);
private slots:
void slotRemoveToolbar();
@@ -57,26 +57,26 @@ private slots:
void slotEditToolbar();
signals:
- void removeToolbar(const QString&);
- void renameToolbar(const QString&);
- void editToolbar(const QString&);
+ void removeToolbar(const TQString&);
+ void renameToolbar(const TQString&);
+ void editToolbar(const TQString&);
void newAction();
void addToolbar();
void iconTextModeChanged();
public:
- QString tabUnderMouse;
- QString tabUnderMouseLabel;
+ TQString tabUnderMouse;
+ TQString tabUnderMouseLabel;
protected:
- virtual void mousePressEvent ( QMouseEvent * e );
+ virtual void mousePressEvent ( TQMouseEvent * e );
KPopupMenu *m_popupMenu;
- QTabBar *m_tabBar;
- QMap<QString, QWidget*> toolbarList;
+ TQTabBar *m_tabBar;
+ TQMap<TQString, TQWidget*> toolbarList;
private:
- ToolbarTabWidget(QWidget * parent = 0, const char * name = 0, WFlags f = 0);
+ ToolbarTabWidget(TQWidget * parent = 0, const char * name = 0, WFlags f = 0);
KToolBar::IconText m_iconText;
};
@@ -86,7 +86,7 @@ class QuantaToolBar: public KToolBar
Q_OBJECT
public:
- QuantaToolBar (QWidget *parent, const char *name=0, bool honor_style=FALSE, bool readConfig=TRUE);
+ QuantaToolBar (TQWidget *parent, const char *name=0, bool honor_style=FALSE, bool readConfig=TRUE);
virtual ~QuantaToolBar() {};
private slots:
@@ -96,16 +96,16 @@ private slots:
void slotIconTextMenuAboutToShow();
signals:
- void removeAction(const QString&, const QString&);
- void editAction(const QString&);
+ void removeAction(const TQString&, const TQString&);
+ void editAction(const TQString&);
protected:
- virtual void mousePressEvent ( QMouseEvent * e );
+ virtual void mousePressEvent ( TQMouseEvent * e );
KPopupMenu *m_popupMenu;
KPopupMenu *m_iconTextMenu;
ToolbarTabWidget *m_toolbarTab;
- QString currentActionName;
+ TQString currentActionName;
};
#endif
diff --git a/quanta/utility/toolbarxmlgui.cpp b/quanta/utility/toolbarxmlgui.cpp
index 1d7d1558..0292e188 100644
--- a/quanta/utility/toolbarxmlgui.cpp
+++ b/quanta/utility/toolbarxmlgui.cpp
@@ -15,7 +15,7 @@
#include "toolbarxmlgui.h"
-ToolbarXMLGUI::ToolbarXMLGUI(const QString& xmlFile)
+ToolbarXMLGUI::ToolbarXMLGUI(const TQString& xmlFile)
: KXMLGUIClient()
{
setLocalXMLFile(xmlFile);
diff --git a/quanta/utility/toolbarxmlgui.h b/quanta/utility/toolbarxmlgui.h
index 74ac04cf..3043424a 100644
--- a/quanta/utility/toolbarxmlgui.h
+++ b/quanta/utility/toolbarxmlgui.h
@@ -25,7 +25,7 @@
class ToolbarXMLGUI : public KXMLGUIClient {
public:
- ToolbarXMLGUI(const QString& xmlFile);
+ ToolbarXMLGUI(const TQString& xmlFile);
~ToolbarXMLGUI();
};