summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:54:04 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:54:04 +0000
commitdc6b8e72fed2586239e3514819238c520636c9d9 (patch)
tree88b200df0a0b7fab9d6f147596173556f1ed9a13
parent6927d4436e54551917f600b706a8d6109e49de1c (diff)
downloadtdewebdev-dc6b8e72fed2586239e3514819238c520636c9d9.tar.gz
tdewebdev-dc6b8e72fed2586239e3514819238c520636c9d9.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdewebdev@1157656 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
-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;